Source: https://ailoot.ai/models/da/qwen3-8-flash/
Canonical: https://ailoot.ai/models/da/qwen3-8-flash/
Language: da

# Qwen: Qwen3.8 Flash

[Markdown](https://ailoot.ai/models/da/qwen3-8-flash/index.md) · [JSON](https://ailoot.ai/models/da/qwen3-8-flash/facts.json)

## [Qwen: Qwen3.8 Flash](https://ailoot.ai/models/da/qwen3-8-flash/)

Multimodal model til softwareagenter og kontoropgaver med stor kontekst. I Ailoot analyserer den tekst og billeder og leverer et tekstsvar.

- [**Ailoot · Anthropic Messages** `POST /v1/messages` `qwen3.8-flash`](https://ailoot.ai/models/da/qwen3-8-flash/#method-0)
- [**Ailoot · OpenAI Responses** `POST /v1/responses` `qwen3.8-flash`](https://ailoot.ai/models/da/qwen3-8-flash/#method-1)
- [**Ailoot · OpenAI Chat** `POST /v1/chat/completions` `qwen3.8-flash`](https://ailoot.ai/models/da/qwen3-8-flash/#method-2)
- [**Ailoot Ultra · OpenAI Chat** `POST /v1/chat/completions` `qwen3.8-flash`](https://ailoot.ai/models/da/qwen3-8-flash/#method-3)
- [**Ailoot Ultra · Anthropic Messages** `POST /v1/messages` `qwen3.8-flash`](https://ailoot.ai/models/da/qwen3-8-flash/#method-4)
- [**Ailoot · Anthropic Messages** `POST /v1/messages` `qwen-flash`](https://ailoot.ai/models/da/qwen3-8-flash/#method-5)
- [**Ailoot · OpenAI Responses** `POST /v1/responses` `qwen-flash`](https://ailoot.ai/models/da/qwen3-8-flash/#method-6)
- [**Ailoot · OpenAI Chat** `POST /v1/chat/completions` `qwen-flash`](https://ailoot.ai/models/da/qwen3-8-flash/#method-7)
- [**Ailoot · Anthropic Messages** `POST /v1/messages` `qwen-flash-latest`](https://ailoot.ai/models/da/qwen3-8-flash/#method-8)
- [**Ailoot · OpenAI Responses** `POST /v1/responses` `qwen-flash-latest`](https://ailoot.ai/models/da/qwen3-8-flash/#method-9)
- [**Ailoot · OpenAI Chat** `POST /v1/chat/completions` `qwen-flash-latest`](https://ailoot.ai/models/da/qwen3-8-flash/#method-10)
- [**Ailoot Ultra · OpenAI Chat** `POST /v1/chat/completions` `qwen/qwen3.8-flash`](https://ailoot.ai/models/da/qwen3-8-flash/#method-11)
- [**Ailoot Ultra · Anthropic Messages** `POST /v1/messages` `qwen/qwen3.8-flash`](https://ailoot.ai/models/da/qwen3-8-flash/#method-12)

Om modellen

Denne beskrivelse dækker modellens funktioner. Tilgængelige input, output og indstillinger i Ailoot står nedenfor for den valgte metode.

Qwen3.8-Flash kombinerer softwareudvikling, sekventielt kontorarbejde og forståelse af visuelt materiale. Alibaba beskriver den som en model til en agent, der planlægger handlinger, får feedback og præciserer de næste skridt. Blandt de beskrevne anvendelser er at skabe og videreudvikle softwareværktøjer, arbejde med forretningsmateriale og løse opgaver, hvor løsningen afhænger af indholdet på en skærm eller i et dokument.

Arkitekturen har 125 milliarder parametre, hvoraf 6 milliarder aktiveres for én token. Hybrid attention kombinerer GDN og QSA for at fastholde en lang sekvens og udtrække de nødvendige oplysninger. Mekanismen med residualforbindelser deler informationsstrømmen i fire parallelle grene, og mekanismen N-gram Embedding tilføjer 51 milliarder parametre; træningen bruger optimeringsalgoritmen Muon. Denne opbygning vedrører modellens interne struktur. Det aktuelle Ailoot-kort viser tekst og billeder som input og tekst som output. Alibaba beskriver også fælles behandling af video; videoinput kræver særskilt understøttelse og findes ikke i kortets aktuelle metoder.

#### Visuelt materiale i arbejdsprocessen

Modellen kan analysere skærmbilleder, udtrække tekst fra dokumenter og bruge billeder som grundlag for at udarbejde kode. I den variant, Alibaba beskriver, analyseres video gennem frames: det gør det muligt at beskrive hændelser, udtrække indholdet i en undervisningsvideo og kontrollere visuelle detaljer. Modellens eget output er tekst — en forklaring, programkode, et værktøjskald eller strukturerede oplysninger.

Funktioner, som udføres af den tilsluttede applikation, understøttes. I ræsonnementstilstanden afgør modellen først, hvilke handlinger der er nødvendige, og hvordan resultatet bruges, og fortsætter derefter svaret. Bevarelse af tidligere ræsonnement understøtter længere værktøjsarbejde. Struktureret output egner sig til udtræk af data, der efterfølgende behandles af et program; den ønskede struktur og felttyper kan angives. Hos producenten gælder skemaer med strenge strukturkrav for tekstforespørgsler. Ved billeder og andre multimodale data erstattes `json_schema` automatisk med `json_object`: resultatet er JSON, men det angivne skemas begrænsninger anvendes ikke. Tilgængeligheden af disse indstillinger afhænger af den valgte Ailoot-metode.

#### To måder at svare på

Qwen3.8-Flash understøtter ræsonnement og direkte svar. Hos producenten er ræsonnement aktiveret som standard med standardintensiteten `xhigh`; understøttelsen af indstillingerne afhænger af den valgte metode. `low` er beregnet til enkle spørgsmål og udtræk af oplysninger, `medium` til daglig udvikling og dokumentarbejde og `xhigh` til kompleks kode, matematiske beviser og arkitekturopgaver. Den valgte dybde påvirker den indledende analyses omfang. Hvis den valgte metode stiller indstillingerne til rådighed, bruges hos producenten enten `reasoning_effort` eller `thinking_budget`; angivelse af begge giver en fejl. Når ræsonnement er slået fra, formulerer modellen svaret direkte.

Konteksten rummer 1 000 000 tokens. Den maksimale inputlængde er 991 808 tokens, eller 983 616 i ræsonnementstilstand. Det maksimale output er 131 072 tokens, og den særskilte ræsonnementsgrænse 262 144. Alibabas visuelle specifikation angiver billeder på op til 16 millioner pixels og videoer på op til to timer og 2 GB. Producenten tillader op til 2048 billeder via adresse eller op til 250 billeder i Base64 samt op til 64 videoer pr. forespørgsel. Disse grænser gælder sammen med den samlede kontekst og beskriver producentens variant; Ailoots aktuelle metoder offentliggør tekst og billeder som input, ikke videoinput eller disse kvantitative grænser.

Den gentagne del af konteksten kan caches til senere forespørgsler. Mekanismen arbejder med inputmaterialets fælles begyndelse; dens tilstedeværelse ændrer ikke opgavens indhold og betyder ikke, at enhver forespørgsel nødvendigvis bruger tidligere gemt kontekst.

Praktisk opgave

### Praktisk opgave

Teknisk eksempel på engelsk

```
Reconcile a business table and note

Reconcile this table: Team A opened 30 cases and closed 24; Team B opened 20 and closed 25. Manager note: “Both backlogs fell.” Assume no transfers or other adjustments. Calculate each team’s backlog change, assess the note and draft a corrected two-sentence update. Keep calculations separate from proposed explanations.
```

#### Forventet resultat

```
Two net-change calculations, an assessment of the note and a corrected short update.
```

#### Kontrollér resultatet

```
Check the sign convention and avoid inventing a cause for either team’s change.
```

**Ailoot · Anthropic Messages** `POST /v1/messages` `qwen3.8-flash`

[`qwen3.8-flash`](https://ailoot.ai/models/da/#m=qwen%2Fqwen3.8-flash&route=Core&caller=qwen3.8-flash&fmt=messages)

Alibaba /`qwen3.8-flash`

Model-ID

- `qwen3.8-flash`
- `qwen-flash`
- `qwen-flash-latest`

### Start

Multimodal model til softwareagenter og kontoropgaver med stor kontekst. I Ailoot analyserer den tekst og billeder og leverer et tekstsvar.

Accepterede input

Tekst · Billeder

Resultater

Tekst

### Tilgængelig i Ailoot · input og metoder

**Ailoot · Anthropic Messages** `POST /v1/messages`

Inputtyper

`text`, `image`

Outputtyper

`text`

Kontekst

991.808 tokens

Maksimalt output

131.072 tokens

Outputformat

json eller SSE

| Felt | Type | Krav | Værdier og grænser | Standard |
| --- | --- | --- | --- | --- |
| Felt`model` | Type`string` | KravPåkrævet | Værdier og grænser qwen3.8-flash | Standard— |
| Felt`messages` | Type`message[]` | KravPåkrævet | Værdier og grænser Minimumsantal elementer: 1 | Standard— |
| Felt`messages[].role` | Type`string` | KravPåkrævet | Værdier og grænser user, assistant | Standard— |
| Felt`messages[].content` | Type`string\|content_block[]` | KravPåkrævet | Værdier og grænser | Standard— |
| Felt`system` | Type`string\|content_block[]` | KravValgfrit | Værdier og grænser | Standard— |
| Felt`max_tokens` | Type`integer` | KravPåkrævet | Værdier og grænser Minimum: 1 Grænsen gælder for: den præcise øvre grænse for valgt model/modelkort | Standard— |
| Felt`stream` | Type`boolean` | KravValgfrit | Værdier og grænser | Standardfalse |
| Felt`temperature` | Type`number` | KravValgfrit | Værdier og grænser Afhænger af modellen | Standard— |
| Felt`top_p` | Type`number` | KravValgfrit | Værdier og grænser Afhænger af modellen | Standard— |
| Felt`stop_sequences` | Type`string[]` | KravValgfrit | Værdier og grænser Afhænger af modellen | Standard— |
| Felt`tools` | Type`tool[]` | KravValgfrit | Værdier og grænser Afhænger af modellen | Standard— |
| Felt`tools[].name` | Type`string` | KravValgfrit | Værdier og grænser Gælder når: værktøj angivet | Standard— |
| Felt`tools[].description` | Type`string` | KravValgfrit | Værdier og grænser | Standard— |
| Felt`tools[].input_schema` | Type`JSON_schema` | KravValgfrit | Værdier og grænser | Standard— |
| Felt`tool_choice` | Type`object` | KravValgfrit | Værdier og grænser Afhænger af modellen | Standard— |
| Felt`thinking.type` | Type`string` | KravValgfrit | Værdier og grænser Afhænger af modellen | Standard— |
| Felt`thinking.budget_tokens` | Type`integer` | KravValgfrit | Værdier og grænser Afhænger af modellen | Standard— |
| Felt`output_config.effort` | Type`string` | KravValgfrit | Værdier og grænser Afhænger af modellen | Standard— |
| Felt`metadata` | Type`object` | KravValgfrit | Værdier og grænser | Standard— |
| Felt`cache_control` | Type`object` | KravValgfrit | Værdier og grænser Afhænger af modellen | Standard— |

Kombinationer af inputmaterialer

**Tekst** · UTF8-tekst

`messages[].content eller en blok med type=text`

**Tekst + billede**

`{type:image,source:{type:base64,media_type,data}} eller kilde med type=url`

Metodeparametre og livscyklus

| Parameter | Kontrakt |
| --- | --- |
| Parameter`material_types` | Kontrakttext, image |
| Parameter`required` | Kontraktmodel, messages, max\_tokens |
| Parameter`optional_controls` | Kontraktnull |
| Parameter`content_type` | Kontraktapplication/json |
| Parameter`text_file_material` | Kontraktfaktisk UTF-8-indhold indsat som tekst; fil-ID’er/URLs kræver særskilt præcis understøttelse |

Livscyklus: `exact retained published method`

Metodernes strukturer og ID’er er præcise; leverandørens muligheder er adskilt fra adgangstilladelse.

### Priser

#### Ailoot-metodetakster

Input

0,00015 US$ */ 1K*

Output

0,00047 US$ */ 1K*

Cachelæsning

0,000016 US$ */ 1K*

Cacheskrivning

0,0002 US$ */ 1K*

Cacheskrivning, 5 min.

0,0002 US$ */ 1K tokens*

Ailoot reserverer et estimeret beløb før en anmodning. Efter resultatet afregnes det endelige beløb ud fra det målte forbrug. Ved streaming bruges den endelige forbrugsregistrering til afregningen. [Sådan fungerer reservation og afregning →](https://ailoot.ai/docs/da/billing/reserve/)

#### Detaljer om referencetariffen

Referenceplaner på modelniveau ændrer ikke metodevalg, prisoverslag eller opkrævninger. Ved den aktive afregning anvendes taksterne for den valgte Ailoot-metode.

Modellens referenceplaner

#### Priser efter konfiguration

Knyt hver omkostning til de viste betingelser. Brug én takst for hver gruppe af alternative konfigurationer.

| Konfiguration | Takstplan | Konteksttokens, mere end | Konteksttokens, op til og med | Beløb |
| --- | --- | --- | --- | --- |
| KonfigurationOpenAI Chat · Grundtakster pr. token | TakstplanGrundtakst | Konteksttokens, mere end— | Konteksttokens, op til og medIngen øvre grænse | Beløb Input · Inputtokens **$0.0003** / 1K tokens Output · Outputtokens **$0.00094** / 1K tokens Input · Cachelæsning **$0.000032** / 1K tokens Input · Cacheskrivning **$0.0004** / 1K tokens Input · Cacheskrivning, 1 time **—** / 1K tokens |
| KonfigurationOpenAI Chat · Trin 1 efter anmodningens længde | Takstplan— | Konteksttokens, mere end0 | Konteksttokens, op til og medIngen øvre grænse | Beløb Input · Inputtokens **$0.0003** / 1K tokens Output · Outputtokens **$0.00094** / 1K tokens Input · Cachelæsning **$0.000032** / 1K tokens Input · Cacheskrivning **$0.0004** / 1K tokens Input · Cacheskrivning, 1 time **—** / 1K tokens |
| KonfigurationAnthropic Messages · Grundtakster pr. token | TakstplanGrundtakst | Konteksttokens, mere end— | Konteksttokens, op til og medIngen øvre grænse | Beløb Input · Inputtokens **$0.0003** / 1K tokens Output · Outputtokens **$0.00094** / 1K tokens Input · Cachelæsning **$0.000032** / 1K tokens Input · Cacheskrivning **$0.0004** / 1K tokens Input · Cacheskrivning, 1 time **—** / 1K tokens |
| KonfigurationAnthropic Messages · Trin 1 efter anmodningens længde | Takstplan— | Konteksttokens, mere end0 | Konteksttokens, op til og medIngen øvre grænse | Beløb Input · Inputtokens **$0.0003** / 1K tokens Output · Outputtokens **$0.00094** / 1K tokens Input · Cachelæsning **$0.000032** / 1K tokens Input · Cacheskrivning **$0.0004** / 1K tokens Input · Cacheskrivning, 1 time **—** / 1K tokens |

### Eksempelanmodninger

#### Ailoot · Anthropic Messages

TeksteksempelInput, billedePython SDKNode.js SDKPython-stream

```bash
set -eu
: "${AILOOT_API_KEY:?Set your Ailoot API key}"
: "${AILOOT_TEXT_FILE:?Set your actual UTF-8 source-material file}"
export AILOOT_TEXT_FILE
python3 - <<'PY_REQUEST'
import json,os
from pathlib import Path
p=json.loads('{"model": "qwen3.8-flash", "max_tokens": 1024, "messages": []}')
f=Path(os.environ["AILOOT_TEXT_FILE"])
if not f.is_file():raise SystemExit("Choose your actual UTF-8 source material")
text=f.read_text(encoding="utf-8")
if not text.strip():raise SystemExit("Source material must contain text")
p["messages"]=[{"role":"user","content":"Summarize this material and quote supporting source passages.\n\n"+text}]
Path("request.json").write_text(json.dumps(p,ensure_ascii=False))
PY_REQUEST
curl --fail-with-body --silent --show-error https://api.ailoot.ai/v1/messages \
  -H "x-api-key: $AILOOT_API_KEY" -H 'anthropic-version: 2023-06-01' -H 'Content-Type: application/json' \
  --data-binary @request.json -D response-headers.txt -o result.json
python3 - <<'PY_RESULT'
import json
from pathlib import Path
print(json.dumps(json.loads(Path("result.json").read_text()),ensure_ascii=False,indent=2))
PY_RESULT
```

```bash
set -eu
: "${AILOOT_API_KEY:?Set your Ailoot API key}"
: "${AILOOT_IMAGE_FILE:?Set your actual PNG JPEG or WebP image}"
export AILOOT_IMAGE_FILE
python3 - <<'PY_REQUEST'
import json,os
from pathlib import Path
p=json.loads('{"model": "qwen3.8-flash", "max_tokens": 1024, "messages": [{"role": "user", "content": [{"type": "text", "text": "Read labels and numbers in this image; flag unreadable text."}]}]}')
import base64
f=Path(os.environ["AILOOT_IMAGE_FILE"])
if not f.is_file():raise SystemExit("Choose an actual PNG JPEG or WebP image")
raw=f.read_bytes()
mime="image/png" if raw.startswith(b"\x89PNG\r\n\x1a\n") else "image/jpeg" if raw.startswith(b"\xff\xd8") else "image/webp" if raw[:4]==b"RIFF" and raw[8:12]==b"WEBP" else None
if not mime:raise SystemExit("Use PNG JPEG or WebP")
b64=base64.b64encode(raw).decode()
p["messages"][0]["content"].append({"type":"image","source":{"type":"base64","media_type":mime,"data":b64}})
Path("request.json").write_text(json.dumps(p,ensure_ascii=False))
PY_REQUEST
curl --fail-with-body --silent --show-error https://api.ailoot.ai/v1/messages \
  -H "x-api-key: $AILOOT_API_KEY" -H 'anthropic-version: 2023-06-01' -H 'Content-Type: application/json' \
  --data-binary @request.json -D response-headers.txt -o result.json
python3 - <<'PY_RESULT'
import json
from pathlib import Path
print(json.dumps(json.loads(Path("result.json").read_text()),ensure_ascii=False,indent=2))
PY_RESULT
```

```python
import anthropic
import os

if not os.environ.get("AILOOT_API_KEY", "").strip(): raise SystemExit("Set AILOOT_API_KEY before making a request")
client = anthropic.Anthropic(base_url="https://api.ailoot.ai", api_key=os.environ["AILOOT_API_KEY"], max_retries=0)
msg = client.messages.create(
    model="qwen3.8-flash",
    max_tokens=1024,
    messages=[{"role": "user", "content": "Explain the difference between an observation and a hypothesis in three sentences."}],
)
import base64, json
from pathlib import Path

def save_result(data, stem="result"):
    # Keep every field, including usage, IDs, reasoning and tool requests.
    Path(stem + ".json").write_text(json.dumps(data, ensure_ascii=False, indent=2), encoding="utf-8")
    print(json.dumps(data, ensure_ascii=False, indent=2))
    def save_blob(encoded, suffix, label):
        raw = base64.b64decode(encoded, altchars=b"-_", validate=True)
        ext = "png" if raw.startswith(b"\x89PNG\r\n\x1a\n") else "jpg" if raw.startswith(b"\xff\xd8") else "webp" if raw[:4] == b"RIFF" and raw[8:12] == b"WEBP" else suffix
        file = Path(stem + "-" + label + "." + ext)
        file.write_bytes(raw)
        print("Saved", file)
    for index, block in enumerate(data.get("content") or []):
        print("Content", index, json.dumps(block, ensure_ascii=False))
    for choice in data.get("choices") or []:
        print("Choice", choice.get("index"), json.dumps(choice.get("message", choice.get("delta", {})), ensure_ascii=False))
    for index, item in enumerate(data.get("output") or []):
        print("Output", index, json.dumps(item, ensure_ascii=False))
        if item.get("type") == "image_generation_call" and item.get("result"):
            save_blob(item["result"], item.get("output_format") or "bin", "output-" + str(index))
    for ci, candidate in enumerate(data.get("candidates") or []):
        for pi, part in enumerate((candidate.get("content") or {}).get("parts") or []):
            print("Candidate/part", ci, pi, json.dumps(part, ensure_ascii=False))
            blob = part.get("inlineData") or part.get("inline_data")
            if blob and blob.get("data"):
                mime = blob.get("mimeType") or blob.get("mime_type")
                suffix = {"image/png":"png", "image/jpeg":"jpg", "image/webp":"webp", "audio/wav":"wav", "audio/mpeg":"mp3", "video/mp4":"mp4"}.get(mime, "bin")
                save_blob(blob["data"], suffix, "candidate-" + str(ci) + "-part-" + str(pi))

save_result(msg.to_dict(mode="json"))
```

```js
import Anthropic from "@anthropic-ai/sdk";

if (!process.env.AILOOT_API_KEY?.trim()) throw new Error("Set AILOOT_API_KEY before making a request");
const client = new Anthropic({ baseURL: "https://api.ailoot.ai", apiKey: process.env.AILOOT_API_KEY, maxRetries: 0 });
const msg = await client.messages.create({
  model: "qwen3.8-flash",
  max_tokens: 1024,
  messages: [{ role: "user", content: "Explain the difference between an observation and a hypothesis in three sentences." }],
});
import { writeFileSync } from "node:fs";

function saveResult(data, stem = "result") {
  writeFileSync(stem + ".json", JSON.stringify(data, null, 2));
  console.log(JSON.stringify(data, null, 2));
  const saveBlob = (encoded, suffix, label) => {
    const raw = Buffer.from(encoded, "base64");
    const ext = raw.subarray(0,8).equals(Buffer.from([137,80,78,71,13,10,26,10])) ? "png" : raw[0]===255 && raw[1]===216 ? "jpg" : raw.subarray(0,4).toString()==="RIFF" && raw.subarray(8,12).toString()==="WEBP" ? "webp" : suffix;
    const file = `${stem}-${label}.${ext}`;
    writeFileSync(file, raw); console.log("Saved", file);
  };
  for (const [i, block] of (data.content || []).entries()) console.log("Content", i, JSON.stringify(block));
  for (const choice of data.choices || []) console.log("Choice", choice.index, JSON.stringify(choice.message || choice.delta || {}));
  for (const [i, item] of (data.output || []).entries()) {
    console.log("Output", i, JSON.stringify(item));
    if (item.type === "image_generation_call" && item.result) saveBlob(item.result, item.output_format || "bin", `output-${i}`);
  }
  for (const [ci, candidate] of (data.candidates || []).entries()) {
    for (const [pi, part] of (candidate.content?.parts || []).entries()) {
      console.log("Candidate/part", ci, pi, JSON.stringify(part));
      const blob = part.inlineData || part.inline_data;
      if (blob?.data) {
        const mime = blob.mimeType || blob.mime_type;
        const suffix = ({"image/png":"png", "image/jpeg":"jpg", "image/webp":"webp", "audio/wav":"wav", "audio/mpeg":"mp3", "video/mp4":"mp4"})[mime] || "bin";
        saveBlob(blob.data, suffix, `candidate-${ci}-part-${pi}`);
      }
    }
  }
}

saveResult(msg);
```

```python
import anthropic,os
from pathlib import Path

if not os.environ.get("AILOOT_API_KEY", "").strip(): raise SystemExit("Set AILOOT_API_KEY before making a request")
client=anthropic.Anthropic(base_url="https://api.ailoot.ai",api_key=os.environ["AILOOT_API_KEY"],max_retries=0)
import base64, json
from pathlib import Path

def save_result(data, stem="result"):
    # Keep every field, including usage, IDs, reasoning and tool requests.
    Path(stem + ".json").write_text(json.dumps(data, ensure_ascii=False, indent=2), encoding="utf-8")
    print(json.dumps(data, ensure_ascii=False, indent=2))
    def save_blob(encoded, suffix, label):
        raw = base64.b64decode(encoded, altchars=b"-_", validate=True)
        ext = "png" if raw.startswith(b"\x89PNG\r\n\x1a\n") else "jpg" if raw.startswith(b"\xff\xd8") else "webp" if raw[:4] == b"RIFF" and raw[8:12] == b"WEBP" else suffix
        file = Path(stem + "-" + label + "." + ext)
        file.write_bytes(raw)
        print("Saved", file)
    for index, block in enumerate(data.get("content") or []):
        print("Content", index, json.dumps(block, ensure_ascii=False))
    for choice in data.get("choices") or []:
        print("Choice", choice.get("index"), json.dumps(choice.get("message", choice.get("delta", {})), ensure_ascii=False))
    for index, item in enumerate(data.get("output") or []):
        print("Output", index, json.dumps(item, ensure_ascii=False))
        if item.get("type") == "image_generation_call" and item.get("result"):
            save_blob(item["result"], item.get("output_format") or "bin", "output-" + str(index))
    for ci, candidate in enumerate(data.get("candidates") or []):
        for pi, part in enumerate((candidate.get("content") or {}).get("parts") or []):
            print("Candidate/part", ci, pi, json.dumps(part, ensure_ascii=False))
            blob = part.get("inlineData") or part.get("inline_data")
            if blob and blob.get("data"):
                mime = blob.get("mimeType") or blob.get("mime_type")
                suffix = {"image/png":"png", "image/jpeg":"jpg", "image/webp":"webp", "audio/wav":"wav", "audio/mpeg":"mp3", "video/mp4":"mp4"}.get(mime, "bin")
                save_blob(blob["data"], suffix, "candidate-" + str(ci) + "-part-" + str(pi))

with client.messages.stream(model='qwen3.8-flash',max_tokens=1024,messages=[{"role":"user","content":"Explain observations and hypotheses in three sentences."}]) as stream:
    with Path("stream-events.jsonl").open("w",encoding="utf-8") as log:
        for event in stream:
            payload=event.to_dict(mode="json")
            log.write(json.dumps(payload,ensure_ascii=False)+"\n"); log.flush()
            print(json.dumps(payload,ensure_ascii=False))
    final=stream.get_final_message()
    save_result(final.to_dict(mode="json"),"stream-result")
```

### Hent og gem resultater

#### Ailoot · Anthropic Messages

json eller SSE

##### Behold alle færdige resultater

Gem hvert fuldstændigt returneret svar, hver fil og hver indholdsdel.

Bevar alle indholdsblokke, ræsonnementssignaturer og faktiske værktøjsbrugs-ID’er. Saml alle SSE-blokdeltaer; den første tekstblok er ikke hele outputtet.

##### Hvis det oprindelige svar skal kontrolleres

Bevar anmodnings-/svar-ID’er og headere. Der leveres ingen generel URL til at hente tekstjob.

Svarfelter

| Felt | Type |
| --- | --- |
| Felt`id` | Typestring |
| Felt`model` | Typestring |
| Felt`content[]` | Typetext\|thinking\|tool\_use\|other content block |
| Felt`stop_reason` | Typestring\|null |
| Felt`usage` | Typeobject |

Fejl og næste trin

| Svar | Betingelse | Næste trin |
| --- | --- | --- |
| Svar400 · `invalid_request_error` | BetingelseUgyldige obligatoriske felter, materialerepræsentation eller parameterværdi | Næste trinRet de angivne felter før en ny oprettelsesanmodning. |

### Aliaser

#### Modelaliaser

<strong>Ailoot</strong> [`qwen3.8-flash`](https://ailoot.ai/models/da/#m=qwen%2Fqwen3.8-flash&route=Core&caller=qwen3.8-flash&fmt=messages), [`qwen-flash`](https://ailoot.ai/models/da/#m=qwen%2Fqwen3.8-flash&route=Core&caller=qwen-flash&fmt=messages), [`qwen-flash-latest`](https://ailoot.ai/models/da/#m=qwen%2Fqwen3.8-flash&route=Core&caller=qwen-flash-latest&fmt=messages)
**Ailoot Ultra** [`qwen3.8-flash`](https://ailoot.ai/models/da/#m=qwen%2Fqwen3.8-flash&route=Ultra&caller=qwen3.8-flash&fmt=messages), [`qwen/qwen3.8-flash`](https://ailoot.ai/models/da/#m=qwen%2Fqwen3.8-flash&route=Ultra&caller=qwen%2Fqwen3.8-flash&fmt=messages)

#### Aliaser for metodestier

`/chat/completions`

#### Relaterede kalder-ID’er

[`qwen/qwen3.8-flash`](https://ailoot.ai/models/da/#m=qwen%2Fqwen3.8-flash&route=Ultra&caller=qwen%2Fqwen3.8-flash&fmt=messages), [`qwen-flash`](https://ailoot.ai/models/da/#m=qwen%2Fqwen3.8-flash&route=Core&caller=qwen-flash&fmt=messages), [`qwen-flash-latest`](https://ailoot.ai/models/da/#m=qwen%2Fqwen3.8-flash&route=Core&caller=qwen-flash-latest&fmt=messages), [`qwen3.8-flash`](https://ailoot.ai/models/da/#m=qwen%2Fqwen3.8-flash&route=Core&caller=qwen3.8-flash&fmt=messages), [`qwen3.8-flash`](https://ailoot.ai/models/da/#m=qwen%2Fqwen3.8-flash&route=Ultra&caller=qwen3.8-flash&fmt=messages)

**Ailoot · OpenAI Responses** `POST /v1/responses` `qwen3.8-flash`

[`qwen3.8-flash`](https://ailoot.ai/models/da/#m=qwen%2Fqwen3.8-flash&route=Core&caller=qwen3.8-flash&fmt=responses)

Alibaba /`qwen3.8-flash`

Model-ID

- `qwen3.8-flash`
- `qwen-flash`
- `qwen-flash-latest`

### Start

Multimodal model til softwareagenter og kontoropgaver med stor kontekst. I Ailoot analyserer den tekst og billeder og leverer et tekstsvar.

Accepterede input

Tekst · Billeder

Resultater

Tekst

### Tilgængelig i Ailoot · input og metoder

**Ailoot · OpenAI Responses** `POST /v1/responses`

Inputtyper

`text`, `image`

Outputtyper

`text`

Kontekst

991.808 tokens

Maksimalt output

131.072 tokens

Outputformat

json eller SSE

| Felt | Type | Krav | Værdier og grænser | Standard |
| --- | --- | --- | --- | --- |
| Felt`model` | Type`string` | KravPåkrævet | Værdier og grænser qwen3.8-flash | Standard— |
| Felt`input` | Type`string\|input_item[]` | KravPåkrævet | Værdier og grænser | Standard— |
| Felt`instructions` | Type`string` | KravValgfrit | Værdier og grænser | Standard— |
| Felt`input[].type` | Type`string` | KravValgfrit | Værdier og grænser message, reasoning, function\_call, function\_call\_output | Standard— |
| Felt`input[].content` | Type`string\|content_part[]` | KravValgfrit | Værdier og grænser | Standard— |
| Felt`input[].call_id` | Type`string` | KravValgfrit | Værdier og grænser Gælder når: function\_call\_output; bevar det faktisk returnerede call\_id | Standard— |
| Felt`input[].output` | Type`string\|content_part[]` | KravValgfrit | Værdier og grænser Gælder når: function\_call\_output | Standard— |
| Felt`max_output_tokens` | Type`integer` | KravValgfrit | Værdier og grænser Minimum: 1 Afhænger af modellen | Standard— |
| Felt`stream` | Type`boolean` | KravValgfrit | Værdier og grænser | Standardfalse |
| Felt`temperature` | Type`number` | KravValgfrit | Værdier og grænser Afhænger af modellen | Standard— |
| Felt`top_p` | Type`number` | KravValgfrit | Værdier og grænser Afhænger af modellen | Standard— |
| Felt`tools` | Type`tool[]` | KravValgfrit | Værdier og grænser Afhænger af modellen | Standard— |
| Felt`tool_choice` | Type`string\|object` | KravValgfrit | Værdier og grænser Afhænger af modellen | Standard— |
| Felt`parallel_tool_calls` | Type`boolean` | KravValgfrit | Værdier og grænser Afhænger af modellen | Standard— |
| Felt`reasoning.effort` | Type`string` | KravValgfrit | Værdier og grænser Afhænger af modellen | Standard— |
| Felt`reasoning.summary` | Type`string` | KravValgfrit | Værdier og grænser Afhænger af modellen | Standard— |
| Felt`text.format` | Type`object` | KravValgfrit | Værdier og grænser Afhænger af modellen | Standard— |
| Felt`text.verbosity` | Type`string` | KravValgfrit | Værdier og grænser Afhænger af modellen | Standard— |
| Felt`include` | Type`string[]` | KravValgfrit | Værdier og grænser Afhænger af modellen | Standard— |
| Felt`store` | Type`boolean` | KravValgfrit | Værdier og grænser Afhænger af modellen | Standard— |
| Felt`previous_response_id` | Type`string` | KravValgfrit | Værdier og grænser ID-krav: Kun et faktisk svar-ID fra en understøttet fortsættelse Afhænger af modellen | Standard— |
| Felt`service_tier` | Type`string` | KravValgfrit | Værdier og grænser Afhænger af modellen | Standard— |
| Felt`prompt_cache_key` | Type`string` | KravValgfrit | Værdier og grænser Afhænger af modellen | Standard— |
| Felt`prompt_cache_options` | Type`object` | KravValgfrit | Værdier og grænser Afhænger af modellen | Standard— |

Kombinationer af inputmaterialer

**Tekst** · UTF8-tekst

`inputtekst eller en input_text-del`

**Tekst + billede**

`{type:input_image,image_url}`

Metodeparametre og livscyklus

| Parameter | Kontrakt |
| --- | --- |
| Parameter`material_types` | Kontrakttext, image |
| Parameter`required` | Kontraktmodel, input |
| Parameter`optional_controls` | Kontraktnull |
| Parameter`content_type` | Kontraktapplication/json |
| Parameter`text_file_material` | Kontraktfaktisk UTF-8-indhold indsat som tekst; fil-ID’er/URLs kræver særskilt præcis understøttelse |

Livscyklus: `exact retained published method`

Metodernes strukturer og ID’er er præcise; leverandørens muligheder er adskilt fra adgangstilladelse.

### Priser

#### Ailoot-metodetakster

Tekstinput

0,00015 US$ */ 1K*

Tekstoutput

0,00047 US$ */ 1K*

Input, billede

0,00015 US$ */ 1K tokens*

Cachelæsning

0,000016 US$ */ 1K*

Cacheskrivning

0,0002 US$ */ 1K*

Cacheskrivning, 5 min.

0,0002 US$ */ 1K tokens*

Ailoot reserverer et estimeret beløb før en anmodning. Efter resultatet afregnes det endelige beløb ud fra det målte forbrug. Ved streaming bruges den endelige forbrugsregistrering til afregningen. [Sådan fungerer reservation og afregning →](https://ailoot.ai/docs/da/billing/reserve/)

#### Detaljer om referencetariffen

Referenceplaner på modelniveau ændrer ikke metodevalg, prisoverslag eller opkrævninger. Ved den aktive afregning anvendes taksterne for den valgte Ailoot-metode.

Modellens referenceplaner

#### Priser efter konfiguration

Knyt hver omkostning til de viste betingelser. Brug én takst for hver gruppe af alternative konfigurationer.

| Konfiguration | Takstplan | Konteksttokens, mere end | Konteksttokens, op til og med | Beløb |
| --- | --- | --- | --- | --- |
| KonfigurationOpenAI Chat · Grundtakster pr. token | TakstplanGrundtakst | Konteksttokens, mere end— | Konteksttokens, op til og medIngen øvre grænse | Beløb Input · Inputtokens **$0.0003** / 1K tokens Output · Outputtokens **$0.00094** / 1K tokens Input · Cachelæsning **$0.000032** / 1K tokens Input · Cacheskrivning **$0.0004** / 1K tokens Input · Cacheskrivning, 1 time **—** / 1K tokens |
| KonfigurationOpenAI Chat · Trin 1 efter anmodningens længde | Takstplan— | Konteksttokens, mere end0 | Konteksttokens, op til og medIngen øvre grænse | Beløb Input · Inputtokens **$0.0003** / 1K tokens Output · Outputtokens **$0.00094** / 1K tokens Input · Cachelæsning **$0.000032** / 1K tokens Input · Cacheskrivning **$0.0004** / 1K tokens Input · Cacheskrivning, 1 time **—** / 1K tokens |
| KonfigurationAnthropic Messages · Grundtakster pr. token | TakstplanGrundtakst | Konteksttokens, mere end— | Konteksttokens, op til og medIngen øvre grænse | Beløb Input · Inputtokens **$0.0003** / 1K tokens Output · Outputtokens **$0.00094** / 1K tokens Input · Cachelæsning **$0.000032** / 1K tokens Input · Cacheskrivning **$0.0004** / 1K tokens Input · Cacheskrivning, 1 time **—** / 1K tokens |
| KonfigurationAnthropic Messages · Trin 1 efter anmodningens længde | Takstplan— | Konteksttokens, mere end0 | Konteksttokens, op til og medIngen øvre grænse | Beløb Input · Inputtokens **$0.0003** / 1K tokens Output · Outputtokens **$0.00094** / 1K tokens Input · Cachelæsning **$0.000032** / 1K tokens Input · Cacheskrivning **$0.0004** / 1K tokens Input · Cacheskrivning, 1 time **—** / 1K tokens |

### Eksempelanmodninger

#### Ailoot · OpenAI Responses

TeksteksempelInput, billedePython SDKNode.js SDKPython-stream

```bash
set -eu
: "${AILOOT_API_KEY:?Set your Ailoot API key}"
: "${AILOOT_TEXT_FILE:?Set your actual UTF-8 source-material file}"
export AILOOT_TEXT_FILE
python3 - <<'PY_REQUEST'
import json,os
from pathlib import Path
p=json.loads('{"model": "qwen3.8-flash", "input": ""}')
f=Path(os.environ["AILOOT_TEXT_FILE"])
if not f.is_file():raise SystemExit("Choose your actual UTF-8 source material")
text=f.read_text(encoding="utf-8")
if not text.strip():raise SystemExit("Source material must contain text")
p["input"]="Summarize this material and quote supporting source passages.\n\n"+text
Path("request.json").write_text(json.dumps(p,ensure_ascii=False))
PY_REQUEST
curl --fail-with-body --silent --show-error https://api.ailoot.ai/v1/responses \
  -H "Authorization: Bearer $AILOOT_API_KEY" -H 'Content-Type: application/json' \
  --data-binary @request.json -D response-headers.txt -o result.json
python3 - <<'PY_RESULT'
import base64, json
from pathlib import Path

def save_result(data, stem="result"):
    # Keep every field, including usage, IDs, reasoning and tool requests.
    Path(stem + ".json").write_text(json.dumps(data, ensure_ascii=False, indent=2), encoding="utf-8")
    print(json.dumps(data, ensure_ascii=False, indent=2))
    def save_blob(encoded, suffix, label):
        raw = base64.b64decode(encoded, altchars=b"-_", validate=True)
        ext = "png" if raw.startswith(b"\x89PNG\r\n\x1a\n") else "jpg" if raw.startswith(b"\xff\xd8") else "webp" if raw[:4] == b"RIFF" and raw[8:12] == b"WEBP" else suffix
        file = Path(stem + "-" + label + "." + ext)
        file.write_bytes(raw)
        print("Saved", file)
    for index, block in enumerate(data.get("content") or []):
        print("Content", index, json.dumps(block, ensure_ascii=False))
    for choice in data.get("choices") or []:
        print("Choice", choice.get("index"), json.dumps(choice.get("message", choice.get("delta", {})), ensure_ascii=False))
    for index, item in enumerate(data.get("output") or []):
        print("Output", index, json.dumps(item, ensure_ascii=False))
        if item.get("type") == "image_generation_call" and item.get("result"):
            save_blob(item["result"], item.get("output_format") or "bin", "output-" + str(index))
    for ci, candidate in enumerate(data.get("candidates") or []):
        for pi, part in enumerate((candidate.get("content") or {}).get("parts") or []):
            print("Candidate/part", ci, pi, json.dumps(part, ensure_ascii=False))
            blob = part.get("inlineData") or part.get("inline_data")
            if blob and blob.get("data"):
                mime = blob.get("mimeType") or blob.get("mime_type")
                suffix = {"image/png":"png", "image/jpeg":"jpg", "image/webp":"webp", "audio/wav":"wav", "audio/mpeg":"mp3", "video/mp4":"mp4"}.get(mime, "bin")
                save_blob(blob["data"], suffix, "candidate-" + str(ci) + "-part-" + str(pi))

save_result(json.loads(Path("result.json").read_text(encoding="utf-8")))
PY_RESULT
```

```bash
set -eu
: "${AILOOT_API_KEY:?Set your Ailoot API key}"
: "${AILOOT_IMAGE_FILE:?Set your actual PNG JPEG or WebP image}"
export AILOOT_IMAGE_FILE
python3 - <<'PY_REQUEST'
import json,os
from pathlib import Path
p=json.loads('{"model": "qwen3.8-flash", "input": [{"role": "user", "content": [{"type": "input_text", "text": "Read labels and numbers in this image; flag unreadable text."}]}]}')
import base64
f=Path(os.environ["AILOOT_IMAGE_FILE"])
if not f.is_file():raise SystemExit("Choose an actual PNG JPEG or WebP image")
raw=f.read_bytes()
mime="image/png" if raw.startswith(b"\x89PNG\r\n\x1a\n") else "image/jpeg" if raw.startswith(b"\xff\xd8") else "image/webp" if raw[:4]==b"RIFF" and raw[8:12]==b"WEBP" else None
if not mime:raise SystemExit("Use PNG JPEG or WebP")
b64=base64.b64encode(raw).decode()
p["input"][0]["content"].append({"type":"input_image","image_url":"data:"+mime+";base64,"+b64})
Path("request.json").write_text(json.dumps(p,ensure_ascii=False))
PY_REQUEST
curl --fail-with-body --silent --show-error https://api.ailoot.ai/v1/responses \
  -H "Authorization: Bearer $AILOOT_API_KEY" -H 'Content-Type: application/json' \
  --data-binary @request.json -D response-headers.txt -o result.json
python3 - <<'PY_RESULT'
import base64, json
from pathlib import Path

def save_result(data, stem="result"):
    # Keep every field, including usage, IDs, reasoning and tool requests.
    Path(stem + ".json").write_text(json.dumps(data, ensure_ascii=False, indent=2), encoding="utf-8")
    print(json.dumps(data, ensure_ascii=False, indent=2))
    def save_blob(encoded, suffix, label):
        raw = base64.b64decode(encoded, altchars=b"-_", validate=True)
        ext = "png" if raw.startswith(b"\x89PNG\r\n\x1a\n") else "jpg" if raw.startswith(b"\xff\xd8") else "webp" if raw[:4] == b"RIFF" and raw[8:12] == b"WEBP" else suffix
        file = Path(stem + "-" + label + "." + ext)
        file.write_bytes(raw)
        print("Saved", file)
    for index, block in enumerate(data.get("content") or []):
        print("Content", index, json.dumps(block, ensure_ascii=False))
    for choice in data.get("choices") or []:
        print("Choice", choice.get("index"), json.dumps(choice.get("message", choice.get("delta", {})), ensure_ascii=False))
    for index, item in enumerate(data.get("output") or []):
        print("Output", index, json.dumps(item, ensure_ascii=False))
        if item.get("type") == "image_generation_call" and item.get("result"):
            save_blob(item["result"], item.get("output_format") or "bin", "output-" + str(index))
    for ci, candidate in enumerate(data.get("candidates") or []):
        for pi, part in enumerate((candidate.get("content") or {}).get("parts") or []):
            print("Candidate/part", ci, pi, json.dumps(part, ensure_ascii=False))
            blob = part.get("inlineData") or part.get("inline_data")
            if blob and blob.get("data"):
                mime = blob.get("mimeType") or blob.get("mime_type")
                suffix = {"image/png":"png", "image/jpeg":"jpg", "image/webp":"webp", "audio/wav":"wav", "audio/mpeg":"mp3", "video/mp4":"mp4"}.get(mime, "bin")
                save_blob(blob["data"], suffix, "candidate-" + str(ci) + "-part-" + str(pi))

save_result(json.loads(Path("result.json").read_text(encoding="utf-8")))
PY_RESULT
```

```python
from openai import OpenAI
import os

if not os.environ.get("AILOOT_API_KEY", "").strip(): raise SystemExit("Set AILOOT_API_KEY before making a request")
client = OpenAI(base_url="https://api.ailoot.ai/v1", api_key=os.environ["AILOOT_API_KEY"], max_retries=0)
resp = client.responses.create(model="qwen3.8-flash", input="Explain the difference between an observation and a hypothesis in three sentences.")
import base64, json
from pathlib import Path

def save_result(data, stem="result"):
    # Keep every field, including usage, IDs, reasoning and tool requests.
    Path(stem + ".json").write_text(json.dumps(data, ensure_ascii=False, indent=2), encoding="utf-8")
    print(json.dumps(data, ensure_ascii=False, indent=2))
    def save_blob(encoded, suffix, label):
        raw = base64.b64decode(encoded, altchars=b"-_", validate=True)
        ext = "png" if raw.startswith(b"\x89PNG\r\n\x1a\n") else "jpg" if raw.startswith(b"\xff\xd8") else "webp" if raw[:4] == b"RIFF" and raw[8:12] == b"WEBP" else suffix
        file = Path(stem + "-" + label + "." + ext)
        file.write_bytes(raw)
        print("Saved", file)
    for index, block in enumerate(data.get("content") or []):
        print("Content", index, json.dumps(block, ensure_ascii=False))
    for choice in data.get("choices") or []:
        print("Choice", choice.get("index"), json.dumps(choice.get("message", choice.get("delta", {})), ensure_ascii=False))
    for index, item in enumerate(data.get("output") or []):
        print("Output", index, json.dumps(item, ensure_ascii=False))
        if item.get("type") == "image_generation_call" and item.get("result"):
            save_blob(item["result"], item.get("output_format") or "bin", "output-" + str(index))
    for ci, candidate in enumerate(data.get("candidates") or []):
        for pi, part in enumerate((candidate.get("content") or {}).get("parts") or []):
            print("Candidate/part", ci, pi, json.dumps(part, ensure_ascii=False))
            blob = part.get("inlineData") or part.get("inline_data")
            if blob and blob.get("data"):
                mime = blob.get("mimeType") or blob.get("mime_type")
                suffix = {"image/png":"png", "image/jpeg":"jpg", "image/webp":"webp", "audio/wav":"wav", "audio/mpeg":"mp3", "video/mp4":"mp4"}.get(mime, "bin")
                save_blob(blob["data"], suffix, "candidate-" + str(ci) + "-part-" + str(pi))

save_result(resp.to_dict(mode="json"))
```

```js
import OpenAI from "openai";

if (!process.env.AILOOT_API_KEY?.trim()) throw new Error("Set AILOOT_API_KEY before making a request");
const client = new OpenAI({ baseURL: "https://api.ailoot.ai/v1", apiKey: process.env.AILOOT_API_KEY, maxRetries: 0 });
const resp = await client.responses.create({ model: "qwen3.8-flash", input: "Explain the difference between an observation and a hypothesis in three sentences." });
import { writeFileSync } from "node:fs";

function saveResult(data, stem = "result") {
  writeFileSync(stem + ".json", JSON.stringify(data, null, 2));
  console.log(JSON.stringify(data, null, 2));
  const saveBlob = (encoded, suffix, label) => {
    const raw = Buffer.from(encoded, "base64");
    const ext = raw.subarray(0,8).equals(Buffer.from([137,80,78,71,13,10,26,10])) ? "png" : raw[0]===255 && raw[1]===216 ? "jpg" : raw.subarray(0,4).toString()==="RIFF" && raw.subarray(8,12).toString()==="WEBP" ? "webp" : suffix;
    const file = `${stem}-${label}.${ext}`;
    writeFileSync(file, raw); console.log("Saved", file);
  };
  for (const [i, block] of (data.content || []).entries()) console.log("Content", i, JSON.stringify(block));
  for (const choice of data.choices || []) console.log("Choice", choice.index, JSON.stringify(choice.message || choice.delta || {}));
  for (const [i, item] of (data.output || []).entries()) {
    console.log("Output", i, JSON.stringify(item));
    if (item.type === "image_generation_call" && item.result) saveBlob(item.result, item.output_format || "bin", `output-${i}`);
  }
  for (const [ci, candidate] of (data.candidates || []).entries()) {
    for (const [pi, part] of (candidate.content?.parts || []).entries()) {
      console.log("Candidate/part", ci, pi, JSON.stringify(part));
      const blob = part.inlineData || part.inline_data;
      if (blob?.data) {
        const mime = blob.mimeType || blob.mime_type;
        const suffix = ({"image/png":"png", "image/jpeg":"jpg", "image/webp":"webp", "audio/wav":"wav", "audio/mpeg":"mp3", "video/mp4":"mp4"})[mime] || "bin";
        saveBlob(blob.data, suffix, `candidate-${ci}-part-${pi}`);
      }
    }
  }
}

saveResult(resp);
```

```python
from openai import OpenAI
import os
from pathlib import Path
import base64, json
from pathlib import Path

def save_result(data, stem="result"):
    # Keep every field, including usage, IDs, reasoning and tool requests.
    Path(stem + ".json").write_text(json.dumps(data, ensure_ascii=False, indent=2), encoding="utf-8")
    print(json.dumps(data, ensure_ascii=False, indent=2))
    def save_blob(encoded, suffix, label):
        raw = base64.b64decode(encoded, altchars=b"-_", validate=True)
        ext = "png" if raw.startswith(b"\x89PNG\r\n\x1a\n") else "jpg" if raw.startswith(b"\xff\xd8") else "webp" if raw[:4] == b"RIFF" and raw[8:12] == b"WEBP" else suffix
        file = Path(stem + "-" + label + "." + ext)
        file.write_bytes(raw)
        print("Saved", file)
    for index, block in enumerate(data.get("content") or []):
        print("Content", index, json.dumps(block, ensure_ascii=False))
    for choice in data.get("choices") or []:
        print("Choice", choice.get("index"), json.dumps(choice.get("message", choice.get("delta", {})), ensure_ascii=False))
    for index, item in enumerate(data.get("output") or []):
        print("Output", index, json.dumps(item, ensure_ascii=False))
        if item.get("type") == "image_generation_call" and item.get("result"):
            save_blob(item["result"], item.get("output_format") or "bin", "output-" + str(index))
    for ci, candidate in enumerate(data.get("candidates") or []):
        for pi, part in enumerate((candidate.get("content") or {}).get("parts") or []):
            print("Candidate/part", ci, pi, json.dumps(part, ensure_ascii=False))
            blob = part.get("inlineData") or part.get("inline_data")
            if blob and blob.get("data"):
                mime = blob.get("mimeType") or blob.get("mime_type")
                suffix = {"image/png":"png", "image/jpeg":"jpg", "image/webp":"webp", "audio/wav":"wav", "audio/mpeg":"mp3", "video/mp4":"mp4"}.get(mime, "bin")
                save_blob(blob["data"], suffix, "candidate-" + str(ci) + "-part-" + str(pi))

if not os.environ.get("AILOOT_API_KEY", "").strip(): raise SystemExit("Set AILOOT_API_KEY before making a request")
client=OpenAI(base_url="https://api.ailoot.ai/v1",api_key=os.environ["AILOOT_API_KEY"],max_retries=0)
with client.responses.stream(model="qwen3.8-flash", input="Explain the difference between an observation and a hypothesis in three sentences.") as stream:
    with Path("stream-events.jsonl").open("w",encoding="utf-8") as log:
        for event in stream:
            payload=event.to_dict(mode="json")
            log.write(json.dumps(payload,ensure_ascii=False)+"\n"); log.flush()
            print(json.dumps(payload,ensure_ascii=False))
    final=stream.get_final_response()
    save_result(final.to_dict(mode="json"),"stream-result")
```

### Hent og gem resultater

#### Ailoot · OpenAI Responses

json eller SSE

##### Behold alle færdige resultater

Gem hvert fuldstændigt returneret svar, hver fil og hver indholdsdel.

Bevar hvert outputelement og hver indholdsdel, faktisk call\_id for funktioner, krypteret ræsonnement og forbrugsoplysninger. Bevar ved streaming den fulde hændelses-/elementidentitet.

##### Hvis det oprindelige svar skal kontrolleres

Bevar anmodnings-/svar-ID’er og headere. Der leveres ingen generel URL til at hente tekstjob.

Svarfelter

| Felt | Type |
| --- | --- |
| Felt`id` | Typestring |
| Felt`status` | Typestring |
| Felt`output[]` | Typemessage\|reasoning\|function\_call\|other item |
| Felt`output[].content[]` | Typecontent part |
| Felt`usage` | Typeobject |

Fejl og næste trin

| Svar | Betingelse | Næste trin |
| --- | --- | --- |
| Svar400 · `invalid_request_error` | BetingelseUgyldige obligatoriske felter, materialerepræsentation eller parameterværdi | Næste trinRet de angivne felter før en ny oprettelsesanmodning. |

### Aliaser

#### Modelaliaser

<strong>Ailoot</strong> [`qwen3.8-flash`](https://ailoot.ai/models/da/#m=qwen%2Fqwen3.8-flash&route=Core&caller=qwen3.8-flash&fmt=responses), [`qwen-flash`](https://ailoot.ai/models/da/#m=qwen%2Fqwen3.8-flash&route=Core&caller=qwen-flash&fmt=responses), [`qwen-flash-latest`](https://ailoot.ai/models/da/#m=qwen%2Fqwen3.8-flash&route=Core&caller=qwen-flash-latest&fmt=responses)
**Ailoot Ultra** [`qwen3.8-flash`](https://ailoot.ai/models/da/#m=qwen%2Fqwen3.8-flash&route=Ultra&caller=qwen3.8-flash), [`qwen/qwen3.8-flash`](https://ailoot.ai/models/da/#m=qwen%2Fqwen3.8-flash&route=Ultra&caller=qwen%2Fqwen3.8-flash)

#### Aliaser for metodestier

`/chat/completions`

#### Relaterede kalder-ID’er

[`qwen/qwen3.8-flash`](https://ailoot.ai/models/da/#m=qwen%2Fqwen3.8-flash&route=Ultra&caller=qwen%2Fqwen3.8-flash), [`qwen-flash`](https://ailoot.ai/models/da/#m=qwen%2Fqwen3.8-flash&route=Core&caller=qwen-flash&fmt=responses), [`qwen-flash-latest`](https://ailoot.ai/models/da/#m=qwen%2Fqwen3.8-flash&route=Core&caller=qwen-flash-latest&fmt=responses), [`qwen3.8-flash`](https://ailoot.ai/models/da/#m=qwen%2Fqwen3.8-flash&route=Core&caller=qwen3.8-flash&fmt=responses), [`qwen3.8-flash`](https://ailoot.ai/models/da/#m=qwen%2Fqwen3.8-flash&route=Ultra&caller=qwen3.8-flash)

**Ailoot · OpenAI Chat** `POST /v1/chat/completions` `qwen3.8-flash`

[`qwen3.8-flash`](https://ailoot.ai/models/da/#m=qwen%2Fqwen3.8-flash&route=Core&caller=qwen3.8-flash&fmt=chat)

Alibaba /`qwen3.8-flash`

Model-ID

- `qwen3.8-flash`
- `qwen-flash`
- `qwen-flash-latest`

### Start

Multimodal model til softwareagenter og kontoropgaver med stor kontekst. I Ailoot analyserer den tekst og billeder og leverer et tekstsvar.

Accepterede input

Tekst · Billeder

Resultater

Tekst

### Tilgængelig i Ailoot · input og metoder

**Ailoot · OpenAI Chat** `POST /v1/chat/completions`

Inputtyper

`text`, `image`

Outputtyper

`text`

Kontekst

991.808 tokens

Maksimalt output

131.072 tokens

Outputformat

json eller SSE

| Felt | Type | Krav | Værdier og grænser | Standard |
| --- | --- | --- | --- | --- |
| Felt`model` | Type`string` | KravPåkrævet | Værdier og grænser qwen3.8-flash | Standard— |
| Felt`messages` | Type`message[]` | KravPåkrævet | Værdier og grænser Minimumsantal elementer: 1 | Standard— |
| Felt`messages[].role` | Type`string` | KravPåkrævet | Værdier og grænser Eksempler: system, user, assistant, tool, function Betingelser: Disse roller er eksplicit repræsenteret i kildekodens kompatibilitetstyper; modellens præcise rollesæt er fortsat modelspecifikt. Afhænger af modellen | Standard— |
| Felt`messages[].content` | Type`string\|content_part[]\|null` | KravValgfrit | Værdier og grænser | Standard— |
| Felt`messages[].tool_calls` | Type`tool_call[]` | KravValgfrit | Værdier og grænser | Standard— |
| Felt`messages[].tool_call_id` | Type`string` | KravValgfrit | Værdier og grænser Gælder når: role=tool; brug det faktisk returnerede ID | Standard— |
| Felt`messages[].name` | Type`string` | KravValgfrit | Værdier og grænser | Standard— |
| Felt`messages[].reasoning_content` | Type`string` | KravValgfrit | Værdier og grænser Gælder når: Send det faktisk returnerede ræsonnement tilbage, når modellen bruger det | Standard— |
| Felt`messages[].reasoning_details` | Type`object\|array` | KravValgfrit | Værdier og grænser Afhænger af modellen | Standard— |
| Felt`max_tokens` | Type`integer` | KravValgfrit | Værdier og grænser Minimum: 1 Afhænger af modellen | Standard— |
| Felt`max_completion_tokens` | Type`integer` | KravValgfrit | Værdier og grænser Minimum: 1 Afhænger af modellen | Standard— |
| Felt`stream` | Type`boolean` | KravValgfrit | Værdier og grænser | Standardfalse |
| Felt`stream_options.include_usage` | Type`boolean` | KravValgfrit | Værdier og grænser Afhænger af modellen | Standard— |
| Felt`temperature` | Type`number` | KravValgfrit | Værdier og grænser Afhænger af modellen | Standard— |
| Felt`top_p` | Type`number` | KravValgfrit | Værdier og grænser Afhænger af modellen | Standard— |
| Felt`stop` | Type`string\|string[]` | KravValgfrit | Værdier og grænser Afhænger af modellen | Standard— |
| Felt`tools` | Type`function_tool[]` | KravValgfrit | Værdier og grænser Afhænger af modellen | Standard— |
| Felt`tools[].type` | Type`string` | KravValgfrit | Værdier og grænser Afhænger af modellen | Standard— |
| Felt`tools[].function.name` | Type`string` | KravPåkrævet | Værdier og grænser Gælder når: funktionsværktøj angivet | Standard— |
| Felt`tools[].function.description` | Type`string` | KravValgfrit | Værdier og grænser | Standard— |
| Felt`tools[].function.parameters` | Type`JSON_schema` | KravValgfrit | Værdier og grænser | Standard— |
| Felt`tool_choice` | Type`string\|object` | KravValgfrit | Værdier og grænser Afhænger af modellen | Standard— |
| Felt`parallel_tool_calls` | Type`boolean` | KravValgfrit | Værdier og grænser Afhænger af modellen | Standard— |
| Felt`response_format` | Type`object` | KravValgfrit | Værdier og grænser Afhænger af modellen | Standard— |
| Felt`reasoning_effort` | Type`string` | KravValgfrit | Værdier og grænser Afhænger af modellen | Standard— |
| Felt`reasoning` | Type`object` | KravValgfrit | Værdier og grænser Afhænger af modellen | Standard— |
| Felt`service_tier` | Type`string` | KravValgfrit | Værdier og grænser Afhænger af modellen | Standard— |
| Felt`instructions` | Type`string` | KravValgfrit | Værdier og grænser Kompatibilitetsfelt | Standard— |
| Felt`functions` | Type`function[]` | KravValgfrit | Værdier og grænser Afhænger af modellen | Standard— |
| Felt`function_call` | Type`string\|object` | KravValgfrit | Værdier og grænser Afhænger af modellen | Standard— |
| Felt`prompt_cache_options` | Type`object` | KravValgfrit | Værdier og grænser Afhænger af modellen | Standard— |

Kombinationer af inputmaterialer

**Tekst** · UTF8-tekst

`messages[].content`

**Tekst + billede**

`{type:image_url,image_url:{url,detail}}`

Metodeparametre og livscyklus

| Parameter | Kontrakt |
| --- | --- |
| Parameter`material_types` | Kontrakttext, image |
| Parameter`required` | Kontraktmodel, messages |
| Parameter`optional_controls` | Kontraktnull |
| Parameter`content_type` | Kontraktapplication/json |
| Parameter`text_file_material` | Kontraktfaktisk UTF-8-indhold indsat som tekst; fil-ID’er/URLs kræver særskilt præcis understøttelse |

Livscyklus: `exact retained published method`

Metodernes strukturer og ID’er er præcise; leverandørens muligheder er adskilt fra adgangstilladelse.

### Priser

#### Ailoot-metodetakster

Tekstinput

0,00015 US$ */ 1K*

Tekstoutput

0,00047 US$ */ 1K*

Input, billede

0,00015 US$ */ 1K tokens*

Cachelæsning

0,000016 US$ */ 1K*

Cacheskrivning

0,0002 US$ */ 1K*

Cacheskrivning, 5 min.

0,0002 US$ */ 1K tokens*

Ailoot reserverer et estimeret beløb før en anmodning. Efter resultatet afregnes det endelige beløb ud fra det målte forbrug. Ved streaming bruges den endelige forbrugsregistrering til afregningen. [Sådan fungerer reservation og afregning →](https://ailoot.ai/docs/da/billing/reserve/)

#### Detaljer om referencetariffen

Referenceplaner på modelniveau ændrer ikke metodevalg, prisoverslag eller opkrævninger. Ved den aktive afregning anvendes taksterne for den valgte Ailoot-metode.

Modellens referenceplaner

#### Priser efter konfiguration

Knyt hver omkostning til de viste betingelser. Brug én takst for hver gruppe af alternative konfigurationer.

| Konfiguration | Takstplan | Konteksttokens, mere end | Konteksttokens, op til og med | Beløb |
| --- | --- | --- | --- | --- |
| KonfigurationOpenAI Chat · Grundtakster pr. token | TakstplanGrundtakst | Konteksttokens, mere end— | Konteksttokens, op til og medIngen øvre grænse | Beløb Input · Inputtokens **$0.0003** / 1K tokens Output · Outputtokens **$0.00094** / 1K tokens Input · Cachelæsning **$0.000032** / 1K tokens Input · Cacheskrivning **$0.0004** / 1K tokens Input · Cacheskrivning, 1 time **—** / 1K tokens |
| KonfigurationOpenAI Chat · Trin 1 efter anmodningens længde | Takstplan— | Konteksttokens, mere end0 | Konteksttokens, op til og medIngen øvre grænse | Beløb Input · Inputtokens **$0.0003** / 1K tokens Output · Outputtokens **$0.00094** / 1K tokens Input · Cachelæsning **$0.000032** / 1K tokens Input · Cacheskrivning **$0.0004** / 1K tokens Input · Cacheskrivning, 1 time **—** / 1K tokens |
| KonfigurationAnthropic Messages · Grundtakster pr. token | TakstplanGrundtakst | Konteksttokens, mere end— | Konteksttokens, op til og medIngen øvre grænse | Beløb Input · Inputtokens **$0.0003** / 1K tokens Output · Outputtokens **$0.00094** / 1K tokens Input · Cachelæsning **$0.000032** / 1K tokens Input · Cacheskrivning **$0.0004** / 1K tokens Input · Cacheskrivning, 1 time **—** / 1K tokens |
| KonfigurationAnthropic Messages · Trin 1 efter anmodningens længde | Takstplan— | Konteksttokens, mere end0 | Konteksttokens, op til og medIngen øvre grænse | Beløb Input · Inputtokens **$0.0003** / 1K tokens Output · Outputtokens **$0.00094** / 1K tokens Input · Cachelæsning **$0.000032** / 1K tokens Input · Cacheskrivning **$0.0004** / 1K tokens Input · Cacheskrivning, 1 time **—** / 1K tokens |

### Eksempelanmodninger

#### Ailoot · OpenAI Chat

TeksteksempelInput, billedePython SDKNode.js SDKPython-stream

```bash
set -eu
: "${AILOOT_API_KEY:?Set your Ailoot API key}"
: "${AILOOT_TEXT_FILE:?Set your actual UTF-8 source-material file}"
export AILOOT_TEXT_FILE
python3 - <<'PY_REQUEST'
import json,os
from pathlib import Path
p=json.loads('{"model": "qwen3.8-flash", "messages": []}')
f=Path(os.environ["AILOOT_TEXT_FILE"])
if not f.is_file():raise SystemExit("Choose your actual UTF-8 source material")
text=f.read_text(encoding="utf-8")
if not text.strip():raise SystemExit("Source material must contain text")
p["messages"]=[{"role":"user","content":"Summarize this material and quote supporting source passages.\n\n"+text}]
Path("request.json").write_text(json.dumps(p,ensure_ascii=False))
PY_REQUEST
curl --fail-with-body --silent --show-error https://api.ailoot.ai/v1/chat/completions \
  -H "Authorization: Bearer $AILOOT_API_KEY" -H 'Content-Type: application/json' \
  --data-binary @request.json -D response-headers.txt -o result.json
python3 - <<'PY_RESULT'
import json
from pathlib import Path
print(json.dumps(json.loads(Path("result.json").read_text()),ensure_ascii=False,indent=2))
PY_RESULT
```

```bash
set -eu
: "${AILOOT_API_KEY:?Set your Ailoot API key}"
: "${AILOOT_IMAGE_FILE:?Set your actual PNG JPEG or WebP image}"
export AILOOT_IMAGE_FILE
python3 - <<'PY_REQUEST'
import json,os
from pathlib import Path
p=json.loads('{"model": "qwen3.8-flash", "messages": [{"role": "user", "content": [{"type": "text", "text": "Read labels and numbers in this image; flag unreadable text."}]}]}')
import base64
f=Path(os.environ["AILOOT_IMAGE_FILE"])
if not f.is_file():raise SystemExit("Choose an actual PNG JPEG or WebP image")
raw=f.read_bytes()
mime="image/png" if raw.startswith(b"\x89PNG\r\n\x1a\n") else "image/jpeg" if raw.startswith(b"\xff\xd8") else "image/webp" if raw[:4]==b"RIFF" and raw[8:12]==b"WEBP" else None
if not mime:raise SystemExit("Use PNG JPEG or WebP")
b64=base64.b64encode(raw).decode()
p["messages"][0]["content"].append({"type":"image_url","image_url":{"url":"data:"+mime+";base64,"+b64}})
Path("request.json").write_text(json.dumps(p,ensure_ascii=False))
PY_REQUEST
curl --fail-with-body --silent --show-error https://api.ailoot.ai/v1/chat/completions \
  -H "Authorization: Bearer $AILOOT_API_KEY" -H 'Content-Type: application/json' \
  --data-binary @request.json -D response-headers.txt -o result.json
python3 - <<'PY_RESULT'
import json
from pathlib import Path
print(json.dumps(json.loads(Path("result.json").read_text()),ensure_ascii=False,indent=2))
PY_RESULT
```

```python
from openai import OpenAI
import os

if not os.environ.get("AILOOT_API_KEY", "").strip(): raise SystemExit("Set AILOOT_API_KEY before making a request")
client = OpenAI(base_url="https://api.ailoot.ai/v1", api_key=os.environ["AILOOT_API_KEY"], max_retries=0)
resp = client.chat.completions.create(
    model="qwen3.8-flash",
    messages=[{"role": "user", "content": "Explain the difference between an observation and a hypothesis in three sentences."}],
)
import base64, json
from pathlib import Path

def save_result(data, stem="result"):
    # Keep every field, including usage, IDs, reasoning and tool requests.
    Path(stem + ".json").write_text(json.dumps(data, ensure_ascii=False, indent=2), encoding="utf-8")
    print(json.dumps(data, ensure_ascii=False, indent=2))
    def save_blob(encoded, suffix, label):
        raw = base64.b64decode(encoded, altchars=b"-_", validate=True)
        ext = "png" if raw.startswith(b"\x89PNG\r\n\x1a\n") else "jpg" if raw.startswith(b"\xff\xd8") else "webp" if raw[:4] == b"RIFF" and raw[8:12] == b"WEBP" else suffix
        file = Path(stem + "-" + label + "." + ext)
        file.write_bytes(raw)
        print("Saved", file)
    for index, block in enumerate(data.get("content") or []):
        print("Content", index, json.dumps(block, ensure_ascii=False))
    for choice in data.get("choices") or []:
        print("Choice", choice.get("index"), json.dumps(choice.get("message", choice.get("delta", {})), ensure_ascii=False))
    for index, item in enumerate(data.get("output") or []):
        print("Output", index, json.dumps(item, ensure_ascii=False))
        if item.get("type") == "image_generation_call" and item.get("result"):
            save_blob(item["result"], item.get("output_format") or "bin", "output-" + str(index))
    for ci, candidate in enumerate(data.get("candidates") or []):
        for pi, part in enumerate((candidate.get("content") or {}).get("parts") or []):
            print("Candidate/part", ci, pi, json.dumps(part, ensure_ascii=False))
            blob = part.get("inlineData") or part.get("inline_data")
            if blob and blob.get("data"):
                mime = blob.get("mimeType") or blob.get("mime_type")
                suffix = {"image/png":"png", "image/jpeg":"jpg", "image/webp":"webp", "audio/wav":"wav", "audio/mpeg":"mp3", "video/mp4":"mp4"}.get(mime, "bin")
                save_blob(blob["data"], suffix, "candidate-" + str(ci) + "-part-" + str(pi))

save_result(resp.to_dict(mode="json"))
```

```js
import OpenAI from "openai";

if (!process.env.AILOOT_API_KEY?.trim()) throw new Error("Set AILOOT_API_KEY before making a request");
const client = new OpenAI({ baseURL: "https://api.ailoot.ai/v1", apiKey: process.env.AILOOT_API_KEY, maxRetries: 0 });
const resp = await client.chat.completions.create({
  model: "qwen3.8-flash",
  messages: [{ role: "user", content: "Explain the difference between an observation and a hypothesis in three sentences." }],
});
import { writeFileSync } from "node:fs";

function saveResult(data, stem = "result") {
  writeFileSync(stem + ".json", JSON.stringify(data, null, 2));
  console.log(JSON.stringify(data, null, 2));
  const saveBlob = (encoded, suffix, label) => {
    const raw = Buffer.from(encoded, "base64");
    const ext = raw.subarray(0,8).equals(Buffer.from([137,80,78,71,13,10,26,10])) ? "png" : raw[0]===255 && raw[1]===216 ? "jpg" : raw.subarray(0,4).toString()==="RIFF" && raw.subarray(8,12).toString()==="WEBP" ? "webp" : suffix;
    const file = `${stem}-${label}.${ext}`;
    writeFileSync(file, raw); console.log("Saved", file);
  };
  for (const [i, block] of (data.content || []).entries()) console.log("Content", i, JSON.stringify(block));
  for (const choice of data.choices || []) console.log("Choice", choice.index, JSON.stringify(choice.message || choice.delta || {}));
  for (const [i, item] of (data.output || []).entries()) {
    console.log("Output", i, JSON.stringify(item));
    if (item.type === "image_generation_call" && item.result) saveBlob(item.result, item.output_format || "bin", `output-${i}`);
  }
  for (const [ci, candidate] of (data.candidates || []).entries()) {
    for (const [pi, part] of (candidate.content?.parts || []).entries()) {
      console.log("Candidate/part", ci, pi, JSON.stringify(part));
      const blob = part.inlineData || part.inline_data;
      if (blob?.data) {
        const mime = blob.mimeType || blob.mime_type;
        const suffix = ({"image/png":"png", "image/jpeg":"jpg", "image/webp":"webp", "audio/wav":"wav", "audio/mpeg":"mp3", "video/mp4":"mp4"})[mime] || "bin";
        saveBlob(blob.data, suffix, `candidate-${ci}-part-${pi}`);
      }
    }
  }
}

saveResult(resp);
```

```python
from openai import OpenAI
import os
from pathlib import Path

if not os.environ.get("AILOOT_API_KEY", "").strip(): raise SystemExit("Set AILOOT_API_KEY before making a request")
client=OpenAI(base_url="https://api.ailoot.ai/v1",api_key=os.environ["AILOOT_API_KEY"],max_retries=0)
import base64, json
from pathlib import Path

def save_result(data, stem="result"):
    # Keep every field, including usage, IDs, reasoning and tool requests.
    Path(stem + ".json").write_text(json.dumps(data, ensure_ascii=False, indent=2), encoding="utf-8")
    print(json.dumps(data, ensure_ascii=False, indent=2))
    def save_blob(encoded, suffix, label):
        raw = base64.b64decode(encoded, altchars=b"-_", validate=True)
        ext = "png" if raw.startswith(b"\x89PNG\r\n\x1a\n") else "jpg" if raw.startswith(b"\xff\xd8") else "webp" if raw[:4] == b"RIFF" and raw[8:12] == b"WEBP" else suffix
        file = Path(stem + "-" + label + "." + ext)
        file.write_bytes(raw)
        print("Saved", file)
    for index, block in enumerate(data.get("content") or []):
        print("Content", index, json.dumps(block, ensure_ascii=False))
    for choice in data.get("choices") or []:
        print("Choice", choice.get("index"), json.dumps(choice.get("message", choice.get("delta", {})), ensure_ascii=False))
    for index, item in enumerate(data.get("output") or []):
        print("Output", index, json.dumps(item, ensure_ascii=False))
        if item.get("type") == "image_generation_call" and item.get("result"):
            save_blob(item["result"], item.get("output_format") or "bin", "output-" + str(index))
    for ci, candidate in enumerate(data.get("candidates") or []):
        for pi, part in enumerate((candidate.get("content") or {}).get("parts") or []):
            print("Candidate/part", ci, pi, json.dumps(part, ensure_ascii=False))
            blob = part.get("inlineData") or part.get("inline_data")
            if blob and blob.get("data"):
                mime = blob.get("mimeType") or blob.get("mime_type")
                suffix = {"image/png":"png", "image/jpeg":"jpg", "image/webp":"webp", "audio/wav":"wav", "audio/mpeg":"mp3", "video/mp4":"mp4"}.get(mime, "bin")
                save_blob(blob["data"], suffix, "candidate-" + str(ci) + "-part-" + str(pi))

with client.chat.completions.stream(model='qwen3.8-flash',messages=[{"role":"user","content":"Explain observations and hypotheses in three sentences."}]) as stream:
    with Path("stream-events.jsonl").open("w",encoding="utf-8") as log:
        for event in stream:
            payload=event.to_dict(mode="json")
            log.write(json.dumps(payload,ensure_ascii=False)+"\n"); log.flush()
            print(json.dumps(payload,ensure_ascii=False))
    final=stream.get_final_completion()
    save_result(final.to_dict(mode="json"),"stream-result")
```

### Hent og gem resultater

#### Ailoot · OpenAI Chat

json eller SSE

##### Behold alle færdige resultater

Gem hvert fuldstændigt returneret svar, hver fil og hver indholdsdel.

Bevar hvert valg og dets indhold, værktøjskald og ræsonnement. Saml i SSE deltaer efter valg-/værktøjsindeks, og bevar den endelige afslutningsårsag og forbrugsoplysningerne.

##### Hvis det oprindelige svar skal kontrolleres

Bevar anmodnings-/svar-ID’er og headere. Der leveres ingen generel URL til at hente tekstjob.

Svarfelter

| Felt | Type |
| --- | --- |
| Felt`choices[].index` | Typeinteger |
| Felt`choices[].message.content` | Typestring\|null |
| Felt`choices[].message.tool_calls` | Typetool\_call\[\] |
| Felt`choices[].message.reasoning_content` | Typestring |
| Felt`choices[].message.reasoning_details` | Typeobject\|array |
| Felt`choices[].finish_reason` | Typestring\|null |
| Felt`usage` | Typeobject |

Fejl og næste trin

| Svar | Betingelse | Næste trin |
| --- | --- | --- |
| Svar400 · `invalid_request_error` | BetingelseUgyldige obligatoriske felter, materialerepræsentation eller parameterværdi | Næste trinRet de angivne felter før en ny oprettelsesanmodning. |

### Aliaser

#### Modelaliaser

<strong>Ailoot</strong> [`qwen3.8-flash`](https://ailoot.ai/models/da/#m=qwen%2Fqwen3.8-flash&route=Core&caller=qwen3.8-flash&fmt=chat), [`qwen-flash`](https://ailoot.ai/models/da/#m=qwen%2Fqwen3.8-flash&route=Core&caller=qwen-flash&fmt=chat), [`qwen-flash-latest`](https://ailoot.ai/models/da/#m=qwen%2Fqwen3.8-flash&route=Core&caller=qwen-flash-latest&fmt=chat)
**Ailoot Ultra** [`qwen3.8-flash`](https://ailoot.ai/models/da/#m=qwen%2Fqwen3.8-flash&route=Ultra&caller=qwen3.8-flash&fmt=chat), [`qwen/qwen3.8-flash`](https://ailoot.ai/models/da/#m=qwen%2Fqwen3.8-flash&route=Ultra&caller=qwen%2Fqwen3.8-flash&fmt=chat)

#### Aliaser for metodestier

`/chat/completions`

#### Relaterede kalder-ID’er

[`qwen/qwen3.8-flash`](https://ailoot.ai/models/da/#m=qwen%2Fqwen3.8-flash&route=Ultra&caller=qwen%2Fqwen3.8-flash&fmt=chat), [`qwen-flash`](https://ailoot.ai/models/da/#m=qwen%2Fqwen3.8-flash&route=Core&caller=qwen-flash&fmt=chat), [`qwen-flash-latest`](https://ailoot.ai/models/da/#m=qwen%2Fqwen3.8-flash&route=Core&caller=qwen-flash-latest&fmt=chat), [`qwen3.8-flash`](https://ailoot.ai/models/da/#m=qwen%2Fqwen3.8-flash&route=Core&caller=qwen3.8-flash&fmt=chat), [`qwen3.8-flash`](https://ailoot.ai/models/da/#m=qwen%2Fqwen3.8-flash&route=Ultra&caller=qwen3.8-flash&fmt=chat)

**Ailoot Ultra · OpenAI Chat** `POST /v1/chat/completions` `qwen3.8-flash`

[`qwen3.8-flash`](https://ailoot.ai/models/da/#m=qwen%2Fqwen3.8-flash&route=Ultra&caller=qwen3.8-flash&fmt=chat)

Alibaba /`qwen3.8-flash`

Model-ID

- `qwen3.8-flash`
- `qwen/qwen3.8-flash`

### Start

Multimodal model til softwareagenter og kontoropgaver med stor kontekst. I Ailoot analyserer den tekst og billeder og leverer et tekstsvar.

Accepterede input

Tekst

Resultater

Tekst

### Tilgængelig i Ailoot · input og metoder

**Ailoot Ultra · OpenAI Chat** `POST /v1/chat/completions`

Inputtyper

`text`

Outputtyper

`text`

Outputformat

json eller SSE

| Felt | Type | Krav | Værdier og grænser | Standard |
| --- | --- | --- | --- | --- |
| Felt`model` | Type`string` | KravPåkrævet | Værdier og grænser qwen3.8-flash | Standard— |
| Felt`messages` | Type`message[]` | KravPåkrævet | Værdier og grænser Minimumsantal elementer: 1 | Standard— |
| Felt`messages[].role` | Type`string` | KravPåkrævet | Værdier og grænser Afhænger af modellen | Standard— |
| Felt`messages[].content` | Type`string` | KravValgfrit | Værdier og grænser Gælder når: Tekstsamtale | Standard— |
| Felt`stream` | Type`boolean` | KravValgfrit | Værdier og grænser | Standardfalse |

Kombinationer af inputmaterialer

**Tekst** · UTF8-tekst

`messages[].content`

Metodeparametre og livscyklus

| Parameter | Kontrakt |
| --- | --- |
| Parameter`content_type` | Kontraktapplication/json |
| Parameter`required` | Kontraktmodel, messages |
| Parameter`material_types` | Kontrakttext |
| Parameter`messages` | Kontraktbeskedarray med strukturen role/content |
| Parameter`file_material` | Kontraktfaktisk UTF-8-dokument indsat som bogstavelig tekst; intet fil-ID udledes |
| Parameter`optional_controls` | Kontraktstream |
| Parameter`control_scope` | KontraktTekstsamtale; stream er en boolesk værdi og er som standard false. |
| Parameter`output_modalities` | Kontrakttext |
| Parameter`hosted_operations` | Kontraktfalse |
| Parameter`multimodal_input_binding` | Kontraktnull |

Metodealiaser: `/chat/completions`

Livscyklus: `synchronous_or_streamed`

Send det præcise model-ID med messages.

Kontekstlængde er ikke et outputloft.

En tekstfil kan levere bogstavelig tekst; billed-, lyd- og filobjektinput kræver en præcis binding.

### Priser

Tarifoplysninger tilføjer ikke anmodningsmuligheder. Understøttede parametre står ved den valgte metode.

Hurtig tilstand

Standardpris Når hurtig tilstand er valgt

flex-tilstand

Standardpris Når flex-tilstanden er valgt

Maksimal ræsonneringsindsats

Standardpris Når default-justeringen anvendes ved maksimal ræsonneringsindsats

#### Ailoot-takster

#### Priser efter konfiguration

Knyt hver omkostning til de viste betingelser. Brug én takst for hver gruppe af alternative konfigurationer.

| Konfiguration | Takstplan | Konteksttokens, mere end | Konteksttokens, op til og med | Beløb |
| --- | --- | --- | --- | --- |
| KonfigurationGrundtakster for tokens | TakstplanGrundtakst | Konteksttokens, mere end— | Konteksttokens, op til og medIngen øvre grænse | Beløb Input · Inputtokens **$0.0003** / 1K tokens Output · Outputtokens **$0.00094** / 1K tokens Input · Cachelæsning **$0.000032** / 1K tokens Input · Cacheskrivning **$0.0004** / 1K tokens Input · Cacheskrivning, 1 time **—** / 1K tokens |
| KonfigurationAnmodningslængde · niveau 1 | Takstplan— | Konteksttokens, mere end0 | Konteksttokens, op til og medIngen øvre grænse | Beløb Input · Inputtokens **$0.0003** / 1K tokens Output · Outputtokens **$0.00094** / 1K tokens Input · Cachelæsning **$0.000032** / 1K tokens Input · Cacheskrivning **$0.0004** / 1K tokens Input · Cacheskrivning, 1 time **—** / 1K tokens |

Ailoot reserverer et estimeret beløb før en anmodning. Efter resultatet afregnes det endelige beløb ud fra det målte forbrug. Ved streaming bruges den endelige forbrugsregistrering til afregningen. [Sådan fungerer reservation og afregning →](https://ailoot.ai/docs/da/billing/reserve/)

### Eksempelanmodninger

#### Ailoot Ultra · OpenAI Chat

curlPython SDK

```bash
set -eu
: "${AILOOT_API_KEY:?Set your Ailoot API key}"
python3 - <<'PY_REQUEST'
import json,os
from pathlib import Path
p=json.loads('{"model":"qwen3.8-flash","messages":[{"role":"user","content":"hello"}],"stream":false}')

Path("request.json").write_text(json.dumps(p,ensure_ascii=False))
PY_REQUEST
curl --fail-with-body --silent --show-error https://api.ailoot.ai/v1/chat/completions \
  -H "Authorization: Bearer $AILOOT_API_KEY" -H 'Content-Type: application/json' \
  --data-binary @request.json -D response-headers.txt -o result.json
python3 - <<'PY_RESULT'
import json
from pathlib import Path
r=json.loads(Path("result.json").read_text())
for x in r.get("choices",[]):
    if x.get("message",{}).get("content"): print(x["message"]["content"])
PY_RESULT
```

```python
from openai import OpenAI
import os

if not os.environ.get("AILOOT_API_KEY", "").strip(): raise SystemExit("Set AILOOT_API_KEY before making a request")
client=OpenAI(base_url="https://api.ailoot.ai/v1",api_key=os.environ["AILOOT_API_KEY"],max_retries=0)
result=client.chat.completions.create(model="qwen3.8-flash", messages=[{"role":"user","content":"hello"}], stream=False)
import base64, json
from pathlib import Path

def save_result(data, stem="result"):
    # Keep every field, including usage, IDs, reasoning and tool requests.
    Path(stem + ".json").write_text(json.dumps(data, ensure_ascii=False, indent=2), encoding="utf-8")
    print(json.dumps(data, ensure_ascii=False, indent=2))
    def save_blob(encoded, suffix, label):
        raw = base64.b64decode(encoded, altchars=b"-_", validate=True)
        ext = "png" if raw.startswith(b"\x89PNG\r\n\x1a\n") else "jpg" if raw.startswith(b"\xff\xd8") else "webp" if raw[:4] == b"RIFF" and raw[8:12] == b"WEBP" else suffix
        file = Path(stem + "-" + label + "." + ext)
        file.write_bytes(raw)
        print("Saved", file)
    for index, block in enumerate(data.get("content") or []):
        print("Content", index, json.dumps(block, ensure_ascii=False))
    for choice in data.get("choices") or []:
        print("Choice", choice.get("index"), json.dumps(choice.get("message", choice.get("delta", {})), ensure_ascii=False))
    for index, item in enumerate(data.get("output") or []):
        print("Output", index, json.dumps(item, ensure_ascii=False))
        if item.get("type") == "image_generation_call" and item.get("result"):
            save_blob(item["result"], item.get("output_format") or "bin", "output-" + str(index))
    for ci, candidate in enumerate(data.get("candidates") or []):
        for pi, part in enumerate((candidate.get("content") or {}).get("parts") or []):
            print("Candidate/part", ci, pi, json.dumps(part, ensure_ascii=False))
            blob = part.get("inlineData") or part.get("inline_data")
            if blob and blob.get("data"):
                mime = blob.get("mimeType") or blob.get("mime_type")
                suffix = {"image/png":"png", "image/jpeg":"jpg", "image/webp":"webp", "audio/wav":"wav", "audio/mpeg":"mp3", "video/mp4":"mp4"}.get(mime, "bin")
                save_blob(blob["data"], suffix, "candidate-" + str(ci) + "-part-" + str(pi))

save_result(result.to_dict(mode="json"))
```

### Hent og gem resultater

#### Ailoot Ultra · OpenAI Chat

json eller SSE

##### Behold alle færdige resultater

Gem hvert fuldstændigt returneret svar, hver fil og hver indholdsdel.

Bevar hvert valg og dets indhold, værktøjskald og ræsonnement. Saml i SSE deltaer efter valg-/værktøjsindeks, og bevar den endelige afslutningsårsag og forbrugsoplysningerne.

##### Hvis det oprindelige svar skal kontrolleres

Bevar anmodnings-/svar-ID’er og headere. Der leveres ingen generel URL til at hente tekstjob.

Svarfelter

| Felt | Type |
| --- | --- |
| Felt`choices[].index` | Typeinteger |
| Felt`choices[].message.content` | Typestring\|null |
| Felt`choices[].message.tool_calls` | Typetool\_call\[\] |
| Felt`choices[].message.reasoning_content` | Typestring |
| Felt`choices[].message.reasoning_details` | Typeobject\|array |
| Felt`choices[].finish_reason` | Typestring\|null |
| Felt`usage` | Typeobject |

Fejl og næste trin

| Svar | Betingelse | Næste trin |
| --- | --- | --- |
| Svar400 · `invalid_request_error` | BetingelseUgyldige obligatoriske felter, materialerepræsentation eller parameterværdi | Næste trinRet de angivne felter før en ny oprettelsesanmodning. |

### Aliaser

#### Modelaliaser

<strong>Ailoot</strong> [`qwen3.8-flash`](https://ailoot.ai/models/da/#m=qwen%2Fqwen3.8-flash&route=Core&caller=qwen3.8-flash&fmt=chat), [`qwen-flash`](https://ailoot.ai/models/da/#m=qwen%2Fqwen3.8-flash&route=Core&caller=qwen-flash&fmt=chat), [`qwen-flash-latest`](https://ailoot.ai/models/da/#m=qwen%2Fqwen3.8-flash&route=Core&caller=qwen-flash-latest&fmt=chat)
**Ailoot Ultra** [`qwen3.8-flash`](https://ailoot.ai/models/da/#m=qwen%2Fqwen3.8-flash&route=Ultra&caller=qwen3.8-flash&fmt=chat), [`qwen/qwen3.8-flash`](https://ailoot.ai/models/da/#m=qwen%2Fqwen3.8-flash&route=Ultra&caller=qwen%2Fqwen3.8-flash&fmt=chat)

#### Aliaser for metodestier

`/chat/completions`

#### Relaterede kalder-ID’er

[`qwen/qwen3.8-flash`](https://ailoot.ai/models/da/#m=qwen%2Fqwen3.8-flash&route=Ultra&caller=qwen%2Fqwen3.8-flash&fmt=chat), [`qwen-flash`](https://ailoot.ai/models/da/#m=qwen%2Fqwen3.8-flash&route=Core&caller=qwen-flash&fmt=chat), [`qwen-flash-latest`](https://ailoot.ai/models/da/#m=qwen%2Fqwen3.8-flash&route=Core&caller=qwen-flash-latest&fmt=chat), [`qwen3.8-flash`](https://ailoot.ai/models/da/#m=qwen%2Fqwen3.8-flash&route=Core&caller=qwen3.8-flash&fmt=chat), [`qwen3.8-flash`](https://ailoot.ai/models/da/#m=qwen%2Fqwen3.8-flash&route=Ultra&caller=qwen3.8-flash&fmt=chat)

**Ailoot Ultra · Anthropic Messages** `POST /v1/messages` `qwen3.8-flash`

[`qwen3.8-flash`](https://ailoot.ai/models/da/#m=qwen%2Fqwen3.8-flash&route=Ultra&caller=qwen3.8-flash&fmt=messages)

Alibaba /`qwen3.8-flash`

Model-ID

- `qwen3.8-flash`
- `qwen/qwen3.8-flash`

### Start

Multimodal model til softwareagenter og kontoropgaver med stor kontekst. I Ailoot analyserer den tekst og billeder og leverer et tekstsvar.

Accepterede input

Tekst

Resultater

json · sse

### Tilgængelig i Ailoot · input og metoder

**Ailoot Ultra · Anthropic Messages** `POST /v1/messages`

Inputtyper

`text`

Outputtyper

`json`, `sse`

Outputformat

JSON eller SSE

| Felt | Type | Krav | Værdier og grænser | Standard |
| --- | --- | --- | --- | --- |
| Felt`model` | Type`string` | KravPåkrævet | Værdier og grænser qwen3.8-flash | Standard— |
| Felt`messages` | Type`message[]` | KravPåkrævet | Værdier og grænser | Standard— |
| Felt`messages[].role` | Type`string` | KravPåkrævet | Værdier og grænser user, assistant | Standard— |
| Felt`messages[].content` | Type`string` | KravPåkrævet | Værdier og grænser | Standard— |
| Felt`max_tokens` | Type`integer` | KravPåkrævet | Værdier og grænser | Standard— |
| Felt`stream` | Type`boolean` | KravValgfrit | Værdier og grænser | Standardfalse |

Kombinationer af inputmaterialer

**Tekst** · UTF-8-tekst

`messages[].content som streng`

Metodeparametre og livscyklus

| Parameter | Kontrakt |
| --- | --- |
| Parameter`content_type` | Kontraktapplication/json |
| Parameter`required` | Kontraktmodel, messages, max\_tokens |
| Parameter`optional_controls` | Kontraktstream |
| Parameter`material_types` | Kontrakttext |
| Parameter`text_file_material` | KontraktLæs det faktiske UTF-8-dokument, og indsæt teksten i det angivne input eller beskedens indholdsstreng. |

Livscyklus: `synchronous_or_streamed`

### Priser

Tarifoplysninger tilføjer ikke anmodningsmuligheder. Understøttede parametre står ved den valgte metode.

Hurtig tilstand

Standardpris Når hurtig tilstand er valgt

flex-tilstand

Standardpris Når flex-tilstanden er valgt

Maksimal ræsonneringsindsats

Standardpris Når default-justeringen anvendes ved maksimal ræsonneringsindsats

#### Ailoot-takster

#### Priser efter konfiguration

Knyt hver omkostning til de viste betingelser. Brug én takst for hver gruppe af alternative konfigurationer.

| Konfiguration | Takstplan | Konteksttokens, mere end | Konteksttokens, op til og med | Beløb |
| --- | --- | --- | --- | --- |
| KonfigurationGrundtakster for tokens | TakstplanGrundtakst | Konteksttokens, mere end— | Konteksttokens, op til og medIngen øvre grænse | Beløb Input · Inputtokens **$0.0003** / 1K tokens Output · Outputtokens **$0.00094** / 1K tokens Input · Cachelæsning **$0.000032** / 1K tokens Input · Cacheskrivning **$0.0004** / 1K tokens Input · Cacheskrivning, 1 time **—** / 1K tokens |
| KonfigurationAnmodningslængde · niveau 1 | Takstplan— | Konteksttokens, mere end0 | Konteksttokens, op til og medIngen øvre grænse | Beløb Input · Inputtokens **$0.0003** / 1K tokens Output · Outputtokens **$0.00094** / 1K tokens Input · Cachelæsning **$0.000032** / 1K tokens Input · Cacheskrivning **$0.0004** / 1K tokens Input · Cacheskrivning, 1 time **—** / 1K tokens |

Ailoot reserverer et estimeret beløb før en anmodning. Efter resultatet afregnes det endelige beløb ud fra det målte forbrug. Ved streaming bruges den endelige forbrugsregistrering til afregningen. [Sådan fungerer reservation og afregning →](https://ailoot.ai/docs/da/billing/reserve/)

### Eksempelanmodninger

#### Ailoot Ultra · Anthropic Messages

Komplet minimalt requestbody i JSONcurl · brug dit UTF-8-dokumentPython · gem hele resultatet

```json
{
  "model": "qwen3.8-flash",
  "max_tokens": 128,
  "messages": [
    {
      "role": "user",
      "content": "Summarize the incident report."
    }
  ],
  "stream": false
}
```

```bash
set -eu
: "${AILOOT_API_KEY:?Set your Ailoot API key}"
: "${AILOOT_TEXT_FILE:?Set your actual UTF-8 document}"
export AILOOT_TEXT_FILE
python3 - <<'PY_REQUEST'
import json, os
from pathlib import Path

source_file = Path(os.environ['AILOOT_TEXT_FILE'])
if not source_file.is_file():
    raise SystemExit('Set AILOOT_TEXT_FILE to your actual UTF-8 document')
text = source_file.read_text(encoding='utf-8')
if not text.strip():
    raise SystemExit('Choose a document containing text')
payload = {'model': 'qwen3.8-flash', 'max_tokens': 128, 'messages': [{'role': 'user', 'content': 'Summarize the incident report.'}]}
payload['messages'][0]['content'] = 'Summarize this material and quote supporting source passages.\n\n' + text
Path('request.json').write_text(json.dumps(payload, ensure_ascii=False), encoding='utf-8')
PY_REQUEST
curl --fail-with-body --silent --show-error https://api.ailoot.ai/v1/messages \
  -H "x-api-key: $AILOOT_API_KEY" -H 'anthropic-version: 2023-06-01' -H 'Content-Type: application/json' \
  --data-binary @request.json -D response-headers.txt -o result.json
python3 - <<'PY_RESULT'
import json
from pathlib import Path

result = json.loads(Path('result.json').read_text(encoding='utf-8'))
print(json.dumps(result, ensure_ascii=False, indent=2))
PY_RESULT
```

```python
import json, os
from pathlib import Path

source_file = Path(os.environ['AILOOT_TEXT_FILE'])
if not source_file.is_file():
    raise SystemExit('Set AILOOT_TEXT_FILE to your actual UTF-8 document')
text = source_file.read_text(encoding='utf-8')
if not text.strip():
    raise SystemExit('Choose a document containing text')
payload = {'model': 'qwen3.8-flash', 'max_tokens': 128, 'messages': [{'role': 'user', 'content': 'Summarize the incident report.'}]}
payload['messages'][0]['content'] = 'Summarize this material and quote supporting source passages.\n\n' + text
from urllib.request import Request, urlopen
from urllib.error import HTTPError

api_key = os.environ['AILOOT_API_KEY']
if not api_key.strip():
    raise SystemExit('Set AILOOT_API_KEY before making a request')
headers = {'x-api-key': 'PLACEHOLDER_KEY', 'anthropic-version': '2023-06-01', 'Content-Type': 'application/json'}
headers['x-api-key'] = api_key
request = Request('https://api.ailoot.ai/v1/messages', data=json.dumps(payload, ensure_ascii=False).encode('utf-8'), headers=headers, method='POST')
try:
    with urlopen(request, timeout=120) as response:
        raw = response.read()
        Path('response-headers.txt').write_text(str(response.headers), encoding='utf-8')
except HTTPError as error:
    Path('result.json').write_bytes(error.read())
    Path('response-headers.txt').write_text(str(error.headers), encoding='utf-8')
    raise
Path('result.json').write_bytes(raw)
import json
from pathlib import Path

result = json.loads(Path('result.json').read_text(encoding='utf-8'))
print(json.dumps(result, ensure_ascii=False, indent=2))
```

### Hent og gem resultater

#### Ailoot Ultra · Anthropic Messages

JSON eller SSE

##### Behold alle færdige resultater

Gem hvert fuldstændigt returneret svar, hver fil og hver indholdsdel.

Bevar alle indholdsblokke, ræsonnementssignaturer og faktiske værktøjsbrugs-ID’er. Saml alle SSE-blokdeltaer; den første tekstblok er ikke hele outputtet.

##### Hvis det oprindelige svar skal kontrolleres

Bevar anmodnings-/svar-ID’er og headere. Der leveres ingen generel URL til at hente tekstjob.

Svarfelter

| Felt | Type |
| --- | --- |
| Felt`id` | Typestring |
| Felt`model` | Typestring |
| Felt`content[]` | Typetext\|thinking\|tool\_use\|other content block |
| Felt`stop_reason` | Typestring\|null |
| Felt`usage` | Typeobject |

Fejl og næste trin

| Svar | Betingelse | Næste trin |
| --- | --- | --- |
| Svar400 · `invalid_request_error` | BetingelseUgyldige obligatoriske felter, materialerepræsentation eller parameterværdi | Næste trinRet de angivne felter før en ny oprettelsesanmodning. |

### Aliaser

#### Modelaliaser

<strong>Ailoot</strong> [`qwen3.8-flash`](https://ailoot.ai/models/da/#m=qwen%2Fqwen3.8-flash&route=Core&caller=qwen3.8-flash&fmt=messages), [`qwen-flash`](https://ailoot.ai/models/da/#m=qwen%2Fqwen3.8-flash&route=Core&caller=qwen-flash&fmt=messages), [`qwen-flash-latest`](https://ailoot.ai/models/da/#m=qwen%2Fqwen3.8-flash&route=Core&caller=qwen-flash-latest&fmt=messages)
**Ailoot Ultra** [`qwen3.8-flash`](https://ailoot.ai/models/da/#m=qwen%2Fqwen3.8-flash&route=Ultra&caller=qwen3.8-flash&fmt=messages), [`qwen/qwen3.8-flash`](https://ailoot.ai/models/da/#m=qwen%2Fqwen3.8-flash&route=Ultra&caller=qwen%2Fqwen3.8-flash&fmt=messages)

#### Aliaser for metodestier

`/chat/completions`

#### Relaterede kalder-ID’er

[`qwen/qwen3.8-flash`](https://ailoot.ai/models/da/#m=qwen%2Fqwen3.8-flash&route=Ultra&caller=qwen%2Fqwen3.8-flash&fmt=messages), [`qwen-flash`](https://ailoot.ai/models/da/#m=qwen%2Fqwen3.8-flash&route=Core&caller=qwen-flash&fmt=messages), [`qwen-flash-latest`](https://ailoot.ai/models/da/#m=qwen%2Fqwen3.8-flash&route=Core&caller=qwen-flash-latest&fmt=messages), [`qwen3.8-flash`](https://ailoot.ai/models/da/#m=qwen%2Fqwen3.8-flash&route=Core&caller=qwen3.8-flash&fmt=messages), [`qwen3.8-flash`](https://ailoot.ai/models/da/#m=qwen%2Fqwen3.8-flash&route=Ultra&caller=qwen3.8-flash&fmt=messages)

**Ailoot · Anthropic Messages** `POST /v1/messages` `qwen-flash`

[`qwen-flash`](https://ailoot.ai/models/da/#m=qwen%2Fqwen3.8-flash&route=Core&caller=qwen-flash&fmt=messages)

Alibaba /`qwen-flash`

Model-ID

- `qwen3.8-flash`
- `qwen-flash`
- `qwen-flash-latest`

### Start

Multimodal model til softwareagenter og kontoropgaver med stor kontekst. I Ailoot analyserer den tekst og billeder og leverer et tekstsvar.

Accepterede input

Tekst · Billeder

Resultater

Tekst

### Tilgængelig i Ailoot · input og metoder

**Ailoot · Anthropic Messages** `POST /v1/messages`

Inputtyper

`text`, `image`

Outputtyper

`text`

Kontekst

991.808 tokens

Maksimalt output

131.072 tokens

Outputformat

json eller SSE

| Felt | Type | Krav | Værdier og grænser | Standard |
| --- | --- | --- | --- | --- |
| Felt`model` | Type`string` | KravPåkrævet | Værdier og grænser qwen-flash | Standard— |
| Felt`messages` | Type`message[]` | KravPåkrævet | Værdier og grænser Minimumsantal elementer: 1 | Standard— |
| Felt`messages[].role` | Type`string` | KravPåkrævet | Værdier og grænser user, assistant | Standard— |
| Felt`messages[].content` | Type`string\|content_block[]` | KravPåkrævet | Værdier og grænser | Standard— |
| Felt`system` | Type`string\|content_block[]` | KravValgfrit | Værdier og grænser | Standard— |
| Felt`max_tokens` | Type`integer` | KravPåkrævet | Værdier og grænser Minimum: 1 Grænsen gælder for: den præcise øvre grænse for valgt model/modelkort | Standard— |
| Felt`stream` | Type`boolean` | KravValgfrit | Værdier og grænser | Standardfalse |
| Felt`temperature` | Type`number` | KravValgfrit | Værdier og grænser Afhænger af modellen | Standard— |
| Felt`top_p` | Type`number` | KravValgfrit | Værdier og grænser Afhænger af modellen | Standard— |
| Felt`stop_sequences` | Type`string[]` | KravValgfrit | Værdier og grænser Afhænger af modellen | Standard— |
| Felt`tools` | Type`tool[]` | KravValgfrit | Værdier og grænser Afhænger af modellen | Standard— |
| Felt`tools[].name` | Type`string` | KravValgfrit | Værdier og grænser Gælder når: værktøj angivet | Standard— |
| Felt`tools[].description` | Type`string` | KravValgfrit | Værdier og grænser | Standard— |
| Felt`tools[].input_schema` | Type`JSON_schema` | KravValgfrit | Værdier og grænser | Standard— |
| Felt`tool_choice` | Type`object` | KravValgfrit | Værdier og grænser Afhænger af modellen | Standard— |
| Felt`thinking.type` | Type`string` | KravValgfrit | Værdier og grænser Afhænger af modellen | Standard— |
| Felt`thinking.budget_tokens` | Type`integer` | KravValgfrit | Værdier og grænser Afhænger af modellen | Standard— |
| Felt`output_config.effort` | Type`string` | KravValgfrit | Værdier og grænser Afhænger af modellen | Standard— |
| Felt`metadata` | Type`object` | KravValgfrit | Værdier og grænser | Standard— |
| Felt`cache_control` | Type`object` | KravValgfrit | Værdier og grænser Afhænger af modellen | Standard— |

Kombinationer af inputmaterialer

**Tekst** · UTF8-tekst

`messages[].content eller en blok med type=text`

**Tekst + billede**

`{type:image,source:{type:base64,media_type,data}} eller kilde med type=url`

Metodeparametre og livscyklus

| Parameter | Kontrakt |
| --- | --- |
| Parameter`material_types` | Kontrakttext, image |
| Parameter`required` | Kontraktmodel, messages, max\_tokens |
| Parameter`optional_controls` | Kontraktnull |
| Parameter`content_type` | Kontraktapplication/json |
| Parameter`text_file_material` | Kontraktfaktisk UTF-8-indhold indsat som tekst; fil-ID’er/URLs kræver særskilt præcis understøttelse |

Livscyklus: `exact retained published method`

Metodernes strukturer og ID’er er præcise; leverandørens muligheder er adskilt fra adgangstilladelse.

### Priser

#### Ailoot-metodetakster

Input

0,00015 US$ */ 1K*

Output

0,00047 US$ */ 1K*

Cachelæsning

0,000016 US$ */ 1K*

Cacheskrivning

0,0002 US$ */ 1K*

Cacheskrivning, 5 min.

0,0002 US$ */ 1K tokens*

Ailoot reserverer et estimeret beløb før en anmodning. Efter resultatet afregnes det endelige beløb ud fra det målte forbrug. Ved streaming bruges den endelige forbrugsregistrering til afregningen. [Sådan fungerer reservation og afregning →](https://ailoot.ai/docs/da/billing/reserve/)

#### Detaljer om referencetariffen

Referenceplaner på modelniveau ændrer ikke metodevalg, prisoverslag eller opkrævninger. Ved den aktive afregning anvendes taksterne for den valgte Ailoot-metode.

Modellens referenceplaner

#### Priser efter konfiguration

Knyt hver omkostning til de viste betingelser. Brug én takst for hver gruppe af alternative konfigurationer.

| Konfiguration | Takstplan | Konteksttokens, mere end | Konteksttokens, op til og med | Beløb |
| --- | --- | --- | --- | --- |
| KonfigurationOpenAI Chat · Grundtakster pr. token | TakstplanGrundtakst | Konteksttokens, mere end— | Konteksttokens, op til og medIngen øvre grænse | Beløb Input · Inputtokens **$0.0003** / 1K tokens Output · Outputtokens **$0.00094** / 1K tokens Input · Cachelæsning **$0.000032** / 1K tokens Input · Cacheskrivning **$0.0004** / 1K tokens Input · Cacheskrivning, 1 time **—** / 1K tokens |
| KonfigurationOpenAI Chat · Trin 1 efter anmodningens længde | Takstplan— | Konteksttokens, mere end0 | Konteksttokens, op til og medIngen øvre grænse | Beløb Input · Inputtokens **$0.0003** / 1K tokens Output · Outputtokens **$0.00094** / 1K tokens Input · Cachelæsning **$0.000032** / 1K tokens Input · Cacheskrivning **$0.0004** / 1K tokens Input · Cacheskrivning, 1 time **—** / 1K tokens |
| KonfigurationAnthropic Messages · Grundtakster pr. token | TakstplanGrundtakst | Konteksttokens, mere end— | Konteksttokens, op til og medIngen øvre grænse | Beløb Input · Inputtokens **$0.0003** / 1K tokens Output · Outputtokens **$0.00094** / 1K tokens Input · Cachelæsning **$0.000032** / 1K tokens Input · Cacheskrivning **$0.0004** / 1K tokens Input · Cacheskrivning, 1 time **—** / 1K tokens |
| KonfigurationAnthropic Messages · Trin 1 efter anmodningens længde | Takstplan— | Konteksttokens, mere end0 | Konteksttokens, op til og medIngen øvre grænse | Beløb Input · Inputtokens **$0.0003** / 1K tokens Output · Outputtokens **$0.00094** / 1K tokens Input · Cachelæsning **$0.000032** / 1K tokens Input · Cacheskrivning **$0.0004** / 1K tokens Input · Cacheskrivning, 1 time **—** / 1K tokens |

### Eksempelanmodninger

#### Ailoot · Anthropic Messages

TeksteksempelInput, billedePython SDKNode.js SDKPython-stream

```bash
set -eu
: "${AILOOT_API_KEY:?Set your Ailoot API key}"
: "${AILOOT_TEXT_FILE:?Set your actual UTF-8 source-material file}"
export AILOOT_TEXT_FILE
python3 - <<'PY_REQUEST'
import json,os
from pathlib import Path
p=json.loads('{"model": "qwen-flash", "max_tokens": 1024, "messages": []}')
f=Path(os.environ["AILOOT_TEXT_FILE"])
if not f.is_file():raise SystemExit("Choose your actual UTF-8 source material")
text=f.read_text(encoding="utf-8")
if not text.strip():raise SystemExit("Source material must contain text")
p["messages"]=[{"role":"user","content":"Summarize this material and quote supporting source passages.\n\n"+text}]
Path("request.json").write_text(json.dumps(p,ensure_ascii=False))
PY_REQUEST
curl --fail-with-body --silent --show-error https://api.ailoot.ai/v1/messages \
  -H "x-api-key: $AILOOT_API_KEY" -H 'anthropic-version: 2023-06-01' -H 'Content-Type: application/json' \
  --data-binary @request.json -D response-headers.txt -o result.json
python3 - <<'PY_RESULT'
import json
from pathlib import Path
print(json.dumps(json.loads(Path("result.json").read_text()),ensure_ascii=False,indent=2))
PY_RESULT
```

```bash
set -eu
: "${AILOOT_API_KEY:?Set your Ailoot API key}"
: "${AILOOT_IMAGE_FILE:?Set your actual PNG JPEG or WebP image}"
export AILOOT_IMAGE_FILE
python3 - <<'PY_REQUEST'
import json,os
from pathlib import Path
p=json.loads('{"model": "qwen-flash", "max_tokens": 1024, "messages": [{"role": "user", "content": [{"type": "text", "text": "Read labels and numbers in this image; flag unreadable text."}]}]}')
import base64
f=Path(os.environ["AILOOT_IMAGE_FILE"])
if not f.is_file():raise SystemExit("Choose an actual PNG JPEG or WebP image")
raw=f.read_bytes()
mime="image/png" if raw.startswith(b"\x89PNG\r\n\x1a\n") else "image/jpeg" if raw.startswith(b"\xff\xd8") else "image/webp" if raw[:4]==b"RIFF" and raw[8:12]==b"WEBP" else None
if not mime:raise SystemExit("Use PNG JPEG or WebP")
b64=base64.b64encode(raw).decode()
p["messages"][0]["content"].append({"type":"image","source":{"type":"base64","media_type":mime,"data":b64}})
Path("request.json").write_text(json.dumps(p,ensure_ascii=False))
PY_REQUEST
curl --fail-with-body --silent --show-error https://api.ailoot.ai/v1/messages \
  -H "x-api-key: $AILOOT_API_KEY" -H 'anthropic-version: 2023-06-01' -H 'Content-Type: application/json' \
  --data-binary @request.json -D response-headers.txt -o result.json
python3 - <<'PY_RESULT'
import json
from pathlib import Path
print(json.dumps(json.loads(Path("result.json").read_text()),ensure_ascii=False,indent=2))
PY_RESULT
```

```python
import anthropic
import os

if not os.environ.get("AILOOT_API_KEY", "").strip(): raise SystemExit("Set AILOOT_API_KEY before making a request")
client = anthropic.Anthropic(base_url="https://api.ailoot.ai", api_key=os.environ["AILOOT_API_KEY"], max_retries=0)
msg = client.messages.create(
    model="qwen-flash",
    max_tokens=1024,
    messages=[{"role": "user", "content": "Explain the difference between an observation and a hypothesis in three sentences."}],
)
import base64, json
from pathlib import Path

def save_result(data, stem="result"):
    # Keep every field, including usage, IDs, reasoning and tool requests.
    Path(stem + ".json").write_text(json.dumps(data, ensure_ascii=False, indent=2), encoding="utf-8")
    print(json.dumps(data, ensure_ascii=False, indent=2))
    def save_blob(encoded, suffix, label):
        raw = base64.b64decode(encoded, altchars=b"-_", validate=True)
        ext = "png" if raw.startswith(b"\x89PNG\r\n\x1a\n") else "jpg" if raw.startswith(b"\xff\xd8") else "webp" if raw[:4] == b"RIFF" and raw[8:12] == b"WEBP" else suffix
        file = Path(stem + "-" + label + "." + ext)
        file.write_bytes(raw)
        print("Saved", file)
    for index, block in enumerate(data.get("content") or []):
        print("Content", index, json.dumps(block, ensure_ascii=False))
    for choice in data.get("choices") or []:
        print("Choice", choice.get("index"), json.dumps(choice.get("message", choice.get("delta", {})), ensure_ascii=False))
    for index, item in enumerate(data.get("output") or []):
        print("Output", index, json.dumps(item, ensure_ascii=False))
        if item.get("type") == "image_generation_call" and item.get("result"):
            save_blob(item["result"], item.get("output_format") or "bin", "output-" + str(index))
    for ci, candidate in enumerate(data.get("candidates") or []):
        for pi, part in enumerate((candidate.get("content") or {}).get("parts") or []):
            print("Candidate/part", ci, pi, json.dumps(part, ensure_ascii=False))
            blob = part.get("inlineData") or part.get("inline_data")
            if blob and blob.get("data"):
                mime = blob.get("mimeType") or blob.get("mime_type")
                suffix = {"image/png":"png", "image/jpeg":"jpg", "image/webp":"webp", "audio/wav":"wav", "audio/mpeg":"mp3", "video/mp4":"mp4"}.get(mime, "bin")
                save_blob(blob["data"], suffix, "candidate-" + str(ci) + "-part-" + str(pi))

save_result(msg.to_dict(mode="json"))
```

```js
import Anthropic from "@anthropic-ai/sdk";

if (!process.env.AILOOT_API_KEY?.trim()) throw new Error("Set AILOOT_API_KEY before making a request");
const client = new Anthropic({ baseURL: "https://api.ailoot.ai", apiKey: process.env.AILOOT_API_KEY, maxRetries: 0 });
const msg = await client.messages.create({
  model: "qwen-flash",
  max_tokens: 1024,
  messages: [{ role: "user", content: "Explain the difference between an observation and a hypothesis in three sentences." }],
});
import { writeFileSync } from "node:fs";

function saveResult(data, stem = "result") {
  writeFileSync(stem + ".json", JSON.stringify(data, null, 2));
  console.log(JSON.stringify(data, null, 2));
  const saveBlob = (encoded, suffix, label) => {
    const raw = Buffer.from(encoded, "base64");
    const ext = raw.subarray(0,8).equals(Buffer.from([137,80,78,71,13,10,26,10])) ? "png" : raw[0]===255 && raw[1]===216 ? "jpg" : raw.subarray(0,4).toString()==="RIFF" && raw.subarray(8,12).toString()==="WEBP" ? "webp" : suffix;
    const file = `${stem}-${label}.${ext}`;
    writeFileSync(file, raw); console.log("Saved", file);
  };
  for (const [i, block] of (data.content || []).entries()) console.log("Content", i, JSON.stringify(block));
  for (const choice of data.choices || []) console.log("Choice", choice.index, JSON.stringify(choice.message || choice.delta || {}));
  for (const [i, item] of (data.output || []).entries()) {
    console.log("Output", i, JSON.stringify(item));
    if (item.type === "image_generation_call" && item.result) saveBlob(item.result, item.output_format || "bin", `output-${i}`);
  }
  for (const [ci, candidate] of (data.candidates || []).entries()) {
    for (const [pi, part] of (candidate.content?.parts || []).entries()) {
      console.log("Candidate/part", ci, pi, JSON.stringify(part));
      const blob = part.inlineData || part.inline_data;
      if (blob?.data) {
        const mime = blob.mimeType || blob.mime_type;
        const suffix = ({"image/png":"png", "image/jpeg":"jpg", "image/webp":"webp", "audio/wav":"wav", "audio/mpeg":"mp3", "video/mp4":"mp4"})[mime] || "bin";
        saveBlob(blob.data, suffix, `candidate-${ci}-part-${pi}`);
      }
    }
  }
}

saveResult(msg);
```

```python
import anthropic,os
from pathlib import Path

if not os.environ.get("AILOOT_API_KEY", "").strip(): raise SystemExit("Set AILOOT_API_KEY before making a request")
client=anthropic.Anthropic(base_url="https://api.ailoot.ai",api_key=os.environ["AILOOT_API_KEY"],max_retries=0)
import base64, json
from pathlib import Path

def save_result(data, stem="result"):
    # Keep every field, including usage, IDs, reasoning and tool requests.
    Path(stem + ".json").write_text(json.dumps(data, ensure_ascii=False, indent=2), encoding="utf-8")
    print(json.dumps(data, ensure_ascii=False, indent=2))
    def save_blob(encoded, suffix, label):
        raw = base64.b64decode(encoded, altchars=b"-_", validate=True)
        ext = "png" if raw.startswith(b"\x89PNG\r\n\x1a\n") else "jpg" if raw.startswith(b"\xff\xd8") else "webp" if raw[:4] == b"RIFF" and raw[8:12] == b"WEBP" else suffix
        file = Path(stem + "-" + label + "." + ext)
        file.write_bytes(raw)
        print("Saved", file)
    for index, block in enumerate(data.get("content") or []):
        print("Content", index, json.dumps(block, ensure_ascii=False))
    for choice in data.get("choices") or []:
        print("Choice", choice.get("index"), json.dumps(choice.get("message", choice.get("delta", {})), ensure_ascii=False))
    for index, item in enumerate(data.get("output") or []):
        print("Output", index, json.dumps(item, ensure_ascii=False))
        if item.get("type") == "image_generation_call" and item.get("result"):
            save_blob(item["result"], item.get("output_format") or "bin", "output-" + str(index))
    for ci, candidate in enumerate(data.get("candidates") or []):
        for pi, part in enumerate((candidate.get("content") or {}).get("parts") or []):
            print("Candidate/part", ci, pi, json.dumps(part, ensure_ascii=False))
            blob = part.get("inlineData") or part.get("inline_data")
            if blob and blob.get("data"):
                mime = blob.get("mimeType") or blob.get("mime_type")
                suffix = {"image/png":"png", "image/jpeg":"jpg", "image/webp":"webp", "audio/wav":"wav", "audio/mpeg":"mp3", "video/mp4":"mp4"}.get(mime, "bin")
                save_blob(blob["data"], suffix, "candidate-" + str(ci) + "-part-" + str(pi))

with client.messages.stream(model='qwen-flash',max_tokens=1024,messages=[{"role":"user","content":"Explain observations and hypotheses in three sentences."}]) as stream:
    with Path("stream-events.jsonl").open("w",encoding="utf-8") as log:
        for event in stream:
            payload=event.to_dict(mode="json")
            log.write(json.dumps(payload,ensure_ascii=False)+"\n"); log.flush()
            print(json.dumps(payload,ensure_ascii=False))
    final=stream.get_final_message()
    save_result(final.to_dict(mode="json"),"stream-result")
```

### Hent og gem resultater

#### Ailoot · Anthropic Messages

json eller SSE

##### Behold alle færdige resultater

Gem hvert fuldstændigt returneret svar, hver fil og hver indholdsdel.

Bevar alle indholdsblokke, ræsonnementssignaturer og faktiske værktøjsbrugs-ID’er. Saml alle SSE-blokdeltaer; den første tekstblok er ikke hele outputtet.

##### Hvis det oprindelige svar skal kontrolleres

Bevar anmodnings-/svar-ID’er og headere. Der leveres ingen generel URL til at hente tekstjob.

Svarfelter

| Felt | Type |
| --- | --- |
| Felt`id` | Typestring |
| Felt`model` | Typestring |
| Felt`content[]` | Typetext\|thinking\|tool\_use\|other content block |
| Felt`stop_reason` | Typestring\|null |
| Felt`usage` | Typeobject |

Fejl og næste trin

| Svar | Betingelse | Næste trin |
| --- | --- | --- |
| Svar400 · `invalid_request_error` | BetingelseUgyldige obligatoriske felter, materialerepræsentation eller parameterværdi | Næste trinRet de angivne felter før en ny oprettelsesanmodning. |

### Aliaser

#### Modelaliaser

<strong>Ailoot</strong> [`qwen3.8-flash`](https://ailoot.ai/models/da/#m=qwen%2Fqwen3.8-flash&route=Core&caller=qwen3.8-flash&fmt=messages), [`qwen-flash`](https://ailoot.ai/models/da/#m=qwen%2Fqwen3.8-flash&route=Core&caller=qwen-flash&fmt=messages), [`qwen-flash-latest`](https://ailoot.ai/models/da/#m=qwen%2Fqwen3.8-flash&route=Core&caller=qwen-flash-latest&fmt=messages)
**Ailoot Ultra** [`qwen3.8-flash`](https://ailoot.ai/models/da/#m=qwen%2Fqwen3.8-flash&route=Ultra&caller=qwen3.8-flash&fmt=messages), [`qwen/qwen3.8-flash`](https://ailoot.ai/models/da/#m=qwen%2Fqwen3.8-flash&route=Ultra&caller=qwen%2Fqwen3.8-flash&fmt=messages)

#### Aliaser for metodestier

`/chat/completions`

#### Relaterede kalder-ID’er

[`qwen/qwen3.8-flash`](https://ailoot.ai/models/da/#m=qwen%2Fqwen3.8-flash&route=Ultra&caller=qwen%2Fqwen3.8-flash&fmt=messages), [`qwen-flash`](https://ailoot.ai/models/da/#m=qwen%2Fqwen3.8-flash&route=Core&caller=qwen-flash&fmt=messages), [`qwen-flash-latest`](https://ailoot.ai/models/da/#m=qwen%2Fqwen3.8-flash&route=Core&caller=qwen-flash-latest&fmt=messages), [`qwen3.8-flash`](https://ailoot.ai/models/da/#m=qwen%2Fqwen3.8-flash&route=Core&caller=qwen3.8-flash&fmt=messages), [`qwen3.8-flash`](https://ailoot.ai/models/da/#m=qwen%2Fqwen3.8-flash&route=Ultra&caller=qwen3.8-flash&fmt=messages)

**Ailoot · OpenAI Responses** `POST /v1/responses` `qwen-flash`

[`qwen-flash`](https://ailoot.ai/models/da/#m=qwen%2Fqwen3.8-flash&route=Core&caller=qwen-flash&fmt=responses)

Alibaba /`qwen-flash`

Model-ID

- `qwen3.8-flash`
- `qwen-flash`
- `qwen-flash-latest`

### Start

Multimodal model til softwareagenter og kontoropgaver med stor kontekst. I Ailoot analyserer den tekst og billeder og leverer et tekstsvar.

Accepterede input

Tekst · Billeder

Resultater

Tekst

### Tilgængelig i Ailoot · input og metoder

**Ailoot · OpenAI Responses** `POST /v1/responses`

Inputtyper

`text`, `image`

Outputtyper

`text`

Kontekst

991.808 tokens

Maksimalt output

131.072 tokens

Outputformat

json eller SSE

| Felt | Type | Krav | Værdier og grænser | Standard |
| --- | --- | --- | --- | --- |
| Felt`model` | Type`string` | KravPåkrævet | Værdier og grænser qwen-flash | Standard— |
| Felt`input` | Type`string\|input_item[]` | KravPåkrævet | Værdier og grænser | Standard— |
| Felt`instructions` | Type`string` | KravValgfrit | Værdier og grænser | Standard— |
| Felt`input[].type` | Type`string` | KravValgfrit | Værdier og grænser message, reasoning, function\_call, function\_call\_output | Standard— |
| Felt`input[].content` | Type`string\|content_part[]` | KravValgfrit | Værdier og grænser | Standard— |
| Felt`input[].call_id` | Type`string` | KravValgfrit | Værdier og grænser Gælder når: function\_call\_output; bevar det faktisk returnerede call\_id | Standard— |
| Felt`input[].output` | Type`string\|content_part[]` | KravValgfrit | Værdier og grænser Gælder når: function\_call\_output | Standard— |
| Felt`max_output_tokens` | Type`integer` | KravValgfrit | Værdier og grænser Minimum: 1 Afhænger af modellen | Standard— |
| Felt`stream` | Type`boolean` | KravValgfrit | Værdier og grænser | Standardfalse |
| Felt`temperature` | Type`number` | KravValgfrit | Værdier og grænser Afhænger af modellen | Standard— |
| Felt`top_p` | Type`number` | KravValgfrit | Værdier og grænser Afhænger af modellen | Standard— |
| Felt`tools` | Type`tool[]` | KravValgfrit | Værdier og grænser Afhænger af modellen | Standard— |
| Felt`tool_choice` | Type`string\|object` | KravValgfrit | Værdier og grænser Afhænger af modellen | Standard— |
| Felt`parallel_tool_calls` | Type`boolean` | KravValgfrit | Værdier og grænser Afhænger af modellen | Standard— |
| Felt`reasoning.effort` | Type`string` | KravValgfrit | Værdier og grænser Afhænger af modellen | Standard— |
| Felt`reasoning.summary` | Type`string` | KravValgfrit | Værdier og grænser Afhænger af modellen | Standard— |
| Felt`text.format` | Type`object` | KravValgfrit | Værdier og grænser Afhænger af modellen | Standard— |
| Felt`text.verbosity` | Type`string` | KravValgfrit | Værdier og grænser Afhænger af modellen | Standard— |
| Felt`include` | Type`string[]` | KravValgfrit | Værdier og grænser Afhænger af modellen | Standard— |
| Felt`store` | Type`boolean` | KravValgfrit | Værdier og grænser Afhænger af modellen | Standard— |
| Felt`previous_response_id` | Type`string` | KravValgfrit | Værdier og grænser ID-krav: Kun et faktisk svar-ID fra en understøttet fortsættelse Afhænger af modellen | Standard— |
| Felt`service_tier` | Type`string` | KravValgfrit | Værdier og grænser Afhænger af modellen | Standard— |
| Felt`prompt_cache_key` | Type`string` | KravValgfrit | Værdier og grænser Afhænger af modellen | Standard— |
| Felt`prompt_cache_options` | Type`object` | KravValgfrit | Værdier og grænser Afhænger af modellen | Standard— |

Kombinationer af inputmaterialer

**Tekst** · UTF8-tekst

`inputtekst eller en input_text-del`

**Tekst + billede**

`{type:input_image,image_url}`

Metodeparametre og livscyklus

| Parameter | Kontrakt |
| --- | --- |
| Parameter`material_types` | Kontrakttext, image |
| Parameter`required` | Kontraktmodel, input |
| Parameter`optional_controls` | Kontraktnull |
| Parameter`content_type` | Kontraktapplication/json |
| Parameter`text_file_material` | Kontraktfaktisk UTF-8-indhold indsat som tekst; fil-ID’er/URLs kræver særskilt præcis understøttelse |

Livscyklus: `exact retained published method`

Metodernes strukturer og ID’er er præcise; leverandørens muligheder er adskilt fra adgangstilladelse.

### Priser

#### Ailoot-metodetakster

Tekstinput

0,00015 US$ */ 1K*

Tekstoutput

0,00047 US$ */ 1K*

Input, billede

0,00015 US$ */ 1K tokens*

Cachelæsning

0,000016 US$ */ 1K*

Cacheskrivning

0,0002 US$ */ 1K*

Cacheskrivning, 5 min.

0,0002 US$ */ 1K tokens*

Ailoot reserverer et estimeret beløb før en anmodning. Efter resultatet afregnes det endelige beløb ud fra det målte forbrug. Ved streaming bruges den endelige forbrugsregistrering til afregningen. [Sådan fungerer reservation og afregning →](https://ailoot.ai/docs/da/billing/reserve/)

#### Detaljer om referencetariffen

Referenceplaner på modelniveau ændrer ikke metodevalg, prisoverslag eller opkrævninger. Ved den aktive afregning anvendes taksterne for den valgte Ailoot-metode.

Modellens referenceplaner

#### Priser efter konfiguration

Knyt hver omkostning til de viste betingelser. Brug én takst for hver gruppe af alternative konfigurationer.

| Konfiguration | Takstplan | Konteksttokens, mere end | Konteksttokens, op til og med | Beløb |
| --- | --- | --- | --- | --- |
| KonfigurationOpenAI Chat · Grundtakster pr. token | TakstplanGrundtakst | Konteksttokens, mere end— | Konteksttokens, op til og medIngen øvre grænse | Beløb Input · Inputtokens **$0.0003** / 1K tokens Output · Outputtokens **$0.00094** / 1K tokens Input · Cachelæsning **$0.000032** / 1K tokens Input · Cacheskrivning **$0.0004** / 1K tokens Input · Cacheskrivning, 1 time **—** / 1K tokens |
| KonfigurationOpenAI Chat · Trin 1 efter anmodningens længde | Takstplan— | Konteksttokens, mere end0 | Konteksttokens, op til og medIngen øvre grænse | Beløb Input · Inputtokens **$0.0003** / 1K tokens Output · Outputtokens **$0.00094** / 1K tokens Input · Cachelæsning **$0.000032** / 1K tokens Input · Cacheskrivning **$0.0004** / 1K tokens Input · Cacheskrivning, 1 time **—** / 1K tokens |
| KonfigurationAnthropic Messages · Grundtakster pr. token | TakstplanGrundtakst | Konteksttokens, mere end— | Konteksttokens, op til og medIngen øvre grænse | Beløb Input · Inputtokens **$0.0003** / 1K tokens Output · Outputtokens **$0.00094** / 1K tokens Input · Cachelæsning **$0.000032** / 1K tokens Input · Cacheskrivning **$0.0004** / 1K tokens Input · Cacheskrivning, 1 time **—** / 1K tokens |
| KonfigurationAnthropic Messages · Trin 1 efter anmodningens længde | Takstplan— | Konteksttokens, mere end0 | Konteksttokens, op til og medIngen øvre grænse | Beløb Input · Inputtokens **$0.0003** / 1K tokens Output · Outputtokens **$0.00094** / 1K tokens Input · Cachelæsning **$0.000032** / 1K tokens Input · Cacheskrivning **$0.0004** / 1K tokens Input · Cacheskrivning, 1 time **—** / 1K tokens |

### Eksempelanmodninger

#### Ailoot · OpenAI Responses

TeksteksempelInput, billedePython SDKNode.js SDKPython-stream

```bash
set -eu
: "${AILOOT_API_KEY:?Set your Ailoot API key}"
: "${AILOOT_TEXT_FILE:?Set your actual UTF-8 source-material file}"
export AILOOT_TEXT_FILE
python3 - <<'PY_REQUEST'
import json,os
from pathlib import Path
p=json.loads('{"model": "qwen-flash", "input": ""}')
f=Path(os.environ["AILOOT_TEXT_FILE"])
if not f.is_file():raise SystemExit("Choose your actual UTF-8 source material")
text=f.read_text(encoding="utf-8")
if not text.strip():raise SystemExit("Source material must contain text")
p["input"]="Summarize this material and quote supporting source passages.\n\n"+text
Path("request.json").write_text(json.dumps(p,ensure_ascii=False))
PY_REQUEST
curl --fail-with-body --silent --show-error https://api.ailoot.ai/v1/responses \
  -H "Authorization: Bearer $AILOOT_API_KEY" -H 'Content-Type: application/json' \
  --data-binary @request.json -D response-headers.txt -o result.json
python3 - <<'PY_RESULT'
import base64, json
from pathlib import Path

def save_result(data, stem="result"):
    # Keep every field, including usage, IDs, reasoning and tool requests.
    Path(stem + ".json").write_text(json.dumps(data, ensure_ascii=False, indent=2), encoding="utf-8")
    print(json.dumps(data, ensure_ascii=False, indent=2))
    def save_blob(encoded, suffix, label):
        raw = base64.b64decode(encoded, altchars=b"-_", validate=True)
        ext = "png" if raw.startswith(b"\x89PNG\r\n\x1a\n") else "jpg" if raw.startswith(b"\xff\xd8") else "webp" if raw[:4] == b"RIFF" and raw[8:12] == b"WEBP" else suffix
        file = Path(stem + "-" + label + "." + ext)
        file.write_bytes(raw)
        print("Saved", file)
    for index, block in enumerate(data.get("content") or []):
        print("Content", index, json.dumps(block, ensure_ascii=False))
    for choice in data.get("choices") or []:
        print("Choice", choice.get("index"), json.dumps(choice.get("message", choice.get("delta", {})), ensure_ascii=False))
    for index, item in enumerate(data.get("output") or []):
        print("Output", index, json.dumps(item, ensure_ascii=False))
        if item.get("type") == "image_generation_call" and item.get("result"):
            save_blob(item["result"], item.get("output_format") or "bin", "output-" + str(index))
    for ci, candidate in enumerate(data.get("candidates") or []):
        for pi, part in enumerate((candidate.get("content") or {}).get("parts") or []):
            print("Candidate/part", ci, pi, json.dumps(part, ensure_ascii=False))
            blob = part.get("inlineData") or part.get("inline_data")
            if blob and blob.get("data"):
                mime = blob.get("mimeType") or blob.get("mime_type")
                suffix = {"image/png":"png", "image/jpeg":"jpg", "image/webp":"webp", "audio/wav":"wav", "audio/mpeg":"mp3", "video/mp4":"mp4"}.get(mime, "bin")
                save_blob(blob["data"], suffix, "candidate-" + str(ci) + "-part-" + str(pi))

save_result(json.loads(Path("result.json").read_text(encoding="utf-8")))
PY_RESULT
```

```bash
set -eu
: "${AILOOT_API_KEY:?Set your Ailoot API key}"
: "${AILOOT_IMAGE_FILE:?Set your actual PNG JPEG or WebP image}"
export AILOOT_IMAGE_FILE
python3 - <<'PY_REQUEST'
import json,os
from pathlib import Path
p=json.loads('{"model": "qwen-flash", "input": [{"role": "user", "content": [{"type": "input_text", "text": "Read labels and numbers in this image; flag unreadable text."}]}]}')
import base64
f=Path(os.environ["AILOOT_IMAGE_FILE"])
if not f.is_file():raise SystemExit("Choose an actual PNG JPEG or WebP image")
raw=f.read_bytes()
mime="image/png" if raw.startswith(b"\x89PNG\r\n\x1a\n") else "image/jpeg" if raw.startswith(b"\xff\xd8") else "image/webp" if raw[:4]==b"RIFF" and raw[8:12]==b"WEBP" else None
if not mime:raise SystemExit("Use PNG JPEG or WebP")
b64=base64.b64encode(raw).decode()
p["input"][0]["content"].append({"type":"input_image","image_url":"data:"+mime+";base64,"+b64})
Path("request.json").write_text(json.dumps(p,ensure_ascii=False))
PY_REQUEST
curl --fail-with-body --silent --show-error https://api.ailoot.ai/v1/responses \
  -H "Authorization: Bearer $AILOOT_API_KEY" -H 'Content-Type: application/json' \
  --data-binary @request.json -D response-headers.txt -o result.json
python3 - <<'PY_RESULT'
import base64, json
from pathlib import Path

def save_result(data, stem="result"):
    # Keep every field, including usage, IDs, reasoning and tool requests.
    Path(stem + ".json").write_text(json.dumps(data, ensure_ascii=False, indent=2), encoding="utf-8")
    print(json.dumps(data, ensure_ascii=False, indent=2))
    def save_blob(encoded, suffix, label):
        raw = base64.b64decode(encoded, altchars=b"-_", validate=True)
        ext = "png" if raw.startswith(b"\x89PNG\r\n\x1a\n") else "jpg" if raw.startswith(b"\xff\xd8") else "webp" if raw[:4] == b"RIFF" and raw[8:12] == b"WEBP" else suffix
        file = Path(stem + "-" + label + "." + ext)
        file.write_bytes(raw)
        print("Saved", file)
    for index, block in enumerate(data.get("content") or []):
        print("Content", index, json.dumps(block, ensure_ascii=False))
    for choice in data.get("choices") or []:
        print("Choice", choice.get("index"), json.dumps(choice.get("message", choice.get("delta", {})), ensure_ascii=False))
    for index, item in enumerate(data.get("output") or []):
        print("Output", index, json.dumps(item, ensure_ascii=False))
        if item.get("type") == "image_generation_call" and item.get("result"):
            save_blob(item["result"], item.get("output_format") or "bin", "output-" + str(index))
    for ci, candidate in enumerate(data.get("candidates") or []):
        for pi, part in enumerate((candidate.get("content") or {}).get("parts") or []):
            print("Candidate/part", ci, pi, json.dumps(part, ensure_ascii=False))
            blob = part.get("inlineData") or part.get("inline_data")
            if blob and blob.get("data"):
                mime = blob.get("mimeType") or blob.get("mime_type")
                suffix = {"image/png":"png", "image/jpeg":"jpg", "image/webp":"webp", "audio/wav":"wav", "audio/mpeg":"mp3", "video/mp4":"mp4"}.get(mime, "bin")
                save_blob(blob["data"], suffix, "candidate-" + str(ci) + "-part-" + str(pi))

save_result(json.loads(Path("result.json").read_text(encoding="utf-8")))
PY_RESULT
```

```python
from openai import OpenAI
import os

if not os.environ.get("AILOOT_API_KEY", "").strip(): raise SystemExit("Set AILOOT_API_KEY before making a request")
client = OpenAI(base_url="https://api.ailoot.ai/v1", api_key=os.environ["AILOOT_API_KEY"], max_retries=0)
resp = client.responses.create(model="qwen-flash", input="Explain the difference between an observation and a hypothesis in three sentences.")
import base64, json
from pathlib import Path

def save_result(data, stem="result"):
    # Keep every field, including usage, IDs, reasoning and tool requests.
    Path(stem + ".json").write_text(json.dumps(data, ensure_ascii=False, indent=2), encoding="utf-8")
    print(json.dumps(data, ensure_ascii=False, indent=2))
    def save_blob(encoded, suffix, label):
        raw = base64.b64decode(encoded, altchars=b"-_", validate=True)
        ext = "png" if raw.startswith(b"\x89PNG\r\n\x1a\n") else "jpg" if raw.startswith(b"\xff\xd8") else "webp" if raw[:4] == b"RIFF" and raw[8:12] == b"WEBP" else suffix
        file = Path(stem + "-" + label + "." + ext)
        file.write_bytes(raw)
        print("Saved", file)
    for index, block in enumerate(data.get("content") or []):
        print("Content", index, json.dumps(block, ensure_ascii=False))
    for choice in data.get("choices") or []:
        print("Choice", choice.get("index"), json.dumps(choice.get("message", choice.get("delta", {})), ensure_ascii=False))
    for index, item in enumerate(data.get("output") or []):
        print("Output", index, json.dumps(item, ensure_ascii=False))
        if item.get("type") == "image_generation_call" and item.get("result"):
            save_blob(item["result"], item.get("output_format") or "bin", "output-" + str(index))
    for ci, candidate in enumerate(data.get("candidates") or []):
        for pi, part in enumerate((candidate.get("content") or {}).get("parts") or []):
            print("Candidate/part", ci, pi, json.dumps(part, ensure_ascii=False))
            blob = part.get("inlineData") or part.get("inline_data")
            if blob and blob.get("data"):
                mime = blob.get("mimeType") or blob.get("mime_type")
                suffix = {"image/png":"png", "image/jpeg":"jpg", "image/webp":"webp", "audio/wav":"wav", "audio/mpeg":"mp3", "video/mp4":"mp4"}.get(mime, "bin")
                save_blob(blob["data"], suffix, "candidate-" + str(ci) + "-part-" + str(pi))

save_result(resp.to_dict(mode="json"))
```

```js
import OpenAI from "openai";

if (!process.env.AILOOT_API_KEY?.trim()) throw new Error("Set AILOOT_API_KEY before making a request");
const client = new OpenAI({ baseURL: "https://api.ailoot.ai/v1", apiKey: process.env.AILOOT_API_KEY, maxRetries: 0 });
const resp = await client.responses.create({ model: "qwen-flash", input: "Explain the difference between an observation and a hypothesis in three sentences." });
import { writeFileSync } from "node:fs";

function saveResult(data, stem = "result") {
  writeFileSync(stem + ".json", JSON.stringify(data, null, 2));
  console.log(JSON.stringify(data, null, 2));
  const saveBlob = (encoded, suffix, label) => {
    const raw = Buffer.from(encoded, "base64");
    const ext = raw.subarray(0,8).equals(Buffer.from([137,80,78,71,13,10,26,10])) ? "png" : raw[0]===255 && raw[1]===216 ? "jpg" : raw.subarray(0,4).toString()==="RIFF" && raw.subarray(8,12).toString()==="WEBP" ? "webp" : suffix;
    const file = `${stem}-${label}.${ext}`;
    writeFileSync(file, raw); console.log("Saved", file);
  };
  for (const [i, block] of (data.content || []).entries()) console.log("Content", i, JSON.stringify(block));
  for (const choice of data.choices || []) console.log("Choice", choice.index, JSON.stringify(choice.message || choice.delta || {}));
  for (const [i, item] of (data.output || []).entries()) {
    console.log("Output", i, JSON.stringify(item));
    if (item.type === "image_generation_call" && item.result) saveBlob(item.result, item.output_format || "bin", `output-${i}`);
  }
  for (const [ci, candidate] of (data.candidates || []).entries()) {
    for (const [pi, part] of (candidate.content?.parts || []).entries()) {
      console.log("Candidate/part", ci, pi, JSON.stringify(part));
      const blob = part.inlineData || part.inline_data;
      if (blob?.data) {
        const mime = blob.mimeType || blob.mime_type;
        const suffix = ({"image/png":"png", "image/jpeg":"jpg", "image/webp":"webp", "audio/wav":"wav", "audio/mpeg":"mp3", "video/mp4":"mp4"})[mime] || "bin";
        saveBlob(blob.data, suffix, `candidate-${ci}-part-${pi}`);
      }
    }
  }
}

saveResult(resp);
```

```python
from openai import OpenAI
import os
from pathlib import Path
import base64, json
from pathlib import Path

def save_result(data, stem="result"):
    # Keep every field, including usage, IDs, reasoning and tool requests.
    Path(stem + ".json").write_text(json.dumps(data, ensure_ascii=False, indent=2), encoding="utf-8")
    print(json.dumps(data, ensure_ascii=False, indent=2))
    def save_blob(encoded, suffix, label):
        raw = base64.b64decode(encoded, altchars=b"-_", validate=True)
        ext = "png" if raw.startswith(b"\x89PNG\r\n\x1a\n") else "jpg" if raw.startswith(b"\xff\xd8") else "webp" if raw[:4] == b"RIFF" and raw[8:12] == b"WEBP" else suffix
        file = Path(stem + "-" + label + "." + ext)
        file.write_bytes(raw)
        print("Saved", file)
    for index, block in enumerate(data.get("content") or []):
        print("Content", index, json.dumps(block, ensure_ascii=False))
    for choice in data.get("choices") or []:
        print("Choice", choice.get("index"), json.dumps(choice.get("message", choice.get("delta", {})), ensure_ascii=False))
    for index, item in enumerate(data.get("output") or []):
        print("Output", index, json.dumps(item, ensure_ascii=False))
        if item.get("type") == "image_generation_call" and item.get("result"):
            save_blob(item["result"], item.get("output_format") or "bin", "output-" + str(index))
    for ci, candidate in enumerate(data.get("candidates") or []):
        for pi, part in enumerate((candidate.get("content") or {}).get("parts") or []):
            print("Candidate/part", ci, pi, json.dumps(part, ensure_ascii=False))
            blob = part.get("inlineData") or part.get("inline_data")
            if blob and blob.get("data"):
                mime = blob.get("mimeType") or blob.get("mime_type")
                suffix = {"image/png":"png", "image/jpeg":"jpg", "image/webp":"webp", "audio/wav":"wav", "audio/mpeg":"mp3", "video/mp4":"mp4"}.get(mime, "bin")
                save_blob(blob["data"], suffix, "candidate-" + str(ci) + "-part-" + str(pi))

if not os.environ.get("AILOOT_API_KEY", "").strip(): raise SystemExit("Set AILOOT_API_KEY before making a request")
client=OpenAI(base_url="https://api.ailoot.ai/v1",api_key=os.environ["AILOOT_API_KEY"],max_retries=0)
with client.responses.stream(model="qwen-flash", input="Explain the difference between an observation and a hypothesis in three sentences.") as stream:
    with Path("stream-events.jsonl").open("w",encoding="utf-8") as log:
        for event in stream:
            payload=event.to_dict(mode="json")
            log.write(json.dumps(payload,ensure_ascii=False)+"\n"); log.flush()
            print(json.dumps(payload,ensure_ascii=False))
    final=stream.get_final_response()
    save_result(final.to_dict(mode="json"),"stream-result")
```

### Hent og gem resultater

#### Ailoot · OpenAI Responses

json eller SSE

##### Behold alle færdige resultater

Gem hvert fuldstændigt returneret svar, hver fil og hver indholdsdel.

Bevar hvert outputelement og hver indholdsdel, faktisk call\_id for funktioner, krypteret ræsonnement og forbrugsoplysninger. Bevar ved streaming den fulde hændelses-/elementidentitet.

##### Hvis det oprindelige svar skal kontrolleres

Bevar anmodnings-/svar-ID’er og headere. Der leveres ingen generel URL til at hente tekstjob.

Svarfelter

| Felt | Type |
| --- | --- |
| Felt`id` | Typestring |
| Felt`status` | Typestring |
| Felt`output[]` | Typemessage\|reasoning\|function\_call\|other item |
| Felt`output[].content[]` | Typecontent part |
| Felt`usage` | Typeobject |

Fejl og næste trin

| Svar | Betingelse | Næste trin |
| --- | --- | --- |
| Svar400 · `invalid_request_error` | BetingelseUgyldige obligatoriske felter, materialerepræsentation eller parameterværdi | Næste trinRet de angivne felter før en ny oprettelsesanmodning. |

### Aliaser

#### Modelaliaser

<strong>Ailoot</strong> [`qwen3.8-flash`](https://ailoot.ai/models/da/#m=qwen%2Fqwen3.8-flash&route=Core&caller=qwen3.8-flash&fmt=responses), [`qwen-flash`](https://ailoot.ai/models/da/#m=qwen%2Fqwen3.8-flash&route=Core&caller=qwen-flash&fmt=responses), [`qwen-flash-latest`](https://ailoot.ai/models/da/#m=qwen%2Fqwen3.8-flash&route=Core&caller=qwen-flash-latest&fmt=responses)
**Ailoot Ultra** [`qwen3.8-flash`](https://ailoot.ai/models/da/#m=qwen%2Fqwen3.8-flash&route=Ultra&caller=qwen3.8-flash), [`qwen/qwen3.8-flash`](https://ailoot.ai/models/da/#m=qwen%2Fqwen3.8-flash&route=Ultra&caller=qwen%2Fqwen3.8-flash)

#### Aliaser for metodestier

`/chat/completions`

#### Relaterede kalder-ID’er

[`qwen/qwen3.8-flash`](https://ailoot.ai/models/da/#m=qwen%2Fqwen3.8-flash&route=Ultra&caller=qwen%2Fqwen3.8-flash), [`qwen-flash`](https://ailoot.ai/models/da/#m=qwen%2Fqwen3.8-flash&route=Core&caller=qwen-flash&fmt=responses), [`qwen-flash-latest`](https://ailoot.ai/models/da/#m=qwen%2Fqwen3.8-flash&route=Core&caller=qwen-flash-latest&fmt=responses), [`qwen3.8-flash`](https://ailoot.ai/models/da/#m=qwen%2Fqwen3.8-flash&route=Core&caller=qwen3.8-flash&fmt=responses), [`qwen3.8-flash`](https://ailoot.ai/models/da/#m=qwen%2Fqwen3.8-flash&route=Ultra&caller=qwen3.8-flash)

**Ailoot · OpenAI Chat** `POST /v1/chat/completions` `qwen-flash`

[`qwen-flash`](https://ailoot.ai/models/da/#m=qwen%2Fqwen3.8-flash&route=Core&caller=qwen-flash&fmt=chat)

Alibaba /`qwen-flash`

Model-ID

- `qwen3.8-flash`
- `qwen-flash`
- `qwen-flash-latest`

### Start

Multimodal model til softwareagenter og kontoropgaver med stor kontekst. I Ailoot analyserer den tekst og billeder og leverer et tekstsvar.

Accepterede input

Tekst · Billeder

Resultater

Tekst

### Tilgængelig i Ailoot · input og metoder

**Ailoot · OpenAI Chat** `POST /v1/chat/completions`

Inputtyper

`text`, `image`

Outputtyper

`text`

Kontekst

991.808 tokens

Maksimalt output

131.072 tokens

Outputformat

json eller SSE

| Felt | Type | Krav | Værdier og grænser | Standard |
| --- | --- | --- | --- | --- |
| Felt`model` | Type`string` | KravPåkrævet | Værdier og grænser qwen-flash | Standard— |
| Felt`messages` | Type`message[]` | KravPåkrævet | Værdier og grænser Minimumsantal elementer: 1 | Standard— |
| Felt`messages[].role` | Type`string` | KravPåkrævet | Værdier og grænser Eksempler: system, user, assistant, tool, function Betingelser: Disse roller er eksplicit repræsenteret i kildekodens kompatibilitetstyper; modellens præcise rollesæt er fortsat modelspecifikt. Afhænger af modellen | Standard— |
| Felt`messages[].content` | Type`string\|content_part[]\|null` | KravValgfrit | Værdier og grænser | Standard— |
| Felt`messages[].tool_calls` | Type`tool_call[]` | KravValgfrit | Værdier og grænser | Standard— |
| Felt`messages[].tool_call_id` | Type`string` | KravValgfrit | Værdier og grænser Gælder når: role=tool; brug det faktisk returnerede ID | Standard— |
| Felt`messages[].name` | Type`string` | KravValgfrit | Værdier og grænser | Standard— |
| Felt`messages[].reasoning_content` | Type`string` | KravValgfrit | Værdier og grænser Gælder når: Send det faktisk returnerede ræsonnement tilbage, når modellen bruger det | Standard— |
| Felt`messages[].reasoning_details` | Type`object\|array` | KravValgfrit | Værdier og grænser Afhænger af modellen | Standard— |
| Felt`max_tokens` | Type`integer` | KravValgfrit | Værdier og grænser Minimum: 1 Afhænger af modellen | Standard— |
| Felt`max_completion_tokens` | Type`integer` | KravValgfrit | Værdier og grænser Minimum: 1 Afhænger af modellen | Standard— |
| Felt`stream` | Type`boolean` | KravValgfrit | Værdier og grænser | Standardfalse |
| Felt`stream_options.include_usage` | Type`boolean` | KravValgfrit | Værdier og grænser Afhænger af modellen | Standard— |
| Felt`temperature` | Type`number` | KravValgfrit | Værdier og grænser Afhænger af modellen | Standard— |
| Felt`top_p` | Type`number` | KravValgfrit | Værdier og grænser Afhænger af modellen | Standard— |
| Felt`stop` | Type`string\|string[]` | KravValgfrit | Værdier og grænser Afhænger af modellen | Standard— |
| Felt`tools` | Type`function_tool[]` | KravValgfrit | Værdier og grænser Afhænger af modellen | Standard— |
| Felt`tools[].type` | Type`string` | KravValgfrit | Værdier og grænser Afhænger af modellen | Standard— |
| Felt`tools[].function.name` | Type`string` | KravPåkrævet | Værdier og grænser Gælder når: funktionsværktøj angivet | Standard— |
| Felt`tools[].function.description` | Type`string` | KravValgfrit | Værdier og grænser | Standard— |
| Felt`tools[].function.parameters` | Type`JSON_schema` | KravValgfrit | Værdier og grænser | Standard— |
| Felt`tool_choice` | Type`string\|object` | KravValgfrit | Værdier og grænser Afhænger af modellen | Standard— |
| Felt`parallel_tool_calls` | Type`boolean` | KravValgfrit | Værdier og grænser Afhænger af modellen | Standard— |
| Felt`response_format` | Type`object` | KravValgfrit | Værdier og grænser Afhænger af modellen | Standard— |
| Felt`reasoning_effort` | Type`string` | KravValgfrit | Værdier og grænser Afhænger af modellen | Standard— |
| Felt`reasoning` | Type`object` | KravValgfrit | Værdier og grænser Afhænger af modellen | Standard— |
| Felt`service_tier` | Type`string` | KravValgfrit | Værdier og grænser Afhænger af modellen | Standard— |
| Felt`instructions` | Type`string` | KravValgfrit | Værdier og grænser Kompatibilitetsfelt | Standard— |
| Felt`functions` | Type`function[]` | KravValgfrit | Værdier og grænser Afhænger af modellen | Standard— |
| Felt`function_call` | Type`string\|object` | KravValgfrit | Værdier og grænser Afhænger af modellen | Standard— |
| Felt`prompt_cache_options` | Type`object` | KravValgfrit | Værdier og grænser Afhænger af modellen | Standard— |

Kombinationer af inputmaterialer

**Tekst** · UTF8-tekst

`messages[].content`

**Tekst + billede**

`{type:image_url,image_url:{url,detail}}`

Metodeparametre og livscyklus

| Parameter | Kontrakt |
| --- | --- |
| Parameter`material_types` | Kontrakttext, image |
| Parameter`required` | Kontraktmodel, messages |
| Parameter`optional_controls` | Kontraktnull |
| Parameter`content_type` | Kontraktapplication/json |
| Parameter`text_file_material` | Kontraktfaktisk UTF-8-indhold indsat som tekst; fil-ID’er/URLs kræver særskilt præcis understøttelse |

Livscyklus: `exact retained published method`

Metodernes strukturer og ID’er er præcise; leverandørens muligheder er adskilt fra adgangstilladelse.

### Priser

#### Ailoot-metodetakster

Tekstinput

0,00015 US$ */ 1K*

Tekstoutput

0,00047 US$ */ 1K*

Input, billede

0,00015 US$ */ 1K tokens*

Cachelæsning

0,000016 US$ */ 1K*

Cacheskrivning

0,0002 US$ */ 1K*

Cacheskrivning, 5 min.

0,0002 US$ */ 1K tokens*

Ailoot reserverer et estimeret beløb før en anmodning. Efter resultatet afregnes det endelige beløb ud fra det målte forbrug. Ved streaming bruges den endelige forbrugsregistrering til afregningen. [Sådan fungerer reservation og afregning →](https://ailoot.ai/docs/da/billing/reserve/)

#### Detaljer om referencetariffen

Referenceplaner på modelniveau ændrer ikke metodevalg, prisoverslag eller opkrævninger. Ved den aktive afregning anvendes taksterne for den valgte Ailoot-metode.

Modellens referenceplaner

#### Priser efter konfiguration

Knyt hver omkostning til de viste betingelser. Brug én takst for hver gruppe af alternative konfigurationer.

| Konfiguration | Takstplan | Konteksttokens, mere end | Konteksttokens, op til og med | Beløb |
| --- | --- | --- | --- | --- |
| KonfigurationOpenAI Chat · Grundtakster pr. token | TakstplanGrundtakst | Konteksttokens, mere end— | Konteksttokens, op til og medIngen øvre grænse | Beløb Input · Inputtokens **$0.0003** / 1K tokens Output · Outputtokens **$0.00094** / 1K tokens Input · Cachelæsning **$0.000032** / 1K tokens Input · Cacheskrivning **$0.0004** / 1K tokens Input · Cacheskrivning, 1 time **—** / 1K tokens |
| KonfigurationOpenAI Chat · Trin 1 efter anmodningens længde | Takstplan— | Konteksttokens, mere end0 | Konteksttokens, op til og medIngen øvre grænse | Beløb Input · Inputtokens **$0.0003** / 1K tokens Output · Outputtokens **$0.00094** / 1K tokens Input · Cachelæsning **$0.000032** / 1K tokens Input · Cacheskrivning **$0.0004** / 1K tokens Input · Cacheskrivning, 1 time **—** / 1K tokens |
| KonfigurationAnthropic Messages · Grundtakster pr. token | TakstplanGrundtakst | Konteksttokens, mere end— | Konteksttokens, op til og medIngen øvre grænse | Beløb Input · Inputtokens **$0.0003** / 1K tokens Output · Outputtokens **$0.00094** / 1K tokens Input · Cachelæsning **$0.000032** / 1K tokens Input · Cacheskrivning **$0.0004** / 1K tokens Input · Cacheskrivning, 1 time **—** / 1K tokens |
| KonfigurationAnthropic Messages · Trin 1 efter anmodningens længde | Takstplan— | Konteksttokens, mere end0 | Konteksttokens, op til og medIngen øvre grænse | Beløb Input · Inputtokens **$0.0003** / 1K tokens Output · Outputtokens **$0.00094** / 1K tokens Input · Cachelæsning **$0.000032** / 1K tokens Input · Cacheskrivning **$0.0004** / 1K tokens Input · Cacheskrivning, 1 time **—** / 1K tokens |

### Eksempelanmodninger

#### Ailoot · OpenAI Chat

TeksteksempelInput, billedePython SDKNode.js SDKPython-stream

```bash
set -eu
: "${AILOOT_API_KEY:?Set your Ailoot API key}"
: "${AILOOT_TEXT_FILE:?Set your actual UTF-8 source-material file}"
export AILOOT_TEXT_FILE
python3 - <<'PY_REQUEST'
import json,os
from pathlib import Path
p=json.loads('{"model": "qwen-flash", "messages": []}')
f=Path(os.environ["AILOOT_TEXT_FILE"])
if not f.is_file():raise SystemExit("Choose your actual UTF-8 source material")
text=f.read_text(encoding="utf-8")
if not text.strip():raise SystemExit("Source material must contain text")
p["messages"]=[{"role":"user","content":"Summarize this material and quote supporting source passages.\n\n"+text}]
Path("request.json").write_text(json.dumps(p,ensure_ascii=False))
PY_REQUEST
curl --fail-with-body --silent --show-error https://api.ailoot.ai/v1/chat/completions \
  -H "Authorization: Bearer $AILOOT_API_KEY" -H 'Content-Type: application/json' \
  --data-binary @request.json -D response-headers.txt -o result.json
python3 - <<'PY_RESULT'
import json
from pathlib import Path
print(json.dumps(json.loads(Path("result.json").read_text()),ensure_ascii=False,indent=2))
PY_RESULT
```

```bash
set -eu
: "${AILOOT_API_KEY:?Set your Ailoot API key}"
: "${AILOOT_IMAGE_FILE:?Set your actual PNG JPEG or WebP image}"
export AILOOT_IMAGE_FILE
python3 - <<'PY_REQUEST'
import json,os
from pathlib import Path
p=json.loads('{"model": "qwen-flash", "messages": [{"role": "user", "content": [{"type": "text", "text": "Read labels and numbers in this image; flag unreadable text."}]}]}')
import base64
f=Path(os.environ["AILOOT_IMAGE_FILE"])
if not f.is_file():raise SystemExit("Choose an actual PNG JPEG or WebP image")
raw=f.read_bytes()
mime="image/png" if raw.startswith(b"\x89PNG\r\n\x1a\n") else "image/jpeg" if raw.startswith(b"\xff\xd8") else "image/webp" if raw[:4]==b"RIFF" and raw[8:12]==b"WEBP" else None
if not mime:raise SystemExit("Use PNG JPEG or WebP")
b64=base64.b64encode(raw).decode()
p["messages"][0]["content"].append({"type":"image_url","image_url":{"url":"data:"+mime+";base64,"+b64}})
Path("request.json").write_text(json.dumps(p,ensure_ascii=False))
PY_REQUEST
curl --fail-with-body --silent --show-error https://api.ailoot.ai/v1/chat/completions \
  -H "Authorization: Bearer $AILOOT_API_KEY" -H 'Content-Type: application/json' \
  --data-binary @request.json -D response-headers.txt -o result.json
python3 - <<'PY_RESULT'
import json
from pathlib import Path
print(json.dumps(json.loads(Path("result.json").read_text()),ensure_ascii=False,indent=2))
PY_RESULT
```

```python
from openai import OpenAI
import os

if not os.environ.get("AILOOT_API_KEY", "").strip(): raise SystemExit("Set AILOOT_API_KEY before making a request")
client = OpenAI(base_url="https://api.ailoot.ai/v1", api_key=os.environ["AILOOT_API_KEY"], max_retries=0)
resp = client.chat.completions.create(
    model="qwen-flash",
    messages=[{"role": "user", "content": "Explain the difference between an observation and a hypothesis in three sentences."}],
)
import base64, json
from pathlib import Path

def save_result(data, stem="result"):
    # Keep every field, including usage, IDs, reasoning and tool requests.
    Path(stem + ".json").write_text(json.dumps(data, ensure_ascii=False, indent=2), encoding="utf-8")
    print(json.dumps(data, ensure_ascii=False, indent=2))
    def save_blob(encoded, suffix, label):
        raw = base64.b64decode(encoded, altchars=b"-_", validate=True)
        ext = "png" if raw.startswith(b"\x89PNG\r\n\x1a\n") else "jpg" if raw.startswith(b"\xff\xd8") else "webp" if raw[:4] == b"RIFF" and raw[8:12] == b"WEBP" else suffix
        file = Path(stem + "-" + label + "." + ext)
        file.write_bytes(raw)
        print("Saved", file)
    for index, block in enumerate(data.get("content") or []):
        print("Content", index, json.dumps(block, ensure_ascii=False))
    for choice in data.get("choices") or []:
        print("Choice", choice.get("index"), json.dumps(choice.get("message", choice.get("delta", {})), ensure_ascii=False))
    for index, item in enumerate(data.get("output") or []):
        print("Output", index, json.dumps(item, ensure_ascii=False))
        if item.get("type") == "image_generation_call" and item.get("result"):
            save_blob(item["result"], item.get("output_format") or "bin", "output-" + str(index))
    for ci, candidate in enumerate(data.get("candidates") or []):
        for pi, part in enumerate((candidate.get("content") or {}).get("parts") or []):
            print("Candidate/part", ci, pi, json.dumps(part, ensure_ascii=False))
            blob = part.get("inlineData") or part.get("inline_data")
            if blob and blob.get("data"):
                mime = blob.get("mimeType") or blob.get("mime_type")
                suffix = {"image/png":"png", "image/jpeg":"jpg", "image/webp":"webp", "audio/wav":"wav", "audio/mpeg":"mp3", "video/mp4":"mp4"}.get(mime, "bin")
                save_blob(blob["data"], suffix, "candidate-" + str(ci) + "-part-" + str(pi))

save_result(resp.to_dict(mode="json"))
```

```js
import OpenAI from "openai";

if (!process.env.AILOOT_API_KEY?.trim()) throw new Error("Set AILOOT_API_KEY before making a request");
const client = new OpenAI({ baseURL: "https://api.ailoot.ai/v1", apiKey: process.env.AILOOT_API_KEY, maxRetries: 0 });
const resp = await client.chat.completions.create({
  model: "qwen-flash",
  messages: [{ role: "user", content: "Explain the difference between an observation and a hypothesis in three sentences." }],
});
import { writeFileSync } from "node:fs";

function saveResult(data, stem = "result") {
  writeFileSync(stem + ".json", JSON.stringify(data, null, 2));
  console.log(JSON.stringify(data, null, 2));
  const saveBlob = (encoded, suffix, label) => {
    const raw = Buffer.from(encoded, "base64");
    const ext = raw.subarray(0,8).equals(Buffer.from([137,80,78,71,13,10,26,10])) ? "png" : raw[0]===255 && raw[1]===216 ? "jpg" : raw.subarray(0,4).toString()==="RIFF" && raw.subarray(8,12).toString()==="WEBP" ? "webp" : suffix;
    const file = `${stem}-${label}.${ext}`;
    writeFileSync(file, raw); console.log("Saved", file);
  };
  for (const [i, block] of (data.content || []).entries()) console.log("Content", i, JSON.stringify(block));
  for (const choice of data.choices || []) console.log("Choice", choice.index, JSON.stringify(choice.message || choice.delta || {}));
  for (const [i, item] of (data.output || []).entries()) {
    console.log("Output", i, JSON.stringify(item));
    if (item.type === "image_generation_call" && item.result) saveBlob(item.result, item.output_format || "bin", `output-${i}`);
  }
  for (const [ci, candidate] of (data.candidates || []).entries()) {
    for (const [pi, part] of (candidate.content?.parts || []).entries()) {
      console.log("Candidate/part", ci, pi, JSON.stringify(part));
      const blob = part.inlineData || part.inline_data;
      if (blob?.data) {
        const mime = blob.mimeType || blob.mime_type;
        const suffix = ({"image/png":"png", "image/jpeg":"jpg", "image/webp":"webp", "audio/wav":"wav", "audio/mpeg":"mp3", "video/mp4":"mp4"})[mime] || "bin";
        saveBlob(blob.data, suffix, `candidate-${ci}-part-${pi}`);
      }
    }
  }
}

saveResult(resp);
```

```python
from openai import OpenAI
import os
from pathlib import Path

if not os.environ.get("AILOOT_API_KEY", "").strip(): raise SystemExit("Set AILOOT_API_KEY before making a request")
client=OpenAI(base_url="https://api.ailoot.ai/v1",api_key=os.environ["AILOOT_API_KEY"],max_retries=0)
import base64, json
from pathlib import Path

def save_result(data, stem="result"):
    # Keep every field, including usage, IDs, reasoning and tool requests.
    Path(stem + ".json").write_text(json.dumps(data, ensure_ascii=False, indent=2), encoding="utf-8")
    print(json.dumps(data, ensure_ascii=False, indent=2))
    def save_blob(encoded, suffix, label):
        raw = base64.b64decode(encoded, altchars=b"-_", validate=True)
        ext = "png" if raw.startswith(b"\x89PNG\r\n\x1a\n") else "jpg" if raw.startswith(b"\xff\xd8") else "webp" if raw[:4] == b"RIFF" and raw[8:12] == b"WEBP" else suffix
        file = Path(stem + "-" + label + "." + ext)
        file.write_bytes(raw)
        print("Saved", file)
    for index, block in enumerate(data.get("content") or []):
        print("Content", index, json.dumps(block, ensure_ascii=False))
    for choice in data.get("choices") or []:
        print("Choice", choice.get("index"), json.dumps(choice.get("message", choice.get("delta", {})), ensure_ascii=False))
    for index, item in enumerate(data.get("output") or []):
        print("Output", index, json.dumps(item, ensure_ascii=False))
        if item.get("type") == "image_generation_call" and item.get("result"):
            save_blob(item["result"], item.get("output_format") or "bin", "output-" + str(index))
    for ci, candidate in enumerate(data.get("candidates") or []):
        for pi, part in enumerate((candidate.get("content") or {}).get("parts") or []):
            print("Candidate/part", ci, pi, json.dumps(part, ensure_ascii=False))
            blob = part.get("inlineData") or part.get("inline_data")
            if blob and blob.get("data"):
                mime = blob.get("mimeType") or blob.get("mime_type")
                suffix = {"image/png":"png", "image/jpeg":"jpg", "image/webp":"webp", "audio/wav":"wav", "audio/mpeg":"mp3", "video/mp4":"mp4"}.get(mime, "bin")
                save_blob(blob["data"], suffix, "candidate-" + str(ci) + "-part-" + str(pi))

with client.chat.completions.stream(model='qwen-flash',messages=[{"role":"user","content":"Explain observations and hypotheses in three sentences."}]) as stream:
    with Path("stream-events.jsonl").open("w",encoding="utf-8") as log:
        for event in stream:
            payload=event.to_dict(mode="json")
            log.write(json.dumps(payload,ensure_ascii=False)+"\n"); log.flush()
            print(json.dumps(payload,ensure_ascii=False))
    final=stream.get_final_completion()
    save_result(final.to_dict(mode="json"),"stream-result")
```

### Hent og gem resultater

#### Ailoot · OpenAI Chat

json eller SSE

##### Behold alle færdige resultater

Gem hvert fuldstændigt returneret svar, hver fil og hver indholdsdel.

Bevar hvert valg og dets indhold, værktøjskald og ræsonnement. Saml i SSE deltaer efter valg-/værktøjsindeks, og bevar den endelige afslutningsårsag og forbrugsoplysningerne.

##### Hvis det oprindelige svar skal kontrolleres

Bevar anmodnings-/svar-ID’er og headere. Der leveres ingen generel URL til at hente tekstjob.

Svarfelter

| Felt | Type |
| --- | --- |
| Felt`choices[].index` | Typeinteger |
| Felt`choices[].message.content` | Typestring\|null |
| Felt`choices[].message.tool_calls` | Typetool\_call\[\] |
| Felt`choices[].message.reasoning_content` | Typestring |
| Felt`choices[].message.reasoning_details` | Typeobject\|array |
| Felt`choices[].finish_reason` | Typestring\|null |
| Felt`usage` | Typeobject |

Fejl og næste trin

| Svar | Betingelse | Næste trin |
| --- | --- | --- |
| Svar400 · `invalid_request_error` | BetingelseUgyldige obligatoriske felter, materialerepræsentation eller parameterværdi | Næste trinRet de angivne felter før en ny oprettelsesanmodning. |

### Aliaser

#### Modelaliaser

<strong>Ailoot</strong> [`qwen3.8-flash`](https://ailoot.ai/models/da/#m=qwen%2Fqwen3.8-flash&route=Core&caller=qwen3.8-flash&fmt=chat), [`qwen-flash`](https://ailoot.ai/models/da/#m=qwen%2Fqwen3.8-flash&route=Core&caller=qwen-flash&fmt=chat), [`qwen-flash-latest`](https://ailoot.ai/models/da/#m=qwen%2Fqwen3.8-flash&route=Core&caller=qwen-flash-latest&fmt=chat)
**Ailoot Ultra** [`qwen3.8-flash`](https://ailoot.ai/models/da/#m=qwen%2Fqwen3.8-flash&route=Ultra&caller=qwen3.8-flash&fmt=chat), [`qwen/qwen3.8-flash`](https://ailoot.ai/models/da/#m=qwen%2Fqwen3.8-flash&route=Ultra&caller=qwen%2Fqwen3.8-flash&fmt=chat)

#### Aliaser for metodestier

`/chat/completions`

#### Relaterede kalder-ID’er

[`qwen/qwen3.8-flash`](https://ailoot.ai/models/da/#m=qwen%2Fqwen3.8-flash&route=Ultra&caller=qwen%2Fqwen3.8-flash&fmt=chat), [`qwen-flash`](https://ailoot.ai/models/da/#m=qwen%2Fqwen3.8-flash&route=Core&caller=qwen-flash&fmt=chat), [`qwen-flash-latest`](https://ailoot.ai/models/da/#m=qwen%2Fqwen3.8-flash&route=Core&caller=qwen-flash-latest&fmt=chat), [`qwen3.8-flash`](https://ailoot.ai/models/da/#m=qwen%2Fqwen3.8-flash&route=Core&caller=qwen3.8-flash&fmt=chat), [`qwen3.8-flash`](https://ailoot.ai/models/da/#m=qwen%2Fqwen3.8-flash&route=Ultra&caller=qwen3.8-flash&fmt=chat)

**Ailoot · Anthropic Messages** `POST /v1/messages` `qwen-flash-latest`

[`qwen-flash-latest`](https://ailoot.ai/models/da/#m=qwen%2Fqwen3.8-flash&route=Core&caller=qwen-flash-latest&fmt=messages)

Alibaba /`qwen-flash-latest`

Model-ID

- `qwen3.8-flash`
- `qwen-flash`
- `qwen-flash-latest`

### Start

Multimodal model til softwareagenter og kontoropgaver med stor kontekst. I Ailoot analyserer den tekst og billeder og leverer et tekstsvar.

Accepterede input

Tekst · Billeder

Resultater

Tekst

### Tilgængelig i Ailoot · input og metoder

**Ailoot · Anthropic Messages** `POST /v1/messages`

Inputtyper

`text`, `image`

Outputtyper

`text`

Kontekst

991.808 tokens

Maksimalt output

131.072 tokens

Outputformat

json eller SSE

| Felt | Type | Krav | Værdier og grænser | Standard |
| --- | --- | --- | --- | --- |
| Felt`model` | Type`string` | KravPåkrævet | Værdier og grænser qwen-flash-latest | Standard— |
| Felt`messages` | Type`message[]` | KravPåkrævet | Værdier og grænser Minimumsantal elementer: 1 | Standard— |
| Felt`messages[].role` | Type`string` | KravPåkrævet | Værdier og grænser user, assistant | Standard— |
| Felt`messages[].content` | Type`string\|content_block[]` | KravPåkrævet | Værdier og grænser | Standard— |
| Felt`system` | Type`string\|content_block[]` | KravValgfrit | Værdier og grænser | Standard— |
| Felt`max_tokens` | Type`integer` | KravPåkrævet | Værdier og grænser Minimum: 1 Grænsen gælder for: den præcise øvre grænse for valgt model/modelkort | Standard— |
| Felt`stream` | Type`boolean` | KravValgfrit | Værdier og grænser | Standardfalse |
| Felt`temperature` | Type`number` | KravValgfrit | Værdier og grænser Afhænger af modellen | Standard— |
| Felt`top_p` | Type`number` | KravValgfrit | Værdier og grænser Afhænger af modellen | Standard— |
| Felt`stop_sequences` | Type`string[]` | KravValgfrit | Værdier og grænser Afhænger af modellen | Standard— |
| Felt`tools` | Type`tool[]` | KravValgfrit | Værdier og grænser Afhænger af modellen | Standard— |
| Felt`tools[].name` | Type`string` | KravValgfrit | Værdier og grænser Gælder når: værktøj angivet | Standard— |
| Felt`tools[].description` | Type`string` | KravValgfrit | Værdier og grænser | Standard— |
| Felt`tools[].input_schema` | Type`JSON_schema` | KravValgfrit | Værdier og grænser | Standard— |
| Felt`tool_choice` | Type`object` | KravValgfrit | Værdier og grænser Afhænger af modellen | Standard— |
| Felt`thinking.type` | Type`string` | KravValgfrit | Værdier og grænser Afhænger af modellen | Standard— |
| Felt`thinking.budget_tokens` | Type`integer` | KravValgfrit | Værdier og grænser Afhænger af modellen | Standard— |
| Felt`output_config.effort` | Type`string` | KravValgfrit | Værdier og grænser Afhænger af modellen | Standard— |
| Felt`metadata` | Type`object` | KravValgfrit | Værdier og grænser | Standard— |
| Felt`cache_control` | Type`object` | KravValgfrit | Værdier og grænser Afhænger af modellen | Standard— |

Kombinationer af inputmaterialer

**Tekst** · UTF8-tekst

`messages[].content eller en blok med type=text`

**Tekst + billede**

`{type:image,source:{type:base64,media_type,data}} eller kilde med type=url`

Metodeparametre og livscyklus

| Parameter | Kontrakt |
| --- | --- |
| Parameter`material_types` | Kontrakttext, image |
| Parameter`required` | Kontraktmodel, messages, max\_tokens |
| Parameter`optional_controls` | Kontraktnull |
| Parameter`content_type` | Kontraktapplication/json |
| Parameter`text_file_material` | Kontraktfaktisk UTF-8-indhold indsat som tekst; fil-ID’er/URLs kræver særskilt præcis understøttelse |

Livscyklus: `exact retained published method`

Metodernes strukturer og ID’er er præcise; leverandørens muligheder er adskilt fra adgangstilladelse.

### Priser

#### Ailoot-metodetakster

Input

0,00015 US$ */ 1K*

Output

0,00047 US$ */ 1K*

Cachelæsning

0,000016 US$ */ 1K*

Cacheskrivning

0,0002 US$ */ 1K*

Cacheskrivning, 5 min.

0,0002 US$ */ 1K tokens*

Ailoot reserverer et estimeret beløb før en anmodning. Efter resultatet afregnes det endelige beløb ud fra det målte forbrug. Ved streaming bruges den endelige forbrugsregistrering til afregningen. [Sådan fungerer reservation og afregning →](https://ailoot.ai/docs/da/billing/reserve/)

#### Detaljer om referencetariffen

Referenceplaner på modelniveau ændrer ikke metodevalg, prisoverslag eller opkrævninger. Ved den aktive afregning anvendes taksterne for den valgte Ailoot-metode.

Modellens referenceplaner

#### Priser efter konfiguration

Knyt hver omkostning til de viste betingelser. Brug én takst for hver gruppe af alternative konfigurationer.

| Konfiguration | Takstplan | Konteksttokens, mere end | Konteksttokens, op til og med | Beløb |
| --- | --- | --- | --- | --- |
| KonfigurationOpenAI Chat · Grundtakster pr. token | TakstplanGrundtakst | Konteksttokens, mere end— | Konteksttokens, op til og medIngen øvre grænse | Beløb Input · Inputtokens **$0.0003** / 1K tokens Output · Outputtokens **$0.00094** / 1K tokens Input · Cachelæsning **$0.000032** / 1K tokens Input · Cacheskrivning **$0.0004** / 1K tokens Input · Cacheskrivning, 1 time **—** / 1K tokens |
| KonfigurationOpenAI Chat · Trin 1 efter anmodningens længde | Takstplan— | Konteksttokens, mere end0 | Konteksttokens, op til og medIngen øvre grænse | Beløb Input · Inputtokens **$0.0003** / 1K tokens Output · Outputtokens **$0.00094** / 1K tokens Input · Cachelæsning **$0.000032** / 1K tokens Input · Cacheskrivning **$0.0004** / 1K tokens Input · Cacheskrivning, 1 time **—** / 1K tokens |
| KonfigurationAnthropic Messages · Grundtakster pr. token | TakstplanGrundtakst | Konteksttokens, mere end— | Konteksttokens, op til og medIngen øvre grænse | Beløb Input · Inputtokens **$0.0003** / 1K tokens Output · Outputtokens **$0.00094** / 1K tokens Input · Cachelæsning **$0.000032** / 1K tokens Input · Cacheskrivning **$0.0004** / 1K tokens Input · Cacheskrivning, 1 time **—** / 1K tokens |
| KonfigurationAnthropic Messages · Trin 1 efter anmodningens længde | Takstplan— | Konteksttokens, mere end0 | Konteksttokens, op til og medIngen øvre grænse | Beløb Input · Inputtokens **$0.0003** / 1K tokens Output · Outputtokens **$0.00094** / 1K tokens Input · Cachelæsning **$0.000032** / 1K tokens Input · Cacheskrivning **$0.0004** / 1K tokens Input · Cacheskrivning, 1 time **—** / 1K tokens |

### Eksempelanmodninger

#### Ailoot · Anthropic Messages

TeksteksempelInput, billedePython SDKNode.js SDKPython-stream

```bash
set -eu
: "${AILOOT_API_KEY:?Set your Ailoot API key}"
: "${AILOOT_TEXT_FILE:?Set your actual UTF-8 source-material file}"
export AILOOT_TEXT_FILE
python3 - <<'PY_REQUEST'
import json,os
from pathlib import Path
p=json.loads('{"model": "qwen-flash-latest", "max_tokens": 1024, "messages": []}')
f=Path(os.environ["AILOOT_TEXT_FILE"])
if not f.is_file():raise SystemExit("Choose your actual UTF-8 source material")
text=f.read_text(encoding="utf-8")
if not text.strip():raise SystemExit("Source material must contain text")
p["messages"]=[{"role":"user","content":"Summarize this material and quote supporting source passages.\n\n"+text}]
Path("request.json").write_text(json.dumps(p,ensure_ascii=False))
PY_REQUEST
curl --fail-with-body --silent --show-error https://api.ailoot.ai/v1/messages \
  -H "x-api-key: $AILOOT_API_KEY" -H 'anthropic-version: 2023-06-01' -H 'Content-Type: application/json' \
  --data-binary @request.json -D response-headers.txt -o result.json
python3 - <<'PY_RESULT'
import json
from pathlib import Path
print(json.dumps(json.loads(Path("result.json").read_text()),ensure_ascii=False,indent=2))
PY_RESULT
```

```bash
set -eu
: "${AILOOT_API_KEY:?Set your Ailoot API key}"
: "${AILOOT_IMAGE_FILE:?Set your actual PNG JPEG or WebP image}"
export AILOOT_IMAGE_FILE
python3 - <<'PY_REQUEST'
import json,os
from pathlib import Path
p=json.loads('{"model": "qwen-flash-latest", "max_tokens": 1024, "messages": [{"role": "user", "content": [{"type": "text", "text": "Read labels and numbers in this image; flag unreadable text."}]}]}')
import base64
f=Path(os.environ["AILOOT_IMAGE_FILE"])
if not f.is_file():raise SystemExit("Choose an actual PNG JPEG or WebP image")
raw=f.read_bytes()
mime="image/png" if raw.startswith(b"\x89PNG\r\n\x1a\n") else "image/jpeg" if raw.startswith(b"\xff\xd8") else "image/webp" if raw[:4]==b"RIFF" and raw[8:12]==b"WEBP" else None
if not mime:raise SystemExit("Use PNG JPEG or WebP")
b64=base64.b64encode(raw).decode()
p["messages"][0]["content"].append({"type":"image","source":{"type":"base64","media_type":mime,"data":b64}})
Path("request.json").write_text(json.dumps(p,ensure_ascii=False))
PY_REQUEST
curl --fail-with-body --silent --show-error https://api.ailoot.ai/v1/messages \
  -H "x-api-key: $AILOOT_API_KEY" -H 'anthropic-version: 2023-06-01' -H 'Content-Type: application/json' \
  --data-binary @request.json -D response-headers.txt -o result.json
python3 - <<'PY_RESULT'
import json
from pathlib import Path
print(json.dumps(json.loads(Path("result.json").read_text()),ensure_ascii=False,indent=2))
PY_RESULT
```

```python
import anthropic
import os

if not os.environ.get("AILOOT_API_KEY", "").strip(): raise SystemExit("Set AILOOT_API_KEY before making a request")
client = anthropic.Anthropic(base_url="https://api.ailoot.ai", api_key=os.environ["AILOOT_API_KEY"], max_retries=0)
msg = client.messages.create(
    model="qwen-flash-latest",
    max_tokens=1024,
    messages=[{"role": "user", "content": "Explain the difference between an observation and a hypothesis in three sentences."}],
)
import base64, json
from pathlib import Path

def save_result(data, stem="result"):
    # Keep every field, including usage, IDs, reasoning and tool requests.
    Path(stem + ".json").write_text(json.dumps(data, ensure_ascii=False, indent=2), encoding="utf-8")
    print(json.dumps(data, ensure_ascii=False, indent=2))
    def save_blob(encoded, suffix, label):
        raw = base64.b64decode(encoded, altchars=b"-_", validate=True)
        ext = "png" if raw.startswith(b"\x89PNG\r\n\x1a\n") else "jpg" if raw.startswith(b"\xff\xd8") else "webp" if raw[:4] == b"RIFF" and raw[8:12] == b"WEBP" else suffix
        file = Path(stem + "-" + label + "." + ext)
        file.write_bytes(raw)
        print("Saved", file)
    for index, block in enumerate(data.get("content") or []):
        print("Content", index, json.dumps(block, ensure_ascii=False))
    for choice in data.get("choices") or []:
        print("Choice", choice.get("index"), json.dumps(choice.get("message", choice.get("delta", {})), ensure_ascii=False))
    for index, item in enumerate(data.get("output") or []):
        print("Output", index, json.dumps(item, ensure_ascii=False))
        if item.get("type") == "image_generation_call" and item.get("result"):
            save_blob(item["result"], item.get("output_format") or "bin", "output-" + str(index))
    for ci, candidate in enumerate(data.get("candidates") or []):
        for pi, part in enumerate((candidate.get("content") or {}).get("parts") or []):
            print("Candidate/part", ci, pi, json.dumps(part, ensure_ascii=False))
            blob = part.get("inlineData") or part.get("inline_data")
            if blob and blob.get("data"):
                mime = blob.get("mimeType") or blob.get("mime_type")
                suffix = {"image/png":"png", "image/jpeg":"jpg", "image/webp":"webp", "audio/wav":"wav", "audio/mpeg":"mp3", "video/mp4":"mp4"}.get(mime, "bin")
                save_blob(blob["data"], suffix, "candidate-" + str(ci) + "-part-" + str(pi))

save_result(msg.to_dict(mode="json"))
```

```js
import Anthropic from "@anthropic-ai/sdk";

if (!process.env.AILOOT_API_KEY?.trim()) throw new Error("Set AILOOT_API_KEY before making a request");
const client = new Anthropic({ baseURL: "https://api.ailoot.ai", apiKey: process.env.AILOOT_API_KEY, maxRetries: 0 });
const msg = await client.messages.create({
  model: "qwen-flash-latest",
  max_tokens: 1024,
  messages: [{ role: "user", content: "Explain the difference between an observation and a hypothesis in three sentences." }],
});
import { writeFileSync } from "node:fs";

function saveResult(data, stem = "result") {
  writeFileSync(stem + ".json", JSON.stringify(data, null, 2));
  console.log(JSON.stringify(data, null, 2));
  const saveBlob = (encoded, suffix, label) => {
    const raw = Buffer.from(encoded, "base64");
    const ext = raw.subarray(0,8).equals(Buffer.from([137,80,78,71,13,10,26,10])) ? "png" : raw[0]===255 && raw[1]===216 ? "jpg" : raw.subarray(0,4).toString()==="RIFF" && raw.subarray(8,12).toString()==="WEBP" ? "webp" : suffix;
    const file = `${stem}-${label}.${ext}`;
    writeFileSync(file, raw); console.log("Saved", file);
  };
  for (const [i, block] of (data.content || []).entries()) console.log("Content", i, JSON.stringify(block));
  for (const choice of data.choices || []) console.log("Choice", choice.index, JSON.stringify(choice.message || choice.delta || {}));
  for (const [i, item] of (data.output || []).entries()) {
    console.log("Output", i, JSON.stringify(item));
    if (item.type === "image_generation_call" && item.result) saveBlob(item.result, item.output_format || "bin", `output-${i}`);
  }
  for (const [ci, candidate] of (data.candidates || []).entries()) {
    for (const [pi, part] of (candidate.content?.parts || []).entries()) {
      console.log("Candidate/part", ci, pi, JSON.stringify(part));
      const blob = part.inlineData || part.inline_data;
      if (blob?.data) {
        const mime = blob.mimeType || blob.mime_type;
        const suffix = ({"image/png":"png", "image/jpeg":"jpg", "image/webp":"webp", "audio/wav":"wav", "audio/mpeg":"mp3", "video/mp4":"mp4"})[mime] || "bin";
        saveBlob(blob.data, suffix, `candidate-${ci}-part-${pi}`);
      }
    }
  }
}

saveResult(msg);
```

```python
import anthropic,os
from pathlib import Path

if not os.environ.get("AILOOT_API_KEY", "").strip(): raise SystemExit("Set AILOOT_API_KEY before making a request")
client=anthropic.Anthropic(base_url="https://api.ailoot.ai",api_key=os.environ["AILOOT_API_KEY"],max_retries=0)
import base64, json
from pathlib import Path

def save_result(data, stem="result"):
    # Keep every field, including usage, IDs, reasoning and tool requests.
    Path(stem + ".json").write_text(json.dumps(data, ensure_ascii=False, indent=2), encoding="utf-8")
    print(json.dumps(data, ensure_ascii=False, indent=2))
    def save_blob(encoded, suffix, label):
        raw = base64.b64decode(encoded, altchars=b"-_", validate=True)
        ext = "png" if raw.startswith(b"\x89PNG\r\n\x1a\n") else "jpg" if raw.startswith(b"\xff\xd8") else "webp" if raw[:4] == b"RIFF" and raw[8:12] == b"WEBP" else suffix
        file = Path(stem + "-" + label + "." + ext)
        file.write_bytes(raw)
        print("Saved", file)
    for index, block in enumerate(data.get("content") or []):
        print("Content", index, json.dumps(block, ensure_ascii=False))
    for choice in data.get("choices") or []:
        print("Choice", choice.get("index"), json.dumps(choice.get("message", choice.get("delta", {})), ensure_ascii=False))
    for index, item in enumerate(data.get("output") or []):
        print("Output", index, json.dumps(item, ensure_ascii=False))
        if item.get("type") == "image_generation_call" and item.get("result"):
            save_blob(item["result"], item.get("output_format") or "bin", "output-" + str(index))
    for ci, candidate in enumerate(data.get("candidates") or []):
        for pi, part in enumerate((candidate.get("content") or {}).get("parts") or []):
            print("Candidate/part", ci, pi, json.dumps(part, ensure_ascii=False))
            blob = part.get("inlineData") or part.get("inline_data")
            if blob and blob.get("data"):
                mime = blob.get("mimeType") or blob.get("mime_type")
                suffix = {"image/png":"png", "image/jpeg":"jpg", "image/webp":"webp", "audio/wav":"wav", "audio/mpeg":"mp3", "video/mp4":"mp4"}.get(mime, "bin")
                save_blob(blob["data"], suffix, "candidate-" + str(ci) + "-part-" + str(pi))

with client.messages.stream(model='qwen-flash-latest',max_tokens=1024,messages=[{"role":"user","content":"Explain observations and hypotheses in three sentences."}]) as stream:
    with Path("stream-events.jsonl").open("w",encoding="utf-8") as log:
        for event in stream:
            payload=event.to_dict(mode="json")
            log.write(json.dumps(payload,ensure_ascii=False)+"\n"); log.flush()
            print(json.dumps(payload,ensure_ascii=False))
    final=stream.get_final_message()
    save_result(final.to_dict(mode="json"),"stream-result")
```

### Hent og gem resultater

#### Ailoot · Anthropic Messages

json eller SSE

##### Behold alle færdige resultater

Gem hvert fuldstændigt returneret svar, hver fil og hver indholdsdel.

Bevar alle indholdsblokke, ræsonnementssignaturer og faktiske værktøjsbrugs-ID’er. Saml alle SSE-blokdeltaer; den første tekstblok er ikke hele outputtet.

##### Hvis det oprindelige svar skal kontrolleres

Bevar anmodnings-/svar-ID’er og headere. Der leveres ingen generel URL til at hente tekstjob.

Svarfelter

| Felt | Type |
| --- | --- |
| Felt`id` | Typestring |
| Felt`model` | Typestring |
| Felt`content[]` | Typetext\|thinking\|tool\_use\|other content block |
| Felt`stop_reason` | Typestring\|null |
| Felt`usage` | Typeobject |

Fejl og næste trin

| Svar | Betingelse | Næste trin |
| --- | --- | --- |
| Svar400 · `invalid_request_error` | BetingelseUgyldige obligatoriske felter, materialerepræsentation eller parameterværdi | Næste trinRet de angivne felter før en ny oprettelsesanmodning. |

### Aliaser

#### Modelaliaser

<strong>Ailoot</strong> [`qwen3.8-flash`](https://ailoot.ai/models/da/#m=qwen%2Fqwen3.8-flash&route=Core&caller=qwen3.8-flash&fmt=messages), [`qwen-flash`](https://ailoot.ai/models/da/#m=qwen%2Fqwen3.8-flash&route=Core&caller=qwen-flash&fmt=messages), [`qwen-flash-latest`](https://ailoot.ai/models/da/#m=qwen%2Fqwen3.8-flash&route=Core&caller=qwen-flash-latest&fmt=messages)
**Ailoot Ultra** [`qwen3.8-flash`](https://ailoot.ai/models/da/#m=qwen%2Fqwen3.8-flash&route=Ultra&caller=qwen3.8-flash&fmt=messages), [`qwen/qwen3.8-flash`](https://ailoot.ai/models/da/#m=qwen%2Fqwen3.8-flash&route=Ultra&caller=qwen%2Fqwen3.8-flash&fmt=messages)

#### Aliaser for metodestier

`/chat/completions`

#### Relaterede kalder-ID’er

[`qwen/qwen3.8-flash`](https://ailoot.ai/models/da/#m=qwen%2Fqwen3.8-flash&route=Ultra&caller=qwen%2Fqwen3.8-flash&fmt=messages), [`qwen-flash`](https://ailoot.ai/models/da/#m=qwen%2Fqwen3.8-flash&route=Core&caller=qwen-flash&fmt=messages), [`qwen-flash-latest`](https://ailoot.ai/models/da/#m=qwen%2Fqwen3.8-flash&route=Core&caller=qwen-flash-latest&fmt=messages), [`qwen3.8-flash`](https://ailoot.ai/models/da/#m=qwen%2Fqwen3.8-flash&route=Core&caller=qwen3.8-flash&fmt=messages), [`qwen3.8-flash`](https://ailoot.ai/models/da/#m=qwen%2Fqwen3.8-flash&route=Ultra&caller=qwen3.8-flash&fmt=messages)

**Ailoot · OpenAI Responses** `POST /v1/responses` `qwen-flash-latest`

[`qwen-flash-latest`](https://ailoot.ai/models/da/#m=qwen%2Fqwen3.8-flash&route=Core&caller=qwen-flash-latest&fmt=responses)

Alibaba /`qwen-flash-latest`

Model-ID

- `qwen3.8-flash`
- `qwen-flash`
- `qwen-flash-latest`

### Start

Multimodal model til softwareagenter og kontoropgaver med stor kontekst. I Ailoot analyserer den tekst og billeder og leverer et tekstsvar.

Accepterede input

Tekst · Billeder

Resultater

Tekst

### Tilgængelig i Ailoot · input og metoder

**Ailoot · OpenAI Responses** `POST /v1/responses`

Inputtyper

`text`, `image`

Outputtyper

`text`

Kontekst

991.808 tokens

Maksimalt output

131.072 tokens

Outputformat

json eller SSE

| Felt | Type | Krav | Værdier og grænser | Standard |
| --- | --- | --- | --- | --- |
| Felt`model` | Type`string` | KravPåkrævet | Værdier og grænser qwen-flash-latest | Standard— |
| Felt`input` | Type`string\|input_item[]` | KravPåkrævet | Værdier og grænser | Standard— |
| Felt`instructions` | Type`string` | KravValgfrit | Værdier og grænser | Standard— |
| Felt`input[].type` | Type`string` | KravValgfrit | Værdier og grænser message, reasoning, function\_call, function\_call\_output | Standard— |
| Felt`input[].content` | Type`string\|content_part[]` | KravValgfrit | Værdier og grænser | Standard— |
| Felt`input[].call_id` | Type`string` | KravValgfrit | Værdier og grænser Gælder når: function\_call\_output; bevar det faktisk returnerede call\_id | Standard— |
| Felt`input[].output` | Type`string\|content_part[]` | KravValgfrit | Værdier og grænser Gælder når: function\_call\_output | Standard— |
| Felt`max_output_tokens` | Type`integer` | KravValgfrit | Værdier og grænser Minimum: 1 Afhænger af modellen | Standard— |
| Felt`stream` | Type`boolean` | KravValgfrit | Værdier og grænser | Standardfalse |
| Felt`temperature` | Type`number` | KravValgfrit | Værdier og grænser Afhænger af modellen | Standard— |
| Felt`top_p` | Type`number` | KravValgfrit | Værdier og grænser Afhænger af modellen | Standard— |
| Felt`tools` | Type`tool[]` | KravValgfrit | Værdier og grænser Afhænger af modellen | Standard— |
| Felt`tool_choice` | Type`string\|object` | KravValgfrit | Værdier og grænser Afhænger af modellen | Standard— |
| Felt`parallel_tool_calls` | Type`boolean` | KravValgfrit | Værdier og grænser Afhænger af modellen | Standard— |
| Felt`reasoning.effort` | Type`string` | KravValgfrit | Værdier og grænser Afhænger af modellen | Standard— |
| Felt`reasoning.summary` | Type`string` | KravValgfrit | Værdier og grænser Afhænger af modellen | Standard— |
| Felt`text.format` | Type`object` | KravValgfrit | Værdier og grænser Afhænger af modellen | Standard— |
| Felt`text.verbosity` | Type`string` | KravValgfrit | Værdier og grænser Afhænger af modellen | Standard— |
| Felt`include` | Type`string[]` | KravValgfrit | Værdier og grænser Afhænger af modellen | Standard— |
| Felt`store` | Type`boolean` | KravValgfrit | Værdier og grænser Afhænger af modellen | Standard— |
| Felt`previous_response_id` | Type`string` | KravValgfrit | Værdier og grænser ID-krav: Kun et faktisk svar-ID fra en understøttet fortsættelse Afhænger af modellen | Standard— |
| Felt`service_tier` | Type`string` | KravValgfrit | Værdier og grænser Afhænger af modellen | Standard— |
| Felt`prompt_cache_key` | Type`string` | KravValgfrit | Værdier og grænser Afhænger af modellen | Standard— |
| Felt`prompt_cache_options` | Type`object` | KravValgfrit | Værdier og grænser Afhænger af modellen | Standard— |

Kombinationer af inputmaterialer

**Tekst** · UTF8-tekst

`inputtekst eller en input_text-del`

**Tekst + billede**

`{type:input_image,image_url}`

Metodeparametre og livscyklus

| Parameter | Kontrakt |
| --- | --- |
| Parameter`material_types` | Kontrakttext, image |
| Parameter`required` | Kontraktmodel, input |
| Parameter`optional_controls` | Kontraktnull |
| Parameter`content_type` | Kontraktapplication/json |
| Parameter`text_file_material` | Kontraktfaktisk UTF-8-indhold indsat som tekst; fil-ID’er/URLs kræver særskilt præcis understøttelse |

Livscyklus: `exact retained published method`

Metodernes strukturer og ID’er er præcise; leverandørens muligheder er adskilt fra adgangstilladelse.

### Priser

#### Ailoot-metodetakster

Tekstinput

0,00015 US$ */ 1K*

Tekstoutput

0,00047 US$ */ 1K*

Input, billede

0,00015 US$ */ 1K tokens*

Cachelæsning

0,000016 US$ */ 1K*

Cacheskrivning

0,0002 US$ */ 1K*

Cacheskrivning, 5 min.

0,0002 US$ */ 1K tokens*

Ailoot reserverer et estimeret beløb før en anmodning. Efter resultatet afregnes det endelige beløb ud fra det målte forbrug. Ved streaming bruges den endelige forbrugsregistrering til afregningen. [Sådan fungerer reservation og afregning →](https://ailoot.ai/docs/da/billing/reserve/)

#### Detaljer om referencetariffen

Referenceplaner på modelniveau ændrer ikke metodevalg, prisoverslag eller opkrævninger. Ved den aktive afregning anvendes taksterne for den valgte Ailoot-metode.

Modellens referenceplaner

#### Priser efter konfiguration

Knyt hver omkostning til de viste betingelser. Brug én takst for hver gruppe af alternative konfigurationer.

| Konfiguration | Takstplan | Konteksttokens, mere end | Konteksttokens, op til og med | Beløb |
| --- | --- | --- | --- | --- |
| KonfigurationOpenAI Chat · Grundtakster pr. token | TakstplanGrundtakst | Konteksttokens, mere end— | Konteksttokens, op til og medIngen øvre grænse | Beløb Input · Inputtokens **$0.0003** / 1K tokens Output · Outputtokens **$0.00094** / 1K tokens Input · Cachelæsning **$0.000032** / 1K tokens Input · Cacheskrivning **$0.0004** / 1K tokens Input · Cacheskrivning, 1 time **—** / 1K tokens |
| KonfigurationOpenAI Chat · Trin 1 efter anmodningens længde | Takstplan— | Konteksttokens, mere end0 | Konteksttokens, op til og medIngen øvre grænse | Beløb Input · Inputtokens **$0.0003** / 1K tokens Output · Outputtokens **$0.00094** / 1K tokens Input · Cachelæsning **$0.000032** / 1K tokens Input · Cacheskrivning **$0.0004** / 1K tokens Input · Cacheskrivning, 1 time **—** / 1K tokens |
| KonfigurationAnthropic Messages · Grundtakster pr. token | TakstplanGrundtakst | Konteksttokens, mere end— | Konteksttokens, op til og medIngen øvre grænse | Beløb Input · Inputtokens **$0.0003** / 1K tokens Output · Outputtokens **$0.00094** / 1K tokens Input · Cachelæsning **$0.000032** / 1K tokens Input · Cacheskrivning **$0.0004** / 1K tokens Input · Cacheskrivning, 1 time **—** / 1K tokens |
| KonfigurationAnthropic Messages · Trin 1 efter anmodningens længde | Takstplan— | Konteksttokens, mere end0 | Konteksttokens, op til og medIngen øvre grænse | Beløb Input · Inputtokens **$0.0003** / 1K tokens Output · Outputtokens **$0.00094** / 1K tokens Input · Cachelæsning **$0.000032** / 1K tokens Input · Cacheskrivning **$0.0004** / 1K tokens Input · Cacheskrivning, 1 time **—** / 1K tokens |

### Eksempelanmodninger

#### Ailoot · OpenAI Responses

TeksteksempelInput, billedePython SDKNode.js SDKPython-stream

```bash
set -eu
: "${AILOOT_API_KEY:?Set your Ailoot API key}"
: "${AILOOT_TEXT_FILE:?Set your actual UTF-8 source-material file}"
export AILOOT_TEXT_FILE
python3 - <<'PY_REQUEST'
import json,os
from pathlib import Path
p=json.loads('{"model": "qwen-flash-latest", "input": ""}')
f=Path(os.environ["AILOOT_TEXT_FILE"])
if not f.is_file():raise SystemExit("Choose your actual UTF-8 source material")
text=f.read_text(encoding="utf-8")
if not text.strip():raise SystemExit("Source material must contain text")
p["input"]="Summarize this material and quote supporting source passages.\n\n"+text
Path("request.json").write_text(json.dumps(p,ensure_ascii=False))
PY_REQUEST
curl --fail-with-body --silent --show-error https://api.ailoot.ai/v1/responses \
  -H "Authorization: Bearer $AILOOT_API_KEY" -H 'Content-Type: application/json' \
  --data-binary @request.json -D response-headers.txt -o result.json
python3 - <<'PY_RESULT'
import base64, json
from pathlib import Path

def save_result(data, stem="result"):
    # Keep every field, including usage, IDs, reasoning and tool requests.
    Path(stem + ".json").write_text(json.dumps(data, ensure_ascii=False, indent=2), encoding="utf-8")
    print(json.dumps(data, ensure_ascii=False, indent=2))
    def save_blob(encoded, suffix, label):
        raw = base64.b64decode(encoded, altchars=b"-_", validate=True)
        ext = "png" if raw.startswith(b"\x89PNG\r\n\x1a\n") else "jpg" if raw.startswith(b"\xff\xd8") else "webp" if raw[:4] == b"RIFF" and raw[8:12] == b"WEBP" else suffix
        file = Path(stem + "-" + label + "." + ext)
        file.write_bytes(raw)
        print("Saved", file)
    for index, block in enumerate(data.get("content") or []):
        print("Content", index, json.dumps(block, ensure_ascii=False))
    for choice in data.get("choices") or []:
        print("Choice", choice.get("index"), json.dumps(choice.get("message", choice.get("delta", {})), ensure_ascii=False))
    for index, item in enumerate(data.get("output") or []):
        print("Output", index, json.dumps(item, ensure_ascii=False))
        if item.get("type") == "image_generation_call" and item.get("result"):
            save_blob(item["result"], item.get("output_format") or "bin", "output-" + str(index))
    for ci, candidate in enumerate(data.get("candidates") or []):
        for pi, part in enumerate((candidate.get("content") or {}).get("parts") or []):
            print("Candidate/part", ci, pi, json.dumps(part, ensure_ascii=False))
            blob = part.get("inlineData") or part.get("inline_data")
            if blob and blob.get("data"):
                mime = blob.get("mimeType") or blob.get("mime_type")
                suffix = {"image/png":"png", "image/jpeg":"jpg", "image/webp":"webp", "audio/wav":"wav", "audio/mpeg":"mp3", "video/mp4":"mp4"}.get(mime, "bin")
                save_blob(blob["data"], suffix, "candidate-" + str(ci) + "-part-" + str(pi))

save_result(json.loads(Path("result.json").read_text(encoding="utf-8")))
PY_RESULT
```

```bash
set -eu
: "${AILOOT_API_KEY:?Set your Ailoot API key}"
: "${AILOOT_IMAGE_FILE:?Set your actual PNG JPEG or WebP image}"
export AILOOT_IMAGE_FILE
python3 - <<'PY_REQUEST'
import json,os
from pathlib import Path
p=json.loads('{"model": "qwen-flash-latest", "input": [{"role": "user", "content": [{"type": "input_text", "text": "Read labels and numbers in this image; flag unreadable text."}]}]}')
import base64
f=Path(os.environ["AILOOT_IMAGE_FILE"])
if not f.is_file():raise SystemExit("Choose an actual PNG JPEG or WebP image")
raw=f.read_bytes()
mime="image/png" if raw.startswith(b"\x89PNG\r\n\x1a\n") else "image/jpeg" if raw.startswith(b"\xff\xd8") else "image/webp" if raw[:4]==b"RIFF" and raw[8:12]==b"WEBP" else None
if not mime:raise SystemExit("Use PNG JPEG or WebP")
b64=base64.b64encode(raw).decode()
p["input"][0]["content"].append({"type":"input_image","image_url":"data:"+mime+";base64,"+b64})
Path("request.json").write_text(json.dumps(p,ensure_ascii=False))
PY_REQUEST
curl --fail-with-body --silent --show-error https://api.ailoot.ai/v1/responses \
  -H "Authorization: Bearer $AILOOT_API_KEY" -H 'Content-Type: application/json' \
  --data-binary @request.json -D response-headers.txt -o result.json
python3 - <<'PY_RESULT'
import base64, json
from pathlib import Path

def save_result(data, stem="result"):
    # Keep every field, including usage, IDs, reasoning and tool requests.
    Path(stem + ".json").write_text(json.dumps(data, ensure_ascii=False, indent=2), encoding="utf-8")
    print(json.dumps(data, ensure_ascii=False, indent=2))
    def save_blob(encoded, suffix, label):
        raw = base64.b64decode(encoded, altchars=b"-_", validate=True)
        ext = "png" if raw.startswith(b"\x89PNG\r\n\x1a\n") else "jpg" if raw.startswith(b"\xff\xd8") else "webp" if raw[:4] == b"RIFF" and raw[8:12] == b"WEBP" else suffix
        file = Path(stem + "-" + label + "." + ext)
        file.write_bytes(raw)
        print("Saved", file)
    for index, block in enumerate(data.get("content") or []):
        print("Content", index, json.dumps(block, ensure_ascii=False))
    for choice in data.get("choices") or []:
        print("Choice", choice.get("index"), json.dumps(choice.get("message", choice.get("delta", {})), ensure_ascii=False))
    for index, item in enumerate(data.get("output") or []):
        print("Output", index, json.dumps(item, ensure_ascii=False))
        if item.get("type") == "image_generation_call" and item.get("result"):
            save_blob(item["result"], item.get("output_format") or "bin", "output-" + str(index))
    for ci, candidate in enumerate(data.get("candidates") or []):
        for pi, part in enumerate((candidate.get("content") or {}).get("parts") or []):
            print("Candidate/part", ci, pi, json.dumps(part, ensure_ascii=False))
            blob = part.get("inlineData") or part.get("inline_data")
            if blob and blob.get("data"):
                mime = blob.get("mimeType") or blob.get("mime_type")
                suffix = {"image/png":"png", "image/jpeg":"jpg", "image/webp":"webp", "audio/wav":"wav", "audio/mpeg":"mp3", "video/mp4":"mp4"}.get(mime, "bin")
                save_blob(blob["data"], suffix, "candidate-" + str(ci) + "-part-" + str(pi))

save_result(json.loads(Path("result.json").read_text(encoding="utf-8")))
PY_RESULT
```

```python
from openai import OpenAI
import os

if not os.environ.get("AILOOT_API_KEY", "").strip(): raise SystemExit("Set AILOOT_API_KEY before making a request")
client = OpenAI(base_url="https://api.ailoot.ai/v1", api_key=os.environ["AILOOT_API_KEY"], max_retries=0)
resp = client.responses.create(model="qwen-flash-latest", input="Explain the difference between an observation and a hypothesis in three sentences.")
import base64, json
from pathlib import Path

def save_result(data, stem="result"):
    # Keep every field, including usage, IDs, reasoning and tool requests.
    Path(stem + ".json").write_text(json.dumps(data, ensure_ascii=False, indent=2), encoding="utf-8")
    print(json.dumps(data, ensure_ascii=False, indent=2))
    def save_blob(encoded, suffix, label):
        raw = base64.b64decode(encoded, altchars=b"-_", validate=True)
        ext = "png" if raw.startswith(b"\x89PNG\r\n\x1a\n") else "jpg" if raw.startswith(b"\xff\xd8") else "webp" if raw[:4] == b"RIFF" and raw[8:12] == b"WEBP" else suffix
        file = Path(stem + "-" + label + "." + ext)
        file.write_bytes(raw)
        print("Saved", file)
    for index, block in enumerate(data.get("content") or []):
        print("Content", index, json.dumps(block, ensure_ascii=False))
    for choice in data.get("choices") or []:
        print("Choice", choice.get("index"), json.dumps(choice.get("message", choice.get("delta", {})), ensure_ascii=False))
    for index, item in enumerate(data.get("output") or []):
        print("Output", index, json.dumps(item, ensure_ascii=False))
        if item.get("type") == "image_generation_call" and item.get("result"):
            save_blob(item["result"], item.get("output_format") or "bin", "output-" + str(index))
    for ci, candidate in enumerate(data.get("candidates") or []):
        for pi, part in enumerate((candidate.get("content") or {}).get("parts") or []):
            print("Candidate/part", ci, pi, json.dumps(part, ensure_ascii=False))
            blob = part.get("inlineData") or part.get("inline_data")
            if blob and blob.get("data"):
                mime = blob.get("mimeType") or blob.get("mime_type")
                suffix = {"image/png":"png", "image/jpeg":"jpg", "image/webp":"webp", "audio/wav":"wav", "audio/mpeg":"mp3", "video/mp4":"mp4"}.get(mime, "bin")
                save_blob(blob["data"], suffix, "candidate-" + str(ci) + "-part-" + str(pi))

save_result(resp.to_dict(mode="json"))
```

```js
import OpenAI from "openai";

if (!process.env.AILOOT_API_KEY?.trim()) throw new Error("Set AILOOT_API_KEY before making a request");
const client = new OpenAI({ baseURL: "https://api.ailoot.ai/v1", apiKey: process.env.AILOOT_API_KEY, maxRetries: 0 });
const resp = await client.responses.create({ model: "qwen-flash-latest", input: "Explain the difference between an observation and a hypothesis in three sentences." });
import { writeFileSync } from "node:fs";

function saveResult(data, stem = "result") {
  writeFileSync(stem + ".json", JSON.stringify(data, null, 2));
  console.log(JSON.stringify(data, null, 2));
  const saveBlob = (encoded, suffix, label) => {
    const raw = Buffer.from(encoded, "base64");
    const ext = raw.subarray(0,8).equals(Buffer.from([137,80,78,71,13,10,26,10])) ? "png" : raw[0]===255 && raw[1]===216 ? "jpg" : raw.subarray(0,4).toString()==="RIFF" && raw.subarray(8,12).toString()==="WEBP" ? "webp" : suffix;
    const file = `${stem}-${label}.${ext}`;
    writeFileSync(file, raw); console.log("Saved", file);
  };
  for (const [i, block] of (data.content || []).entries()) console.log("Content", i, JSON.stringify(block));
  for (const choice of data.choices || []) console.log("Choice", choice.index, JSON.stringify(choice.message || choice.delta || {}));
  for (const [i, item] of (data.output || []).entries()) {
    console.log("Output", i, JSON.stringify(item));
    if (item.type === "image_generation_call" && item.result) saveBlob(item.result, item.output_format || "bin", `output-${i}`);
  }
  for (const [ci, candidate] of (data.candidates || []).entries()) {
    for (const [pi, part] of (candidate.content?.parts || []).entries()) {
      console.log("Candidate/part", ci, pi, JSON.stringify(part));
      const blob = part.inlineData || part.inline_data;
      if (blob?.data) {
        const mime = blob.mimeType || blob.mime_type;
        const suffix = ({"image/png":"png", "image/jpeg":"jpg", "image/webp":"webp", "audio/wav":"wav", "audio/mpeg":"mp3", "video/mp4":"mp4"})[mime] || "bin";
        saveBlob(blob.data, suffix, `candidate-${ci}-part-${pi}`);
      }
    }
  }
}

saveResult(resp);
```

```python
from openai import OpenAI
import os
from pathlib import Path
import base64, json
from pathlib import Path

def save_result(data, stem="result"):
    # Keep every field, including usage, IDs, reasoning and tool requests.
    Path(stem + ".json").write_text(json.dumps(data, ensure_ascii=False, indent=2), encoding="utf-8")
    print(json.dumps(data, ensure_ascii=False, indent=2))
    def save_blob(encoded, suffix, label):
        raw = base64.b64decode(encoded, altchars=b"-_", validate=True)
        ext = "png" if raw.startswith(b"\x89PNG\r\n\x1a\n") else "jpg" if raw.startswith(b"\xff\xd8") else "webp" if raw[:4] == b"RIFF" and raw[8:12] == b"WEBP" else suffix
        file = Path(stem + "-" + label + "." + ext)
        file.write_bytes(raw)
        print("Saved", file)
    for index, block in enumerate(data.get("content") or []):
        print("Content", index, json.dumps(block, ensure_ascii=False))
    for choice in data.get("choices") or []:
        print("Choice", choice.get("index"), json.dumps(choice.get("message", choice.get("delta", {})), ensure_ascii=False))
    for index, item in enumerate(data.get("output") or []):
        print("Output", index, json.dumps(item, ensure_ascii=False))
        if item.get("type") == "image_generation_call" and item.get("result"):
            save_blob(item["result"], item.get("output_format") or "bin", "output-" + str(index))
    for ci, candidate in enumerate(data.get("candidates") or []):
        for pi, part in enumerate((candidate.get("content") or {}).get("parts") or []):
            print("Candidate/part", ci, pi, json.dumps(part, ensure_ascii=False))
            blob = part.get("inlineData") or part.get("inline_data")
            if blob and blob.get("data"):
                mime = blob.get("mimeType") or blob.get("mime_type")
                suffix = {"image/png":"png", "image/jpeg":"jpg", "image/webp":"webp", "audio/wav":"wav", "audio/mpeg":"mp3", "video/mp4":"mp4"}.get(mime, "bin")
                save_blob(blob["data"], suffix, "candidate-" + str(ci) + "-part-" + str(pi))

if not os.environ.get("AILOOT_API_KEY", "").strip(): raise SystemExit("Set AILOOT_API_KEY before making a request")
client=OpenAI(base_url="https://api.ailoot.ai/v1",api_key=os.environ["AILOOT_API_KEY"],max_retries=0)
with client.responses.stream(model="qwen-flash-latest", input="Explain the difference between an observation and a hypothesis in three sentences.") as stream:
    with Path("stream-events.jsonl").open("w",encoding="utf-8") as log:
        for event in stream:
            payload=event.to_dict(mode="json")
            log.write(json.dumps(payload,ensure_ascii=False)+"\n"); log.flush()
            print(json.dumps(payload,ensure_ascii=False))
    final=stream.get_final_response()
    save_result(final.to_dict(mode="json"),"stream-result")
```

### Hent og gem resultater

#### Ailoot · OpenAI Responses

json eller SSE

##### Behold alle færdige resultater

Gem hvert fuldstændigt returneret svar, hver fil og hver indholdsdel.

Bevar hvert outputelement og hver indholdsdel, faktisk call\_id for funktioner, krypteret ræsonnement og forbrugsoplysninger. Bevar ved streaming den fulde hændelses-/elementidentitet.

##### Hvis det oprindelige svar skal kontrolleres

Bevar anmodnings-/svar-ID’er og headere. Der leveres ingen generel URL til at hente tekstjob.

Svarfelter

| Felt | Type |
| --- | --- |
| Felt`id` | Typestring |
| Felt`status` | Typestring |
| Felt`output[]` | Typemessage\|reasoning\|function\_call\|other item |
| Felt`output[].content[]` | Typecontent part |
| Felt`usage` | Typeobject |

Fejl og næste trin

| Svar | Betingelse | Næste trin |
| --- | --- | --- |
| Svar400 · `invalid_request_error` | BetingelseUgyldige obligatoriske felter, materialerepræsentation eller parameterværdi | Næste trinRet de angivne felter før en ny oprettelsesanmodning. |

### Aliaser

#### Modelaliaser

<strong>Ailoot</strong> [`qwen3.8-flash`](https://ailoot.ai/models/da/#m=qwen%2Fqwen3.8-flash&route=Core&caller=qwen3.8-flash&fmt=responses), [`qwen-flash`](https://ailoot.ai/models/da/#m=qwen%2Fqwen3.8-flash&route=Core&caller=qwen-flash&fmt=responses), [`qwen-flash-latest`](https://ailoot.ai/models/da/#m=qwen%2Fqwen3.8-flash&route=Core&caller=qwen-flash-latest&fmt=responses)
**Ailoot Ultra** [`qwen3.8-flash`](https://ailoot.ai/models/da/#m=qwen%2Fqwen3.8-flash&route=Ultra&caller=qwen3.8-flash), [`qwen/qwen3.8-flash`](https://ailoot.ai/models/da/#m=qwen%2Fqwen3.8-flash&route=Ultra&caller=qwen%2Fqwen3.8-flash)

#### Aliaser for metodestier

`/chat/completions`

#### Relaterede kalder-ID’er

[`qwen/qwen3.8-flash`](https://ailoot.ai/models/da/#m=qwen%2Fqwen3.8-flash&route=Ultra&caller=qwen%2Fqwen3.8-flash), [`qwen-flash`](https://ailoot.ai/models/da/#m=qwen%2Fqwen3.8-flash&route=Core&caller=qwen-flash&fmt=responses), [`qwen-flash-latest`](https://ailoot.ai/models/da/#m=qwen%2Fqwen3.8-flash&route=Core&caller=qwen-flash-latest&fmt=responses), [`qwen3.8-flash`](https://ailoot.ai/models/da/#m=qwen%2Fqwen3.8-flash&route=Core&caller=qwen3.8-flash&fmt=responses), [`qwen3.8-flash`](https://ailoot.ai/models/da/#m=qwen%2Fqwen3.8-flash&route=Ultra&caller=qwen3.8-flash)

**Ailoot · OpenAI Chat** `POST /v1/chat/completions` `qwen-flash-latest`

[`qwen-flash-latest`](https://ailoot.ai/models/da/#m=qwen%2Fqwen3.8-flash&route=Core&caller=qwen-flash-latest&fmt=chat)

Alibaba /`qwen-flash-latest`

Model-ID

- `qwen3.8-flash`
- `qwen-flash`
- `qwen-flash-latest`

### Start

Multimodal model til softwareagenter og kontoropgaver med stor kontekst. I Ailoot analyserer den tekst og billeder og leverer et tekstsvar.

Accepterede input

Tekst · Billeder

Resultater

Tekst

### Tilgængelig i Ailoot · input og metoder

**Ailoot · OpenAI Chat** `POST /v1/chat/completions`

Inputtyper

`text`, `image`

Outputtyper

`text`

Kontekst

991.808 tokens

Maksimalt output

131.072 tokens

Outputformat

json eller SSE

| Felt | Type | Krav | Værdier og grænser | Standard |
| --- | --- | --- | --- | --- |
| Felt`model` | Type`string` | KravPåkrævet | Værdier og grænser qwen-flash-latest | Standard— |
| Felt`messages` | Type`message[]` | KravPåkrævet | Værdier og grænser Minimumsantal elementer: 1 | Standard— |
| Felt`messages[].role` | Type`string` | KravPåkrævet | Værdier og grænser Eksempler: system, user, assistant, tool, function Betingelser: Disse roller er eksplicit repræsenteret i kildekodens kompatibilitetstyper; modellens præcise rollesæt er fortsat modelspecifikt. Afhænger af modellen | Standard— |
| Felt`messages[].content` | Type`string\|content_part[]\|null` | KravValgfrit | Værdier og grænser | Standard— |
| Felt`messages[].tool_calls` | Type`tool_call[]` | KravValgfrit | Værdier og grænser | Standard— |
| Felt`messages[].tool_call_id` | Type`string` | KravValgfrit | Værdier og grænser Gælder når: role=tool; brug det faktisk returnerede ID | Standard— |
| Felt`messages[].name` | Type`string` | KravValgfrit | Værdier og grænser | Standard— |
| Felt`messages[].reasoning_content` | Type`string` | KravValgfrit | Værdier og grænser Gælder når: Send det faktisk returnerede ræsonnement tilbage, når modellen bruger det | Standard— |
| Felt`messages[].reasoning_details` | Type`object\|array` | KravValgfrit | Værdier og grænser Afhænger af modellen | Standard— |
| Felt`max_tokens` | Type`integer` | KravValgfrit | Værdier og grænser Minimum: 1 Afhænger af modellen | Standard— |
| Felt`max_completion_tokens` | Type`integer` | KravValgfrit | Værdier og grænser Minimum: 1 Afhænger af modellen | Standard— |
| Felt`stream` | Type`boolean` | KravValgfrit | Værdier og grænser | Standardfalse |
| Felt`stream_options.include_usage` | Type`boolean` | KravValgfrit | Værdier og grænser Afhænger af modellen | Standard— |
| Felt`temperature` | Type`number` | KravValgfrit | Værdier og grænser Afhænger af modellen | Standard— |
| Felt`top_p` | Type`number` | KravValgfrit | Værdier og grænser Afhænger af modellen | Standard— |
| Felt`stop` | Type`string\|string[]` | KravValgfrit | Værdier og grænser Afhænger af modellen | Standard— |
| Felt`tools` | Type`function_tool[]` | KravValgfrit | Værdier og grænser Afhænger af modellen | Standard— |
| Felt`tools[].type` | Type`string` | KravValgfrit | Værdier og grænser Afhænger af modellen | Standard— |
| Felt`tools[].function.name` | Type`string` | KravPåkrævet | Værdier og grænser Gælder når: funktionsværktøj angivet | Standard— |
| Felt`tools[].function.description` | Type`string` | KravValgfrit | Værdier og grænser | Standard— |
| Felt`tools[].function.parameters` | Type`JSON_schema` | KravValgfrit | Værdier og grænser | Standard— |
| Felt`tool_choice` | Type`string\|object` | KravValgfrit | Værdier og grænser Afhænger af modellen | Standard— |
| Felt`parallel_tool_calls` | Type`boolean` | KravValgfrit | Værdier og grænser Afhænger af modellen | Standard— |
| Felt`response_format` | Type`object` | KravValgfrit | Værdier og grænser Afhænger af modellen | Standard— |
| Felt`reasoning_effort` | Type`string` | KravValgfrit | Værdier og grænser Afhænger af modellen | Standard— |
| Felt`reasoning` | Type`object` | KravValgfrit | Værdier og grænser Afhænger af modellen | Standard— |
| Felt`service_tier` | Type`string` | KravValgfrit | Værdier og grænser Afhænger af modellen | Standard— |
| Felt`instructions` | Type`string` | KravValgfrit | Værdier og grænser Kompatibilitetsfelt | Standard— |
| Felt`functions` | Type`function[]` | KravValgfrit | Værdier og grænser Afhænger af modellen | Standard— |
| Felt`function_call` | Type`string\|object` | KravValgfrit | Værdier og grænser Afhænger af modellen | Standard— |
| Felt`prompt_cache_options` | Type`object` | KravValgfrit | Værdier og grænser Afhænger af modellen | Standard— |

Kombinationer af inputmaterialer

**Tekst** · UTF8-tekst

`messages[].content`

**Tekst + billede**

`{type:image_url,image_url:{url,detail}}`

Metodeparametre og livscyklus

| Parameter | Kontrakt |
| --- | --- |
| Parameter`material_types` | Kontrakttext, image |
| Parameter`required` | Kontraktmodel, messages |
| Parameter`optional_controls` | Kontraktnull |
| Parameter`content_type` | Kontraktapplication/json |
| Parameter`text_file_material` | Kontraktfaktisk UTF-8-indhold indsat som tekst; fil-ID’er/URLs kræver særskilt præcis understøttelse |

Livscyklus: `exact retained published method`

Metodernes strukturer og ID’er er præcise; leverandørens muligheder er adskilt fra adgangstilladelse.

### Priser

#### Ailoot-metodetakster

Tekstinput

0,00015 US$ */ 1K*

Tekstoutput

0,00047 US$ */ 1K*

Input, billede

0,00015 US$ */ 1K tokens*

Cachelæsning

0,000016 US$ */ 1K*

Cacheskrivning

0,0002 US$ */ 1K*

Cacheskrivning, 5 min.

0,0002 US$ */ 1K tokens*

Ailoot reserverer et estimeret beløb før en anmodning. Efter resultatet afregnes det endelige beløb ud fra det målte forbrug. Ved streaming bruges den endelige forbrugsregistrering til afregningen. [Sådan fungerer reservation og afregning →](https://ailoot.ai/docs/da/billing/reserve/)

#### Detaljer om referencetariffen

Referenceplaner på modelniveau ændrer ikke metodevalg, prisoverslag eller opkrævninger. Ved den aktive afregning anvendes taksterne for den valgte Ailoot-metode.

Modellens referenceplaner

#### Priser efter konfiguration

Knyt hver omkostning til de viste betingelser. Brug én takst for hver gruppe af alternative konfigurationer.

| Konfiguration | Takstplan | Konteksttokens, mere end | Konteksttokens, op til og med | Beløb |
| --- | --- | --- | --- | --- |
| KonfigurationOpenAI Chat · Grundtakster pr. token | TakstplanGrundtakst | Konteksttokens, mere end— | Konteksttokens, op til og medIngen øvre grænse | Beløb Input · Inputtokens **$0.0003** / 1K tokens Output · Outputtokens **$0.00094** / 1K tokens Input · Cachelæsning **$0.000032** / 1K tokens Input · Cacheskrivning **$0.0004** / 1K tokens Input · Cacheskrivning, 1 time **—** / 1K tokens |
| KonfigurationOpenAI Chat · Trin 1 efter anmodningens længde | Takstplan— | Konteksttokens, mere end0 | Konteksttokens, op til og medIngen øvre grænse | Beløb Input · Inputtokens **$0.0003** / 1K tokens Output · Outputtokens **$0.00094** / 1K tokens Input · Cachelæsning **$0.000032** / 1K tokens Input · Cacheskrivning **$0.0004** / 1K tokens Input · Cacheskrivning, 1 time **—** / 1K tokens |
| KonfigurationAnthropic Messages · Grundtakster pr. token | TakstplanGrundtakst | Konteksttokens, mere end— | Konteksttokens, op til og medIngen øvre grænse | Beløb Input · Inputtokens **$0.0003** / 1K tokens Output · Outputtokens **$0.00094** / 1K tokens Input · Cachelæsning **$0.000032** / 1K tokens Input · Cacheskrivning **$0.0004** / 1K tokens Input · Cacheskrivning, 1 time **—** / 1K tokens |
| KonfigurationAnthropic Messages · Trin 1 efter anmodningens længde | Takstplan— | Konteksttokens, mere end0 | Konteksttokens, op til og medIngen øvre grænse | Beløb Input · Inputtokens **$0.0003** / 1K tokens Output · Outputtokens **$0.00094** / 1K tokens Input · Cachelæsning **$0.000032** / 1K tokens Input · Cacheskrivning **$0.0004** / 1K tokens Input · Cacheskrivning, 1 time **—** / 1K tokens |

### Eksempelanmodninger

#### Ailoot · OpenAI Chat

TeksteksempelInput, billedePython SDKNode.js SDKPython-stream

```bash
set -eu
: "${AILOOT_API_KEY:?Set your Ailoot API key}"
: "${AILOOT_TEXT_FILE:?Set your actual UTF-8 source-material file}"
export AILOOT_TEXT_FILE
python3 - <<'PY_REQUEST'
import json,os
from pathlib import Path
p=json.loads('{"model": "qwen-flash-latest", "messages": []}')
f=Path(os.environ["AILOOT_TEXT_FILE"])
if not f.is_file():raise SystemExit("Choose your actual UTF-8 source material")
text=f.read_text(encoding="utf-8")
if not text.strip():raise SystemExit("Source material must contain text")
p["messages"]=[{"role":"user","content":"Summarize this material and quote supporting source passages.\n\n"+text}]
Path("request.json").write_text(json.dumps(p,ensure_ascii=False))
PY_REQUEST
curl --fail-with-body --silent --show-error https://api.ailoot.ai/v1/chat/completions \
  -H "Authorization: Bearer $AILOOT_API_KEY" -H 'Content-Type: application/json' \
  --data-binary @request.json -D response-headers.txt -o result.json
python3 - <<'PY_RESULT'
import json
from pathlib import Path
print(json.dumps(json.loads(Path("result.json").read_text()),ensure_ascii=False,indent=2))
PY_RESULT
```

```bash
set -eu
: "${AILOOT_API_KEY:?Set your Ailoot API key}"
: "${AILOOT_IMAGE_FILE:?Set your actual PNG JPEG or WebP image}"
export AILOOT_IMAGE_FILE
python3 - <<'PY_REQUEST'
import json,os
from pathlib import Path
p=json.loads('{"model": "qwen-flash-latest", "messages": [{"role": "user", "content": [{"type": "text", "text": "Read labels and numbers in this image; flag unreadable text."}]}]}')
import base64
f=Path(os.environ["AILOOT_IMAGE_FILE"])
if not f.is_file():raise SystemExit("Choose an actual PNG JPEG or WebP image")
raw=f.read_bytes()
mime="image/png" if raw.startswith(b"\x89PNG\r\n\x1a\n") else "image/jpeg" if raw.startswith(b"\xff\xd8") else "image/webp" if raw[:4]==b"RIFF" and raw[8:12]==b"WEBP" else None
if not mime:raise SystemExit("Use PNG JPEG or WebP")
b64=base64.b64encode(raw).decode()
p["messages"][0]["content"].append({"type":"image_url","image_url":{"url":"data:"+mime+";base64,"+b64}})
Path("request.json").write_text(json.dumps(p,ensure_ascii=False))
PY_REQUEST
curl --fail-with-body --silent --show-error https://api.ailoot.ai/v1/chat/completions \
  -H "Authorization: Bearer $AILOOT_API_KEY" -H 'Content-Type: application/json' \
  --data-binary @request.json -D response-headers.txt -o result.json
python3 - <<'PY_RESULT'
import json
from pathlib import Path
print(json.dumps(json.loads(Path("result.json").read_text()),ensure_ascii=False,indent=2))
PY_RESULT
```

```python
from openai import OpenAI
import os

if not os.environ.get("AILOOT_API_KEY", "").strip(): raise SystemExit("Set AILOOT_API_KEY before making a request")
client = OpenAI(base_url="https://api.ailoot.ai/v1", api_key=os.environ["AILOOT_API_KEY"], max_retries=0)
resp = client.chat.completions.create(
    model="qwen-flash-latest",
    messages=[{"role": "user", "content": "Explain the difference between an observation and a hypothesis in three sentences."}],
)
import base64, json
from pathlib import Path

def save_result(data, stem="result"):
    # Keep every field, including usage, IDs, reasoning and tool requests.
    Path(stem + ".json").write_text(json.dumps(data, ensure_ascii=False, indent=2), encoding="utf-8")
    print(json.dumps(data, ensure_ascii=False, indent=2))
    def save_blob(encoded, suffix, label):
        raw = base64.b64decode(encoded, altchars=b"-_", validate=True)
        ext = "png" if raw.startswith(b"\x89PNG\r\n\x1a\n") else "jpg" if raw.startswith(b"\xff\xd8") else "webp" if raw[:4] == b"RIFF" and raw[8:12] == b"WEBP" else suffix
        file = Path(stem + "-" + label + "." + ext)
        file.write_bytes(raw)
        print("Saved", file)
    for index, block in enumerate(data.get("content") or []):
        print("Content", index, json.dumps(block, ensure_ascii=False))
    for choice in data.get("choices") or []:
        print("Choice", choice.get("index"), json.dumps(choice.get("message", choice.get("delta", {})), ensure_ascii=False))
    for index, item in enumerate(data.get("output") or []):
        print("Output", index, json.dumps(item, ensure_ascii=False))
        if item.get("type") == "image_generation_call" and item.get("result"):
            save_blob(item["result"], item.get("output_format") or "bin", "output-" + str(index))
    for ci, candidate in enumerate(data.get("candidates") or []):
        for pi, part in enumerate((candidate.get("content") or {}).get("parts") or []):
            print("Candidate/part", ci, pi, json.dumps(part, ensure_ascii=False))
            blob = part.get("inlineData") or part.get("inline_data")
            if blob and blob.get("data"):
                mime = blob.get("mimeType") or blob.get("mime_type")
                suffix = {"image/png":"png", "image/jpeg":"jpg", "image/webp":"webp", "audio/wav":"wav", "audio/mpeg":"mp3", "video/mp4":"mp4"}.get(mime, "bin")
                save_blob(blob["data"], suffix, "candidate-" + str(ci) + "-part-" + str(pi))

save_result(resp.to_dict(mode="json"))
```

```js
import OpenAI from "openai";

if (!process.env.AILOOT_API_KEY?.trim()) throw new Error("Set AILOOT_API_KEY before making a request");
const client = new OpenAI({ baseURL: "https://api.ailoot.ai/v1", apiKey: process.env.AILOOT_API_KEY, maxRetries: 0 });
const resp = await client.chat.completions.create({
  model: "qwen-flash-latest",
  messages: [{ role: "user", content: "Explain the difference between an observation and a hypothesis in three sentences." }],
});
import { writeFileSync } from "node:fs";

function saveResult(data, stem = "result") {
  writeFileSync(stem + ".json", JSON.stringify(data, null, 2));
  console.log(JSON.stringify(data, null, 2));
  const saveBlob = (encoded, suffix, label) => {
    const raw = Buffer.from(encoded, "base64");
    const ext = raw.subarray(0,8).equals(Buffer.from([137,80,78,71,13,10,26,10])) ? "png" : raw[0]===255 && raw[1]===216 ? "jpg" : raw.subarray(0,4).toString()==="RIFF" && raw.subarray(8,12).toString()==="WEBP" ? "webp" : suffix;
    const file = `${stem}-${label}.${ext}`;
    writeFileSync(file, raw); console.log("Saved", file);
  };
  for (const [i, block] of (data.content || []).entries()) console.log("Content", i, JSON.stringify(block));
  for (const choice of data.choices || []) console.log("Choice", choice.index, JSON.stringify(choice.message || choice.delta || {}));
  for (const [i, item] of (data.output || []).entries()) {
    console.log("Output", i, JSON.stringify(item));
    if (item.type === "image_generation_call" && item.result) saveBlob(item.result, item.output_format || "bin", `output-${i}`);
  }
  for (const [ci, candidate] of (data.candidates || []).entries()) {
    for (const [pi, part] of (candidate.content?.parts || []).entries()) {
      console.log("Candidate/part", ci, pi, JSON.stringify(part));
      const blob = part.inlineData || part.inline_data;
      if (blob?.data) {
        const mime = blob.mimeType || blob.mime_type;
        const suffix = ({"image/png":"png", "image/jpeg":"jpg", "image/webp":"webp", "audio/wav":"wav", "audio/mpeg":"mp3", "video/mp4":"mp4"})[mime] || "bin";
        saveBlob(blob.data, suffix, `candidate-${ci}-part-${pi}`);
      }
    }
  }
}

saveResult(resp);
```

```python
from openai import OpenAI
import os
from pathlib import Path

if not os.environ.get("AILOOT_API_KEY", "").strip(): raise SystemExit("Set AILOOT_API_KEY before making a request")
client=OpenAI(base_url="https://api.ailoot.ai/v1",api_key=os.environ["AILOOT_API_KEY"],max_retries=0)
import base64, json
from pathlib import Path

def save_result(data, stem="result"):
    # Keep every field, including usage, IDs, reasoning and tool requests.
    Path(stem + ".json").write_text(json.dumps(data, ensure_ascii=False, indent=2), encoding="utf-8")
    print(json.dumps(data, ensure_ascii=False, indent=2))
    def save_blob(encoded, suffix, label):
        raw = base64.b64decode(encoded, altchars=b"-_", validate=True)
        ext = "png" if raw.startswith(b"\x89PNG\r\n\x1a\n") else "jpg" if raw.startswith(b"\xff\xd8") else "webp" if raw[:4] == b"RIFF" and raw[8:12] == b"WEBP" else suffix
        file = Path(stem + "-" + label + "." + ext)
        file.write_bytes(raw)
        print("Saved", file)
    for index, block in enumerate(data.get("content") or []):
        print("Content", index, json.dumps(block, ensure_ascii=False))
    for choice in data.get("choices") or []:
        print("Choice", choice.get("index"), json.dumps(choice.get("message", choice.get("delta", {})), ensure_ascii=False))
    for index, item in enumerate(data.get("output") or []):
        print("Output", index, json.dumps(item, ensure_ascii=False))
        if item.get("type") == "image_generation_call" and item.get("result"):
            save_blob(item["result"], item.get("output_format") or "bin", "output-" + str(index))
    for ci, candidate in enumerate(data.get("candidates") or []):
        for pi, part in enumerate((candidate.get("content") or {}).get("parts") or []):
            print("Candidate/part", ci, pi, json.dumps(part, ensure_ascii=False))
            blob = part.get("inlineData") or part.get("inline_data")
            if blob and blob.get("data"):
                mime = blob.get("mimeType") or blob.get("mime_type")
                suffix = {"image/png":"png", "image/jpeg":"jpg", "image/webp":"webp", "audio/wav":"wav", "audio/mpeg":"mp3", "video/mp4":"mp4"}.get(mime, "bin")
                save_blob(blob["data"], suffix, "candidate-" + str(ci) + "-part-" + str(pi))

with client.chat.completions.stream(model='qwen-flash-latest',messages=[{"role":"user","content":"Explain observations and hypotheses in three sentences."}]) as stream:
    with Path("stream-events.jsonl").open("w",encoding="utf-8") as log:
        for event in stream:
            payload=event.to_dict(mode="json")
            log.write(json.dumps(payload,ensure_ascii=False)+"\n"); log.flush()
            print(json.dumps(payload,ensure_ascii=False))
    final=stream.get_final_completion()
    save_result(final.to_dict(mode="json"),"stream-result")
```

### Hent og gem resultater

#### Ailoot · OpenAI Chat

json eller SSE

##### Behold alle færdige resultater

Gem hvert fuldstændigt returneret svar, hver fil og hver indholdsdel.

Bevar hvert valg og dets indhold, værktøjskald og ræsonnement. Saml i SSE deltaer efter valg-/værktøjsindeks, og bevar den endelige afslutningsårsag og forbrugsoplysningerne.

##### Hvis det oprindelige svar skal kontrolleres

Bevar anmodnings-/svar-ID’er og headere. Der leveres ingen generel URL til at hente tekstjob.

Svarfelter

| Felt | Type |
| --- | --- |
| Felt`choices[].index` | Typeinteger |
| Felt`choices[].message.content` | Typestring\|null |
| Felt`choices[].message.tool_calls` | Typetool\_call\[\] |
| Felt`choices[].message.reasoning_content` | Typestring |
| Felt`choices[].message.reasoning_details` | Typeobject\|array |
| Felt`choices[].finish_reason` | Typestring\|null |
| Felt`usage` | Typeobject |

Fejl og næste trin

| Svar | Betingelse | Næste trin |
| --- | --- | --- |
| Svar400 · `invalid_request_error` | BetingelseUgyldige obligatoriske felter, materialerepræsentation eller parameterværdi | Næste trinRet de angivne felter før en ny oprettelsesanmodning. |

### Aliaser

#### Modelaliaser

<strong>Ailoot</strong> [`qwen3.8-flash`](https://ailoot.ai/models/da/#m=qwen%2Fqwen3.8-flash&route=Core&caller=qwen3.8-flash&fmt=chat), [`qwen-flash`](https://ailoot.ai/models/da/#m=qwen%2Fqwen3.8-flash&route=Core&caller=qwen-flash&fmt=chat), [`qwen-flash-latest`](https://ailoot.ai/models/da/#m=qwen%2Fqwen3.8-flash&route=Core&caller=qwen-flash-latest&fmt=chat)
**Ailoot Ultra** [`qwen3.8-flash`](https://ailoot.ai/models/da/#m=qwen%2Fqwen3.8-flash&route=Ultra&caller=qwen3.8-flash&fmt=chat), [`qwen/qwen3.8-flash`](https://ailoot.ai/models/da/#m=qwen%2Fqwen3.8-flash&route=Ultra&caller=qwen%2Fqwen3.8-flash&fmt=chat)

#### Aliaser for metodestier

`/chat/completions`

#### Relaterede kalder-ID’er

[`qwen/qwen3.8-flash`](https://ailoot.ai/models/da/#m=qwen%2Fqwen3.8-flash&route=Ultra&caller=qwen%2Fqwen3.8-flash&fmt=chat), [`qwen-flash`](https://ailoot.ai/models/da/#m=qwen%2Fqwen3.8-flash&route=Core&caller=qwen-flash&fmt=chat), [`qwen-flash-latest`](https://ailoot.ai/models/da/#m=qwen%2Fqwen3.8-flash&route=Core&caller=qwen-flash-latest&fmt=chat), [`qwen3.8-flash`](https://ailoot.ai/models/da/#m=qwen%2Fqwen3.8-flash&route=Core&caller=qwen3.8-flash&fmt=chat), [`qwen3.8-flash`](https://ailoot.ai/models/da/#m=qwen%2Fqwen3.8-flash&route=Ultra&caller=qwen3.8-flash&fmt=chat)

**Ailoot Ultra · OpenAI Chat** `POST /v1/chat/completions` `qwen/qwen3.8-flash`

[`qwen/qwen3.8-flash`](https://ailoot.ai/models/da/#m=qwen%2Fqwen3.8-flash&route=Ultra&caller=qwen%2Fqwen3.8-flash&fmt=chat)

Alibaba /`qwen/qwen3.8-flash`

Model-ID

- `qwen3.8-flash`
- `qwen/qwen3.8-flash`

### Start

Multimodal model til softwareagenter og kontoropgaver med stor kontekst. I Ailoot analyserer den tekst og billeder og leverer et tekstsvar.

Accepterede input

Tekst

Resultater

Tekst

### Tilgængelig i Ailoot · input og metoder

**Ailoot Ultra · OpenAI Chat** `POST /v1/chat/completions`

Inputtyper

`text`

Outputtyper

`text`

Outputformat

json eller SSE

| Felt | Type | Krav | Værdier og grænser | Standard |
| --- | --- | --- | --- | --- |
| Felt`model` | Type`string` | KravPåkrævet | Værdier og grænser qwen/qwen3.8-flash | Standard— |
| Felt`messages` | Type`message[]` | KravPåkrævet | Værdier og grænser Minimumsantal elementer: 1 | Standard— |
| Felt`messages[].role` | Type`string` | KravPåkrævet | Værdier og grænser Eksempler: system, user, assistant, tool, function Betingelser: Disse roller er eksplicit repræsenteret i kildekodens kompatibilitetstyper; modellens præcise rollesæt er fortsat modelspecifikt. Afhænger af modellen | Standard— |
| Felt`messages[].content` | Type`string\|content_part[]\|null` | KravValgfrit | Værdier og grænser | Standard— |
| Felt`messages[].tool_calls` | Type`tool_call[]` | KravValgfrit | Værdier og grænser | Standard— |
| Felt`messages[].tool_call_id` | Type`string` | KravValgfrit | Værdier og grænser Gælder når: role=tool; brug det faktisk returnerede ID | Standard— |
| Felt`messages[].name` | Type`string` | KravValgfrit | Værdier og grænser | Standard— |
| Felt`messages[].reasoning_content` | Type`string` | KravValgfrit | Værdier og grænser Gælder når: Send det faktisk returnerede ræsonnement tilbage, når modellen bruger det | Standard— |
| Felt`messages[].reasoning_details` | Type`object\|array` | KravValgfrit | Værdier og grænser Afhænger af modellen | Standard— |
| Felt`max_tokens` | Type`integer` | KravValgfrit | Værdier og grænser Minimum: 1 Afhænger af modellen | Standard— |
| Felt`max_completion_tokens` | Type`integer` | KravValgfrit | Værdier og grænser Minimum: 1 Afhænger af modellen | Standard— |
| Felt`stream` | Type`boolean` | KravValgfrit | Værdier og grænser | Standardfalse |
| Felt`stream_options.include_usage` | Type`boolean` | KravValgfrit | Værdier og grænser Afhænger af modellen | Standard— |
| Felt`temperature` | Type`number` | KravValgfrit | Værdier og grænser Afhænger af modellen | Standard— |
| Felt`top_p` | Type`number` | KravValgfrit | Værdier og grænser Afhænger af modellen | Standard— |
| Felt`stop` | Type`string\|string[]` | KravValgfrit | Værdier og grænser Afhænger af modellen | Standard— |
| Felt`tools` | Type`function_tool[]` | KravValgfrit | Værdier og grænser Afhænger af modellen | Standard— |
| Felt`tools[].type` | Type`string` | KravValgfrit | Værdier og grænser function Afhænger af modellen | Standard— |
| Felt`tools[].function.name` | Type`string` | KravPåkrævet | Værdier og grænser Gælder når: funktionsværktøj angivet | Standard— |
| Felt`tools[].function.description` | Type`string` | KravValgfrit | Værdier og grænser | Standard— |
| Felt`tools[].function.parameters` | Type`JSON_schema` | KravValgfrit | Værdier og grænser | Standard— |
| Felt`tool_choice` | Type`string\|object` | KravValgfrit | Værdier og grænser Afhænger af modellen | Standard— |
| Felt`parallel_tool_calls` | Type`boolean` | KravValgfrit | Værdier og grænser Afhænger af modellen | Standard— |
| Felt`response_format` | Type`object` | KravValgfrit | Værdier og grænser Afhænger af modellen | Standard— |
| Felt`reasoning_effort` | Type`string` | KravValgfrit | Værdier og grænser Afhænger af modellen | Standard— |
| Felt`reasoning` | Type`object` | KravValgfrit | Værdier og grænser Afhænger af modellen | Standard— |
| Felt`service_tier` | Type`string` | KravValgfrit | Værdier og grænser Afhænger af modellen | Standard— |
| Felt`instructions` | Type`string` | KravValgfrit | Værdier og grænser Kompatibilitetsfelt | Standard— |
| Felt`functions` | Type`function[]` | KravValgfrit | Værdier og grænser Afhænger af modellen | Standard— |
| Felt`function_call` | Type`string\|object` | KravValgfrit | Værdier og grænser Afhænger af modellen | Standard— |
| Felt`prompt_cache_options` | Type`object` | KravValgfrit | Værdier og grænser Afhænger af modellen | Standard— |
| Felt`modalities` | Type`string[]` | KravValgfrit | Værdier og grænser text | Standard— |
| Felt`provider` | Type`object` | KravValgfrit | Værdier og grænser Betingelser: provider.options afvises på denne Ultra-tekstrute | Standard— |
| Felt`cache_control.ttl` | Type`string` | KravValgfrit | Værdier og grænser Betingelser: 1h afvises på de faktiske placeringer for promptcaching | Standard— |

Kombinationer af inputmaterialer

**Tekst** · UTF8-tekst

`messages[].content`

Metodeparametre og livscyklus

| Parameter | Kontrakt |
| --- | --- |
| Parameter`content_type` | Kontraktapplication/json |
| Parameter`required` | Kontraktmodel, messages |
| Parameter`material_types` | Kontrakttext |
| Parameter`messages` | Kontraktbeskedarray med strukturen role/content |
| Parameter`file_material` | Kontraktfaktisk UTF-8-dokument indsat som bogstavelig tekst; intet fil-ID udledes |
| Parameter`optional_controls` | Kontraktstream, temperature, top\_p, stop, max\_tokens, max\_completion\_tokens, reasoning, response\_format, tools, tool\_choice |
| Parameter`control_scope` | Kontraktmodelspecifikt; brugerens funktionsværktøjer er forskellige fra hostede værktøjer |
| Parameter`output_modalities` | Kontrakttext |
| Parameter`hosted_operations` | Kontraktfalse |
| Parameter`multimodal_input_binding` | Kontraktnull |

Livscyklus: `synchronous_or_streamed`

Send det præcise model-ID med messages.

Kontekstlængde er ikke et outputloft.

En tekstfil kan levere bogstavelig tekst; billed-, lyd- og filobjektinput kræver en præcis binding.

### Priser

Tarifoplysninger tilføjer ikke anmodningsmuligheder. Understøttede parametre står ved den valgte metode.

Hurtig tilstand

Standardpris Når hurtig tilstand er valgt

flex-tilstand

Standardpris Når flex-tilstanden er valgt

Maksimal ræsonneringsindsats

Standardpris Når default-justeringen anvendes ved maksimal ræsonneringsindsats

#### Ailoot-takster

#### Priser efter konfiguration

Knyt hver omkostning til de viste betingelser. Brug én takst for hver gruppe af alternative konfigurationer.

| Konfiguration | Takstplan | Konteksttokens, mere end | Konteksttokens, op til og med | Beløb |
| --- | --- | --- | --- | --- |
| KonfigurationGrundtakster for tokens | TakstplanGrundtakst | Konteksttokens, mere end— | Konteksttokens, op til og medIngen øvre grænse | Beløb Input · Inputtokens **$0.0003** / 1K tokens Output · Outputtokens **$0.00094** / 1K tokens Input · Cachelæsning **$0.000032** / 1K tokens Input · Cacheskrivning **$0.0004** / 1K tokens Input · Cacheskrivning, 1 time **—** / 1K tokens |
| KonfigurationAnmodningslængde · niveau 1 | Takstplan— | Konteksttokens, mere end0 | Konteksttokens, op til og medIngen øvre grænse | Beløb Input · Inputtokens **$0.0003** / 1K tokens Output · Outputtokens **$0.00094** / 1K tokens Input · Cachelæsning **$0.000032** / 1K tokens Input · Cacheskrivning **$0.0004** / 1K tokens Input · Cacheskrivning, 1 time **—** / 1K tokens |

Ailoot reserverer et estimeret beløb før en anmodning. Efter resultatet afregnes det endelige beløb ud fra det målte forbrug. Ved streaming bruges den endelige forbrugsregistrering til afregningen. [Sådan fungerer reservation og afregning →](https://ailoot.ai/docs/da/billing/reserve/)

### Eksempelanmodninger

#### Ailoot Ultra · OpenAI Chat

curlPython SDKPython-stream

```bash
set -eu
: "${AILOOT_API_KEY:?Set your Ailoot API key}"
python3 - <<'PY_REQUEST'
import json,os
from pathlib import Path
p=json.loads('{"model": "qwen/qwen3.8-flash", "messages": [{"role": "user", "content": "Explain the difference between an observation and a hypothesis in three sentences."}]}')

Path("request.json").write_text(json.dumps(p,ensure_ascii=False))
PY_REQUEST
curl --fail-with-body --silent --show-error https://api.ailoot.ai/v1/chat/completions \
  -H "Authorization: Bearer $AILOOT_API_KEY" -H 'Content-Type: application/json' \
  --data-binary @request.json -D response-headers.txt -o result.json
python3 - <<'PY_RESULT'
import json
from pathlib import Path
r=json.loads(Path("result.json").read_text())
for x in r.get("choices",[]):
    if x.get("message",{}).get("content"): print(x["message"]["content"])
PY_RESULT
```

```python
from openai import OpenAI
import os

if not os.environ.get("AILOOT_API_KEY", "").strip(): raise SystemExit("Set AILOOT_API_KEY before making a request")
client=OpenAI(base_url="https://api.ailoot.ai/v1",api_key=os.environ["AILOOT_API_KEY"],max_retries=0)
result=client.chat.completions.create(model='qwen/qwen3.8-flash',messages=[{"role":"user","content":"Explain observations and hypotheses in three sentences."}])
import base64, json
from pathlib import Path

def save_result(data, stem="result"):
    # Keep every field, including usage, IDs, reasoning and tool requests.
    Path(stem + ".json").write_text(json.dumps(data, ensure_ascii=False, indent=2), encoding="utf-8")
    print(json.dumps(data, ensure_ascii=False, indent=2))
    def save_blob(encoded, suffix, label):
        raw = base64.b64decode(encoded, altchars=b"-_", validate=True)
        ext = "png" if raw.startswith(b"\x89PNG\r\n\x1a\n") else "jpg" if raw.startswith(b"\xff\xd8") else "webp" if raw[:4] == b"RIFF" and raw[8:12] == b"WEBP" else suffix
        file = Path(stem + "-" + label + "." + ext)
        file.write_bytes(raw)
        print("Saved", file)
    for index, block in enumerate(data.get("content") or []):
        print("Content", index, json.dumps(block, ensure_ascii=False))
    for choice in data.get("choices") or []:
        print("Choice", choice.get("index"), json.dumps(choice.get("message", choice.get("delta", {})), ensure_ascii=False))
    for index, item in enumerate(data.get("output") or []):
        print("Output", index, json.dumps(item, ensure_ascii=False))
        if item.get("type") == "image_generation_call" and item.get("result"):
            save_blob(item["result"], item.get("output_format") or "bin", "output-" + str(index))
    for ci, candidate in enumerate(data.get("candidates") or []):
        for pi, part in enumerate((candidate.get("content") or {}).get("parts") or []):
            print("Candidate/part", ci, pi, json.dumps(part, ensure_ascii=False))
            blob = part.get("inlineData") or part.get("inline_data")
            if blob and blob.get("data"):
                mime = blob.get("mimeType") or blob.get("mime_type")
                suffix = {"image/png":"png", "image/jpeg":"jpg", "image/webp":"webp", "audio/wav":"wav", "audio/mpeg":"mp3", "video/mp4":"mp4"}.get(mime, "bin")
                save_blob(blob["data"], suffix, "candidate-" + str(ci) + "-part-" + str(pi))

save_result(result.to_dict(mode="json"))
```

```python
from openai import OpenAI
import os
from pathlib import Path

if not os.environ.get("AILOOT_API_KEY", "").strip(): raise SystemExit("Set AILOOT_API_KEY before making a request")
client=OpenAI(base_url="https://api.ailoot.ai/v1",api_key=os.environ["AILOOT_API_KEY"],max_retries=0)
import base64, json
from pathlib import Path

def save_result(data, stem="result"):
    # Keep every field, including usage, IDs, reasoning and tool requests.
    Path(stem + ".json").write_text(json.dumps(data, ensure_ascii=False, indent=2), encoding="utf-8")
    print(json.dumps(data, ensure_ascii=False, indent=2))
    def save_blob(encoded, suffix, label):
        raw = base64.b64decode(encoded, altchars=b"-_", validate=True)
        ext = "png" if raw.startswith(b"\x89PNG\r\n\x1a\n") else "jpg" if raw.startswith(b"\xff\xd8") else "webp" if raw[:4] == b"RIFF" and raw[8:12] == b"WEBP" else suffix
        file = Path(stem + "-" + label + "." + ext)
        file.write_bytes(raw)
        print("Saved", file)
    for index, block in enumerate(data.get("content") or []):
        print("Content", index, json.dumps(block, ensure_ascii=False))
    for choice in data.get("choices") or []:
        print("Choice", choice.get("index"), json.dumps(choice.get("message", choice.get("delta", {})), ensure_ascii=False))
    for index, item in enumerate(data.get("output") or []):
        print("Output", index, json.dumps(item, ensure_ascii=False))
        if item.get("type") == "image_generation_call" and item.get("result"):
            save_blob(item["result"], item.get("output_format") or "bin", "output-" + str(index))
    for ci, candidate in enumerate(data.get("candidates") or []):
        for pi, part in enumerate((candidate.get("content") or {}).get("parts") or []):
            print("Candidate/part", ci, pi, json.dumps(part, ensure_ascii=False))
            blob = part.get("inlineData") or part.get("inline_data")
            if blob and blob.get("data"):
                mime = blob.get("mimeType") or blob.get("mime_type")
                suffix = {"image/png":"png", "image/jpeg":"jpg", "image/webp":"webp", "audio/wav":"wav", "audio/mpeg":"mp3", "video/mp4":"mp4"}.get(mime, "bin")
                save_blob(blob["data"], suffix, "candidate-" + str(ci) + "-part-" + str(pi))

with client.chat.completions.stream(model='qwen/qwen3.8-flash',messages=[{"role":"user","content":"Explain observations and hypotheses in three sentences."}]) as stream:
    with Path("stream-events.jsonl").open("w",encoding="utf-8") as log:
        for event in stream:
            payload=event.to_dict(mode="json")
            log.write(json.dumps(payload,ensure_ascii=False)+"\n"); log.flush()
            print(json.dumps(payload,ensure_ascii=False))
    final=stream.get_final_completion()
    save_result(final.to_dict(mode="json"),"stream-result")
```

### Hent og gem resultater

#### Ailoot Ultra · OpenAI Chat

json eller SSE

##### Behold alle færdige resultater

Gem hvert fuldstændigt returneret svar, hver fil og hver indholdsdel.

Bevar hvert valg og dets indhold, værktøjskald og ræsonnement. Saml i SSE deltaer efter valg-/værktøjsindeks, og bevar den endelige afslutningsårsag og forbrugsoplysningerne.

##### Hvis det oprindelige svar skal kontrolleres

Bevar anmodnings-/svar-ID’er og headere. Der leveres ingen generel URL til at hente tekstjob.

Svarfelter

| Felt | Type |
| --- | --- |
| Felt`choices[].index` | Typeinteger |
| Felt`choices[].message.content` | Typestring\|null |
| Felt`choices[].message.tool_calls` | Typetool\_call\[\] |
| Felt`choices[].message.reasoning_content` | Typestring |
| Felt`choices[].message.reasoning_details` | Typeobject\|array |
| Felt`choices[].finish_reason` | Typestring\|null |
| Felt`usage` | Typeobject |

Fejl og næste trin

| Svar | Betingelse | Næste trin |
| --- | --- | --- |
| Svar400 · `invalid_request_error` | BetingelseUgyldige obligatoriske felter, materialerepræsentation eller parameterværdi | Næste trinRet de angivne felter før en ny oprettelsesanmodning. |

### Aliaser

#### Modelaliaser

<strong>Ailoot</strong> [`qwen3.8-flash`](https://ailoot.ai/models/da/#m=qwen%2Fqwen3.8-flash&route=Core&caller=qwen3.8-flash&fmt=chat), [`qwen-flash`](https://ailoot.ai/models/da/#m=qwen%2Fqwen3.8-flash&route=Core&caller=qwen-flash&fmt=chat), [`qwen-flash-latest`](https://ailoot.ai/models/da/#m=qwen%2Fqwen3.8-flash&route=Core&caller=qwen-flash-latest&fmt=chat)
**Ailoot Ultra** [`qwen3.8-flash`](https://ailoot.ai/models/da/#m=qwen%2Fqwen3.8-flash&route=Ultra&caller=qwen3.8-flash&fmt=chat), [`qwen/qwen3.8-flash`](https://ailoot.ai/models/da/#m=qwen%2Fqwen3.8-flash&route=Ultra&caller=qwen%2Fqwen3.8-flash&fmt=chat)

#### Aliaser for metodestier

`/chat/completions`

#### Relaterede kalder-ID’er

[`qwen/qwen3.8-flash`](https://ailoot.ai/models/da/#m=qwen%2Fqwen3.8-flash&route=Ultra&caller=qwen%2Fqwen3.8-flash&fmt=chat), [`qwen-flash`](https://ailoot.ai/models/da/#m=qwen%2Fqwen3.8-flash&route=Core&caller=qwen-flash&fmt=chat), [`qwen-flash-latest`](https://ailoot.ai/models/da/#m=qwen%2Fqwen3.8-flash&route=Core&caller=qwen-flash-latest&fmt=chat), [`qwen3.8-flash`](https://ailoot.ai/models/da/#m=qwen%2Fqwen3.8-flash&route=Core&caller=qwen3.8-flash&fmt=chat), [`qwen3.8-flash`](https://ailoot.ai/models/da/#m=qwen%2Fqwen3.8-flash&route=Ultra&caller=qwen3.8-flash&fmt=chat)

**Ailoot Ultra · Anthropic Messages** `POST /v1/messages` `qwen/qwen3.8-flash`

[`qwen/qwen3.8-flash`](https://ailoot.ai/models/da/#m=qwen%2Fqwen3.8-flash&route=Ultra&caller=qwen%2Fqwen3.8-flash&fmt=messages)

Alibaba /`qwen/qwen3.8-flash`

Model-ID

- `qwen3.8-flash`
- `qwen/qwen3.8-flash`

### Start

Multimodal model til softwareagenter og kontoropgaver med stor kontekst. I Ailoot analyserer den tekst og billeder og leverer et tekstsvar.

Accepterede input

Tekst

Resultater

json · sse

### Tilgængelig i Ailoot · input og metoder

**Ailoot Ultra · Anthropic Messages** `POST /v1/messages`

Inputtyper

`text`

Outputtyper

`json`, `sse`

Outputformat

JSON eller SSE

| Felt | Type | Krav | Værdier og grænser | Standard |
| --- | --- | --- | --- | --- |
| Felt`model` | Type`string` | KravPåkrævet | Værdier og grænser qwen/qwen3.8-flash | Standard— |
| Felt`messages` | Type`message[]` | KravPåkrævet | Værdier og grænser | Standard— |
| Felt`messages[].role` | Type`string` | KravPåkrævet | Værdier og grænser user, assistant | Standard— |
| Felt`messages[].content` | Type`string` | KravPåkrævet | Værdier og grænser | Standard— |
| Felt`max_tokens` | Type`integer` | KravPåkrævet | Værdier og grænser | Standard— |
| Felt`stream` | Type`boolean` | KravValgfrit | Værdier og grænser | Standardfalse |

Kombinationer af inputmaterialer

**Tekst** · UTF-8-tekst

`messages[].content som streng`

Metodeparametre og livscyklus

| Parameter | Kontrakt |
| --- | --- |
| Parameter`content_type` | Kontraktapplication/json |
| Parameter`required` | Kontraktmodel, messages, max\_tokens |
| Parameter`optional_controls` | Kontraktstream |
| Parameter`material_types` | Kontrakttext |
| Parameter`text_file_material` | KontraktLæs det faktiske UTF-8-dokument, og indsæt teksten i det angivne input eller beskedens indholdsstreng. |

Livscyklus: `synchronous_or_streamed`

### Priser

Tarifoplysninger tilføjer ikke anmodningsmuligheder. Understøttede parametre står ved den valgte metode.

Hurtig tilstand

Standardpris Når hurtig tilstand er valgt

flex-tilstand

Standardpris Når flex-tilstanden er valgt

Maksimal ræsonneringsindsats

Standardpris Når default-justeringen anvendes ved maksimal ræsonneringsindsats

#### Ailoot-takster

#### Priser efter konfiguration

Knyt hver omkostning til de viste betingelser. Brug én takst for hver gruppe af alternative konfigurationer.

| Konfiguration | Takstplan | Konteksttokens, mere end | Konteksttokens, op til og med | Beløb |
| --- | --- | --- | --- | --- |
| KonfigurationGrundtakster for tokens | TakstplanGrundtakst | Konteksttokens, mere end— | Konteksttokens, op til og medIngen øvre grænse | Beløb Input · Inputtokens **$0.0003** / 1K tokens Output · Outputtokens **$0.00094** / 1K tokens Input · Cachelæsning **$0.000032** / 1K tokens Input · Cacheskrivning **$0.0004** / 1K tokens Input · Cacheskrivning, 1 time **—** / 1K tokens |
| KonfigurationAnmodningslængde · niveau 1 | Takstplan— | Konteksttokens, mere end0 | Konteksttokens, op til og medIngen øvre grænse | Beløb Input · Inputtokens **$0.0003** / 1K tokens Output · Outputtokens **$0.00094** / 1K tokens Input · Cachelæsning **$0.000032** / 1K tokens Input · Cacheskrivning **$0.0004** / 1K tokens Input · Cacheskrivning, 1 time **—** / 1K tokens |

Ailoot reserverer et estimeret beløb før en anmodning. Efter resultatet afregnes det endelige beløb ud fra det målte forbrug. Ved streaming bruges den endelige forbrugsregistrering til afregningen. [Sådan fungerer reservation og afregning →](https://ailoot.ai/docs/da/billing/reserve/)

### Eksempelanmodninger

#### Ailoot Ultra · Anthropic Messages

Komplet minimalt requestbody i JSONcurl · brug dit UTF-8-dokumentPython · gem hele resultatet

```json
{
  "model": "qwen/qwen3.8-flash",
  "max_tokens": 128,
  "messages": [
    {
      "role": "user",
      "content": "Summarize the incident report."
    }
  ],
  "stream": false
}
```

```bash
set -eu
: "${AILOOT_API_KEY:?Set your Ailoot API key}"
: "${AILOOT_TEXT_FILE:?Set your actual UTF-8 document}"
export AILOOT_TEXT_FILE
python3 - <<'PY_REQUEST'
import json, os
from pathlib import Path

source_file = Path(os.environ['AILOOT_TEXT_FILE'])
if not source_file.is_file():
    raise SystemExit('Set AILOOT_TEXT_FILE to your actual UTF-8 document')
text = source_file.read_text(encoding='utf-8')
if not text.strip():
    raise SystemExit('Choose a document containing text')
payload = {'model': 'qwen/qwen3.8-flash', 'max_tokens': 128, 'messages': [{'role': 'user', 'content': 'Summarize the incident report.'}]}
payload['messages'][0]['content'] = 'Summarize this material and quote supporting source passages.\n\n' + text
Path('request.json').write_text(json.dumps(payload, ensure_ascii=False), encoding='utf-8')
PY_REQUEST
curl --fail-with-body --silent --show-error https://api.ailoot.ai/v1/messages \
  -H "x-api-key: $AILOOT_API_KEY" -H 'anthropic-version: 2023-06-01' -H 'Content-Type: application/json' \
  --data-binary @request.json -D response-headers.txt -o result.json
python3 - <<'PY_RESULT'
import json
from pathlib import Path

result = json.loads(Path('result.json').read_text(encoding='utf-8'))
print(json.dumps(result, ensure_ascii=False, indent=2))
PY_RESULT
```

```python
import json, os
from pathlib import Path

source_file = Path(os.environ['AILOOT_TEXT_FILE'])
if not source_file.is_file():
    raise SystemExit('Set AILOOT_TEXT_FILE to your actual UTF-8 document')
text = source_file.read_text(encoding='utf-8')
if not text.strip():
    raise SystemExit('Choose a document containing text')
payload = {'model': 'qwen/qwen3.8-flash', 'max_tokens': 128, 'messages': [{'role': 'user', 'content': 'Summarize the incident report.'}]}
payload['messages'][0]['content'] = 'Summarize this material and quote supporting source passages.\n\n' + text
from urllib.request import Request, urlopen
from urllib.error import HTTPError

api_key = os.environ['AILOOT_API_KEY']
if not api_key.strip():
    raise SystemExit('Set AILOOT_API_KEY before making a request')
headers = {'x-api-key': 'PLACEHOLDER_KEY', 'anthropic-version': '2023-06-01', 'Content-Type': 'application/json'}
headers['x-api-key'] = api_key
request = Request('https://api.ailoot.ai/v1/messages', data=json.dumps(payload, ensure_ascii=False).encode('utf-8'), headers=headers, method='POST')
try:
    with urlopen(request, timeout=120) as response:
        raw = response.read()
        Path('response-headers.txt').write_text(str(response.headers), encoding='utf-8')
except HTTPError as error:
    Path('result.json').write_bytes(error.read())
    Path('response-headers.txt').write_text(str(error.headers), encoding='utf-8')
    raise
Path('result.json').write_bytes(raw)
import json
from pathlib import Path

result = json.loads(Path('result.json').read_text(encoding='utf-8'))
print(json.dumps(result, ensure_ascii=False, indent=2))
```

### Hent og gem resultater

#### Ailoot Ultra · Anthropic Messages

JSON eller SSE

##### Behold alle færdige resultater

Gem hvert fuldstændigt returneret svar, hver fil og hver indholdsdel.

Bevar alle indholdsblokke, ræsonnementssignaturer og faktiske værktøjsbrugs-ID’er. Saml alle SSE-blokdeltaer; den første tekstblok er ikke hele outputtet.

##### Hvis det oprindelige svar skal kontrolleres

Bevar anmodnings-/svar-ID’er og headere. Der leveres ingen generel URL til at hente tekstjob.

Svarfelter

| Felt | Type |
| --- | --- |
| Felt`id` | Typestring |
| Felt`model` | Typestring |
| Felt`content[]` | Typetext\|thinking\|tool\_use\|other content block |
| Felt`stop_reason` | Typestring\|null |
| Felt`usage` | Typeobject |

Fejl og næste trin

| Svar | Betingelse | Næste trin |
| --- | --- | --- |
| Svar400 · `invalid_request_error` | BetingelseUgyldige obligatoriske felter, materialerepræsentation eller parameterværdi | Næste trinRet de angivne felter før en ny oprettelsesanmodning. |

### Aliaser

#### Modelaliaser

<strong>Ailoot</strong> [`qwen3.8-flash`](https://ailoot.ai/models/da/#m=qwen%2Fqwen3.8-flash&route=Core&caller=qwen3.8-flash&fmt=messages), [`qwen-flash`](https://ailoot.ai/models/da/#m=qwen%2Fqwen3.8-flash&route=Core&caller=qwen-flash&fmt=messages), [`qwen-flash-latest`](https://ailoot.ai/models/da/#m=qwen%2Fqwen3.8-flash&route=Core&caller=qwen-flash-latest&fmt=messages)
**Ailoot Ultra** [`qwen3.8-flash`](https://ailoot.ai/models/da/#m=qwen%2Fqwen3.8-flash&route=Ultra&caller=qwen3.8-flash&fmt=messages), [`qwen/qwen3.8-flash`](https://ailoot.ai/models/da/#m=qwen%2Fqwen3.8-flash&route=Ultra&caller=qwen%2Fqwen3.8-flash&fmt=messages)

#### Aliaser for metodestier

`/chat/completions`

#### Relaterede kalder-ID’er

[`qwen/qwen3.8-flash`](https://ailoot.ai/models/da/#m=qwen%2Fqwen3.8-flash&route=Ultra&caller=qwen%2Fqwen3.8-flash&fmt=messages), [`qwen-flash`](https://ailoot.ai/models/da/#m=qwen%2Fqwen3.8-flash&route=Core&caller=qwen-flash&fmt=messages), [`qwen-flash-latest`](https://ailoot.ai/models/da/#m=qwen%2Fqwen3.8-flash&route=Core&caller=qwen-flash-latest&fmt=messages), [`qwen3.8-flash`](https://ailoot.ai/models/da/#m=qwen%2Fqwen3.8-flash&route=Core&caller=qwen3.8-flash&fmt=messages), [`qwen3.8-flash`](https://ailoot.ai/models/da/#m=qwen%2Fqwen3.8-flash&route=Ultra&caller=qwen3.8-flash&fmt=messages)

FAQ · Qwen: Qwen3.8 Flash

Hvilke input og resultater er tilgængelige?

`POST /v1/messages` · `qwen3.8-flash`: `text`, `image` → `text` `POST /v1/responses` · `qwen3.8-flash`: `text`, `image` → `text` `POST /v1/chat/completions` · `qwen3.8-flash`: `text`, `image` → `text` `POST /v1/chat/completions` · `qwen3.8-flash`: `text` → `text` `POST /v1/messages` · `qwen3.8-flash`: `text` → `json`, `sse` `POST /v1/messages` · `qwen-flash`: `text`, `image` → `text` `POST /v1/responses` · `qwen-flash`: `text`, `image` → `text` `POST /v1/chat/completions` · `qwen-flash`: `text`, `image` → `text` `POST /v1/messages` · `qwen-flash-latest`: `text`, `image` → `text` `POST /v1/responses` · `qwen-flash-latest`: `text`, `image` → `text` `POST /v1/chat/completions` · `qwen-flash-latest`: `text`, `image` → `text` `POST /v1/chat/completions` · `qwen/qwen3.8-flash`: `text` → `text` `POST /v1/messages` · `qwen/qwen3.8-flash`: `text` → `json`, `sse`

Hvilke felter bruger anmodningen?

`POST /v1/messages` · `qwen3.8-flash`: `model`, `messages`, `system`, `max_tokens`, `stream`, `metadata` `POST /v1/responses` · `qwen3.8-flash`: `model`, `input`, `instructions`, `stream` `POST /v1/chat/completions` · `qwen3.8-flash`: `model`, `messages`, `stream` `POST /v1/chat/completions` · `qwen3.8-flash`: `model`, `messages`, `stream` `POST /v1/messages` · `qwen3.8-flash`: `model`, `messages`, `max_tokens`, `stream` `POST /v1/messages` · `qwen-flash`: `model`, `messages`, `system`, `max_tokens`, `stream`, `metadata` `POST /v1/responses` · `qwen-flash`: `model`, `input`, `instructions`, `stream` `POST /v1/chat/completions` · `qwen-flash`: `model`, `messages`, `stream` `POST /v1/messages` · `qwen-flash-latest`: `model`, `messages`, `system`, `max_tokens`, `stream`, `metadata` `POST /v1/responses` · `qwen-flash-latest`: `model`, `input`, `instructions`, `stream` `POST /v1/chat/completions` · `qwen-flash-latest`: `model`, `messages`, `stream` `POST /v1/chat/completions` · `qwen/qwen3.8-flash`: `model`, `messages`, `stream`, `modalities`, `provider` `POST /v1/messages` · `qwen/qwen3.8-flash`: `model`, `messages`, `max_tokens`, `stream`

Hvilke grænser gælder?

`POST /v1/messages` · `qwen3.8-flash`: `ctx`: `991808`; `max_out`: `131072`; `messages.min_items`: `1`; `max_tokens.minimum`: `1` `POST /v1/responses` · `qwen3.8-flash`: `ctx`: `991808`; `max_out`: `131072` `POST /v1/chat/completions` · `qwen3.8-flash`: `ctx`: `991808`; `max_out`: `131072`; `messages.min_items`: `1` `POST /v1/chat/completions` · `qwen3.8-flash`: `messages.min_items`: `1` `POST /v1/messages` · `qwen-flash`: `ctx`: `991808`; `max_out`: `131072`; `messages.min_items`: `1`; `max_tokens.minimum`: `1` `POST /v1/responses` · `qwen-flash`: `ctx`: `991808`; `max_out`: `131072` `POST /v1/chat/completions` · `qwen-flash`: `ctx`: `991808`; `max_out`: `131072`; `messages.min_items`: `1` `POST /v1/messages` · `qwen-flash-latest`: `ctx`: `991808`; `max_out`: `131072`; `messages.min_items`: `1`; `max_tokens.minimum`: `1` `POST /v1/responses` · `qwen-flash-latest`: `ctx`: `991808`; `max_out`: `131072` `POST /v1/chat/completions` · `qwen-flash-latest`: `ctx`: `991808`; `max_out`: `131072`; `messages.min_items`: `1` `POST /v1/chat/completions` · `qwen/qwen3.8-flash`: `messages.min_items`: `1`

Tilslut Ailoot til Claude Code, OpenCode, Hermes eller din egen applikation.

## Virksomheden og dens projektportefølje

Virksomheden og dens projektportefølje: millioner af kunder; månedligt salg for milliarder.

## Køb tokens med rabat.

Abonnementsrabat til regelmæssigt arbejde. Rabatkoder giver op til 50% på tokenkøb.

Abonnement

Vælg et abonnement med rabat til dine regelmæssige anmodninger.

Rabatkode på op til 50%

Indtast koden ved købet. Prisen genberegnes efter den aktuelle kampagne.

Udgifter i historikken

Model, tokens og beløb gemmes for hver anmodning.

[Vælg abonnement](https://ailoot.ai/docs/da/billing/subscriptions/) · [Se modelpriser](https://ailoot.ai/models/da/)

## Tilslut API’et til produktet, du sælger.

SaaS, apps og bots efter Ailoots tilbudsvilkår og licensaftale. Anmod om en forhandlerlicens til videresalg.

Kommerciel applikation

Byg generering af tekst, billeder, video og lyd ind i tjenestens betalte funktioner.

Licens til forhandlere

Send projektbeskrivelse og adgangsmodel. Bed om skriftlige vilkår for anvendelse og videresalg.

Dokumenter på websitet

Tilbudsvilkår, licensaftale og politik for behandling af data kan læses før tilslutning.

[Anmod om forhandlerlicens](mailto:support@ailoot.ai) · [Tilbudsvilkår og licensaftale](https://ailoot.ai/legal/offer?lang=da)

## Ailoot · Virksomheden og dens projektportefølje





Ailoot bygger på solid driftserfaring, en stor kundebase, stabil service og løbende kontrol af KPI.





Virksomheden og dens projektportefølje: millioner af kunder; månedligt salg for milliarder.





Ailoot bruger denne driftserfaring til API-adgang til AI-funktioner i kundernes produkter, agenter, applikationer og automatiseringer.
