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

# qwen3.8-max

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

## [qwen3.8-max](https://ailoot.ai/models/da/qwen3-8-max/)

Qwen3.8-Max er en Qwen-model til tekstræsonnement og visuel forståelse. Udvikleren beskriver en kontekst på 1 million tokens, billed- og videoinput, værktøjsunderstøttede forløb og strukturerede tekstresultater.

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

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-Max er en Qwen-model til tekstræsonnement og visuel forståelse. Udviklerens vejledninger angiver den til krævende ræsonnementsarbejde og fortolkning af billeder og video. Tabellen over visuelle modeller angiver en kontekst på 1 million tokens, funktionskald, indbyggede værktøjer og struktureret output.

#### Analyser et spørgsmål og dets kildemateriale

Giv belæggene, betingelserne og det resultat, opgaven skal producere. Ved dokumentarbejde bevares afsnitsmærkninger, og det angives, hvilken reference der har forrang, hvis passager er uenige. Ved et visuelt spørgsmål gives et læsbart billede, det område der skal undersøges, og de oplysninger der er relevante for svaret. Bed svaret holde kildeobservationer adskilt fra fortolkning.

#### Brug en optaget sekvens til et defineret spørgsmål

Vælg det udsnit, der er relevant for opgaven, og bevar rækkefølgen. Bed om en beskrivelse af de synlige hændelser og belæggene bag hver observation. Hvis en talt forklaring er nødvendig, tilføjes dens transskription som tekst. Det ønskede resultat kan være en kronologisk note, en analytisk sammenligning eller en forklaring forankret i de givne enkeltbilleder.

#### Giv den omgivende applikation en tydelig rolle

Funktionskald lader en integration definere en handling og dens argumenter, udføre det kald, modellen vælger, og returnere det faktiske resultat. Udvikleren angiver også indbyggede værktøjer til modellen. Deres tilgængelighed afhænger af den grænseflade, som bruges til anmodningen. Ved struktureret output defineres feltnavne og håndtering af manglende værdier, hvorefter både svarformat og betydning kontrolleres.

#### Planlæg inden for de dokumenterede grænser

Tabellen over visuelle modeller angiver billeder på op til 16 millioner pixels, video på op til to timer og 2 GB samt filantalsgrænser på 2.048 billeder og 64 videoer. Disse grænser for udviklerens forløb er fortsat underlagt den fælles kontekst på 1 million tokens. De beskriver inputforberedelse, mens den valgte grænseflade fastlægger grænserne for den faktiske anmodning. Hold kildemærkninger og det ønskede svar samlet, så resultatet kan kontrolleres mod belæggene.

Praktisk opgave

### Praktisk opgave

Teknisk eksempel på engelsk

```
Resolve a document-priority conflict

Use these requirements and source priority. Manual M: operators may restart the pump after a ten-minute wait. Safety bulletin S: after a leak alarm, only maintenance may authorise restart; S overrides M. Case: a leak alarm occurred 15 minutes ago. Write a short decision note with source references and state the evidence still needed before restart.
```

#### Forventet resultat

```
A source-linked decision note applying the bulletin and naming maintenance authorisation as an unresolved condition.
```

#### Kontrollér resultatet

```
Elapsed waiting time alone does not override the leak-alarm rule.
```

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

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

Alibaba /`qwen3.8-max`

Model-ID

- `qwen3.8-max`
- `qwen`
- `qwen-latest`
- `qwen-max`
- `qwen3.8-max-preview`

### Start

Qwen3.8-Max er en Qwen-model til tekstræsonnement og visuel forståelse. Udvikleren beskriver en kontekst på 1 million tokens, billed- og videoinput, værktøjsunderstøttede forløb og strukturerede tekstresultater.

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-max | 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,002 US$ */ 1K*

Output

0,006 US$ */ 1K*

Cachelæsning

0,00017 US$ */ 1K*

Cacheskrivning

0,0025 US$ */ 1K*

Cacheskrivning, 5 min.

0,0025 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 | Beløb |
| --- | --- | --- |
| KonfigurationOpenAI Chat · Grundtakster pr. token | TakstplanGrundtakst | Beløb Input · Inputtokens **$0.00432** / 1K tokens Output · Outputtokens **$0.01272** / 1K tokens Input · Cachelæsning **$0.000336** / 1K tokens Input · Cacheskrivning **$0.00516** / 1K tokens Input · Cacheskrivning, 1 time **—** / 1K tokens |
| KonfigurationAnthropic Messages · Grundtakster pr. token | TakstplanGrundtakst | Beløb Input · Inputtokens **$0.00432** / 1K tokens Output · Outputtokens **$0.01272** / 1K tokens Input · Cachelæsning **$0.000336** / 1K tokens Input · Cacheskrivning **$0.00516** / 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-max", "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-max", "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-max",
    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-max",
  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-max',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-max`](https://ailoot.ai/models/da/#m=qwen3.8-max&route=Core&caller=qwen3.8-max&fmt=messages), [`qwen`](https://ailoot.ai/models/da/#m=qwen3.8-max&route=Core&caller=qwen&fmt=messages), [`qwen-latest`](https://ailoot.ai/models/da/#m=qwen3.8-max&route=Core&caller=qwen-latest&fmt=messages), [`qwen-max`](https://ailoot.ai/models/da/#m=qwen3.8-max&route=Core&caller=qwen-max&fmt=messages), [`qwen3.8-max-preview`](https://ailoot.ai/models/da/#m=qwen3.8-max&route=Core&caller=qwen3.8-max-preview&fmt=messages)
**Ailoot Ultra** [`qwen3.8-max`](https://ailoot.ai/models/da/#m=qwen3.8-max&route=Ultra&caller=qwen3.8-max&fmt=messages)

#### Aliaser for metodestier

Brug metodestierne vist ovenfor.

#### Relaterede kalder-ID’er

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

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

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

Alibaba /`qwen3.8-max`

Model-ID

- `qwen3.8-max`
- `qwen`
- `qwen-latest`
- `qwen-max`
- `qwen3.8-max-preview`

### Start

Qwen3.8-Max er en Qwen-model til tekstræsonnement og visuel forståelse. Udvikleren beskriver en kontekst på 1 million tokens, billed- og videoinput, værktøjsunderstøttede forløb og strukturerede tekstresultater.

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-max | 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

Input

0,002 US$ */ 1K*

Output

0,006 US$ */ 1K*

Cachelæsning

0,00025 US$ */ 1K*

Cacheskrivning

0,0025 US$ */ 1K*

Cacheskrivning, 5 min.

0,0025 US$ */ 1K tokens*

code\_interpreter\_call

0,00 US$ *pr. kald*

image\_search\_call

0,008 US$ *pr. kald*

web\_extractor\_call

0,00 US$ *pr. kald*

web\_search\_call

0,01 US$ *pr. kald*

web\_search\_image\_call

0,008 US$ *pr. kald*

Maks. antal kald code\_interpreter\_call

8

Maks. antal kald image\_search\_call

8

Maks. antal kald web\_extractor\_call

8

Maks. antal kald web\_search\_call

8

Maks. antal kald web\_search\_image\_call

8

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 | Beløb |
| --- | --- | --- |
| KonfigurationOpenAI Chat · Grundtakster pr. token | TakstplanGrundtakst | Beløb Input · Inputtokens **$0.00432** / 1K tokens Output · Outputtokens **$0.01272** / 1K tokens Input · Cachelæsning **$0.000336** / 1K tokens Input · Cacheskrivning **$0.00516** / 1K tokens Input · Cacheskrivning, 1 time **—** / 1K tokens |
| KonfigurationAnthropic Messages · Grundtakster pr. token | TakstplanGrundtakst | Beløb Input · Inputtokens **$0.00432** / 1K tokens Output · Outputtokens **$0.01272** / 1K tokens Input · Cachelæsning **$0.000336** / 1K tokens Input · Cacheskrivning **$0.00516** / 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-max", "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-max", "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-max", 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-max", 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-max", 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-max`](https://ailoot.ai/models/da/#m=qwen3.8-max&route=Core&caller=qwen3.8-max&fmt=responses), [`qwen`](https://ailoot.ai/models/da/#m=qwen3.8-max&route=Core&caller=qwen&fmt=responses), [`qwen-latest`](https://ailoot.ai/models/da/#m=qwen3.8-max&route=Core&caller=qwen-latest&fmt=responses), [`qwen-max`](https://ailoot.ai/models/da/#m=qwen3.8-max&route=Core&caller=qwen-max&fmt=responses), [`qwen3.8-max-preview`](https://ailoot.ai/models/da/#m=qwen3.8-max&route=Core&caller=qwen3.8-max-preview&fmt=responses)
**Ailoot Ultra** [`qwen3.8-max`](https://ailoot.ai/models/da/#m=qwen3.8-max&route=Ultra&caller=qwen3.8-max)

#### Aliaser for metodestier

Brug metodestierne vist ovenfor.

#### Relaterede kalder-ID’er

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

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

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

Alibaba /`qwen3.8-max`

Model-ID

- `qwen3.8-max`
- `qwen`
- `qwen-latest`
- `qwen-max`
- `qwen3.8-max-preview`

### Start

Qwen3.8-Max er en Qwen-model til tekstræsonnement og visuel forståelse. Udvikleren beskriver en kontekst på 1 million tokens, billed- og videoinput, værktøjsunderstøttede forløb og strukturerede tekstresultater.

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-max | 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

Input

0,002 US$ */ 1K*

Output

0,006 US$ */ 1K*

Cachelæsning

0,00025 US$ */ 1K*

Cacheskrivning

0,0025 US$ */ 1K*

Cacheskrivning, 5 min.

0,0025 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 | Beløb |
| --- | --- | --- |
| KonfigurationOpenAI Chat · Grundtakster pr. token | TakstplanGrundtakst | Beløb Input · Inputtokens **$0.00432** / 1K tokens Output · Outputtokens **$0.01272** / 1K tokens Input · Cachelæsning **$0.000336** / 1K tokens Input · Cacheskrivning **$0.00516** / 1K tokens Input · Cacheskrivning, 1 time **—** / 1K tokens |
| KonfigurationAnthropic Messages · Grundtakster pr. token | TakstplanGrundtakst | Beløb Input · Inputtokens **$0.00432** / 1K tokens Output · Outputtokens **$0.01272** / 1K tokens Input · Cachelæsning **$0.000336** / 1K tokens Input · Cacheskrivning **$0.00516** / 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-max", "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-max", "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-max",
    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-max",
  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-max',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-max`](https://ailoot.ai/models/da/#m=qwen3.8-max&route=Core&caller=qwen3.8-max&fmt=chat), [`qwen`](https://ailoot.ai/models/da/#m=qwen3.8-max&route=Core&caller=qwen&fmt=chat), [`qwen-latest`](https://ailoot.ai/models/da/#m=qwen3.8-max&route=Core&caller=qwen-latest&fmt=chat), [`qwen-max`](https://ailoot.ai/models/da/#m=qwen3.8-max&route=Core&caller=qwen-max&fmt=chat), [`qwen3.8-max-preview`](https://ailoot.ai/models/da/#m=qwen3.8-max&route=Core&caller=qwen3.8-max-preview&fmt=chat)
**Ailoot Ultra** [`qwen3.8-max`](https://ailoot.ai/models/da/#m=qwen3.8-max&route=Ultra&caller=qwen3.8-max&fmt=chat)

#### Aliaser for metodestier

Brug metodestierne vist ovenfor.

#### Relaterede kalder-ID’er

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

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

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

Alibaba /`qwen3.8-max`

### Start

Qwen3.8-Max er en Qwen-model til tekstræsonnement og visuel forståelse. Udvikleren beskriver en kontekst på 1 million tokens, billed- og videoinput, værktøjsunderstøttede forløb og strukturerede tekstresultater.

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-max | 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

Ikke angivet Når hurtig tilstand er valgt

flex-tilstand

Ikke angivet Når flex-tilstanden er valgt

Maksimal ræsonneringsindsats

Ikke angivet Når default-justeringen anvendes ved maksimal ræsonneringsindsats

#### Ailoot-takster

#### Priser efter konfiguration

| Konfiguration | Takstplan | Beløb |
| --- | --- | --- |
| KonfigurationGrundtakster for tokens | TakstplanGrundtakst | Beløb Input · Inputtokens **$0.00432** / 1K tokens Output · Outputtokens **$0.01272** / 1K tokens Input · Cachelæsning **$0.000336** / 1K tokens Input · Cacheskrivning **$0.00516** / 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": "qwen3.8-max", "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='qwen3.8-max',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='qwen3.8-max',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-max`](https://ailoot.ai/models/da/#m=qwen3.8-max&route=Core&caller=qwen3.8-max&fmt=chat), [`qwen`](https://ailoot.ai/models/da/#m=qwen3.8-max&route=Core&caller=qwen&fmt=chat), [`qwen-latest`](https://ailoot.ai/models/da/#m=qwen3.8-max&route=Core&caller=qwen-latest&fmt=chat), [`qwen-max`](https://ailoot.ai/models/da/#m=qwen3.8-max&route=Core&caller=qwen-max&fmt=chat), [`qwen3.8-max-preview`](https://ailoot.ai/models/da/#m=qwen3.8-max&route=Core&caller=qwen3.8-max-preview&fmt=chat)
**Ailoot Ultra** [`qwen3.8-max`](https://ailoot.ai/models/da/#m=qwen3.8-max&route=Ultra&caller=qwen3.8-max&fmt=chat)

#### Aliaser for metodestier

Brug metodestierne vist ovenfor.

#### Relaterede kalder-ID’er

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

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

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

Alibaba /`qwen3.8-max`

### Start

Qwen3.8-Max er en Qwen-model til tekstræsonnement og visuel forståelse. Udvikleren beskriver en kontekst på 1 million tokens, billed- og videoinput, værktøjsunderstøttede forløb og strukturerede tekstresultater.

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-max | 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

Ikke angivet Når hurtig tilstand er valgt

flex-tilstand

Ikke angivet Når flex-tilstanden er valgt

Maksimal ræsonneringsindsats

Ikke angivet Når default-justeringen anvendes ved maksimal ræsonneringsindsats

#### Ailoot-takster

#### Priser efter konfiguration

| Konfiguration | Takstplan | Beløb |
| --- | --- | --- |
| KonfigurationGrundtakster for tokens | TakstplanGrundtakst | Beløb Input · Inputtokens **$0.00432** / 1K tokens Output · Outputtokens **$0.01272** / 1K tokens Input · Cachelæsning **$0.000336** / 1K tokens Input · Cacheskrivning **$0.00516** / 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-max",
  "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-max', '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-max', '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-max`](https://ailoot.ai/models/da/#m=qwen3.8-max&route=Core&caller=qwen3.8-max&fmt=messages), [`qwen`](https://ailoot.ai/models/da/#m=qwen3.8-max&route=Core&caller=qwen&fmt=messages), [`qwen-latest`](https://ailoot.ai/models/da/#m=qwen3.8-max&route=Core&caller=qwen-latest&fmt=messages), [`qwen-max`](https://ailoot.ai/models/da/#m=qwen3.8-max&route=Core&caller=qwen-max&fmt=messages), [`qwen3.8-max-preview`](https://ailoot.ai/models/da/#m=qwen3.8-max&route=Core&caller=qwen3.8-max-preview&fmt=messages)
**Ailoot Ultra** [`qwen3.8-max`](https://ailoot.ai/models/da/#m=qwen3.8-max&route=Ultra&caller=qwen3.8-max&fmt=messages)

#### Aliaser for metodestier

Brug metodestierne vist ovenfor.

#### Relaterede kalder-ID’er

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

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

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

Alibaba /`qwen`

Model-ID

- `qwen3.8-max`
- `qwen`
- `qwen-latest`
- `qwen-max`
- `qwen3.8-max-preview`

### Start

Qwen3.8-Max er en Qwen-model til tekstræsonnement og visuel forståelse. Udvikleren beskriver en kontekst på 1 million tokens, billed- og videoinput, værktøjsunderstøttede forløb og strukturerede tekstresultater.

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 | 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,002 US$ */ 1K*

Output

0,006 US$ */ 1K*

Cachelæsning

0,00017 US$ */ 1K*

Cacheskrivning

0,0025 US$ */ 1K*

Cacheskrivning, 5 min.

0,0025 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 | Beløb |
| --- | --- | --- |
| KonfigurationOpenAI Chat · Grundtakster pr. token | TakstplanGrundtakst | Beløb Input · Inputtokens **$0.00432** / 1K tokens Output · Outputtokens **$0.01272** / 1K tokens Input · Cachelæsning **$0.000336** / 1K tokens Input · Cacheskrivning **$0.00516** / 1K tokens Input · Cacheskrivning, 1 time **—** / 1K tokens |
| KonfigurationAnthropic Messages · Grundtakster pr. token | TakstplanGrundtakst | Beløb Input · Inputtokens **$0.00432** / 1K tokens Output · Outputtokens **$0.01272** / 1K tokens Input · Cachelæsning **$0.000336** / 1K tokens Input · Cacheskrivning **$0.00516** / 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", "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", "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",
    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",
  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',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-max`](https://ailoot.ai/models/da/#m=qwen3.8-max&route=Core&caller=qwen3.8-max&fmt=messages), [`qwen`](https://ailoot.ai/models/da/#m=qwen3.8-max&route=Core&caller=qwen&fmt=messages), [`qwen-latest`](https://ailoot.ai/models/da/#m=qwen3.8-max&route=Core&caller=qwen-latest&fmt=messages), [`qwen-max`](https://ailoot.ai/models/da/#m=qwen3.8-max&route=Core&caller=qwen-max&fmt=messages), [`qwen3.8-max-preview`](https://ailoot.ai/models/da/#m=qwen3.8-max&route=Core&caller=qwen3.8-max-preview&fmt=messages)
**Ailoot Ultra** [`qwen3.8-max`](https://ailoot.ai/models/da/#m=qwen3.8-max&route=Ultra&caller=qwen3.8-max&fmt=messages)

#### Aliaser for metodestier

Brug metodestierne vist ovenfor.

#### Relaterede kalder-ID’er

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

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

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

Alibaba /`qwen`

Model-ID

- `qwen3.8-max`
- `qwen`
- `qwen-latest`
- `qwen-max`
- `qwen3.8-max-preview`

### Start

Qwen3.8-Max er en Qwen-model til tekstræsonnement og visuel forståelse. Udvikleren beskriver en kontekst på 1 million tokens, billed- og videoinput, værktøjsunderstøttede forløb og strukturerede tekstresultater.

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 | 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

Input

0,002 US$ */ 1K*

Output

0,006 US$ */ 1K*

Cachelæsning

0,00025 US$ */ 1K*

Cacheskrivning

0,0025 US$ */ 1K*

Cacheskrivning, 5 min.

0,0025 US$ */ 1K tokens*

code\_interpreter\_call

0,00 US$ *pr. kald*

image\_search\_call

0,008 US$ *pr. kald*

web\_extractor\_call

0,00 US$ *pr. kald*

web\_search\_call

0,01 US$ *pr. kald*

web\_search\_image\_call

0,008 US$ *pr. kald*

Maks. antal kald code\_interpreter\_call

8

Maks. antal kald image\_search\_call

8

Maks. antal kald web\_extractor\_call

8

Maks. antal kald web\_search\_call

8

Maks. antal kald web\_search\_image\_call

8

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 | Beløb |
| --- | --- | --- |
| KonfigurationOpenAI Chat · Grundtakster pr. token | TakstplanGrundtakst | Beløb Input · Inputtokens **$0.00432** / 1K tokens Output · Outputtokens **$0.01272** / 1K tokens Input · Cachelæsning **$0.000336** / 1K tokens Input · Cacheskrivning **$0.00516** / 1K tokens Input · Cacheskrivning, 1 time **—** / 1K tokens |
| KonfigurationAnthropic Messages · Grundtakster pr. token | TakstplanGrundtakst | Beløb Input · Inputtokens **$0.00432** / 1K tokens Output · Outputtokens **$0.01272** / 1K tokens Input · Cachelæsning **$0.000336** / 1K tokens Input · Cacheskrivning **$0.00516** / 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", "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", "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", 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", 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", 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-max`](https://ailoot.ai/models/da/#m=qwen3.8-max&route=Core&caller=qwen3.8-max&fmt=responses), [`qwen`](https://ailoot.ai/models/da/#m=qwen3.8-max&route=Core&caller=qwen&fmt=responses), [`qwen-latest`](https://ailoot.ai/models/da/#m=qwen3.8-max&route=Core&caller=qwen-latest&fmt=responses), [`qwen-max`](https://ailoot.ai/models/da/#m=qwen3.8-max&route=Core&caller=qwen-max&fmt=responses), [`qwen3.8-max-preview`](https://ailoot.ai/models/da/#m=qwen3.8-max&route=Core&caller=qwen3.8-max-preview&fmt=responses)
**Ailoot Ultra** [`qwen3.8-max`](https://ailoot.ai/models/da/#m=qwen3.8-max&route=Ultra&caller=qwen3.8-max)

#### Aliaser for metodestier

Brug metodestierne vist ovenfor.

#### Relaterede kalder-ID’er

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

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

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

Alibaba /`qwen`

Model-ID

- `qwen3.8-max`
- `qwen`
- `qwen-latest`
- `qwen-max`
- `qwen3.8-max-preview`

### Start

Qwen3.8-Max er en Qwen-model til tekstræsonnement og visuel forståelse. Udvikleren beskriver en kontekst på 1 million tokens, billed- og videoinput, værktøjsunderstøttede forløb og strukturerede tekstresultater.

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 | 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

Input

0,002 US$ */ 1K*

Output

0,006 US$ */ 1K*

Cachelæsning

0,00025 US$ */ 1K*

Cacheskrivning

0,002 US$ */ 1K*

Cacheskrivning, 5 min.

0,002 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 | Beløb |
| --- | --- | --- |
| KonfigurationOpenAI Chat · Grundtakster pr. token | TakstplanGrundtakst | Beløb Input · Inputtokens **$0.00432** / 1K tokens Output · Outputtokens **$0.01272** / 1K tokens Input · Cachelæsning **$0.000336** / 1K tokens Input · Cacheskrivning **$0.00516** / 1K tokens Input · Cacheskrivning, 1 time **—** / 1K tokens |
| KonfigurationAnthropic Messages · Grundtakster pr. token | TakstplanGrundtakst | Beløb Input · Inputtokens **$0.00432** / 1K tokens Output · Outputtokens **$0.01272** / 1K tokens Input · Cachelæsning **$0.000336** / 1K tokens Input · Cacheskrivning **$0.00516** / 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", "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", "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",
    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",
  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',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-max`](https://ailoot.ai/models/da/#m=qwen3.8-max&route=Core&caller=qwen3.8-max&fmt=chat), [`qwen`](https://ailoot.ai/models/da/#m=qwen3.8-max&route=Core&caller=qwen&fmt=chat), [`qwen-latest`](https://ailoot.ai/models/da/#m=qwen3.8-max&route=Core&caller=qwen-latest&fmt=chat), [`qwen-max`](https://ailoot.ai/models/da/#m=qwen3.8-max&route=Core&caller=qwen-max&fmt=chat), [`qwen3.8-max-preview`](https://ailoot.ai/models/da/#m=qwen3.8-max&route=Core&caller=qwen3.8-max-preview&fmt=chat)
**Ailoot Ultra** [`qwen3.8-max`](https://ailoot.ai/models/da/#m=qwen3.8-max&route=Ultra&caller=qwen3.8-max&fmt=chat)

#### Aliaser for metodestier

Brug metodestierne vist ovenfor.

#### Relaterede kalder-ID’er

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

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

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

Alibaba /`qwen-latest`

Model-ID

- `qwen3.8-max`
- `qwen`
- `qwen-latest`
- `qwen-max`
- `qwen3.8-max-preview`

### Start

Qwen3.8-Max er en Qwen-model til tekstræsonnement og visuel forståelse. Udvikleren beskriver en kontekst på 1 million tokens, billed- og videoinput, værktøjsunderstøttede forløb og strukturerede tekstresultater.

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-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,002 US$ */ 1K*

Output

0,006 US$ */ 1K*

Cachelæsning

0,00017 US$ */ 1K*

Cacheskrivning

0,0025 US$ */ 1K*

Cacheskrivning, 5 min.

0,0025 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 | Beløb |
| --- | --- | --- |
| KonfigurationOpenAI Chat · Grundtakster pr. token | TakstplanGrundtakst | Beløb Input · Inputtokens **$0.00432** / 1K tokens Output · Outputtokens **$0.01272** / 1K tokens Input · Cachelæsning **$0.000336** / 1K tokens Input · Cacheskrivning **$0.00516** / 1K tokens Input · Cacheskrivning, 1 time **—** / 1K tokens |
| KonfigurationAnthropic Messages · Grundtakster pr. token | TakstplanGrundtakst | Beløb Input · Inputtokens **$0.00432** / 1K tokens Output · Outputtokens **$0.01272** / 1K tokens Input · Cachelæsning **$0.000336** / 1K tokens Input · Cacheskrivning **$0.00516** / 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-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-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-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-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-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-max`](https://ailoot.ai/models/da/#m=qwen3.8-max&route=Core&caller=qwen3.8-max&fmt=messages), [`qwen`](https://ailoot.ai/models/da/#m=qwen3.8-max&route=Core&caller=qwen&fmt=messages), [`qwen-latest`](https://ailoot.ai/models/da/#m=qwen3.8-max&route=Core&caller=qwen-latest&fmt=messages), [`qwen-max`](https://ailoot.ai/models/da/#m=qwen3.8-max&route=Core&caller=qwen-max&fmt=messages), [`qwen3.8-max-preview`](https://ailoot.ai/models/da/#m=qwen3.8-max&route=Core&caller=qwen3.8-max-preview&fmt=messages)
**Ailoot Ultra** [`qwen3.8-max`](https://ailoot.ai/models/da/#m=qwen3.8-max&route=Ultra&caller=qwen3.8-max&fmt=messages)

#### Aliaser for metodestier

Brug metodestierne vist ovenfor.

#### Relaterede kalder-ID’er

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

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

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

Alibaba /`qwen-latest`

Model-ID

- `qwen3.8-max`
- `qwen`
- `qwen-latest`
- `qwen-max`
- `qwen3.8-max-preview`

### Start

Qwen3.8-Max er en Qwen-model til tekstræsonnement og visuel forståelse. Udvikleren beskriver en kontekst på 1 million tokens, billed- og videoinput, værktøjsunderstøttede forløb og strukturerede tekstresultater.

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-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

Input

0,002 US$ */ 1K*

Output

0,006 US$ */ 1K*

Cachelæsning

0,00025 US$ */ 1K*

Cacheskrivning

0,0025 US$ */ 1K*

Cacheskrivning, 5 min.

0,0025 US$ */ 1K tokens*

code\_interpreter\_call

0,00 US$ *pr. kald*

image\_search\_call

0,008 US$ *pr. kald*

web\_extractor\_call

0,00 US$ *pr. kald*

web\_search\_call

0,01 US$ *pr. kald*

web\_search\_image\_call

0,008 US$ *pr. kald*

Maks. antal kald code\_interpreter\_call

8

Maks. antal kald image\_search\_call

8

Maks. antal kald web\_extractor\_call

8

Maks. antal kald web\_search\_call

8

Maks. antal kald web\_search\_image\_call

8

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 | Beløb |
| --- | --- | --- |
| KonfigurationOpenAI Chat · Grundtakster pr. token | TakstplanGrundtakst | Beløb Input · Inputtokens **$0.00432** / 1K tokens Output · Outputtokens **$0.01272** / 1K tokens Input · Cachelæsning **$0.000336** / 1K tokens Input · Cacheskrivning **$0.00516** / 1K tokens Input · Cacheskrivning, 1 time **—** / 1K tokens |
| KonfigurationAnthropic Messages · Grundtakster pr. token | TakstplanGrundtakst | Beløb Input · Inputtokens **$0.00432** / 1K tokens Output · Outputtokens **$0.01272** / 1K tokens Input · Cachelæsning **$0.000336** / 1K tokens Input · Cacheskrivning **$0.00516** / 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-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-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-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-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-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-max`](https://ailoot.ai/models/da/#m=qwen3.8-max&route=Core&caller=qwen3.8-max&fmt=responses), [`qwen`](https://ailoot.ai/models/da/#m=qwen3.8-max&route=Core&caller=qwen&fmt=responses), [`qwen-latest`](https://ailoot.ai/models/da/#m=qwen3.8-max&route=Core&caller=qwen-latest&fmt=responses), [`qwen-max`](https://ailoot.ai/models/da/#m=qwen3.8-max&route=Core&caller=qwen-max&fmt=responses), [`qwen3.8-max-preview`](https://ailoot.ai/models/da/#m=qwen3.8-max&route=Core&caller=qwen3.8-max-preview&fmt=responses)
**Ailoot Ultra** [`qwen3.8-max`](https://ailoot.ai/models/da/#m=qwen3.8-max&route=Ultra&caller=qwen3.8-max)

#### Aliaser for metodestier

Brug metodestierne vist ovenfor.

#### Relaterede kalder-ID’er

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

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

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

Alibaba /`qwen-latest`

Model-ID

- `qwen3.8-max`
- `qwen`
- `qwen-latest`
- `qwen-max`
- `qwen3.8-max-preview`

### Start

Qwen3.8-Max er en Qwen-model til tekstræsonnement og visuel forståelse. Udvikleren beskriver en kontekst på 1 million tokens, billed- og videoinput, værktøjsunderstøttede forløb og strukturerede tekstresultater.

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-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

Input

0,002 US$ */ 1K*

Output

0,006 US$ */ 1K*

Cachelæsning

0,00025 US$ */ 1K*

Cacheskrivning

0,002 US$ */ 1K*

Cacheskrivning, 5 min.

0,002 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 | Beløb |
| --- | --- | --- |
| KonfigurationOpenAI Chat · Grundtakster pr. token | TakstplanGrundtakst | Beløb Input · Inputtokens **$0.00432** / 1K tokens Output · Outputtokens **$0.01272** / 1K tokens Input · Cachelæsning **$0.000336** / 1K tokens Input · Cacheskrivning **$0.00516** / 1K tokens Input · Cacheskrivning, 1 time **—** / 1K tokens |
| KonfigurationAnthropic Messages · Grundtakster pr. token | TakstplanGrundtakst | Beløb Input · Inputtokens **$0.00432** / 1K tokens Output · Outputtokens **$0.01272** / 1K tokens Input · Cachelæsning **$0.000336** / 1K tokens Input · Cacheskrivning **$0.00516** / 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-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-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-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-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-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-max`](https://ailoot.ai/models/da/#m=qwen3.8-max&route=Core&caller=qwen3.8-max&fmt=chat), [`qwen`](https://ailoot.ai/models/da/#m=qwen3.8-max&route=Core&caller=qwen&fmt=chat), [`qwen-latest`](https://ailoot.ai/models/da/#m=qwen3.8-max&route=Core&caller=qwen-latest&fmt=chat), [`qwen-max`](https://ailoot.ai/models/da/#m=qwen3.8-max&route=Core&caller=qwen-max&fmt=chat), [`qwen3.8-max-preview`](https://ailoot.ai/models/da/#m=qwen3.8-max&route=Core&caller=qwen3.8-max-preview&fmt=chat)
**Ailoot Ultra** [`qwen3.8-max`](https://ailoot.ai/models/da/#m=qwen3.8-max&route=Ultra&caller=qwen3.8-max&fmt=chat)

#### Aliaser for metodestier

Brug metodestierne vist ovenfor.

#### Relaterede kalder-ID’er

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

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

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

Alibaba /`qwen-max`

Model-ID

- `qwen3.8-max`
- `qwen`
- `qwen-latest`
- `qwen-max`
- `qwen3.8-max-preview`

### Start

Qwen3.8-Max er en Qwen-model til tekstræsonnement og visuel forståelse. Udvikleren beskriver en kontekst på 1 million tokens, billed- og videoinput, værktøjsunderstøttede forløb og strukturerede tekstresultater.

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-max | 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,002 US$ */ 1K*

Output

0,006 US$ */ 1K*

Cachelæsning

0,00017 US$ */ 1K*

Cacheskrivning

0,0025 US$ */ 1K*

Cacheskrivning, 5 min.

0,0025 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 | Beløb |
| --- | --- | --- |
| KonfigurationOpenAI Chat · Grundtakster pr. token | TakstplanGrundtakst | Beløb Input · Inputtokens **$0.00432** / 1K tokens Output · Outputtokens **$0.01272** / 1K tokens Input · Cachelæsning **$0.000336** / 1K tokens Input · Cacheskrivning **$0.00516** / 1K tokens Input · Cacheskrivning, 1 time **—** / 1K tokens |
| KonfigurationAnthropic Messages · Grundtakster pr. token | TakstplanGrundtakst | Beløb Input · Inputtokens **$0.00432** / 1K tokens Output · Outputtokens **$0.01272** / 1K tokens Input · Cachelæsning **$0.000336** / 1K tokens Input · Cacheskrivning **$0.00516** / 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-max", "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-max", "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-max",
    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-max",
  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-max',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-max`](https://ailoot.ai/models/da/#m=qwen3.8-max&route=Core&caller=qwen3.8-max&fmt=messages), [`qwen`](https://ailoot.ai/models/da/#m=qwen3.8-max&route=Core&caller=qwen&fmt=messages), [`qwen-latest`](https://ailoot.ai/models/da/#m=qwen3.8-max&route=Core&caller=qwen-latest&fmt=messages), [`qwen-max`](https://ailoot.ai/models/da/#m=qwen3.8-max&route=Core&caller=qwen-max&fmt=messages), [`qwen3.8-max-preview`](https://ailoot.ai/models/da/#m=qwen3.8-max&route=Core&caller=qwen3.8-max-preview&fmt=messages)
**Ailoot Ultra** [`qwen3.8-max`](https://ailoot.ai/models/da/#m=qwen3.8-max&route=Ultra&caller=qwen3.8-max&fmt=messages)

#### Aliaser for metodestier

Brug metodestierne vist ovenfor.

#### Relaterede kalder-ID’er

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

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

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

Alibaba /`qwen-max`

Model-ID

- `qwen3.8-max`
- `qwen`
- `qwen-latest`
- `qwen-max`
- `qwen3.8-max-preview`

### Start

Qwen3.8-Max er en Qwen-model til tekstræsonnement og visuel forståelse. Udvikleren beskriver en kontekst på 1 million tokens, billed- og videoinput, værktøjsunderstøttede forløb og strukturerede tekstresultater.

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-max | 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

Input

0,002 US$ */ 1K*

Output

0,006 US$ */ 1K*

Cachelæsning

0,00025 US$ */ 1K*

Cacheskrivning

0,0025 US$ */ 1K*

Cacheskrivning, 5 min.

0,0025 US$ */ 1K tokens*

code\_interpreter\_call

0,00 US$ *pr. kald*

image\_search\_call

0,008 US$ *pr. kald*

web\_extractor\_call

0,00 US$ *pr. kald*

web\_search\_call

0,01 US$ *pr. kald*

web\_search\_image\_call

0,008 US$ *pr. kald*

Maks. antal kald code\_interpreter\_call

8

Maks. antal kald image\_search\_call

8

Maks. antal kald web\_extractor\_call

8

Maks. antal kald web\_search\_call

8

Maks. antal kald web\_search\_image\_call

8

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 | Beløb |
| --- | --- | --- |
| KonfigurationOpenAI Chat · Grundtakster pr. token | TakstplanGrundtakst | Beløb Input · Inputtokens **$0.00432** / 1K tokens Output · Outputtokens **$0.01272** / 1K tokens Input · Cachelæsning **$0.000336** / 1K tokens Input · Cacheskrivning **$0.00516** / 1K tokens Input · Cacheskrivning, 1 time **—** / 1K tokens |
| KonfigurationAnthropic Messages · Grundtakster pr. token | TakstplanGrundtakst | Beløb Input · Inputtokens **$0.00432** / 1K tokens Output · Outputtokens **$0.01272** / 1K tokens Input · Cachelæsning **$0.000336** / 1K tokens Input · Cacheskrivning **$0.00516** / 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-max", "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-max", "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-max", 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-max", 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-max", 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-max`](https://ailoot.ai/models/da/#m=qwen3.8-max&route=Core&caller=qwen3.8-max&fmt=responses), [`qwen`](https://ailoot.ai/models/da/#m=qwen3.8-max&route=Core&caller=qwen&fmt=responses), [`qwen-latest`](https://ailoot.ai/models/da/#m=qwen3.8-max&route=Core&caller=qwen-latest&fmt=responses), [`qwen-max`](https://ailoot.ai/models/da/#m=qwen3.8-max&route=Core&caller=qwen-max&fmt=responses), [`qwen3.8-max-preview`](https://ailoot.ai/models/da/#m=qwen3.8-max&route=Core&caller=qwen3.8-max-preview&fmt=responses)
**Ailoot Ultra** [`qwen3.8-max`](https://ailoot.ai/models/da/#m=qwen3.8-max&route=Ultra&caller=qwen3.8-max)

#### Aliaser for metodestier

Brug metodestierne vist ovenfor.

#### Relaterede kalder-ID’er

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

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

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

Alibaba /`qwen-max`

Model-ID

- `qwen3.8-max`
- `qwen`
- `qwen-latest`
- `qwen-max`
- `qwen3.8-max-preview`

### Start

Qwen3.8-Max er en Qwen-model til tekstræsonnement og visuel forståelse. Udvikleren beskriver en kontekst på 1 million tokens, billed- og videoinput, værktøjsunderstøttede forløb og strukturerede tekstresultater.

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-max | 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

Input

0,002 US$ */ 1K*

Output

0,006 US$ */ 1K*

Cachelæsning

0,00025 US$ */ 1K*

Cacheskrivning

0,0025 US$ */ 1K*

Cacheskrivning, 5 min.

0,0025 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 | Beløb |
| --- | --- | --- |
| KonfigurationOpenAI Chat · Grundtakster pr. token | TakstplanGrundtakst | Beløb Input · Inputtokens **$0.00432** / 1K tokens Output · Outputtokens **$0.01272** / 1K tokens Input · Cachelæsning **$0.000336** / 1K tokens Input · Cacheskrivning **$0.00516** / 1K tokens Input · Cacheskrivning, 1 time **—** / 1K tokens |
| KonfigurationAnthropic Messages · Grundtakster pr. token | TakstplanGrundtakst | Beløb Input · Inputtokens **$0.00432** / 1K tokens Output · Outputtokens **$0.01272** / 1K tokens Input · Cachelæsning **$0.000336** / 1K tokens Input · Cacheskrivning **$0.00516** / 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-max", "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-max", "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-max",
    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-max",
  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-max',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-max`](https://ailoot.ai/models/da/#m=qwen3.8-max&route=Core&caller=qwen3.8-max&fmt=chat), [`qwen`](https://ailoot.ai/models/da/#m=qwen3.8-max&route=Core&caller=qwen&fmt=chat), [`qwen-latest`](https://ailoot.ai/models/da/#m=qwen3.8-max&route=Core&caller=qwen-latest&fmt=chat), [`qwen-max`](https://ailoot.ai/models/da/#m=qwen3.8-max&route=Core&caller=qwen-max&fmt=chat), [`qwen3.8-max-preview`](https://ailoot.ai/models/da/#m=qwen3.8-max&route=Core&caller=qwen3.8-max-preview&fmt=chat)
**Ailoot Ultra** [`qwen3.8-max`](https://ailoot.ai/models/da/#m=qwen3.8-max&route=Ultra&caller=qwen3.8-max&fmt=chat)

#### Aliaser for metodestier

Brug metodestierne vist ovenfor.

#### Relaterede kalder-ID’er

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

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

[`qwen3.8-max-preview`](https://ailoot.ai/models/da/#m=qwen3.8-max&route=Core&caller=qwen3.8-max-preview&fmt=messages)

Alibaba /`qwen3.8-max-preview`

Model-ID

- `qwen3.8-max`
- `qwen`
- `qwen-latest`
- `qwen-max`
- `qwen3.8-max-preview`

### Start

Qwen3.8-Max er en Qwen-model til tekstræsonnement og visuel forståelse. Udvikleren beskriver en kontekst på 1 million tokens, billed- og videoinput, værktøjsunderstøttede forløb og strukturerede tekstresultater.

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-max-preview | 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,002 US$ */ 1K*

Output

0,006 US$ */ 1K*

Cachelæsning

0,00017 US$ */ 1K*

Cacheskrivning

0,0025 US$ */ 1K*

Cacheskrivning, 5 min.

0,0025 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 | Beløb |
| --- | --- | --- |
| KonfigurationOpenAI Chat · Grundtakster pr. token | TakstplanGrundtakst | Beløb Input · Inputtokens **$0.00432** / 1K tokens Output · Outputtokens **$0.01272** / 1K tokens Input · Cachelæsning **$0.000336** / 1K tokens Input · Cacheskrivning **$0.00516** / 1K tokens Input · Cacheskrivning, 1 time **—** / 1K tokens |
| KonfigurationAnthropic Messages · Grundtakster pr. token | TakstplanGrundtakst | Beløb Input · Inputtokens **$0.00432** / 1K tokens Output · Outputtokens **$0.01272** / 1K tokens Input · Cachelæsning **$0.000336** / 1K tokens Input · Cacheskrivning **$0.00516** / 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-max-preview", "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-max-preview", "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-max-preview",
    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-max-preview",
  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-max-preview',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-max`](https://ailoot.ai/models/da/#m=qwen3.8-max&route=Core&caller=qwen3.8-max&fmt=messages), [`qwen`](https://ailoot.ai/models/da/#m=qwen3.8-max&route=Core&caller=qwen&fmt=messages), [`qwen-latest`](https://ailoot.ai/models/da/#m=qwen3.8-max&route=Core&caller=qwen-latest&fmt=messages), [`qwen-max`](https://ailoot.ai/models/da/#m=qwen3.8-max&route=Core&caller=qwen-max&fmt=messages), [`qwen3.8-max-preview`](https://ailoot.ai/models/da/#m=qwen3.8-max&route=Core&caller=qwen3.8-max-preview&fmt=messages)
**Ailoot Ultra** [`qwen3.8-max`](https://ailoot.ai/models/da/#m=qwen3.8-max&route=Ultra&caller=qwen3.8-max&fmt=messages)

#### Aliaser for metodestier

Brug metodestierne vist ovenfor.

#### Relaterede kalder-ID’er

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

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

[`qwen3.8-max-preview`](https://ailoot.ai/models/da/#m=qwen3.8-max&route=Core&caller=qwen3.8-max-preview&fmt=responses)

Alibaba /`qwen3.8-max-preview`

Model-ID

- `qwen3.8-max`
- `qwen`
- `qwen-latest`
- `qwen-max`
- `qwen3.8-max-preview`

### Start

Qwen3.8-Max er en Qwen-model til tekstræsonnement og visuel forståelse. Udvikleren beskriver en kontekst på 1 million tokens, billed- og videoinput, værktøjsunderstøttede forløb og strukturerede tekstresultater.

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-max-preview | 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

Input

0,002 US$ */ 1K*

Output

0,006 US$ */ 1K*

Cachelæsning

0,00025 US$ */ 1K*

Cacheskrivning

0,0025 US$ */ 1K*

Cacheskrivning, 5 min.

0,0025 US$ */ 1K tokens*

code\_interpreter\_call

0,00 US$ *pr. kald*

image\_search\_call

0,008 US$ *pr. kald*

web\_extractor\_call

0,00 US$ *pr. kald*

web\_search\_call

0,01 US$ *pr. kald*

web\_search\_image\_call

0,008 US$ *pr. kald*

Maks. antal kald code\_interpreter\_call

8

Maks. antal kald image\_search\_call

8

Maks. antal kald web\_extractor\_call

8

Maks. antal kald web\_search\_call

8

Maks. antal kald web\_search\_image\_call

8

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 | Beløb |
| --- | --- | --- |
| KonfigurationOpenAI Chat · Grundtakster pr. token | TakstplanGrundtakst | Beløb Input · Inputtokens **$0.00432** / 1K tokens Output · Outputtokens **$0.01272** / 1K tokens Input · Cachelæsning **$0.000336** / 1K tokens Input · Cacheskrivning **$0.00516** / 1K tokens Input · Cacheskrivning, 1 time **—** / 1K tokens |
| KonfigurationAnthropic Messages · Grundtakster pr. token | TakstplanGrundtakst | Beløb Input · Inputtokens **$0.00432** / 1K tokens Output · Outputtokens **$0.01272** / 1K tokens Input · Cachelæsning **$0.000336** / 1K tokens Input · Cacheskrivning **$0.00516** / 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-max-preview", "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-max-preview", "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-max-preview", 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-max-preview", 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-max-preview", 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-max`](https://ailoot.ai/models/da/#m=qwen3.8-max&route=Core&caller=qwen3.8-max&fmt=responses), [`qwen`](https://ailoot.ai/models/da/#m=qwen3.8-max&route=Core&caller=qwen&fmt=responses), [`qwen-latest`](https://ailoot.ai/models/da/#m=qwen3.8-max&route=Core&caller=qwen-latest&fmt=responses), [`qwen-max`](https://ailoot.ai/models/da/#m=qwen3.8-max&route=Core&caller=qwen-max&fmt=responses), [`qwen3.8-max-preview`](https://ailoot.ai/models/da/#m=qwen3.8-max&route=Core&caller=qwen3.8-max-preview&fmt=responses)
**Ailoot Ultra** [`qwen3.8-max`](https://ailoot.ai/models/da/#m=qwen3.8-max&route=Ultra&caller=qwen3.8-max)

#### Aliaser for metodestier

Brug metodestierne vist ovenfor.

#### Relaterede kalder-ID’er

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

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

[`qwen3.8-max-preview`](https://ailoot.ai/models/da/#m=qwen3.8-max&route=Core&caller=qwen3.8-max-preview&fmt=chat)

Alibaba /`qwen3.8-max-preview`

Model-ID

- `qwen3.8-max`
- `qwen`
- `qwen-latest`
- `qwen-max`
- `qwen3.8-max-preview`

### Start

Qwen3.8-Max er en Qwen-model til tekstræsonnement og visuel forståelse. Udvikleren beskriver en kontekst på 1 million tokens, billed- og videoinput, værktøjsunderstøttede forløb og strukturerede tekstresultater.

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-max-preview | 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

Input

0,002 US$ */ 1K*

Output

0,006 US$ */ 1K*

Cachelæsning

0,00025 US$ */ 1K*

Cacheskrivning

0,0025 US$ */ 1K*

Cacheskrivning, 5 min.

0,0025 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 | Beløb |
| --- | --- | --- |
| KonfigurationOpenAI Chat · Grundtakster pr. token | TakstplanGrundtakst | Beløb Input · Inputtokens **$0.00432** / 1K tokens Output · Outputtokens **$0.01272** / 1K tokens Input · Cachelæsning **$0.000336** / 1K tokens Input · Cacheskrivning **$0.00516** / 1K tokens Input · Cacheskrivning, 1 time **—** / 1K tokens |
| KonfigurationAnthropic Messages · Grundtakster pr. token | TakstplanGrundtakst | Beløb Input · Inputtokens **$0.00432** / 1K tokens Output · Outputtokens **$0.01272** / 1K tokens Input · Cachelæsning **$0.000336** / 1K tokens Input · Cacheskrivning **$0.00516** / 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-max-preview", "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-max-preview", "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-max-preview",
    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-max-preview",
  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-max-preview',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-max`](https://ailoot.ai/models/da/#m=qwen3.8-max&route=Core&caller=qwen3.8-max&fmt=chat), [`qwen`](https://ailoot.ai/models/da/#m=qwen3.8-max&route=Core&caller=qwen&fmt=chat), [`qwen-latest`](https://ailoot.ai/models/da/#m=qwen3.8-max&route=Core&caller=qwen-latest&fmt=chat), [`qwen-max`](https://ailoot.ai/models/da/#m=qwen3.8-max&route=Core&caller=qwen-max&fmt=chat), [`qwen3.8-max-preview`](https://ailoot.ai/models/da/#m=qwen3.8-max&route=Core&caller=qwen3.8-max-preview&fmt=chat)
**Ailoot Ultra** [`qwen3.8-max`](https://ailoot.ai/models/da/#m=qwen3.8-max&route=Ultra&caller=qwen3.8-max&fmt=chat)

#### Aliaser for metodestier

Brug metodestierne vist ovenfor.

#### Relaterede kalder-ID’er

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

FAQ · qwen3.8-max

Hvilke input og resultater er tilgængelige?

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

Hvilke felter bruger anmodningen?

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

Hvilke grænser gælder?

`POST /v1/messages` · `qwen3.8-max`: `ctx`: `991808`; `max_out`: `131072`; `messages.min_items`: `1`; `max_tokens.minimum`: `1` `POST /v1/responses` · `qwen3.8-max`: `ctx`: `991808`; `max_out`: `131072` `POST /v1/chat/completions` · `qwen3.8-max`: `ctx`: `991808`; `max_out`: `131072`; `messages.min_items`: `1` `POST /v1/chat/completions` · `qwen3.8-max`: `messages.min_items`: `1` `POST /v1/messages` · `qwen`: `ctx`: `991808`; `max_out`: `131072`; `messages.min_items`: `1`; `max_tokens.minimum`: `1` `POST /v1/responses` · `qwen`: `ctx`: `991808`; `max_out`: `131072` `POST /v1/chat/completions` · `qwen`: `ctx`: `991808`; `max_out`: `131072`; `messages.min_items`: `1` `POST /v1/messages` · `qwen-latest`: `ctx`: `991808`; `max_out`: `131072`; `messages.min_items`: `1`; `max_tokens.minimum`: `1` `POST /v1/responses` · `qwen-latest`: `ctx`: `991808`; `max_out`: `131072` `POST /v1/chat/completions` · `qwen-latest`: `ctx`: `991808`; `max_out`: `131072`; `messages.min_items`: `1` `POST /v1/messages` · `qwen-max`: `ctx`: `991808`; `max_out`: `131072`; `messages.min_items`: `1`; `max_tokens.minimum`: `1` `POST /v1/responses` · `qwen-max`: `ctx`: `991808`; `max_out`: `131072` `POST /v1/chat/completions` · `qwen-max`: `ctx`: `991808`; `max_out`: `131072`; `messages.min_items`: `1` `POST /v1/messages` · `qwen3.8-max-preview`: `ctx`: `991808`; `max_out`: `131072`; `messages.min_items`: `1`; `max_tokens.minimum`: `1` `POST /v1/responses` · `qwen3.8-max-preview`: `ctx`: `991808`; `max_out`: `131072` `POST /v1/chat/completions` · `qwen3.8-max-preview`: `ctx`: `991808`; `max_out`: `131072`; `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.
