Source: https://ailoot.ai/models/da/minimax-m3/
Canonical: https://ailoot.ai/models/da/minimax-m3/
Language: da

# MiniMax: MiniMax M3

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

## [MiniMax: MiniMax M3](https://ailoot.ai/models/da/minimax-m3/)

MiniMax M3 er en multimodal model til vedvarende programmering og agentarbejde, som bruger MiniMax Sparse Attention og er udformet til lang kontekst. Dens angivne Ultra-chatgrænseflader modtager tekst og returnerer tekstsvar.

- [**Ailoot · Anthropic Messages** `POST /v1/messages` `MiniMax-M3`](https://ailoot.ai/models/da/minimax-m3/#method-0)
- [**Ailoot · OpenAI Responses** `POST /v1/responses` `MiniMax-M3`](https://ailoot.ai/models/da/minimax-m3/#method-1)
- [**Ailoot · OpenAI Chat** `POST /v1/chat/completions` `MiniMax-M3`](https://ailoot.ai/models/da/minimax-m3/#method-2)
- [**Ailoot Ultra · OpenAI Chat** `POST /v1/chat/completions` `MiniMax-M3`](https://ailoot.ai/models/da/minimax-m3/#method-3)
- [**Ailoot Ultra · Anthropic Messages** `POST /v1/messages` `MiniMax-M3`](https://ailoot.ai/models/da/minimax-m3/#method-4)
- [**Ailoot · Anthropic Messages** `POST /v1/messages` `minimax`](https://ailoot.ai/models/da/minimax-m3/#method-5)
- [**Ailoot · OpenAI Responses** `POST /v1/responses` `minimax`](https://ailoot.ai/models/da/minimax-m3/#method-6)
- [**Ailoot · OpenAI Chat** `POST /v1/chat/completions` `minimax`](https://ailoot.ai/models/da/minimax-m3/#method-7)
- [**Ailoot · Anthropic Messages** `POST /v1/messages` `minimax-latest`](https://ailoot.ai/models/da/minimax-m3/#method-8)
- [**Ailoot · OpenAI Responses** `POST /v1/responses` `minimax-latest`](https://ailoot.ai/models/da/minimax-m3/#method-9)
- [**Ailoot · OpenAI Chat** `POST /v1/chat/completions` `minimax-latest`](https://ailoot.ai/models/da/minimax-m3/#method-10)
- [**Ailoot · Anthropic Messages** `POST /v1/messages` `minimax-text`](https://ailoot.ai/models/da/minimax-m3/#method-11)
- [**Ailoot · OpenAI Responses** `POST /v1/responses` `minimax-text`](https://ailoot.ai/models/da/minimax-m3/#method-12)
- [**Ailoot · OpenAI Chat** `POST /v1/chat/completions` `minimax-text`](https://ailoot.ai/models/da/minimax-m3/#method-13)
- [**Ailoot · Anthropic Messages** `POST /v1/messages` `minimax-text-latest`](https://ailoot.ai/models/da/minimax-m3/#method-14)
- [**Ailoot · OpenAI Responses** `POST /v1/responses` `minimax-text-latest`](https://ailoot.ai/models/da/minimax-m3/#method-15)
- [**Ailoot · OpenAI Chat** `POST /v1/chat/completions` `minimax-text-latest`](https://ailoot.ai/models/da/minimax-m3/#method-16)
- [**Ailoot · Anthropic Messages** `POST /v1/messages` `minimax/minimax-m3`](https://ailoot.ai/models/da/minimax-m3/#method-17)
- [**Ailoot · OpenAI Responses** `POST /v1/responses` `minimax/minimax-m3`](https://ailoot.ai/models/da/minimax-m3/#method-18)
- [**Ailoot · OpenAI Chat** `POST /v1/chat/completions` `minimax/minimax-m3`](https://ailoot.ai/models/da/minimax-m3/#method-19)
- [**Ailoot Ultra · OpenAI Chat** `POST /v1/chat/completions` `minimax/minimax-m3`](https://ailoot.ai/models/da/minimax-m3/#method-20)
- [**Ailoot Ultra · Anthropic Messages** `POST /v1/messages` `minimax/minimax-m3`](https://ailoot.ai/models/da/minimax-m3/#method-21)

Om modellen

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

MiniMax M3 er MiniMax’ multimodale grundmodel til vedvarende opgaver over flere trin. Dens offentliggjorte modelprofil beskriver tekst-, billed- og videoinput med tekstoutput; de angivne Ultra-chatgrænseflader modtager tekst og returnerer tekstsvar. Modellen bygger på MiniMax Sparse Attention, som udvælger nøgle-værdi-blokke frem for at anvende fuld attention på hele den lange kontekst. Dens offentliggjorte anvendelsesområde omfatter programmering, brug af værktøjer og samarbejdsarbejdsgange over flere samtaletrin.

#### Bring opgavens evidens ind i samtalen

Kombiner det skriftlige mål med de skriftlige observationer, der fastslår problemet. Ved grænsefladearbejde skal du beskrive og mærke den skærm og tilstand, der undersøges. Ved et videospørgsmål skal du give en transskription eller skriftlige noter, som identificerer den relevante scene eller det relevante tidsinterval og det synlige forløb, der skal analyseres. Bed om et konkret tekstresultat, såsom en beskrivelse, sammenligning eller et implementeringsforslag, og bevar samtidig de kildebetegnelser, der er nødvendige for at kontrollere det.

Modellens multimodale træning bruger sammenflettet materiale, og dens samarbejdstræning er rettet mod længere interaktioner. En nyttig arbejdsbeskrivelse holder skriftlige instruktioner tæt på den kilde, de beskriver. Adskil belæg fra antagelser, så en senere tur kan fortsætte ud fra det, der faktisk blev observeret.

#### Programmering og værktøjsunderstøttet arbejde

Ved en programmeringsopgave gives den relevante kilde, den adfærd der skal leveres, og de betingelser som fastslår afslutning. Bevar faktisk kommando- eller testoutput i samtalen, når næste trin afhænger af det. En værktøjsunderstøttet applikation kan udføre en foreslået handling og returnere resultatet til modellen.

Den offentliggjorte modelprofil dokumenterer funktionskald og strukturerede output med JSON-skema; den angivne Ultra Chat-kontrakt behandler tools og response\_format som modelafhængige. Definer handlingerne eller resultatfelterne ud fra opgaven, og validér derefter de returnerede data mod deres kilder. Bevar, hvilken observation der tilhører hvilken værktøjshandling, før du kombinerer konklusioner fra flere trin.

#### Lang kontekst og en tydelig sluttilstand

Den offentliggjorte modelprofil beskriver en kontekst på omkring én million tokens. Planlæg hver anmodning ud fra den leverende grænseflades faktiske budget, og reservér plads til svaret. Hold færdige beslutninger, de seneste observationer og åbne spørgsmål i navngivne afsnit frem for gentagne gange at tilføje alt baggrundsmateriale.

Et nyttigt M3-resultat holder arbejdet og belæggene samlet: en afgrænset ændring med validering, en analyse knyttet til en visuel kilde eller en næste handling, hvis resultat vil afklare et resterende spørgsmål. Det lader et længere forløb fortsætte fra en tilstand, som kan undersøges.

Praktisk opgave

### Praktisk opgave

Teknisk eksempel på engelsk

```
Analyze a written video sequence

Analyze these written scene notes, using no video access. [00:03] Operator places a tray on a scale. [00:07] Display reads 2.4 kg. [00:10] A second tray is placed beside it, not on the scale. Summarize the sequence and state which tray has a recorded weight and what remains unknown.
```

#### Forventet resultat

```
A source-labelled sequence summary and a clear known/unknown distinction for tray weights.
```

#### Kontrollér resultatet

```
Ensure the 2.4 kg reading is not assigned to the unweighed second tray.
```

**Ailoot · Anthropic Messages** `POST /v1/messages` `MiniMax-M3`

[`MiniMax-M3`](https://ailoot.ai/models/da/#m=minimax%2Fminimax-m3&route=Core&caller=MiniMax-M3&fmt=messages)

MiniMax /`MiniMax-M3`

Model-ID

- `MiniMax-M3`
- `minimax`
- `minimax-latest`
- `minimax-text`
- `minimax-text-latest`
- `minimax/minimax-m3`

### Start

MiniMax M3 er en multimodal model til vedvarende programmering og agentarbejde, som bruger MiniMax Sparse Attention og er udformet til lang kontekst. Dens angivne Ultra-chatgrænseflader modtager tekst og returnerer tekstsvar.

Accepterede input

Tekst · Billeder

Resultater

Tekst

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

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

Inputtyper

`text`, `image`

Outputtyper

`text`

Kontekst

1.000.000 tokens

Maksimalt output

524.288 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 MiniMax-M3 | 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,0003 US$ */ 1K*

Output

0,0012 US$ */ 1K*

Cachelæsning

≈0,00006 US$ */ 1K*

Cacheskrivning

0,0003 US$ */ 1K*

Cacheskrivning, 5 min.

0,0003 US$ */ 1K tokens*

#### Priser efter anmodningens længde · Anthropic Messages

| Anmodningens størrelse, tokens | Input | Output | Cachelæsning | Cacheskrivning | Cache 5 min. | Cache 1 time |
| --- | --- | --- | --- | --- | --- | --- |
| Anmodningens størrelse, tokens(0; 524.288\] | Input0,0003 US$ | Output0,0012 US$ | Cachelæsning≈0,00006 US$ | Cacheskrivning0,0003 US$ | Cache 5 min.0,0003 US$ | Cache 1 timeGrundsats: — |
| Anmodningens størrelse, tokens(524.288; 1.000.000\] | Input0,0006 US$ | Output0,0024 US$ | Cachelæsning≈0,00012 US$ | Cacheskrivning0,0006 US$ | Cache 5 min.0,0006 US$ | Cache 1 timeGrundsats: — |

Takster i USD pr. 1K tokens. Hvis ingen takst er angivet, overtages grundtaksten for denne metode; «—» betyder, at ingen grundtakst er angivet.

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

#### Detaljer om referencetariffen

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

Modellens referenceplaner

#### Priser efter konfiguration

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

| Konfiguration | Takstplan | Konteksttokens, mere end | Konteksttokens, op til og med | Beløb |
| --- | --- | --- | --- | --- |
| KonfigurationOpenAI Chat · Grundtakster pr. token | TakstplanGrundtakst | Konteksttokens, mere end— | Konteksttokens, op til og medIngen øvre grænse | Beløb Input · Inputtokens **$0.0006** / 1K tokens Output · Outputtokens **$0.0024** / 1K tokens Input · Cachelæsning **$0.00012** / 1K tokens Input · Cacheskrivning **—** / 1K tokens Input · Cacheskrivning, 1 time **—** / 1K tokens |
| KonfigurationOpenAI Chat · Trin 1 efter anmodningens længde | Takstplan— | Konteksttokens, mere end0 | Konteksttokens, op til og medIngen øvre grænse | Beløb Input · Inputtokens **$0.0006** / 1K tokens Output · Outputtokens **$0.0024** / 1K tokens Input · Cachelæsning **$0.00012** / 1K tokens Input · Cacheskrivning **—** / 1K tokens Input · Cacheskrivning, 1 time **—** / 1K tokens |
| KonfigurationAnthropic Messages · Grundtakster pr. token | TakstplanGrundtakst | Konteksttokens, mere end— | Konteksttokens, op til og medIngen øvre grænse | Beløb Input · Inputtokens **$0.0006** / 1K tokens Output · Outputtokens **$0.0024** / 1K tokens Input · Cachelæsning **$0.00012** / 1K tokens Input · Cacheskrivning **—** / 1K tokens Input · Cacheskrivning, 1 time **—** / 1K tokens |
| KonfigurationAnthropic Messages · Trin 1 efter anmodningens længde | Takstplan— | Konteksttokens, mere end0 | Konteksttokens, op til og medIngen øvre grænse | Beløb Input · Inputtokens **$0.0006** / 1K tokens Output · Outputtokens **$0.0024** / 1K tokens Input · Cachelæsning **$0.00012** / 1K tokens Input · Cacheskrivning **—** / 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": "MiniMax-M3", "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": "MiniMax-M3", "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="MiniMax-M3",
    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: "MiniMax-M3",
  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='MiniMax-M3',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> [`MiniMax-M3`](https://ailoot.ai/models/da/#m=minimax%2Fminimax-m3&route=Core&caller=MiniMax-M3&fmt=messages), [`minimax`](https://ailoot.ai/models/da/#m=minimax%2Fminimax-m3&route=Core&caller=minimax&fmt=messages), [`minimax-latest`](https://ailoot.ai/models/da/#m=minimax%2Fminimax-m3&route=Core&caller=minimax-latest&fmt=messages), [`minimax-text`](https://ailoot.ai/models/da/#m=minimax%2Fminimax-m3&route=Core&caller=minimax-text&fmt=messages), [`minimax-text-latest`](https://ailoot.ai/models/da/#m=minimax%2Fminimax-m3&route=Core&caller=minimax-text-latest&fmt=messages), [`minimax/minimax-m3`](https://ailoot.ai/models/da/#m=minimax%2Fminimax-m3&route=Core&caller=minimax%2Fminimax-m3&fmt=messages)
**Ailoot Ultra** [`MiniMax-M3`](https://ailoot.ai/models/da/#m=minimax%2Fminimax-m3&route=Ultra&caller=MiniMax-M3&fmt=messages), [`minimax/minimax-m3`](https://ailoot.ai/models/da/#m=minimax%2Fminimax-m3&route=Ultra&caller=minimax%2Fminimax-m3&fmt=messages)

#### Aliaser for metodestier

`/chat/completions`

#### Relaterede kalder-ID’er

[`minimax/minimax-m3`](https://ailoot.ai/models/da/#m=minimax%2Fminimax-m3&route=Core&caller=minimax%2Fminimax-m3&fmt=messages), [`minimax/minimax-m3`](https://ailoot.ai/models/da/#m=minimax%2Fminimax-m3&route=Ultra&caller=minimax%2Fminimax-m3&fmt=messages), [`minimax`](https://ailoot.ai/models/da/#m=minimax%2Fminimax-m3&route=Core&caller=minimax&fmt=messages), [`minimax-latest`](https://ailoot.ai/models/da/#m=minimax%2Fminimax-m3&route=Core&caller=minimax-latest&fmt=messages), [`minimax-text`](https://ailoot.ai/models/da/#m=minimax%2Fminimax-m3&route=Core&caller=minimax-text&fmt=messages), [`minimax-text-latest`](https://ailoot.ai/models/da/#m=minimax%2Fminimax-m3&route=Core&caller=minimax-text-latest&fmt=messages), [`MiniMax-M3`](https://ailoot.ai/models/da/#m=minimax%2Fminimax-m3&route=Core&caller=MiniMax-M3&fmt=messages), [`MiniMax-M3`](https://ailoot.ai/models/da/#m=minimax%2Fminimax-m3&route=Ultra&caller=MiniMax-M3&fmt=messages)

**Ailoot · OpenAI Responses** `POST /v1/responses` `MiniMax-M3`

[`MiniMax-M3`](https://ailoot.ai/models/da/#m=minimax%2Fminimax-m3&route=Core&caller=MiniMax-M3&fmt=responses)

MiniMax /`MiniMax-M3`

Model-ID

- `MiniMax-M3`
- `minimax`
- `minimax-latest`
- `minimax-text`
- `minimax-text-latest`
- `minimax/minimax-m3`

### Start

MiniMax M3 er en multimodal model til vedvarende programmering og agentarbejde, som bruger MiniMax Sparse Attention og er udformet til lang kontekst. Dens angivne Ultra-chatgrænseflader modtager tekst og returnerer tekstsvar.

Accepterede input

Tekst · Billeder

Resultater

Tekst

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

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

Inputtyper

`text`, `image`

Outputtyper

`text`

Kontekst

1.000.000 tokens

Maksimalt output

1.000.000 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 MiniMax-M3 | 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,0003 US$ */ 1K*

Output

0,0012 US$ */ 1K*

Cachelæsning

≈0,00006 US$ */ 1K*

Cacheskrivning

0,0003 US$ */ 1K*

Cacheskrivning, 5 min.

0,0003 US$ */ 1K tokens*

#### Priser efter anmodningens længde · OpenAI Responses

| Anmodningens størrelse, tokens | Input | Output | Cachelæsning | Cacheskrivning | Cache 5 min. | Cache 1 time |
| --- | --- | --- | --- | --- | --- | --- |
| Anmodningens størrelse, tokens(0; 524.288\] | Input0,0003 US$ | Output0,0012 US$ | Cachelæsning≈0,00006 US$ | Cacheskrivning0,0003 US$ | Cache 5 min.0,0003 US$ | Cache 1 timeGrundsats: — |
| Anmodningens størrelse, tokens(524.288; 1.000.000\] | Input0,0006 US$ | Output0,0024 US$ | Cachelæsning≈0,00012 US$ | Cacheskrivning0,0006 US$ | Cache 5 min.0,0006 US$ | Cache 1 timeGrundsats: — |

Takster i USD pr. 1K tokens. Hvis ingen takst er angivet, overtages grundtaksten for denne metode; «—» betyder, at ingen grundtakst er angivet.

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

#### Detaljer om referencetariffen

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

Modellens referenceplaner

#### Priser efter konfiguration

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

| Konfiguration | Takstplan | Konteksttokens, mere end | Konteksttokens, op til og med | Beløb |
| --- | --- | --- | --- | --- |
| KonfigurationOpenAI Chat · Grundtakster pr. token | TakstplanGrundtakst | Konteksttokens, mere end— | Konteksttokens, op til og medIngen øvre grænse | Beløb Input · Inputtokens **$0.0006** / 1K tokens Output · Outputtokens **$0.0024** / 1K tokens Input · Cachelæsning **$0.00012** / 1K tokens Input · Cacheskrivning **—** / 1K tokens Input · Cacheskrivning, 1 time **—** / 1K tokens |
| KonfigurationOpenAI Chat · Trin 1 efter anmodningens længde | Takstplan— | Konteksttokens, mere end0 | Konteksttokens, op til og medIngen øvre grænse | Beløb Input · Inputtokens **$0.0006** / 1K tokens Output · Outputtokens **$0.0024** / 1K tokens Input · Cachelæsning **$0.00012** / 1K tokens Input · Cacheskrivning **—** / 1K tokens Input · Cacheskrivning, 1 time **—** / 1K tokens |
| KonfigurationAnthropic Messages · Grundtakster pr. token | TakstplanGrundtakst | Konteksttokens, mere end— | Konteksttokens, op til og medIngen øvre grænse | Beløb Input · Inputtokens **$0.0006** / 1K tokens Output · Outputtokens **$0.0024** / 1K tokens Input · Cachelæsning **$0.00012** / 1K tokens Input · Cacheskrivning **—** / 1K tokens Input · Cacheskrivning, 1 time **—** / 1K tokens |
| KonfigurationAnthropic Messages · Trin 1 efter anmodningens længde | Takstplan— | Konteksttokens, mere end0 | Konteksttokens, op til og medIngen øvre grænse | Beløb Input · Inputtokens **$0.0006** / 1K tokens Output · Outputtokens **$0.0024** / 1K tokens Input · Cachelæsning **$0.00012** / 1K tokens Input · Cacheskrivning **—** / 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": "MiniMax-M3", "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": "MiniMax-M3", "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="MiniMax-M3", 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: "MiniMax-M3", 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="MiniMax-M3", 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> [`MiniMax-M3`](https://ailoot.ai/models/da/#m=minimax%2Fminimax-m3&route=Core&caller=MiniMax-M3&fmt=responses), [`minimax`](https://ailoot.ai/models/da/#m=minimax%2Fminimax-m3&route=Core&caller=minimax&fmt=responses), [`minimax-latest`](https://ailoot.ai/models/da/#m=minimax%2Fminimax-m3&route=Core&caller=minimax-latest&fmt=responses), [`minimax-text`](https://ailoot.ai/models/da/#m=minimax%2Fminimax-m3&route=Core&caller=minimax-text&fmt=responses), [`minimax-text-latest`](https://ailoot.ai/models/da/#m=minimax%2Fminimax-m3&route=Core&caller=minimax-text-latest&fmt=responses), [`minimax/minimax-m3`](https://ailoot.ai/models/da/#m=minimax%2Fminimax-m3&route=Core&caller=minimax%2Fminimax-m3&fmt=responses)
**Ailoot Ultra** [`MiniMax-M3`](https://ailoot.ai/models/da/#m=minimax%2Fminimax-m3&route=Ultra&caller=MiniMax-M3), [`minimax/minimax-m3`](https://ailoot.ai/models/da/#m=minimax%2Fminimax-m3&route=Ultra&caller=minimax%2Fminimax-m3)

#### Aliaser for metodestier

`/chat/completions`

#### Relaterede kalder-ID’er

[`minimax/minimax-m3`](https://ailoot.ai/models/da/#m=minimax%2Fminimax-m3&route=Core&caller=minimax%2Fminimax-m3&fmt=responses), [`minimax/minimax-m3`](https://ailoot.ai/models/da/#m=minimax%2Fminimax-m3&route=Ultra&caller=minimax%2Fminimax-m3), [`minimax`](https://ailoot.ai/models/da/#m=minimax%2Fminimax-m3&route=Core&caller=minimax&fmt=responses), [`minimax-latest`](https://ailoot.ai/models/da/#m=minimax%2Fminimax-m3&route=Core&caller=minimax-latest&fmt=responses), [`minimax-text`](https://ailoot.ai/models/da/#m=minimax%2Fminimax-m3&route=Core&caller=minimax-text&fmt=responses), [`minimax-text-latest`](https://ailoot.ai/models/da/#m=minimax%2Fminimax-m3&route=Core&caller=minimax-text-latest&fmt=responses), [`MiniMax-M3`](https://ailoot.ai/models/da/#m=minimax%2Fminimax-m3&route=Core&caller=MiniMax-M3&fmt=responses), [`MiniMax-M3`](https://ailoot.ai/models/da/#m=minimax%2Fminimax-m3&route=Ultra&caller=MiniMax-M3)

**Ailoot · OpenAI Chat** `POST /v1/chat/completions` `MiniMax-M3`

[`MiniMax-M3`](https://ailoot.ai/models/da/#m=minimax%2Fminimax-m3&route=Core&caller=MiniMax-M3&fmt=chat)

MiniMax /`MiniMax-M3`

Model-ID

- `MiniMax-M3`
- `minimax`
- `minimax-latest`
- `minimax-text`
- `minimax-text-latest`
- `minimax/minimax-m3`

### Start

MiniMax M3 er en multimodal model til vedvarende programmering og agentarbejde, som bruger MiniMax Sparse Attention og er udformet til lang kontekst. Dens angivne Ultra-chatgrænseflader modtager tekst og returnerer tekstsvar.

Accepterede input

Tekst · Billeder

Resultater

Tekst

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

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

Inputtyper

`text`, `image`

Outputtyper

`text`

Kontekst

1.000.000 tokens

Maksimalt output

524.288 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 MiniMax-M3 | 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,0003 US$ */ 1K*

Output

0,0012 US$ */ 1K*

Cachelæsning

≈0,00006 US$ */ 1K*

Cacheskrivning

0,0003 US$ */ 1K*

Cacheskrivning, 5 min.

0,0003 US$ */ 1K tokens*

#### Priser efter anmodningens længde · OpenAI Chat

| Anmodningens størrelse, tokens | Input | Output | Cachelæsning | Cacheskrivning | Cache 5 min. | Cache 1 time |
| --- | --- | --- | --- | --- | --- | --- |
| Anmodningens størrelse, tokens(0; 524.288\] | Input0,0003 US$ | Output0,0012 US$ | Cachelæsning≈0,00006 US$ | Cacheskrivning0,0003 US$ | Cache 5 min.0,0003 US$ | Cache 1 timeGrundsats: — |
| Anmodningens størrelse, tokens(524.288; 1.000.000\] | Input0,0006 US$ | Output0,0024 US$ | Cachelæsning≈0,00012 US$ | Cacheskrivning0,0006 US$ | Cache 5 min.0,0006 US$ | Cache 1 timeGrundsats: — |

Takster i USD pr. 1K tokens. Hvis ingen takst er angivet, overtages grundtaksten for denne metode; «—» betyder, at ingen grundtakst er angivet.

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

#### Detaljer om referencetariffen

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

Modellens referenceplaner

#### Priser efter konfiguration

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

| Konfiguration | Takstplan | Konteksttokens, mere end | Konteksttokens, op til og med | Beløb |
| --- | --- | --- | --- | --- |
| KonfigurationOpenAI Chat · Grundtakster pr. token | TakstplanGrundtakst | Konteksttokens, mere end— | Konteksttokens, op til og medIngen øvre grænse | Beløb Input · Inputtokens **$0.0006** / 1K tokens Output · Outputtokens **$0.0024** / 1K tokens Input · Cachelæsning **$0.00012** / 1K tokens Input · Cacheskrivning **—** / 1K tokens Input · Cacheskrivning, 1 time **—** / 1K tokens |
| KonfigurationOpenAI Chat · Trin 1 efter anmodningens længde | Takstplan— | Konteksttokens, mere end0 | Konteksttokens, op til og medIngen øvre grænse | Beløb Input · Inputtokens **$0.0006** / 1K tokens Output · Outputtokens **$0.0024** / 1K tokens Input · Cachelæsning **$0.00012** / 1K tokens Input · Cacheskrivning **—** / 1K tokens Input · Cacheskrivning, 1 time **—** / 1K tokens |
| KonfigurationAnthropic Messages · Grundtakster pr. token | TakstplanGrundtakst | Konteksttokens, mere end— | Konteksttokens, op til og medIngen øvre grænse | Beløb Input · Inputtokens **$0.0006** / 1K tokens Output · Outputtokens **$0.0024** / 1K tokens Input · Cachelæsning **$0.00012** / 1K tokens Input · Cacheskrivning **—** / 1K tokens Input · Cacheskrivning, 1 time **—** / 1K tokens |
| KonfigurationAnthropic Messages · Trin 1 efter anmodningens længde | Takstplan— | Konteksttokens, mere end0 | Konteksttokens, op til og medIngen øvre grænse | Beløb Input · Inputtokens **$0.0006** / 1K tokens Output · Outputtokens **$0.0024** / 1K tokens Input · Cachelæsning **$0.00012** / 1K tokens Input · Cacheskrivning **—** / 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": "MiniMax-M3", "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": "MiniMax-M3", "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="MiniMax-M3",
    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: "MiniMax-M3",
  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='MiniMax-M3',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> [`MiniMax-M3`](https://ailoot.ai/models/da/#m=minimax%2Fminimax-m3&route=Core&caller=MiniMax-M3&fmt=chat), [`minimax`](https://ailoot.ai/models/da/#m=minimax%2Fminimax-m3&route=Core&caller=minimax&fmt=chat), [`minimax-latest`](https://ailoot.ai/models/da/#m=minimax%2Fminimax-m3&route=Core&caller=minimax-latest&fmt=chat), [`minimax-text`](https://ailoot.ai/models/da/#m=minimax%2Fminimax-m3&route=Core&caller=minimax-text&fmt=chat), [`minimax-text-latest`](https://ailoot.ai/models/da/#m=minimax%2Fminimax-m3&route=Core&caller=minimax-text-latest&fmt=chat), [`minimax/minimax-m3`](https://ailoot.ai/models/da/#m=minimax%2Fminimax-m3&route=Core&caller=minimax%2Fminimax-m3&fmt=chat)
**Ailoot Ultra** [`MiniMax-M3`](https://ailoot.ai/models/da/#m=minimax%2Fminimax-m3&route=Ultra&caller=MiniMax-M3&fmt=chat), [`minimax/minimax-m3`](https://ailoot.ai/models/da/#m=minimax%2Fminimax-m3&route=Ultra&caller=minimax%2Fminimax-m3&fmt=chat)

#### Aliaser for metodestier

`/chat/completions`

#### Relaterede kalder-ID’er

[`minimax/minimax-m3`](https://ailoot.ai/models/da/#m=minimax%2Fminimax-m3&route=Core&caller=minimax%2Fminimax-m3&fmt=chat), [`minimax/minimax-m3`](https://ailoot.ai/models/da/#m=minimax%2Fminimax-m3&route=Ultra&caller=minimax%2Fminimax-m3&fmt=chat), [`minimax`](https://ailoot.ai/models/da/#m=minimax%2Fminimax-m3&route=Core&caller=minimax&fmt=chat), [`minimax-latest`](https://ailoot.ai/models/da/#m=minimax%2Fminimax-m3&route=Core&caller=minimax-latest&fmt=chat), [`minimax-text`](https://ailoot.ai/models/da/#m=minimax%2Fminimax-m3&route=Core&caller=minimax-text&fmt=chat), [`minimax-text-latest`](https://ailoot.ai/models/da/#m=minimax%2Fminimax-m3&route=Core&caller=minimax-text-latest&fmt=chat), [`MiniMax-M3`](https://ailoot.ai/models/da/#m=minimax%2Fminimax-m3&route=Core&caller=MiniMax-M3&fmt=chat), [`MiniMax-M3`](https://ailoot.ai/models/da/#m=minimax%2Fminimax-m3&route=Ultra&caller=MiniMax-M3&fmt=chat)

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

[`MiniMax-M3`](https://ailoot.ai/models/da/#m=minimax%2Fminimax-m3&route=Ultra&caller=MiniMax-M3&fmt=chat)

MiniMax /`MiniMax-M3`

Model-ID

- `MiniMax-M3`
- `minimax/minimax-m3`

### Start

MiniMax M3 er en multimodal model til vedvarende programmering og agentarbejde, som bruger MiniMax Sparse Attention og er udformet til lang kontekst. Dens angivne Ultra-chatgrænseflader modtager tekst og returnerer tekstsvar.

Accepterede input

Tekst

Resultater

Tekst

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

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

Inputtyper

`text`

Outputtyper

`text`

Outputformat

json eller SSE

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

Kombinationer af inputmaterialer

**Tekst** · UTF8-tekst

`messages[].content`

Metodeparametre og livscyklus

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

Metodealiaser: `/chat/completions`

Livscyklus: `synchronous_or_streamed`

Send det præcise model-ID med messages.

Kontekstlængde er ikke et outputloft.

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

### Priser

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

Hurtig tilstand

Standardpris Når hurtig tilstand er valgt

flex-tilstand

Standardpris Når flex-tilstanden er valgt

Maksimal ræsonneringsindsats

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

#### Ailoot-takster

#### Priser efter konfiguration

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

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

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

### Eksempelanmodninger

#### Ailoot Ultra · OpenAI Chat

curlPython SDK

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

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

```python
from openai import OpenAI
import os

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

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

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

### Hent og gem resultater

#### Ailoot Ultra · OpenAI Chat

json eller SSE

##### Behold alle færdige resultater

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

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

##### Hvis det oprindelige svar skal kontrolleres

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

Svarfelter

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

Fejl og næste trin

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

### Aliaser

#### Modelaliaser

<strong>Ailoot</strong> [`MiniMax-M3`](https://ailoot.ai/models/da/#m=minimax%2Fminimax-m3&route=Core&caller=MiniMax-M3&fmt=chat), [`minimax`](https://ailoot.ai/models/da/#m=minimax%2Fminimax-m3&route=Core&caller=minimax&fmt=chat), [`minimax-latest`](https://ailoot.ai/models/da/#m=minimax%2Fminimax-m3&route=Core&caller=minimax-latest&fmt=chat), [`minimax-text`](https://ailoot.ai/models/da/#m=minimax%2Fminimax-m3&route=Core&caller=minimax-text&fmt=chat), [`minimax-text-latest`](https://ailoot.ai/models/da/#m=minimax%2Fminimax-m3&route=Core&caller=minimax-text-latest&fmt=chat), [`minimax/minimax-m3`](https://ailoot.ai/models/da/#m=minimax%2Fminimax-m3&route=Core&caller=minimax%2Fminimax-m3&fmt=chat)
**Ailoot Ultra** [`MiniMax-M3`](https://ailoot.ai/models/da/#m=minimax%2Fminimax-m3&route=Ultra&caller=MiniMax-M3&fmt=chat), [`minimax/minimax-m3`](https://ailoot.ai/models/da/#m=minimax%2Fminimax-m3&route=Ultra&caller=minimax%2Fminimax-m3&fmt=chat)

#### Aliaser for metodestier

`/chat/completions`

#### Relaterede kalder-ID’er

[`minimax/minimax-m3`](https://ailoot.ai/models/da/#m=minimax%2Fminimax-m3&route=Core&caller=minimax%2Fminimax-m3&fmt=chat), [`minimax/minimax-m3`](https://ailoot.ai/models/da/#m=minimax%2Fminimax-m3&route=Ultra&caller=minimax%2Fminimax-m3&fmt=chat), [`minimax`](https://ailoot.ai/models/da/#m=minimax%2Fminimax-m3&route=Core&caller=minimax&fmt=chat), [`minimax-latest`](https://ailoot.ai/models/da/#m=minimax%2Fminimax-m3&route=Core&caller=minimax-latest&fmt=chat), [`minimax-text`](https://ailoot.ai/models/da/#m=minimax%2Fminimax-m3&route=Core&caller=minimax-text&fmt=chat), [`minimax-text-latest`](https://ailoot.ai/models/da/#m=minimax%2Fminimax-m3&route=Core&caller=minimax-text-latest&fmt=chat), [`MiniMax-M3`](https://ailoot.ai/models/da/#m=minimax%2Fminimax-m3&route=Core&caller=MiniMax-M3&fmt=chat), [`MiniMax-M3`](https://ailoot.ai/models/da/#m=minimax%2Fminimax-m3&route=Ultra&caller=MiniMax-M3&fmt=chat)

**Ailoot Ultra · Anthropic Messages** `POST /v1/messages` `MiniMax-M3`

[`MiniMax-M3`](https://ailoot.ai/models/da/#m=minimax%2Fminimax-m3&route=Ultra&caller=MiniMax-M3&fmt=messages)

MiniMax /`MiniMax-M3`

Model-ID

- `MiniMax-M3`
- `minimax/minimax-m3`

### Start

MiniMax M3 er en multimodal model til vedvarende programmering og agentarbejde, som bruger MiniMax Sparse Attention og er udformet til lang kontekst. Dens angivne Ultra-chatgrænseflader modtager tekst og returnerer tekstsvar.

Accepterede input

Tekst

Resultater

json · sse

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

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

Inputtyper

`text`

Outputtyper

`json`, `sse`

Outputformat

JSON eller SSE

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

Kombinationer af inputmaterialer

**Tekst** · UTF-8-tekst

`messages[].content som streng`

Metodeparametre og livscyklus

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

Livscyklus: `synchronous_or_streamed`

### Priser

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

Hurtig tilstand

Standardpris Når hurtig tilstand er valgt

flex-tilstand

Standardpris Når flex-tilstanden er valgt

Maksimal ræsonneringsindsats

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

#### Ailoot-takster

#### Priser efter konfiguration

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

| Konfiguration | Takstplan | Konteksttokens, mere end | Konteksttokens, op til og med | Beløb |
| --- | --- | --- | --- | --- |
| KonfigurationGrundtakster for tokens | TakstplanGrundtakst | Konteksttokens, mere end— | Konteksttokens, op til og medIngen øvre grænse | Beløb Input · Inputtokens **$0.0006** / 1K tokens Output · Outputtokens **$0.0024** / 1K tokens Input · Cachelæsning **$0.00012** / 1K tokens Input · Cacheskrivning **—** / 1K tokens Input · Cacheskrivning, 1 time **—** / 1K tokens |
| KonfigurationAnmodningslængde · niveau 1 | Takstplan— | Konteksttokens, mere end0 | Konteksttokens, op til og medIngen øvre grænse | Beløb Input · Inputtokens **$0.0006** / 1K tokens Output · Outputtokens **$0.0024** / 1K tokens Input · Cachelæsning **$0.00012** / 1K tokens Input · Cacheskrivning **—** / 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": "MiniMax-M3",
  "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': 'MiniMax-M3', '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': 'MiniMax-M3', '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> [`MiniMax-M3`](https://ailoot.ai/models/da/#m=minimax%2Fminimax-m3&route=Core&caller=MiniMax-M3&fmt=messages), [`minimax`](https://ailoot.ai/models/da/#m=minimax%2Fminimax-m3&route=Core&caller=minimax&fmt=messages), [`minimax-latest`](https://ailoot.ai/models/da/#m=minimax%2Fminimax-m3&route=Core&caller=minimax-latest&fmt=messages), [`minimax-text`](https://ailoot.ai/models/da/#m=minimax%2Fminimax-m3&route=Core&caller=minimax-text&fmt=messages), [`minimax-text-latest`](https://ailoot.ai/models/da/#m=minimax%2Fminimax-m3&route=Core&caller=minimax-text-latest&fmt=messages), [`minimax/minimax-m3`](https://ailoot.ai/models/da/#m=minimax%2Fminimax-m3&route=Core&caller=minimax%2Fminimax-m3&fmt=messages)
**Ailoot Ultra** [`MiniMax-M3`](https://ailoot.ai/models/da/#m=minimax%2Fminimax-m3&route=Ultra&caller=MiniMax-M3&fmt=messages), [`minimax/minimax-m3`](https://ailoot.ai/models/da/#m=minimax%2Fminimax-m3&route=Ultra&caller=minimax%2Fminimax-m3&fmt=messages)

#### Aliaser for metodestier

`/chat/completions`

#### Relaterede kalder-ID’er

[`minimax/minimax-m3`](https://ailoot.ai/models/da/#m=minimax%2Fminimax-m3&route=Core&caller=minimax%2Fminimax-m3&fmt=messages), [`minimax/minimax-m3`](https://ailoot.ai/models/da/#m=minimax%2Fminimax-m3&route=Ultra&caller=minimax%2Fminimax-m3&fmt=messages), [`minimax`](https://ailoot.ai/models/da/#m=minimax%2Fminimax-m3&route=Core&caller=minimax&fmt=messages), [`minimax-latest`](https://ailoot.ai/models/da/#m=minimax%2Fminimax-m3&route=Core&caller=minimax-latest&fmt=messages), [`minimax-text`](https://ailoot.ai/models/da/#m=minimax%2Fminimax-m3&route=Core&caller=minimax-text&fmt=messages), [`minimax-text-latest`](https://ailoot.ai/models/da/#m=minimax%2Fminimax-m3&route=Core&caller=minimax-text-latest&fmt=messages), [`MiniMax-M3`](https://ailoot.ai/models/da/#m=minimax%2Fminimax-m3&route=Core&caller=MiniMax-M3&fmt=messages), [`MiniMax-M3`](https://ailoot.ai/models/da/#m=minimax%2Fminimax-m3&route=Ultra&caller=MiniMax-M3&fmt=messages)

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

[`minimax`](https://ailoot.ai/models/da/#m=minimax%2Fminimax-m3&route=Core&caller=minimax&fmt=messages)

MiniMax /`minimax`

Model-ID

- `MiniMax-M3`
- `minimax`
- `minimax-latest`
- `minimax-text`
- `minimax-text-latest`
- `minimax/minimax-m3`

### Start

MiniMax M3 er en multimodal model til vedvarende programmering og agentarbejde, som bruger MiniMax Sparse Attention og er udformet til lang kontekst. Dens angivne Ultra-chatgrænseflader modtager tekst og returnerer tekstsvar.

Accepterede input

Tekst · Billeder

Resultater

Tekst

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

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

Inputtyper

`text`, `image`

Outputtyper

`text`

Kontekst

1.000.000 tokens

Maksimalt output

524.288 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 minimax | 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,0003 US$ */ 1K*

Output

0,0012 US$ */ 1K*

Cachelæsning

≈0,00006 US$ */ 1K*

Cacheskrivning

0,0003 US$ */ 1K*

Cacheskrivning, 5 min.

0,0003 US$ */ 1K tokens*

#### Priser efter anmodningens længde · Anthropic Messages

| Anmodningens størrelse, tokens | Input | Output | Cachelæsning | Cacheskrivning | Cache 5 min. | Cache 1 time |
| --- | --- | --- | --- | --- | --- | --- |
| Anmodningens størrelse, tokens(0; 524.288\] | Input0,0003 US$ | Output0,0012 US$ | Cachelæsning≈0,00006 US$ | Cacheskrivning0,0003 US$ | Cache 5 min.0,0003 US$ | Cache 1 timeGrundsats: — |
| Anmodningens størrelse, tokens(524.288; 1.000.000\] | Input0,0006 US$ | Output0,0024 US$ | Cachelæsning≈0,00012 US$ | Cacheskrivning0,0006 US$ | Cache 5 min.0,0006 US$ | Cache 1 timeGrundsats: — |

Takster i USD pr. 1K tokens. Hvis ingen takst er angivet, overtages grundtaksten for denne metode; «—» betyder, at ingen grundtakst er angivet.

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

#### Detaljer om referencetariffen

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

Modellens referenceplaner

#### Priser efter konfiguration

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

| Konfiguration | Takstplan | Konteksttokens, mere end | Konteksttokens, op til og med | Beløb |
| --- | --- | --- | --- | --- |
| KonfigurationOpenAI Chat · Grundtakster pr. token | TakstplanGrundtakst | Konteksttokens, mere end— | Konteksttokens, op til og medIngen øvre grænse | Beløb Input · Inputtokens **$0.0006** / 1K tokens Output · Outputtokens **$0.0024** / 1K tokens Input · Cachelæsning **$0.00012** / 1K tokens Input · Cacheskrivning **—** / 1K tokens Input · Cacheskrivning, 1 time **—** / 1K tokens |
| KonfigurationOpenAI Chat · Trin 1 efter anmodningens længde | Takstplan— | Konteksttokens, mere end0 | Konteksttokens, op til og medIngen øvre grænse | Beløb Input · Inputtokens **$0.0006** / 1K tokens Output · Outputtokens **$0.0024** / 1K tokens Input · Cachelæsning **$0.00012** / 1K tokens Input · Cacheskrivning **—** / 1K tokens Input · Cacheskrivning, 1 time **—** / 1K tokens |
| KonfigurationAnthropic Messages · Grundtakster pr. token | TakstplanGrundtakst | Konteksttokens, mere end— | Konteksttokens, op til og medIngen øvre grænse | Beløb Input · Inputtokens **$0.0006** / 1K tokens Output · Outputtokens **$0.0024** / 1K tokens Input · Cachelæsning **$0.00012** / 1K tokens Input · Cacheskrivning **—** / 1K tokens Input · Cacheskrivning, 1 time **—** / 1K tokens |
| KonfigurationAnthropic Messages · Trin 1 efter anmodningens længde | Takstplan— | Konteksttokens, mere end0 | Konteksttokens, op til og medIngen øvre grænse | Beløb Input · Inputtokens **$0.0006** / 1K tokens Output · Outputtokens **$0.0024** / 1K tokens Input · Cachelæsning **$0.00012** / 1K tokens Input · Cacheskrivning **—** / 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": "minimax", "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": "minimax", "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="minimax",
    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: "minimax",
  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='minimax',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> [`MiniMax-M3`](https://ailoot.ai/models/da/#m=minimax%2Fminimax-m3&route=Core&caller=MiniMax-M3&fmt=messages), [`minimax`](https://ailoot.ai/models/da/#m=minimax%2Fminimax-m3&route=Core&caller=minimax&fmt=messages), [`minimax-latest`](https://ailoot.ai/models/da/#m=minimax%2Fminimax-m3&route=Core&caller=minimax-latest&fmt=messages), [`minimax-text`](https://ailoot.ai/models/da/#m=minimax%2Fminimax-m3&route=Core&caller=minimax-text&fmt=messages), [`minimax-text-latest`](https://ailoot.ai/models/da/#m=minimax%2Fminimax-m3&route=Core&caller=minimax-text-latest&fmt=messages), [`minimax/minimax-m3`](https://ailoot.ai/models/da/#m=minimax%2Fminimax-m3&route=Core&caller=minimax%2Fminimax-m3&fmt=messages)
**Ailoot Ultra** [`MiniMax-M3`](https://ailoot.ai/models/da/#m=minimax%2Fminimax-m3&route=Ultra&caller=MiniMax-M3&fmt=messages), [`minimax/minimax-m3`](https://ailoot.ai/models/da/#m=minimax%2Fminimax-m3&route=Ultra&caller=minimax%2Fminimax-m3&fmt=messages)

#### Aliaser for metodestier

`/chat/completions`

#### Relaterede kalder-ID’er

[`minimax/minimax-m3`](https://ailoot.ai/models/da/#m=minimax%2Fminimax-m3&route=Core&caller=minimax%2Fminimax-m3&fmt=messages), [`minimax/minimax-m3`](https://ailoot.ai/models/da/#m=minimax%2Fminimax-m3&route=Ultra&caller=minimax%2Fminimax-m3&fmt=messages), [`minimax`](https://ailoot.ai/models/da/#m=minimax%2Fminimax-m3&route=Core&caller=minimax&fmt=messages), [`minimax-latest`](https://ailoot.ai/models/da/#m=minimax%2Fminimax-m3&route=Core&caller=minimax-latest&fmt=messages), [`minimax-text`](https://ailoot.ai/models/da/#m=minimax%2Fminimax-m3&route=Core&caller=minimax-text&fmt=messages), [`minimax-text-latest`](https://ailoot.ai/models/da/#m=minimax%2Fminimax-m3&route=Core&caller=minimax-text-latest&fmt=messages), [`MiniMax-M3`](https://ailoot.ai/models/da/#m=minimax%2Fminimax-m3&route=Core&caller=MiniMax-M3&fmt=messages), [`MiniMax-M3`](https://ailoot.ai/models/da/#m=minimax%2Fminimax-m3&route=Ultra&caller=MiniMax-M3&fmt=messages)

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

[`minimax`](https://ailoot.ai/models/da/#m=minimax%2Fminimax-m3&route=Core&caller=minimax&fmt=responses)

MiniMax /`minimax`

Model-ID

- `MiniMax-M3`
- `minimax`
- `minimax-latest`
- `minimax-text`
- `minimax-text-latest`
- `minimax/minimax-m3`

### Start

MiniMax M3 er en multimodal model til vedvarende programmering og agentarbejde, som bruger MiniMax Sparse Attention og er udformet til lang kontekst. Dens angivne Ultra-chatgrænseflader modtager tekst og returnerer tekstsvar.

Accepterede input

Tekst · Billeder

Resultater

Tekst

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

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

Inputtyper

`text`, `image`

Outputtyper

`text`

Kontekst

1.000.000 tokens

Maksimalt output

1.000.000 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 minimax | 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,0003 US$ */ 1K*

Output

0,0012 US$ */ 1K*

Cachelæsning

≈0,00006 US$ */ 1K*

Cacheskrivning

0,0003 US$ */ 1K*

Cacheskrivning, 5 min.

0,0003 US$ */ 1K tokens*

#### Priser efter anmodningens længde · OpenAI Responses

| Anmodningens størrelse, tokens | Input | Output | Cachelæsning | Cacheskrivning | Cache 5 min. | Cache 1 time |
| --- | --- | --- | --- | --- | --- | --- |
| Anmodningens størrelse, tokens(0; 524.288\] | Input0,0003 US$ | Output0,0012 US$ | Cachelæsning≈0,00006 US$ | Cacheskrivning0,0003 US$ | Cache 5 min.0,0003 US$ | Cache 1 timeGrundsats: — |
| Anmodningens størrelse, tokens(524.288; 1.000.000\] | Input0,0006 US$ | Output0,0024 US$ | Cachelæsning≈0,00012 US$ | Cacheskrivning0,0006 US$ | Cache 5 min.0,0006 US$ | Cache 1 timeGrundsats: — |

Takster i USD pr. 1K tokens. Hvis ingen takst er angivet, overtages grundtaksten for denne metode; «—» betyder, at ingen grundtakst er angivet.

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

#### Detaljer om referencetariffen

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

Modellens referenceplaner

#### Priser efter konfiguration

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

| Konfiguration | Takstplan | Konteksttokens, mere end | Konteksttokens, op til og med | Beløb |
| --- | --- | --- | --- | --- |
| KonfigurationOpenAI Chat · Grundtakster pr. token | TakstplanGrundtakst | Konteksttokens, mere end— | Konteksttokens, op til og medIngen øvre grænse | Beløb Input · Inputtokens **$0.0006** / 1K tokens Output · Outputtokens **$0.0024** / 1K tokens Input · Cachelæsning **$0.00012** / 1K tokens Input · Cacheskrivning **—** / 1K tokens Input · Cacheskrivning, 1 time **—** / 1K tokens |
| KonfigurationOpenAI Chat · Trin 1 efter anmodningens længde | Takstplan— | Konteksttokens, mere end0 | Konteksttokens, op til og medIngen øvre grænse | Beløb Input · Inputtokens **$0.0006** / 1K tokens Output · Outputtokens **$0.0024** / 1K tokens Input · Cachelæsning **$0.00012** / 1K tokens Input · Cacheskrivning **—** / 1K tokens Input · Cacheskrivning, 1 time **—** / 1K tokens |
| KonfigurationAnthropic Messages · Grundtakster pr. token | TakstplanGrundtakst | Konteksttokens, mere end— | Konteksttokens, op til og medIngen øvre grænse | Beløb Input · Inputtokens **$0.0006** / 1K tokens Output · Outputtokens **$0.0024** / 1K tokens Input · Cachelæsning **$0.00012** / 1K tokens Input · Cacheskrivning **—** / 1K tokens Input · Cacheskrivning, 1 time **—** / 1K tokens |
| KonfigurationAnthropic Messages · Trin 1 efter anmodningens længde | Takstplan— | Konteksttokens, mere end0 | Konteksttokens, op til og medIngen øvre grænse | Beløb Input · Inputtokens **$0.0006** / 1K tokens Output · Outputtokens **$0.0024** / 1K tokens Input · Cachelæsning **$0.00012** / 1K tokens Input · Cacheskrivning **—** / 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": "minimax", "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": "minimax", "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="minimax", 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: "minimax", 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="minimax", 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> [`MiniMax-M3`](https://ailoot.ai/models/da/#m=minimax%2Fminimax-m3&route=Core&caller=MiniMax-M3&fmt=responses), [`minimax`](https://ailoot.ai/models/da/#m=minimax%2Fminimax-m3&route=Core&caller=minimax&fmt=responses), [`minimax-latest`](https://ailoot.ai/models/da/#m=minimax%2Fminimax-m3&route=Core&caller=minimax-latest&fmt=responses), [`minimax-text`](https://ailoot.ai/models/da/#m=minimax%2Fminimax-m3&route=Core&caller=minimax-text&fmt=responses), [`minimax-text-latest`](https://ailoot.ai/models/da/#m=minimax%2Fminimax-m3&route=Core&caller=minimax-text-latest&fmt=responses), [`minimax/minimax-m3`](https://ailoot.ai/models/da/#m=minimax%2Fminimax-m3&route=Core&caller=minimax%2Fminimax-m3&fmt=responses)
**Ailoot Ultra** [`MiniMax-M3`](https://ailoot.ai/models/da/#m=minimax%2Fminimax-m3&route=Ultra&caller=MiniMax-M3), [`minimax/minimax-m3`](https://ailoot.ai/models/da/#m=minimax%2Fminimax-m3&route=Ultra&caller=minimax%2Fminimax-m3)

#### Aliaser for metodestier

`/chat/completions`

#### Relaterede kalder-ID’er

[`minimax/minimax-m3`](https://ailoot.ai/models/da/#m=minimax%2Fminimax-m3&route=Core&caller=minimax%2Fminimax-m3&fmt=responses), [`minimax/minimax-m3`](https://ailoot.ai/models/da/#m=minimax%2Fminimax-m3&route=Ultra&caller=minimax%2Fminimax-m3), [`minimax`](https://ailoot.ai/models/da/#m=minimax%2Fminimax-m3&route=Core&caller=minimax&fmt=responses), [`minimax-latest`](https://ailoot.ai/models/da/#m=minimax%2Fminimax-m3&route=Core&caller=minimax-latest&fmt=responses), [`minimax-text`](https://ailoot.ai/models/da/#m=minimax%2Fminimax-m3&route=Core&caller=minimax-text&fmt=responses), [`minimax-text-latest`](https://ailoot.ai/models/da/#m=minimax%2Fminimax-m3&route=Core&caller=minimax-text-latest&fmt=responses), [`MiniMax-M3`](https://ailoot.ai/models/da/#m=minimax%2Fminimax-m3&route=Core&caller=MiniMax-M3&fmt=responses), [`MiniMax-M3`](https://ailoot.ai/models/da/#m=minimax%2Fminimax-m3&route=Ultra&caller=MiniMax-M3)

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

[`minimax`](https://ailoot.ai/models/da/#m=minimax%2Fminimax-m3&route=Core&caller=minimax&fmt=chat)

MiniMax /`minimax`

Model-ID

- `MiniMax-M3`
- `minimax`
- `minimax-latest`
- `minimax-text`
- `minimax-text-latest`
- `minimax/minimax-m3`

### Start

MiniMax M3 er en multimodal model til vedvarende programmering og agentarbejde, som bruger MiniMax Sparse Attention og er udformet til lang kontekst. Dens angivne Ultra-chatgrænseflader modtager tekst og returnerer tekstsvar.

Accepterede input

Tekst · Billeder

Resultater

Tekst

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

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

Inputtyper

`text`, `image`

Outputtyper

`text`

Kontekst

1.000.000 tokens

Maksimalt output

524.288 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 minimax | 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,0003 US$ */ 1K*

Output

0,0012 US$ */ 1K*

Cachelæsning

≈0,00006 US$ */ 1K*

Cacheskrivning

0,0003 US$ */ 1K*

Cacheskrivning, 5 min.

0,0003 US$ */ 1K tokens*

#### Priser efter anmodningens længde · OpenAI Chat

| Anmodningens størrelse, tokens | Input | Output | Cachelæsning | Cacheskrivning | Cache 5 min. | Cache 1 time |
| --- | --- | --- | --- | --- | --- | --- |
| Anmodningens størrelse, tokens(0; 524.288\] | Input0,0003 US$ | Output0,0012 US$ | Cachelæsning≈0,00006 US$ | Cacheskrivning0,0003 US$ | Cache 5 min.0,0003 US$ | Cache 1 timeGrundsats: — |
| Anmodningens størrelse, tokens(524.288; 1.000.000\] | Input0,0006 US$ | Output0,0024 US$ | Cachelæsning≈0,00012 US$ | Cacheskrivning0,0006 US$ | Cache 5 min.0,0006 US$ | Cache 1 timeGrundsats: — |

Takster i USD pr. 1K tokens. Hvis ingen takst er angivet, overtages grundtaksten for denne metode; «—» betyder, at ingen grundtakst er angivet.

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

#### Detaljer om referencetariffen

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

Modellens referenceplaner

#### Priser efter konfiguration

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

| Konfiguration | Takstplan | Konteksttokens, mere end | Konteksttokens, op til og med | Beløb |
| --- | --- | --- | --- | --- |
| KonfigurationOpenAI Chat · Grundtakster pr. token | TakstplanGrundtakst | Konteksttokens, mere end— | Konteksttokens, op til og medIngen øvre grænse | Beløb Input · Inputtokens **$0.0006** / 1K tokens Output · Outputtokens **$0.0024** / 1K tokens Input · Cachelæsning **$0.00012** / 1K tokens Input · Cacheskrivning **—** / 1K tokens Input · Cacheskrivning, 1 time **—** / 1K tokens |
| KonfigurationOpenAI Chat · Trin 1 efter anmodningens længde | Takstplan— | Konteksttokens, mere end0 | Konteksttokens, op til og medIngen øvre grænse | Beløb Input · Inputtokens **$0.0006** / 1K tokens Output · Outputtokens **$0.0024** / 1K tokens Input · Cachelæsning **$0.00012** / 1K tokens Input · Cacheskrivning **—** / 1K tokens Input · Cacheskrivning, 1 time **—** / 1K tokens |
| KonfigurationAnthropic Messages · Grundtakster pr. token | TakstplanGrundtakst | Konteksttokens, mere end— | Konteksttokens, op til og medIngen øvre grænse | Beløb Input · Inputtokens **$0.0006** / 1K tokens Output · Outputtokens **$0.0024** / 1K tokens Input · Cachelæsning **$0.00012** / 1K tokens Input · Cacheskrivning **—** / 1K tokens Input · Cacheskrivning, 1 time **—** / 1K tokens |
| KonfigurationAnthropic Messages · Trin 1 efter anmodningens længde | Takstplan— | Konteksttokens, mere end0 | Konteksttokens, op til og medIngen øvre grænse | Beløb Input · Inputtokens **$0.0006** / 1K tokens Output · Outputtokens **$0.0024** / 1K tokens Input · Cachelæsning **$0.00012** / 1K tokens Input · Cacheskrivning **—** / 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": "minimax", "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": "minimax", "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="minimax",
    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: "minimax",
  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='minimax',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> [`MiniMax-M3`](https://ailoot.ai/models/da/#m=minimax%2Fminimax-m3&route=Core&caller=MiniMax-M3&fmt=chat), [`minimax`](https://ailoot.ai/models/da/#m=minimax%2Fminimax-m3&route=Core&caller=minimax&fmt=chat), [`minimax-latest`](https://ailoot.ai/models/da/#m=minimax%2Fminimax-m3&route=Core&caller=minimax-latest&fmt=chat), [`minimax-text`](https://ailoot.ai/models/da/#m=minimax%2Fminimax-m3&route=Core&caller=minimax-text&fmt=chat), [`minimax-text-latest`](https://ailoot.ai/models/da/#m=minimax%2Fminimax-m3&route=Core&caller=minimax-text-latest&fmt=chat), [`minimax/minimax-m3`](https://ailoot.ai/models/da/#m=minimax%2Fminimax-m3&route=Core&caller=minimax%2Fminimax-m3&fmt=chat)
**Ailoot Ultra** [`MiniMax-M3`](https://ailoot.ai/models/da/#m=minimax%2Fminimax-m3&route=Ultra&caller=MiniMax-M3&fmt=chat), [`minimax/minimax-m3`](https://ailoot.ai/models/da/#m=minimax%2Fminimax-m3&route=Ultra&caller=minimax%2Fminimax-m3&fmt=chat)

#### Aliaser for metodestier

`/chat/completions`

#### Relaterede kalder-ID’er

[`minimax/minimax-m3`](https://ailoot.ai/models/da/#m=minimax%2Fminimax-m3&route=Core&caller=minimax%2Fminimax-m3&fmt=chat), [`minimax/minimax-m3`](https://ailoot.ai/models/da/#m=minimax%2Fminimax-m3&route=Ultra&caller=minimax%2Fminimax-m3&fmt=chat), [`minimax`](https://ailoot.ai/models/da/#m=minimax%2Fminimax-m3&route=Core&caller=minimax&fmt=chat), [`minimax-latest`](https://ailoot.ai/models/da/#m=minimax%2Fminimax-m3&route=Core&caller=minimax-latest&fmt=chat), [`minimax-text`](https://ailoot.ai/models/da/#m=minimax%2Fminimax-m3&route=Core&caller=minimax-text&fmt=chat), [`minimax-text-latest`](https://ailoot.ai/models/da/#m=minimax%2Fminimax-m3&route=Core&caller=minimax-text-latest&fmt=chat), [`MiniMax-M3`](https://ailoot.ai/models/da/#m=minimax%2Fminimax-m3&route=Core&caller=MiniMax-M3&fmt=chat), [`MiniMax-M3`](https://ailoot.ai/models/da/#m=minimax%2Fminimax-m3&route=Ultra&caller=MiniMax-M3&fmt=chat)

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

[`minimax-latest`](https://ailoot.ai/models/da/#m=minimax%2Fminimax-m3&route=Core&caller=minimax-latest&fmt=messages)

MiniMax /`minimax-latest`

Model-ID

- `MiniMax-M3`
- `minimax`
- `minimax-latest`
- `minimax-text`
- `minimax-text-latest`
- `minimax/minimax-m3`

### Start

MiniMax M3 er en multimodal model til vedvarende programmering og agentarbejde, som bruger MiniMax Sparse Attention og er udformet til lang kontekst. Dens angivne Ultra-chatgrænseflader modtager tekst og returnerer tekstsvar.

Accepterede input

Tekst · Billeder

Resultater

Tekst

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

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

Inputtyper

`text`, `image`

Outputtyper

`text`

Kontekst

1.000.000 tokens

Maksimalt output

524.288 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 minimax-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,0003 US$ */ 1K*

Output

0,0012 US$ */ 1K*

Cachelæsning

≈0,00006 US$ */ 1K*

Cacheskrivning

0,0003 US$ */ 1K*

Cacheskrivning, 5 min.

0,0003 US$ */ 1K tokens*

#### Priser efter anmodningens længde · Anthropic Messages

| Anmodningens størrelse, tokens | Input | Output | Cachelæsning | Cacheskrivning | Cache 5 min. | Cache 1 time |
| --- | --- | --- | --- | --- | --- | --- |
| Anmodningens størrelse, tokens(0; 524.288\] | Input0,0003 US$ | Output0,0012 US$ | Cachelæsning≈0,00006 US$ | Cacheskrivning0,0003 US$ | Cache 5 min.0,0003 US$ | Cache 1 timeGrundsats: — |
| Anmodningens størrelse, tokens(524.288; 1.000.000\] | Input0,0006 US$ | Output0,0024 US$ | Cachelæsning≈0,00012 US$ | Cacheskrivning0,0006 US$ | Cache 5 min.0,0006 US$ | Cache 1 timeGrundsats: — |

Takster i USD pr. 1K tokens. Hvis ingen takst er angivet, overtages grundtaksten for denne metode; «—» betyder, at ingen grundtakst er angivet.

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

#### Detaljer om referencetariffen

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

Modellens referenceplaner

#### Priser efter konfiguration

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

| Konfiguration | Takstplan | Konteksttokens, mere end | Konteksttokens, op til og med | Beløb |
| --- | --- | --- | --- | --- |
| KonfigurationOpenAI Chat · Grundtakster pr. token | TakstplanGrundtakst | Konteksttokens, mere end— | Konteksttokens, op til og medIngen øvre grænse | Beløb Input · Inputtokens **$0.0006** / 1K tokens Output · Outputtokens **$0.0024** / 1K tokens Input · Cachelæsning **$0.00012** / 1K tokens Input · Cacheskrivning **—** / 1K tokens Input · Cacheskrivning, 1 time **—** / 1K tokens |
| KonfigurationOpenAI Chat · Trin 1 efter anmodningens længde | Takstplan— | Konteksttokens, mere end0 | Konteksttokens, op til og medIngen øvre grænse | Beløb Input · Inputtokens **$0.0006** / 1K tokens Output · Outputtokens **$0.0024** / 1K tokens Input · Cachelæsning **$0.00012** / 1K tokens Input · Cacheskrivning **—** / 1K tokens Input · Cacheskrivning, 1 time **—** / 1K tokens |
| KonfigurationAnthropic Messages · Grundtakster pr. token | TakstplanGrundtakst | Konteksttokens, mere end— | Konteksttokens, op til og medIngen øvre grænse | Beløb Input · Inputtokens **$0.0006** / 1K tokens Output · Outputtokens **$0.0024** / 1K tokens Input · Cachelæsning **$0.00012** / 1K tokens Input · Cacheskrivning **—** / 1K tokens Input · Cacheskrivning, 1 time **—** / 1K tokens |
| KonfigurationAnthropic Messages · Trin 1 efter anmodningens længde | Takstplan— | Konteksttokens, mere end0 | Konteksttokens, op til og medIngen øvre grænse | Beløb Input · Inputtokens **$0.0006** / 1K tokens Output · Outputtokens **$0.0024** / 1K tokens Input · Cachelæsning **$0.00012** / 1K tokens Input · Cacheskrivning **—** / 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": "minimax-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": "minimax-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="minimax-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: "minimax-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='minimax-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> [`MiniMax-M3`](https://ailoot.ai/models/da/#m=minimax%2Fminimax-m3&route=Core&caller=MiniMax-M3&fmt=messages), [`minimax`](https://ailoot.ai/models/da/#m=minimax%2Fminimax-m3&route=Core&caller=minimax&fmt=messages), [`minimax-latest`](https://ailoot.ai/models/da/#m=minimax%2Fminimax-m3&route=Core&caller=minimax-latest&fmt=messages), [`minimax-text`](https://ailoot.ai/models/da/#m=minimax%2Fminimax-m3&route=Core&caller=minimax-text&fmt=messages), [`minimax-text-latest`](https://ailoot.ai/models/da/#m=minimax%2Fminimax-m3&route=Core&caller=minimax-text-latest&fmt=messages), [`minimax/minimax-m3`](https://ailoot.ai/models/da/#m=minimax%2Fminimax-m3&route=Core&caller=minimax%2Fminimax-m3&fmt=messages)
**Ailoot Ultra** [`MiniMax-M3`](https://ailoot.ai/models/da/#m=minimax%2Fminimax-m3&route=Ultra&caller=MiniMax-M3&fmt=messages), [`minimax/minimax-m3`](https://ailoot.ai/models/da/#m=minimax%2Fminimax-m3&route=Ultra&caller=minimax%2Fminimax-m3&fmt=messages)

#### Aliaser for metodestier

`/chat/completions`

#### Relaterede kalder-ID’er

[`minimax/minimax-m3`](https://ailoot.ai/models/da/#m=minimax%2Fminimax-m3&route=Core&caller=minimax%2Fminimax-m3&fmt=messages), [`minimax/minimax-m3`](https://ailoot.ai/models/da/#m=minimax%2Fminimax-m3&route=Ultra&caller=minimax%2Fminimax-m3&fmt=messages), [`minimax`](https://ailoot.ai/models/da/#m=minimax%2Fminimax-m3&route=Core&caller=minimax&fmt=messages), [`minimax-latest`](https://ailoot.ai/models/da/#m=minimax%2Fminimax-m3&route=Core&caller=minimax-latest&fmt=messages), [`minimax-text`](https://ailoot.ai/models/da/#m=minimax%2Fminimax-m3&route=Core&caller=minimax-text&fmt=messages), [`minimax-text-latest`](https://ailoot.ai/models/da/#m=minimax%2Fminimax-m3&route=Core&caller=minimax-text-latest&fmt=messages), [`MiniMax-M3`](https://ailoot.ai/models/da/#m=minimax%2Fminimax-m3&route=Core&caller=MiniMax-M3&fmt=messages), [`MiniMax-M3`](https://ailoot.ai/models/da/#m=minimax%2Fminimax-m3&route=Ultra&caller=MiniMax-M3&fmt=messages)

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

[`minimax-latest`](https://ailoot.ai/models/da/#m=minimax%2Fminimax-m3&route=Core&caller=minimax-latest&fmt=responses)

MiniMax /`minimax-latest`

Model-ID

- `MiniMax-M3`
- `minimax`
- `minimax-latest`
- `minimax-text`
- `minimax-text-latest`
- `minimax/minimax-m3`

### Start

MiniMax M3 er en multimodal model til vedvarende programmering og agentarbejde, som bruger MiniMax Sparse Attention og er udformet til lang kontekst. Dens angivne Ultra-chatgrænseflader modtager tekst og returnerer tekstsvar.

Accepterede input

Tekst · Billeder

Resultater

Tekst

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

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

Inputtyper

`text`, `image`

Outputtyper

`text`

Kontekst

1.000.000 tokens

Maksimalt output

1.000.000 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 minimax-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,0003 US$ */ 1K*

Output

0,0012 US$ */ 1K*

Cachelæsning

≈0,00006 US$ */ 1K*

Cacheskrivning

0,0003 US$ */ 1K*

Cacheskrivning, 5 min.

0,0003 US$ */ 1K tokens*

#### Priser efter anmodningens længde · OpenAI Responses

| Anmodningens størrelse, tokens | Input | Output | Cachelæsning | Cacheskrivning | Cache 5 min. | Cache 1 time |
| --- | --- | --- | --- | --- | --- | --- |
| Anmodningens størrelse, tokens(0; 524.288\] | Input0,0003 US$ | Output0,0012 US$ | Cachelæsning≈0,00006 US$ | Cacheskrivning0,0003 US$ | Cache 5 min.0,0003 US$ | Cache 1 timeGrundsats: — |
| Anmodningens størrelse, tokens(524.288; 1.000.000\] | Input0,0006 US$ | Output0,0024 US$ | Cachelæsning≈0,00012 US$ | Cacheskrivning0,0006 US$ | Cache 5 min.0,0006 US$ | Cache 1 timeGrundsats: — |

Takster i USD pr. 1K tokens. Hvis ingen takst er angivet, overtages grundtaksten for denne metode; «—» betyder, at ingen grundtakst er angivet.

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

#### Detaljer om referencetariffen

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

Modellens referenceplaner

#### Priser efter konfiguration

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

| Konfiguration | Takstplan | Konteksttokens, mere end | Konteksttokens, op til og med | Beløb |
| --- | --- | --- | --- | --- |
| KonfigurationOpenAI Chat · Grundtakster pr. token | TakstplanGrundtakst | Konteksttokens, mere end— | Konteksttokens, op til og medIngen øvre grænse | Beløb Input · Inputtokens **$0.0006** / 1K tokens Output · Outputtokens **$0.0024** / 1K tokens Input · Cachelæsning **$0.00012** / 1K tokens Input · Cacheskrivning **—** / 1K tokens Input · Cacheskrivning, 1 time **—** / 1K tokens |
| KonfigurationOpenAI Chat · Trin 1 efter anmodningens længde | Takstplan— | Konteksttokens, mere end0 | Konteksttokens, op til og medIngen øvre grænse | Beløb Input · Inputtokens **$0.0006** / 1K tokens Output · Outputtokens **$0.0024** / 1K tokens Input · Cachelæsning **$0.00012** / 1K tokens Input · Cacheskrivning **—** / 1K tokens Input · Cacheskrivning, 1 time **—** / 1K tokens |
| KonfigurationAnthropic Messages · Grundtakster pr. token | TakstplanGrundtakst | Konteksttokens, mere end— | Konteksttokens, op til og medIngen øvre grænse | Beløb Input · Inputtokens **$0.0006** / 1K tokens Output · Outputtokens **$0.0024** / 1K tokens Input · Cachelæsning **$0.00012** / 1K tokens Input · Cacheskrivning **—** / 1K tokens Input · Cacheskrivning, 1 time **—** / 1K tokens |
| KonfigurationAnthropic Messages · Trin 1 efter anmodningens længde | Takstplan— | Konteksttokens, mere end0 | Konteksttokens, op til og medIngen øvre grænse | Beløb Input · Inputtokens **$0.0006** / 1K tokens Output · Outputtokens **$0.0024** / 1K tokens Input · Cachelæsning **$0.00012** / 1K tokens Input · Cacheskrivning **—** / 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": "minimax-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": "minimax-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="minimax-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: "minimax-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="minimax-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> [`MiniMax-M3`](https://ailoot.ai/models/da/#m=minimax%2Fminimax-m3&route=Core&caller=MiniMax-M3&fmt=responses), [`minimax`](https://ailoot.ai/models/da/#m=minimax%2Fminimax-m3&route=Core&caller=minimax&fmt=responses), [`minimax-latest`](https://ailoot.ai/models/da/#m=minimax%2Fminimax-m3&route=Core&caller=minimax-latest&fmt=responses), [`minimax-text`](https://ailoot.ai/models/da/#m=minimax%2Fminimax-m3&route=Core&caller=minimax-text&fmt=responses), [`minimax-text-latest`](https://ailoot.ai/models/da/#m=minimax%2Fminimax-m3&route=Core&caller=minimax-text-latest&fmt=responses), [`minimax/minimax-m3`](https://ailoot.ai/models/da/#m=minimax%2Fminimax-m3&route=Core&caller=minimax%2Fminimax-m3&fmt=responses)
**Ailoot Ultra** [`MiniMax-M3`](https://ailoot.ai/models/da/#m=minimax%2Fminimax-m3&route=Ultra&caller=MiniMax-M3), [`minimax/minimax-m3`](https://ailoot.ai/models/da/#m=minimax%2Fminimax-m3&route=Ultra&caller=minimax%2Fminimax-m3)

#### Aliaser for metodestier

`/chat/completions`

#### Relaterede kalder-ID’er

[`minimax/minimax-m3`](https://ailoot.ai/models/da/#m=minimax%2Fminimax-m3&route=Core&caller=minimax%2Fminimax-m3&fmt=responses), [`minimax/minimax-m3`](https://ailoot.ai/models/da/#m=minimax%2Fminimax-m3&route=Ultra&caller=minimax%2Fminimax-m3), [`minimax`](https://ailoot.ai/models/da/#m=minimax%2Fminimax-m3&route=Core&caller=minimax&fmt=responses), [`minimax-latest`](https://ailoot.ai/models/da/#m=minimax%2Fminimax-m3&route=Core&caller=minimax-latest&fmt=responses), [`minimax-text`](https://ailoot.ai/models/da/#m=minimax%2Fminimax-m3&route=Core&caller=minimax-text&fmt=responses), [`minimax-text-latest`](https://ailoot.ai/models/da/#m=minimax%2Fminimax-m3&route=Core&caller=minimax-text-latest&fmt=responses), [`MiniMax-M3`](https://ailoot.ai/models/da/#m=minimax%2Fminimax-m3&route=Core&caller=MiniMax-M3&fmt=responses), [`MiniMax-M3`](https://ailoot.ai/models/da/#m=minimax%2Fminimax-m3&route=Ultra&caller=MiniMax-M3)

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

[`minimax-latest`](https://ailoot.ai/models/da/#m=minimax%2Fminimax-m3&route=Core&caller=minimax-latest&fmt=chat)

MiniMax /`minimax-latest`

Model-ID

- `MiniMax-M3`
- `minimax`
- `minimax-latest`
- `minimax-text`
- `minimax-text-latest`
- `minimax/minimax-m3`

### Start

MiniMax M3 er en multimodal model til vedvarende programmering og agentarbejde, som bruger MiniMax Sparse Attention og er udformet til lang kontekst. Dens angivne Ultra-chatgrænseflader modtager tekst og returnerer tekstsvar.

Accepterede input

Tekst · Billeder

Resultater

Tekst

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

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

Inputtyper

`text`, `image`

Outputtyper

`text`

Kontekst

1.000.000 tokens

Maksimalt output

524.288 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 minimax-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,0003 US$ */ 1K*

Output

0,0012 US$ */ 1K*

Cachelæsning

≈0,00006 US$ */ 1K*

Cacheskrivning

0,0003 US$ */ 1K*

Cacheskrivning, 5 min.

0,0003 US$ */ 1K tokens*

#### Priser efter anmodningens længde · OpenAI Chat

| Anmodningens størrelse, tokens | Input | Output | Cachelæsning | Cacheskrivning | Cache 5 min. | Cache 1 time |
| --- | --- | --- | --- | --- | --- | --- |
| Anmodningens størrelse, tokens(0; 524.288\] | Input0,0003 US$ | Output0,0012 US$ | Cachelæsning≈0,00006 US$ | Cacheskrivning0,0003 US$ | Cache 5 min.0,0003 US$ | Cache 1 timeGrundsats: — |
| Anmodningens størrelse, tokens(524.288; 1.000.000\] | Input0,0006 US$ | Output0,0024 US$ | Cachelæsning≈0,00012 US$ | Cacheskrivning0,0006 US$ | Cache 5 min.0,0006 US$ | Cache 1 timeGrundsats: — |

Takster i USD pr. 1K tokens. Hvis ingen takst er angivet, overtages grundtaksten for denne metode; «—» betyder, at ingen grundtakst er angivet.

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

#### Detaljer om referencetariffen

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

Modellens referenceplaner

#### Priser efter konfiguration

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

| Konfiguration | Takstplan | Konteksttokens, mere end | Konteksttokens, op til og med | Beløb |
| --- | --- | --- | --- | --- |
| KonfigurationOpenAI Chat · Grundtakster pr. token | TakstplanGrundtakst | Konteksttokens, mere end— | Konteksttokens, op til og medIngen øvre grænse | Beløb Input · Inputtokens **$0.0006** / 1K tokens Output · Outputtokens **$0.0024** / 1K tokens Input · Cachelæsning **$0.00012** / 1K tokens Input · Cacheskrivning **—** / 1K tokens Input · Cacheskrivning, 1 time **—** / 1K tokens |
| KonfigurationOpenAI Chat · Trin 1 efter anmodningens længde | Takstplan— | Konteksttokens, mere end0 | Konteksttokens, op til og medIngen øvre grænse | Beløb Input · Inputtokens **$0.0006** / 1K tokens Output · Outputtokens **$0.0024** / 1K tokens Input · Cachelæsning **$0.00012** / 1K tokens Input · Cacheskrivning **—** / 1K tokens Input · Cacheskrivning, 1 time **—** / 1K tokens |
| KonfigurationAnthropic Messages · Grundtakster pr. token | TakstplanGrundtakst | Konteksttokens, mere end— | Konteksttokens, op til og medIngen øvre grænse | Beløb Input · Inputtokens **$0.0006** / 1K tokens Output · Outputtokens **$0.0024** / 1K tokens Input · Cachelæsning **$0.00012** / 1K tokens Input · Cacheskrivning **—** / 1K tokens Input · Cacheskrivning, 1 time **—** / 1K tokens |
| KonfigurationAnthropic Messages · Trin 1 efter anmodningens længde | Takstplan— | Konteksttokens, mere end0 | Konteksttokens, op til og medIngen øvre grænse | Beløb Input · Inputtokens **$0.0006** / 1K tokens Output · Outputtokens **$0.0024** / 1K tokens Input · Cachelæsning **$0.00012** / 1K tokens Input · Cacheskrivning **—** / 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": "minimax-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": "minimax-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="minimax-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: "minimax-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='minimax-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> [`MiniMax-M3`](https://ailoot.ai/models/da/#m=minimax%2Fminimax-m3&route=Core&caller=MiniMax-M3&fmt=chat), [`minimax`](https://ailoot.ai/models/da/#m=minimax%2Fminimax-m3&route=Core&caller=minimax&fmt=chat), [`minimax-latest`](https://ailoot.ai/models/da/#m=minimax%2Fminimax-m3&route=Core&caller=minimax-latest&fmt=chat), [`minimax-text`](https://ailoot.ai/models/da/#m=minimax%2Fminimax-m3&route=Core&caller=minimax-text&fmt=chat), [`minimax-text-latest`](https://ailoot.ai/models/da/#m=minimax%2Fminimax-m3&route=Core&caller=minimax-text-latest&fmt=chat), [`minimax/minimax-m3`](https://ailoot.ai/models/da/#m=minimax%2Fminimax-m3&route=Core&caller=minimax%2Fminimax-m3&fmt=chat)
**Ailoot Ultra** [`MiniMax-M3`](https://ailoot.ai/models/da/#m=minimax%2Fminimax-m3&route=Ultra&caller=MiniMax-M3&fmt=chat), [`minimax/minimax-m3`](https://ailoot.ai/models/da/#m=minimax%2Fminimax-m3&route=Ultra&caller=minimax%2Fminimax-m3&fmt=chat)

#### Aliaser for metodestier

`/chat/completions`

#### Relaterede kalder-ID’er

[`minimax/minimax-m3`](https://ailoot.ai/models/da/#m=minimax%2Fminimax-m3&route=Core&caller=minimax%2Fminimax-m3&fmt=chat), [`minimax/minimax-m3`](https://ailoot.ai/models/da/#m=minimax%2Fminimax-m3&route=Ultra&caller=minimax%2Fminimax-m3&fmt=chat), [`minimax`](https://ailoot.ai/models/da/#m=minimax%2Fminimax-m3&route=Core&caller=minimax&fmt=chat), [`minimax-latest`](https://ailoot.ai/models/da/#m=minimax%2Fminimax-m3&route=Core&caller=minimax-latest&fmt=chat), [`minimax-text`](https://ailoot.ai/models/da/#m=minimax%2Fminimax-m3&route=Core&caller=minimax-text&fmt=chat), [`minimax-text-latest`](https://ailoot.ai/models/da/#m=minimax%2Fminimax-m3&route=Core&caller=minimax-text-latest&fmt=chat), [`MiniMax-M3`](https://ailoot.ai/models/da/#m=minimax%2Fminimax-m3&route=Core&caller=MiniMax-M3&fmt=chat), [`MiniMax-M3`](https://ailoot.ai/models/da/#m=minimax%2Fminimax-m3&route=Ultra&caller=MiniMax-M3&fmt=chat)

**Ailoot · Anthropic Messages** `POST /v1/messages` `minimax-text`

[`minimax-text`](https://ailoot.ai/models/da/#m=minimax%2Fminimax-m3&route=Core&caller=minimax-text&fmt=messages)

MiniMax /`minimax-text`

Model-ID

- `MiniMax-M3`
- `minimax`
- `minimax-latest`
- `minimax-text`
- `minimax-text-latest`
- `minimax/minimax-m3`

### Start

MiniMax M3 er en multimodal model til vedvarende programmering og agentarbejde, som bruger MiniMax Sparse Attention og er udformet til lang kontekst. Dens angivne Ultra-chatgrænseflader modtager tekst og returnerer tekstsvar.

Accepterede input

Tekst · Billeder

Resultater

Tekst

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

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

Inputtyper

`text`, `image`

Outputtyper

`text`

Kontekst

1.000.000 tokens

Maksimalt output

524.288 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 minimax-text | 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,0003 US$ */ 1K*

Output

0,0012 US$ */ 1K*

Cachelæsning

≈0,00006 US$ */ 1K*

Cacheskrivning

0,0003 US$ */ 1K*

Cacheskrivning, 5 min.

0,0003 US$ */ 1K tokens*

#### Priser efter anmodningens længde · Anthropic Messages

| Anmodningens størrelse, tokens | Input | Output | Cachelæsning | Cacheskrivning | Cache 5 min. | Cache 1 time |
| --- | --- | --- | --- | --- | --- | --- |
| Anmodningens størrelse, tokens(0; 524.288\] | Input0,0003 US$ | Output0,0012 US$ | Cachelæsning≈0,00006 US$ | Cacheskrivning0,0003 US$ | Cache 5 min.0,0003 US$ | Cache 1 timeGrundsats: — |
| Anmodningens størrelse, tokens(524.288; 1.000.000\] | Input0,0006 US$ | Output0,0024 US$ | Cachelæsning≈0,00012 US$ | Cacheskrivning0,0006 US$ | Cache 5 min.0,0006 US$ | Cache 1 timeGrundsats: — |

Takster i USD pr. 1K tokens. Hvis ingen takst er angivet, overtages grundtaksten for denne metode; «—» betyder, at ingen grundtakst er angivet.

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

#### Detaljer om referencetariffen

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

Modellens referenceplaner

#### Priser efter konfiguration

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

| Konfiguration | Takstplan | Konteksttokens, mere end | Konteksttokens, op til og med | Beløb |
| --- | --- | --- | --- | --- |
| KonfigurationOpenAI Chat · Grundtakster pr. token | TakstplanGrundtakst | Konteksttokens, mere end— | Konteksttokens, op til og medIngen øvre grænse | Beløb Input · Inputtokens **$0.0006** / 1K tokens Output · Outputtokens **$0.0024** / 1K tokens Input · Cachelæsning **$0.00012** / 1K tokens Input · Cacheskrivning **—** / 1K tokens Input · Cacheskrivning, 1 time **—** / 1K tokens |
| KonfigurationOpenAI Chat · Trin 1 efter anmodningens længde | Takstplan— | Konteksttokens, mere end0 | Konteksttokens, op til og medIngen øvre grænse | Beløb Input · Inputtokens **$0.0006** / 1K tokens Output · Outputtokens **$0.0024** / 1K tokens Input · Cachelæsning **$0.00012** / 1K tokens Input · Cacheskrivning **—** / 1K tokens Input · Cacheskrivning, 1 time **—** / 1K tokens |
| KonfigurationAnthropic Messages · Grundtakster pr. token | TakstplanGrundtakst | Konteksttokens, mere end— | Konteksttokens, op til og medIngen øvre grænse | Beløb Input · Inputtokens **$0.0006** / 1K tokens Output · Outputtokens **$0.0024** / 1K tokens Input · Cachelæsning **$0.00012** / 1K tokens Input · Cacheskrivning **—** / 1K tokens Input · Cacheskrivning, 1 time **—** / 1K tokens |
| KonfigurationAnthropic Messages · Trin 1 efter anmodningens længde | Takstplan— | Konteksttokens, mere end0 | Konteksttokens, op til og medIngen øvre grænse | Beløb Input · Inputtokens **$0.0006** / 1K tokens Output · Outputtokens **$0.0024** / 1K tokens Input · Cachelæsning **$0.00012** / 1K tokens Input · Cacheskrivning **—** / 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": "minimax-text", "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": "minimax-text", "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="minimax-text",
    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: "minimax-text",
  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='minimax-text',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> [`MiniMax-M3`](https://ailoot.ai/models/da/#m=minimax%2Fminimax-m3&route=Core&caller=MiniMax-M3&fmt=messages), [`minimax`](https://ailoot.ai/models/da/#m=minimax%2Fminimax-m3&route=Core&caller=minimax&fmt=messages), [`minimax-latest`](https://ailoot.ai/models/da/#m=minimax%2Fminimax-m3&route=Core&caller=minimax-latest&fmt=messages), [`minimax-text`](https://ailoot.ai/models/da/#m=minimax%2Fminimax-m3&route=Core&caller=minimax-text&fmt=messages), [`minimax-text-latest`](https://ailoot.ai/models/da/#m=minimax%2Fminimax-m3&route=Core&caller=minimax-text-latest&fmt=messages), [`minimax/minimax-m3`](https://ailoot.ai/models/da/#m=minimax%2Fminimax-m3&route=Core&caller=minimax%2Fminimax-m3&fmt=messages)
**Ailoot Ultra** [`MiniMax-M3`](https://ailoot.ai/models/da/#m=minimax%2Fminimax-m3&route=Ultra&caller=MiniMax-M3&fmt=messages), [`minimax/minimax-m3`](https://ailoot.ai/models/da/#m=minimax%2Fminimax-m3&route=Ultra&caller=minimax%2Fminimax-m3&fmt=messages)

#### Aliaser for metodestier

`/chat/completions`

#### Relaterede kalder-ID’er

[`minimax/minimax-m3`](https://ailoot.ai/models/da/#m=minimax%2Fminimax-m3&route=Core&caller=minimax%2Fminimax-m3&fmt=messages), [`minimax/minimax-m3`](https://ailoot.ai/models/da/#m=minimax%2Fminimax-m3&route=Ultra&caller=minimax%2Fminimax-m3&fmt=messages), [`minimax`](https://ailoot.ai/models/da/#m=minimax%2Fminimax-m3&route=Core&caller=minimax&fmt=messages), [`minimax-latest`](https://ailoot.ai/models/da/#m=minimax%2Fminimax-m3&route=Core&caller=minimax-latest&fmt=messages), [`minimax-text`](https://ailoot.ai/models/da/#m=minimax%2Fminimax-m3&route=Core&caller=minimax-text&fmt=messages), [`minimax-text-latest`](https://ailoot.ai/models/da/#m=minimax%2Fminimax-m3&route=Core&caller=minimax-text-latest&fmt=messages), [`MiniMax-M3`](https://ailoot.ai/models/da/#m=minimax%2Fminimax-m3&route=Core&caller=MiniMax-M3&fmt=messages), [`MiniMax-M3`](https://ailoot.ai/models/da/#m=minimax%2Fminimax-m3&route=Ultra&caller=MiniMax-M3&fmt=messages)

**Ailoot · OpenAI Responses** `POST /v1/responses` `minimax-text`

[`minimax-text`](https://ailoot.ai/models/da/#m=minimax%2Fminimax-m3&route=Core&caller=minimax-text&fmt=responses)

MiniMax /`minimax-text`

Model-ID

- `MiniMax-M3`
- `minimax`
- `minimax-latest`
- `minimax-text`
- `minimax-text-latest`
- `minimax/minimax-m3`

### Start

MiniMax M3 er en multimodal model til vedvarende programmering og agentarbejde, som bruger MiniMax Sparse Attention og er udformet til lang kontekst. Dens angivne Ultra-chatgrænseflader modtager tekst og returnerer tekstsvar.

Accepterede input

Tekst · Billeder

Resultater

Tekst

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

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

Inputtyper

`text`, `image`

Outputtyper

`text`

Kontekst

1.000.000 tokens

Maksimalt output

1.000.000 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 minimax-text | 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,0003 US$ */ 1K*

Output

0,0012 US$ */ 1K*

Cachelæsning

≈0,00006 US$ */ 1K*

Cacheskrivning

0,0003 US$ */ 1K*

Cacheskrivning, 5 min.

0,0003 US$ */ 1K tokens*

#### Priser efter anmodningens længde · OpenAI Responses

| Anmodningens størrelse, tokens | Input | Output | Cachelæsning | Cacheskrivning | Cache 5 min. | Cache 1 time |
| --- | --- | --- | --- | --- | --- | --- |
| Anmodningens størrelse, tokens(0; 524.288\] | Input0,0003 US$ | Output0,0012 US$ | Cachelæsning≈0,00006 US$ | Cacheskrivning0,0003 US$ | Cache 5 min.0,0003 US$ | Cache 1 timeGrundsats: — |
| Anmodningens størrelse, tokens(524.288; 1.000.000\] | Input0,0006 US$ | Output0,0024 US$ | Cachelæsning≈0,00012 US$ | Cacheskrivning0,0006 US$ | Cache 5 min.0,0006 US$ | Cache 1 timeGrundsats: — |

Takster i USD pr. 1K tokens. Hvis ingen takst er angivet, overtages grundtaksten for denne metode; «—» betyder, at ingen grundtakst er angivet.

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

#### Detaljer om referencetariffen

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

Modellens referenceplaner

#### Priser efter konfiguration

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

| Konfiguration | Takstplan | Konteksttokens, mere end | Konteksttokens, op til og med | Beløb |
| --- | --- | --- | --- | --- |
| KonfigurationOpenAI Chat · Grundtakster pr. token | TakstplanGrundtakst | Konteksttokens, mere end— | Konteksttokens, op til og medIngen øvre grænse | Beløb Input · Inputtokens **$0.0006** / 1K tokens Output · Outputtokens **$0.0024** / 1K tokens Input · Cachelæsning **$0.00012** / 1K tokens Input · Cacheskrivning **—** / 1K tokens Input · Cacheskrivning, 1 time **—** / 1K tokens |
| KonfigurationOpenAI Chat · Trin 1 efter anmodningens længde | Takstplan— | Konteksttokens, mere end0 | Konteksttokens, op til og medIngen øvre grænse | Beløb Input · Inputtokens **$0.0006** / 1K tokens Output · Outputtokens **$0.0024** / 1K tokens Input · Cachelæsning **$0.00012** / 1K tokens Input · Cacheskrivning **—** / 1K tokens Input · Cacheskrivning, 1 time **—** / 1K tokens |
| KonfigurationAnthropic Messages · Grundtakster pr. token | TakstplanGrundtakst | Konteksttokens, mere end— | Konteksttokens, op til og medIngen øvre grænse | Beløb Input · Inputtokens **$0.0006** / 1K tokens Output · Outputtokens **$0.0024** / 1K tokens Input · Cachelæsning **$0.00012** / 1K tokens Input · Cacheskrivning **—** / 1K tokens Input · Cacheskrivning, 1 time **—** / 1K tokens |
| KonfigurationAnthropic Messages · Trin 1 efter anmodningens længde | Takstplan— | Konteksttokens, mere end0 | Konteksttokens, op til og medIngen øvre grænse | Beløb Input · Inputtokens **$0.0006** / 1K tokens Output · Outputtokens **$0.0024** / 1K tokens Input · Cachelæsning **$0.00012** / 1K tokens Input · Cacheskrivning **—** / 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": "minimax-text", "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": "minimax-text", "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="minimax-text", 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: "minimax-text", 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="minimax-text", 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> [`MiniMax-M3`](https://ailoot.ai/models/da/#m=minimax%2Fminimax-m3&route=Core&caller=MiniMax-M3&fmt=responses), [`minimax`](https://ailoot.ai/models/da/#m=minimax%2Fminimax-m3&route=Core&caller=minimax&fmt=responses), [`minimax-latest`](https://ailoot.ai/models/da/#m=minimax%2Fminimax-m3&route=Core&caller=minimax-latest&fmt=responses), [`minimax-text`](https://ailoot.ai/models/da/#m=minimax%2Fminimax-m3&route=Core&caller=minimax-text&fmt=responses), [`minimax-text-latest`](https://ailoot.ai/models/da/#m=minimax%2Fminimax-m3&route=Core&caller=minimax-text-latest&fmt=responses), [`minimax/minimax-m3`](https://ailoot.ai/models/da/#m=minimax%2Fminimax-m3&route=Core&caller=minimax%2Fminimax-m3&fmt=responses)
**Ailoot Ultra** [`MiniMax-M3`](https://ailoot.ai/models/da/#m=minimax%2Fminimax-m3&route=Ultra&caller=MiniMax-M3), [`minimax/minimax-m3`](https://ailoot.ai/models/da/#m=minimax%2Fminimax-m3&route=Ultra&caller=minimax%2Fminimax-m3)

#### Aliaser for metodestier

`/chat/completions`

#### Relaterede kalder-ID’er

[`minimax/minimax-m3`](https://ailoot.ai/models/da/#m=minimax%2Fminimax-m3&route=Core&caller=minimax%2Fminimax-m3&fmt=responses), [`minimax/minimax-m3`](https://ailoot.ai/models/da/#m=minimax%2Fminimax-m3&route=Ultra&caller=minimax%2Fminimax-m3), [`minimax`](https://ailoot.ai/models/da/#m=minimax%2Fminimax-m3&route=Core&caller=minimax&fmt=responses), [`minimax-latest`](https://ailoot.ai/models/da/#m=minimax%2Fminimax-m3&route=Core&caller=minimax-latest&fmt=responses), [`minimax-text`](https://ailoot.ai/models/da/#m=minimax%2Fminimax-m3&route=Core&caller=minimax-text&fmt=responses), [`minimax-text-latest`](https://ailoot.ai/models/da/#m=minimax%2Fminimax-m3&route=Core&caller=minimax-text-latest&fmt=responses), [`MiniMax-M3`](https://ailoot.ai/models/da/#m=minimax%2Fminimax-m3&route=Core&caller=MiniMax-M3&fmt=responses), [`MiniMax-M3`](https://ailoot.ai/models/da/#m=minimax%2Fminimax-m3&route=Ultra&caller=MiniMax-M3)

**Ailoot · OpenAI Chat** `POST /v1/chat/completions` `minimax-text`

[`minimax-text`](https://ailoot.ai/models/da/#m=minimax%2Fminimax-m3&route=Core&caller=minimax-text&fmt=chat)

MiniMax /`minimax-text`

Model-ID

- `MiniMax-M3`
- `minimax`
- `minimax-latest`
- `minimax-text`
- `minimax-text-latest`
- `minimax/minimax-m3`

### Start

MiniMax M3 er en multimodal model til vedvarende programmering og agentarbejde, som bruger MiniMax Sparse Attention og er udformet til lang kontekst. Dens angivne Ultra-chatgrænseflader modtager tekst og returnerer tekstsvar.

Accepterede input

Tekst · Billeder

Resultater

Tekst

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

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

Inputtyper

`text`, `image`

Outputtyper

`text`

Kontekst

1.000.000 tokens

Maksimalt output

524.288 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 minimax-text | 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,0003 US$ */ 1K*

Output

0,0012 US$ */ 1K*

Cachelæsning

≈0,00006 US$ */ 1K*

Cacheskrivning

0,0003 US$ */ 1K*

Cacheskrivning, 5 min.

0,0003 US$ */ 1K tokens*

#### Priser efter anmodningens længde · OpenAI Chat

| Anmodningens størrelse, tokens | Input | Output | Cachelæsning | Cacheskrivning | Cache 5 min. | Cache 1 time |
| --- | --- | --- | --- | --- | --- | --- |
| Anmodningens størrelse, tokens(0; 524.288\] | Input0,0003 US$ | Output0,0012 US$ | Cachelæsning≈0,00006 US$ | Cacheskrivning0,0003 US$ | Cache 5 min.0,0003 US$ | Cache 1 timeGrundsats: — |
| Anmodningens størrelse, tokens(524.288; 1.000.000\] | Input0,0006 US$ | Output0,0024 US$ | Cachelæsning≈0,00012 US$ | Cacheskrivning0,0006 US$ | Cache 5 min.0,0006 US$ | Cache 1 timeGrundsats: — |

Takster i USD pr. 1K tokens. Hvis ingen takst er angivet, overtages grundtaksten for denne metode; «—» betyder, at ingen grundtakst er angivet.

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

#### Detaljer om referencetariffen

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

Modellens referenceplaner

#### Priser efter konfiguration

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

| Konfiguration | Takstplan | Konteksttokens, mere end | Konteksttokens, op til og med | Beløb |
| --- | --- | --- | --- | --- |
| KonfigurationOpenAI Chat · Grundtakster pr. token | TakstplanGrundtakst | Konteksttokens, mere end— | Konteksttokens, op til og medIngen øvre grænse | Beløb Input · Inputtokens **$0.0006** / 1K tokens Output · Outputtokens **$0.0024** / 1K tokens Input · Cachelæsning **$0.00012** / 1K tokens Input · Cacheskrivning **—** / 1K tokens Input · Cacheskrivning, 1 time **—** / 1K tokens |
| KonfigurationOpenAI Chat · Trin 1 efter anmodningens længde | Takstplan— | Konteksttokens, mere end0 | Konteksttokens, op til og medIngen øvre grænse | Beløb Input · Inputtokens **$0.0006** / 1K tokens Output · Outputtokens **$0.0024** / 1K tokens Input · Cachelæsning **$0.00012** / 1K tokens Input · Cacheskrivning **—** / 1K tokens Input · Cacheskrivning, 1 time **—** / 1K tokens |
| KonfigurationAnthropic Messages · Grundtakster pr. token | TakstplanGrundtakst | Konteksttokens, mere end— | Konteksttokens, op til og medIngen øvre grænse | Beløb Input · Inputtokens **$0.0006** / 1K tokens Output · Outputtokens **$0.0024** / 1K tokens Input · Cachelæsning **$0.00012** / 1K tokens Input · Cacheskrivning **—** / 1K tokens Input · Cacheskrivning, 1 time **—** / 1K tokens |
| KonfigurationAnthropic Messages · Trin 1 efter anmodningens længde | Takstplan— | Konteksttokens, mere end0 | Konteksttokens, op til og medIngen øvre grænse | Beløb Input · Inputtokens **$0.0006** / 1K tokens Output · Outputtokens **$0.0024** / 1K tokens Input · Cachelæsning **$0.00012** / 1K tokens Input · Cacheskrivning **—** / 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": "minimax-text", "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": "minimax-text", "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="minimax-text",
    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: "minimax-text",
  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='minimax-text',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> [`MiniMax-M3`](https://ailoot.ai/models/da/#m=minimax%2Fminimax-m3&route=Core&caller=MiniMax-M3&fmt=chat), [`minimax`](https://ailoot.ai/models/da/#m=minimax%2Fminimax-m3&route=Core&caller=minimax&fmt=chat), [`minimax-latest`](https://ailoot.ai/models/da/#m=minimax%2Fminimax-m3&route=Core&caller=minimax-latest&fmt=chat), [`minimax-text`](https://ailoot.ai/models/da/#m=minimax%2Fminimax-m3&route=Core&caller=minimax-text&fmt=chat), [`minimax-text-latest`](https://ailoot.ai/models/da/#m=minimax%2Fminimax-m3&route=Core&caller=minimax-text-latest&fmt=chat), [`minimax/minimax-m3`](https://ailoot.ai/models/da/#m=minimax%2Fminimax-m3&route=Core&caller=minimax%2Fminimax-m3&fmt=chat)
**Ailoot Ultra** [`MiniMax-M3`](https://ailoot.ai/models/da/#m=minimax%2Fminimax-m3&route=Ultra&caller=MiniMax-M3&fmt=chat), [`minimax/minimax-m3`](https://ailoot.ai/models/da/#m=minimax%2Fminimax-m3&route=Ultra&caller=minimax%2Fminimax-m3&fmt=chat)

#### Aliaser for metodestier

`/chat/completions`

#### Relaterede kalder-ID’er

[`minimax/minimax-m3`](https://ailoot.ai/models/da/#m=minimax%2Fminimax-m3&route=Core&caller=minimax%2Fminimax-m3&fmt=chat), [`minimax/minimax-m3`](https://ailoot.ai/models/da/#m=minimax%2Fminimax-m3&route=Ultra&caller=minimax%2Fminimax-m3&fmt=chat), [`minimax`](https://ailoot.ai/models/da/#m=minimax%2Fminimax-m3&route=Core&caller=minimax&fmt=chat), [`minimax-latest`](https://ailoot.ai/models/da/#m=minimax%2Fminimax-m3&route=Core&caller=minimax-latest&fmt=chat), [`minimax-text`](https://ailoot.ai/models/da/#m=minimax%2Fminimax-m3&route=Core&caller=minimax-text&fmt=chat), [`minimax-text-latest`](https://ailoot.ai/models/da/#m=minimax%2Fminimax-m3&route=Core&caller=minimax-text-latest&fmt=chat), [`MiniMax-M3`](https://ailoot.ai/models/da/#m=minimax%2Fminimax-m3&route=Core&caller=MiniMax-M3&fmt=chat), [`MiniMax-M3`](https://ailoot.ai/models/da/#m=minimax%2Fminimax-m3&route=Ultra&caller=MiniMax-M3&fmt=chat)

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

[`minimax-text-latest`](https://ailoot.ai/models/da/#m=minimax%2Fminimax-m3&route=Core&caller=minimax-text-latest&fmt=messages)

MiniMax /`minimax-text-latest`

Model-ID

- `MiniMax-M3`
- `minimax`
- `minimax-latest`
- `minimax-text`
- `minimax-text-latest`
- `minimax/minimax-m3`

### Start

MiniMax M3 er en multimodal model til vedvarende programmering og agentarbejde, som bruger MiniMax Sparse Attention og er udformet til lang kontekst. Dens angivne Ultra-chatgrænseflader modtager tekst og returnerer tekstsvar.

Accepterede input

Tekst · Billeder

Resultater

Tekst

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

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

Inputtyper

`text`, `image`

Outputtyper

`text`

Kontekst

1.000.000 tokens

Maksimalt output

524.288 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 minimax-text-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,0003 US$ */ 1K*

Output

0,0012 US$ */ 1K*

Cachelæsning

≈0,00006 US$ */ 1K*

Cacheskrivning

0,0003 US$ */ 1K*

Cacheskrivning, 5 min.

0,0003 US$ */ 1K tokens*

#### Priser efter anmodningens længde · Anthropic Messages

| Anmodningens størrelse, tokens | Input | Output | Cachelæsning | Cacheskrivning | Cache 5 min. | Cache 1 time |
| --- | --- | --- | --- | --- | --- | --- |
| Anmodningens størrelse, tokens(0; 524.288\] | Input0,0003 US$ | Output0,0012 US$ | Cachelæsning≈0,00006 US$ | Cacheskrivning0,0003 US$ | Cache 5 min.0,0003 US$ | Cache 1 timeGrundsats: — |
| Anmodningens størrelse, tokens(524.288; 1.000.000\] | Input0,0006 US$ | Output0,0024 US$ | Cachelæsning≈0,00012 US$ | Cacheskrivning0,0006 US$ | Cache 5 min.0,0006 US$ | Cache 1 timeGrundsats: — |

Takster i USD pr. 1K tokens. Hvis ingen takst er angivet, overtages grundtaksten for denne metode; «—» betyder, at ingen grundtakst er angivet.

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

#### Detaljer om referencetariffen

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

Modellens referenceplaner

#### Priser efter konfiguration

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

| Konfiguration | Takstplan | Konteksttokens, mere end | Konteksttokens, op til og med | Beløb |
| --- | --- | --- | --- | --- |
| KonfigurationOpenAI Chat · Grundtakster pr. token | TakstplanGrundtakst | Konteksttokens, mere end— | Konteksttokens, op til og medIngen øvre grænse | Beløb Input · Inputtokens **$0.0006** / 1K tokens Output · Outputtokens **$0.0024** / 1K tokens Input · Cachelæsning **$0.00012** / 1K tokens Input · Cacheskrivning **—** / 1K tokens Input · Cacheskrivning, 1 time **—** / 1K tokens |
| KonfigurationOpenAI Chat · Trin 1 efter anmodningens længde | Takstplan— | Konteksttokens, mere end0 | Konteksttokens, op til og medIngen øvre grænse | Beløb Input · Inputtokens **$0.0006** / 1K tokens Output · Outputtokens **$0.0024** / 1K tokens Input · Cachelæsning **$0.00012** / 1K tokens Input · Cacheskrivning **—** / 1K tokens Input · Cacheskrivning, 1 time **—** / 1K tokens |
| KonfigurationAnthropic Messages · Grundtakster pr. token | TakstplanGrundtakst | Konteksttokens, mere end— | Konteksttokens, op til og medIngen øvre grænse | Beløb Input · Inputtokens **$0.0006** / 1K tokens Output · Outputtokens **$0.0024** / 1K tokens Input · Cachelæsning **$0.00012** / 1K tokens Input · Cacheskrivning **—** / 1K tokens Input · Cacheskrivning, 1 time **—** / 1K tokens |
| KonfigurationAnthropic Messages · Trin 1 efter anmodningens længde | Takstplan— | Konteksttokens, mere end0 | Konteksttokens, op til og medIngen øvre grænse | Beløb Input · Inputtokens **$0.0006** / 1K tokens Output · Outputtokens **$0.0024** / 1K tokens Input · Cachelæsning **$0.00012** / 1K tokens Input · Cacheskrivning **—** / 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": "minimax-text-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": "minimax-text-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="minimax-text-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: "minimax-text-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='minimax-text-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> [`MiniMax-M3`](https://ailoot.ai/models/da/#m=minimax%2Fminimax-m3&route=Core&caller=MiniMax-M3&fmt=messages), [`minimax`](https://ailoot.ai/models/da/#m=minimax%2Fminimax-m3&route=Core&caller=minimax&fmt=messages), [`minimax-latest`](https://ailoot.ai/models/da/#m=minimax%2Fminimax-m3&route=Core&caller=minimax-latest&fmt=messages), [`minimax-text`](https://ailoot.ai/models/da/#m=minimax%2Fminimax-m3&route=Core&caller=minimax-text&fmt=messages), [`minimax-text-latest`](https://ailoot.ai/models/da/#m=minimax%2Fminimax-m3&route=Core&caller=minimax-text-latest&fmt=messages), [`minimax/minimax-m3`](https://ailoot.ai/models/da/#m=minimax%2Fminimax-m3&route=Core&caller=minimax%2Fminimax-m3&fmt=messages)
**Ailoot Ultra** [`MiniMax-M3`](https://ailoot.ai/models/da/#m=minimax%2Fminimax-m3&route=Ultra&caller=MiniMax-M3&fmt=messages), [`minimax/minimax-m3`](https://ailoot.ai/models/da/#m=minimax%2Fminimax-m3&route=Ultra&caller=minimax%2Fminimax-m3&fmt=messages)

#### Aliaser for metodestier

`/chat/completions`

#### Relaterede kalder-ID’er

[`minimax/minimax-m3`](https://ailoot.ai/models/da/#m=minimax%2Fminimax-m3&route=Core&caller=minimax%2Fminimax-m3&fmt=messages), [`minimax/minimax-m3`](https://ailoot.ai/models/da/#m=minimax%2Fminimax-m3&route=Ultra&caller=minimax%2Fminimax-m3&fmt=messages), [`minimax`](https://ailoot.ai/models/da/#m=minimax%2Fminimax-m3&route=Core&caller=minimax&fmt=messages), [`minimax-latest`](https://ailoot.ai/models/da/#m=minimax%2Fminimax-m3&route=Core&caller=minimax-latest&fmt=messages), [`minimax-text`](https://ailoot.ai/models/da/#m=minimax%2Fminimax-m3&route=Core&caller=minimax-text&fmt=messages), [`minimax-text-latest`](https://ailoot.ai/models/da/#m=minimax%2Fminimax-m3&route=Core&caller=minimax-text-latest&fmt=messages), [`MiniMax-M3`](https://ailoot.ai/models/da/#m=minimax%2Fminimax-m3&route=Core&caller=MiniMax-M3&fmt=messages), [`MiniMax-M3`](https://ailoot.ai/models/da/#m=minimax%2Fminimax-m3&route=Ultra&caller=MiniMax-M3&fmt=messages)

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

[`minimax-text-latest`](https://ailoot.ai/models/da/#m=minimax%2Fminimax-m3&route=Core&caller=minimax-text-latest&fmt=responses)

MiniMax /`minimax-text-latest`

Model-ID

- `MiniMax-M3`
- `minimax`
- `minimax-latest`
- `minimax-text`
- `minimax-text-latest`
- `minimax/minimax-m3`

### Start

MiniMax M3 er en multimodal model til vedvarende programmering og agentarbejde, som bruger MiniMax Sparse Attention og er udformet til lang kontekst. Dens angivne Ultra-chatgrænseflader modtager tekst og returnerer tekstsvar.

Accepterede input

Tekst · Billeder

Resultater

Tekst

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

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

Inputtyper

`text`, `image`

Outputtyper

`text`

Kontekst

1.000.000 tokens

Maksimalt output

1.000.000 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 minimax-text-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,0003 US$ */ 1K*

Output

0,0012 US$ */ 1K*

Cachelæsning

≈0,00006 US$ */ 1K*

Cacheskrivning

0,0003 US$ */ 1K*

Cacheskrivning, 5 min.

0,0003 US$ */ 1K tokens*

#### Priser efter anmodningens længde · OpenAI Responses

| Anmodningens størrelse, tokens | Input | Output | Cachelæsning | Cacheskrivning | Cache 5 min. | Cache 1 time |
| --- | --- | --- | --- | --- | --- | --- |
| Anmodningens størrelse, tokens(0; 524.288\] | Input0,0003 US$ | Output0,0012 US$ | Cachelæsning≈0,00006 US$ | Cacheskrivning0,0003 US$ | Cache 5 min.0,0003 US$ | Cache 1 timeGrundsats: — |
| Anmodningens størrelse, tokens(524.288; 1.000.000\] | Input0,0006 US$ | Output0,0024 US$ | Cachelæsning≈0,00012 US$ | Cacheskrivning0,0006 US$ | Cache 5 min.0,0006 US$ | Cache 1 timeGrundsats: — |

Takster i USD pr. 1K tokens. Hvis ingen takst er angivet, overtages grundtaksten for denne metode; «—» betyder, at ingen grundtakst er angivet.

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

#### Detaljer om referencetariffen

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

Modellens referenceplaner

#### Priser efter konfiguration

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

| Konfiguration | Takstplan | Konteksttokens, mere end | Konteksttokens, op til og med | Beløb |
| --- | --- | --- | --- | --- |
| KonfigurationOpenAI Chat · Grundtakster pr. token | TakstplanGrundtakst | Konteksttokens, mere end— | Konteksttokens, op til og medIngen øvre grænse | Beløb Input · Inputtokens **$0.0006** / 1K tokens Output · Outputtokens **$0.0024** / 1K tokens Input · Cachelæsning **$0.00012** / 1K tokens Input · Cacheskrivning **—** / 1K tokens Input · Cacheskrivning, 1 time **—** / 1K tokens |
| KonfigurationOpenAI Chat · Trin 1 efter anmodningens længde | Takstplan— | Konteksttokens, mere end0 | Konteksttokens, op til og medIngen øvre grænse | Beløb Input · Inputtokens **$0.0006** / 1K tokens Output · Outputtokens **$0.0024** / 1K tokens Input · Cachelæsning **$0.00012** / 1K tokens Input · Cacheskrivning **—** / 1K tokens Input · Cacheskrivning, 1 time **—** / 1K tokens |
| KonfigurationAnthropic Messages · Grundtakster pr. token | TakstplanGrundtakst | Konteksttokens, mere end— | Konteksttokens, op til og medIngen øvre grænse | Beløb Input · Inputtokens **$0.0006** / 1K tokens Output · Outputtokens **$0.0024** / 1K tokens Input · Cachelæsning **$0.00012** / 1K tokens Input · Cacheskrivning **—** / 1K tokens Input · Cacheskrivning, 1 time **—** / 1K tokens |
| KonfigurationAnthropic Messages · Trin 1 efter anmodningens længde | Takstplan— | Konteksttokens, mere end0 | Konteksttokens, op til og medIngen øvre grænse | Beløb Input · Inputtokens **$0.0006** / 1K tokens Output · Outputtokens **$0.0024** / 1K tokens Input · Cachelæsning **$0.00012** / 1K tokens Input · Cacheskrivning **—** / 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": "minimax-text-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": "minimax-text-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="minimax-text-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: "minimax-text-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="minimax-text-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> [`MiniMax-M3`](https://ailoot.ai/models/da/#m=minimax%2Fminimax-m3&route=Core&caller=MiniMax-M3&fmt=responses), [`minimax`](https://ailoot.ai/models/da/#m=minimax%2Fminimax-m3&route=Core&caller=minimax&fmt=responses), [`minimax-latest`](https://ailoot.ai/models/da/#m=minimax%2Fminimax-m3&route=Core&caller=minimax-latest&fmt=responses), [`minimax-text`](https://ailoot.ai/models/da/#m=minimax%2Fminimax-m3&route=Core&caller=minimax-text&fmt=responses), [`minimax-text-latest`](https://ailoot.ai/models/da/#m=minimax%2Fminimax-m3&route=Core&caller=minimax-text-latest&fmt=responses), [`minimax/minimax-m3`](https://ailoot.ai/models/da/#m=minimax%2Fminimax-m3&route=Core&caller=minimax%2Fminimax-m3&fmt=responses)
**Ailoot Ultra** [`MiniMax-M3`](https://ailoot.ai/models/da/#m=minimax%2Fminimax-m3&route=Ultra&caller=MiniMax-M3), [`minimax/minimax-m3`](https://ailoot.ai/models/da/#m=minimax%2Fminimax-m3&route=Ultra&caller=minimax%2Fminimax-m3)

#### Aliaser for metodestier

`/chat/completions`

#### Relaterede kalder-ID’er

[`minimax/minimax-m3`](https://ailoot.ai/models/da/#m=minimax%2Fminimax-m3&route=Core&caller=minimax%2Fminimax-m3&fmt=responses), [`minimax/minimax-m3`](https://ailoot.ai/models/da/#m=minimax%2Fminimax-m3&route=Ultra&caller=minimax%2Fminimax-m3), [`minimax`](https://ailoot.ai/models/da/#m=minimax%2Fminimax-m3&route=Core&caller=minimax&fmt=responses), [`minimax-latest`](https://ailoot.ai/models/da/#m=minimax%2Fminimax-m3&route=Core&caller=minimax-latest&fmt=responses), [`minimax-text`](https://ailoot.ai/models/da/#m=minimax%2Fminimax-m3&route=Core&caller=minimax-text&fmt=responses), [`minimax-text-latest`](https://ailoot.ai/models/da/#m=minimax%2Fminimax-m3&route=Core&caller=minimax-text-latest&fmt=responses), [`MiniMax-M3`](https://ailoot.ai/models/da/#m=minimax%2Fminimax-m3&route=Core&caller=MiniMax-M3&fmt=responses), [`MiniMax-M3`](https://ailoot.ai/models/da/#m=minimax%2Fminimax-m3&route=Ultra&caller=MiniMax-M3)

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

[`minimax-text-latest`](https://ailoot.ai/models/da/#m=minimax%2Fminimax-m3&route=Core&caller=minimax-text-latest&fmt=chat)

MiniMax /`minimax-text-latest`

Model-ID

- `MiniMax-M3`
- `minimax`
- `minimax-latest`
- `minimax-text`
- `minimax-text-latest`
- `minimax/minimax-m3`

### Start

MiniMax M3 er en multimodal model til vedvarende programmering og agentarbejde, som bruger MiniMax Sparse Attention og er udformet til lang kontekst. Dens angivne Ultra-chatgrænseflader modtager tekst og returnerer tekstsvar.

Accepterede input

Tekst · Billeder

Resultater

Tekst

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

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

Inputtyper

`text`, `image`

Outputtyper

`text`

Kontekst

1.000.000 tokens

Maksimalt output

524.288 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 minimax-text-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,0003 US$ */ 1K*

Output

0,0012 US$ */ 1K*

Cachelæsning

≈0,00006 US$ */ 1K*

Cacheskrivning

0,0003 US$ */ 1K*

Cacheskrivning, 5 min.

0,0003 US$ */ 1K tokens*

#### Priser efter anmodningens længde · OpenAI Chat

| Anmodningens størrelse, tokens | Input | Output | Cachelæsning | Cacheskrivning | Cache 5 min. | Cache 1 time |
| --- | --- | --- | --- | --- | --- | --- |
| Anmodningens størrelse, tokens(0; 524.288\] | Input0,0003 US$ | Output0,0012 US$ | Cachelæsning≈0,00006 US$ | Cacheskrivning0,0003 US$ | Cache 5 min.0,0003 US$ | Cache 1 timeGrundsats: — |
| Anmodningens størrelse, tokens(524.288; 1.000.000\] | Input0,0006 US$ | Output0,0024 US$ | Cachelæsning≈0,00012 US$ | Cacheskrivning0,0006 US$ | Cache 5 min.0,0006 US$ | Cache 1 timeGrundsats: — |

Takster i USD pr. 1K tokens. Hvis ingen takst er angivet, overtages grundtaksten for denne metode; «—» betyder, at ingen grundtakst er angivet.

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

#### Detaljer om referencetariffen

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

Modellens referenceplaner

#### Priser efter konfiguration

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

| Konfiguration | Takstplan | Konteksttokens, mere end | Konteksttokens, op til og med | Beløb |
| --- | --- | --- | --- | --- |
| KonfigurationOpenAI Chat · Grundtakster pr. token | TakstplanGrundtakst | Konteksttokens, mere end— | Konteksttokens, op til og medIngen øvre grænse | Beløb Input · Inputtokens **$0.0006** / 1K tokens Output · Outputtokens **$0.0024** / 1K tokens Input · Cachelæsning **$0.00012** / 1K tokens Input · Cacheskrivning **—** / 1K tokens Input · Cacheskrivning, 1 time **—** / 1K tokens |
| KonfigurationOpenAI Chat · Trin 1 efter anmodningens længde | Takstplan— | Konteksttokens, mere end0 | Konteksttokens, op til og medIngen øvre grænse | Beløb Input · Inputtokens **$0.0006** / 1K tokens Output · Outputtokens **$0.0024** / 1K tokens Input · Cachelæsning **$0.00012** / 1K tokens Input · Cacheskrivning **—** / 1K tokens Input · Cacheskrivning, 1 time **—** / 1K tokens |
| KonfigurationAnthropic Messages · Grundtakster pr. token | TakstplanGrundtakst | Konteksttokens, mere end— | Konteksttokens, op til og medIngen øvre grænse | Beløb Input · Inputtokens **$0.0006** / 1K tokens Output · Outputtokens **$0.0024** / 1K tokens Input · Cachelæsning **$0.00012** / 1K tokens Input · Cacheskrivning **—** / 1K tokens Input · Cacheskrivning, 1 time **—** / 1K tokens |
| KonfigurationAnthropic Messages · Trin 1 efter anmodningens længde | Takstplan— | Konteksttokens, mere end0 | Konteksttokens, op til og medIngen øvre grænse | Beløb Input · Inputtokens **$0.0006** / 1K tokens Output · Outputtokens **$0.0024** / 1K tokens Input · Cachelæsning **$0.00012** / 1K tokens Input · Cacheskrivning **—** / 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": "minimax-text-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": "minimax-text-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="minimax-text-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: "minimax-text-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='minimax-text-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> [`MiniMax-M3`](https://ailoot.ai/models/da/#m=minimax%2Fminimax-m3&route=Core&caller=MiniMax-M3&fmt=chat), [`minimax`](https://ailoot.ai/models/da/#m=minimax%2Fminimax-m3&route=Core&caller=minimax&fmt=chat), [`minimax-latest`](https://ailoot.ai/models/da/#m=minimax%2Fminimax-m3&route=Core&caller=minimax-latest&fmt=chat), [`minimax-text`](https://ailoot.ai/models/da/#m=minimax%2Fminimax-m3&route=Core&caller=minimax-text&fmt=chat), [`minimax-text-latest`](https://ailoot.ai/models/da/#m=minimax%2Fminimax-m3&route=Core&caller=minimax-text-latest&fmt=chat), [`minimax/minimax-m3`](https://ailoot.ai/models/da/#m=minimax%2Fminimax-m3&route=Core&caller=minimax%2Fminimax-m3&fmt=chat)
**Ailoot Ultra** [`MiniMax-M3`](https://ailoot.ai/models/da/#m=minimax%2Fminimax-m3&route=Ultra&caller=MiniMax-M3&fmt=chat), [`minimax/minimax-m3`](https://ailoot.ai/models/da/#m=minimax%2Fminimax-m3&route=Ultra&caller=minimax%2Fminimax-m3&fmt=chat)

#### Aliaser for metodestier

`/chat/completions`

#### Relaterede kalder-ID’er

[`minimax/minimax-m3`](https://ailoot.ai/models/da/#m=minimax%2Fminimax-m3&route=Core&caller=minimax%2Fminimax-m3&fmt=chat), [`minimax/minimax-m3`](https://ailoot.ai/models/da/#m=minimax%2Fminimax-m3&route=Ultra&caller=minimax%2Fminimax-m3&fmt=chat), [`minimax`](https://ailoot.ai/models/da/#m=minimax%2Fminimax-m3&route=Core&caller=minimax&fmt=chat), [`minimax-latest`](https://ailoot.ai/models/da/#m=minimax%2Fminimax-m3&route=Core&caller=minimax-latest&fmt=chat), [`minimax-text`](https://ailoot.ai/models/da/#m=minimax%2Fminimax-m3&route=Core&caller=minimax-text&fmt=chat), [`minimax-text-latest`](https://ailoot.ai/models/da/#m=minimax%2Fminimax-m3&route=Core&caller=minimax-text-latest&fmt=chat), [`MiniMax-M3`](https://ailoot.ai/models/da/#m=minimax%2Fminimax-m3&route=Core&caller=MiniMax-M3&fmt=chat), [`MiniMax-M3`](https://ailoot.ai/models/da/#m=minimax%2Fminimax-m3&route=Ultra&caller=MiniMax-M3&fmt=chat)

**Ailoot · Anthropic Messages** `POST /v1/messages` `minimax/minimax-m3`

[`minimax/minimax-m3`](https://ailoot.ai/models/da/#m=minimax%2Fminimax-m3&route=Core&caller=minimax%2Fminimax-m3&fmt=messages)

MiniMax /`minimax/minimax-m3`

Model-ID

- `MiniMax-M3`
- `minimax`
- `minimax-latest`
- `minimax-text`
- `minimax-text-latest`
- `minimax/minimax-m3`

### Start

MiniMax M3 er en multimodal model til vedvarende programmering og agentarbejde, som bruger MiniMax Sparse Attention og er udformet til lang kontekst. Dens angivne Ultra-chatgrænseflader modtager tekst og returnerer tekstsvar.

Accepterede input

Tekst · Billeder

Resultater

Tekst

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

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

Inputtyper

`text`, `image`

Outputtyper

`text`

Kontekst

1.000.000 tokens

Maksimalt output

524.288 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 minimax/minimax-m3 | 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,0003 US$ */ 1K*

Output

0,0012 US$ */ 1K*

Cachelæsning

≈0,00006 US$ */ 1K*

Cacheskrivning

0,0003 US$ */ 1K*

Cacheskrivning, 5 min.

0,0003 US$ */ 1K tokens*

#### Priser efter anmodningens længde · Anthropic Messages

| Anmodningens størrelse, tokens | Input | Output | Cachelæsning | Cacheskrivning | Cache 5 min. | Cache 1 time |
| --- | --- | --- | --- | --- | --- | --- |
| Anmodningens størrelse, tokens(0; 524.288\] | Input0,0003 US$ | Output0,0012 US$ | Cachelæsning≈0,00006 US$ | Cacheskrivning0,0003 US$ | Cache 5 min.0,0003 US$ | Cache 1 timeGrundsats: — |
| Anmodningens størrelse, tokens(524.288; 1.000.000\] | Input0,0006 US$ | Output0,0024 US$ | Cachelæsning≈0,00012 US$ | Cacheskrivning0,0006 US$ | Cache 5 min.0,0006 US$ | Cache 1 timeGrundsats: — |

Takster i USD pr. 1K tokens. Hvis ingen takst er angivet, overtages grundtaksten for denne metode; «—» betyder, at ingen grundtakst er angivet.

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

#### Detaljer om referencetariffen

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

Modellens referenceplaner

#### Priser efter konfiguration

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

| Konfiguration | Takstplan | Konteksttokens, mere end | Konteksttokens, op til og med | Beløb |
| --- | --- | --- | --- | --- |
| KonfigurationOpenAI Chat · Grundtakster pr. token | TakstplanGrundtakst | Konteksttokens, mere end— | Konteksttokens, op til og medIngen øvre grænse | Beløb Input · Inputtokens **$0.0006** / 1K tokens Output · Outputtokens **$0.0024** / 1K tokens Input · Cachelæsning **$0.00012** / 1K tokens Input · Cacheskrivning **—** / 1K tokens Input · Cacheskrivning, 1 time **—** / 1K tokens |
| KonfigurationOpenAI Chat · Trin 1 efter anmodningens længde | Takstplan— | Konteksttokens, mere end0 | Konteksttokens, op til og medIngen øvre grænse | Beløb Input · Inputtokens **$0.0006** / 1K tokens Output · Outputtokens **$0.0024** / 1K tokens Input · Cachelæsning **$0.00012** / 1K tokens Input · Cacheskrivning **—** / 1K tokens Input · Cacheskrivning, 1 time **—** / 1K tokens |
| KonfigurationAnthropic Messages · Grundtakster pr. token | TakstplanGrundtakst | Konteksttokens, mere end— | Konteksttokens, op til og medIngen øvre grænse | Beløb Input · Inputtokens **$0.0006** / 1K tokens Output · Outputtokens **$0.0024** / 1K tokens Input · Cachelæsning **$0.00012** / 1K tokens Input · Cacheskrivning **—** / 1K tokens Input · Cacheskrivning, 1 time **—** / 1K tokens |
| KonfigurationAnthropic Messages · Trin 1 efter anmodningens længde | Takstplan— | Konteksttokens, mere end0 | Konteksttokens, op til og medIngen øvre grænse | Beløb Input · Inputtokens **$0.0006** / 1K tokens Output · Outputtokens **$0.0024** / 1K tokens Input · Cachelæsning **$0.00012** / 1K tokens Input · Cacheskrivning **—** / 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": "minimax/minimax-m3", "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": "minimax/minimax-m3", "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="minimax/minimax-m3",
    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: "minimax/minimax-m3",
  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='minimax/minimax-m3',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> [`MiniMax-M3`](https://ailoot.ai/models/da/#m=minimax%2Fminimax-m3&route=Core&caller=MiniMax-M3&fmt=messages), [`minimax`](https://ailoot.ai/models/da/#m=minimax%2Fminimax-m3&route=Core&caller=minimax&fmt=messages), [`minimax-latest`](https://ailoot.ai/models/da/#m=minimax%2Fminimax-m3&route=Core&caller=minimax-latest&fmt=messages), [`minimax-text`](https://ailoot.ai/models/da/#m=minimax%2Fminimax-m3&route=Core&caller=minimax-text&fmt=messages), [`minimax-text-latest`](https://ailoot.ai/models/da/#m=minimax%2Fminimax-m3&route=Core&caller=minimax-text-latest&fmt=messages), [`minimax/minimax-m3`](https://ailoot.ai/models/da/#m=minimax%2Fminimax-m3&route=Core&caller=minimax%2Fminimax-m3&fmt=messages)
**Ailoot Ultra** [`MiniMax-M3`](https://ailoot.ai/models/da/#m=minimax%2Fminimax-m3&route=Ultra&caller=MiniMax-M3&fmt=messages), [`minimax/minimax-m3`](https://ailoot.ai/models/da/#m=minimax%2Fminimax-m3&route=Ultra&caller=minimax%2Fminimax-m3&fmt=messages)

#### Aliaser for metodestier

`/chat/completions`

#### Relaterede kalder-ID’er

[`minimax/minimax-m3`](https://ailoot.ai/models/da/#m=minimax%2Fminimax-m3&route=Core&caller=minimax%2Fminimax-m3&fmt=messages), [`minimax/minimax-m3`](https://ailoot.ai/models/da/#m=minimax%2Fminimax-m3&route=Ultra&caller=minimax%2Fminimax-m3&fmt=messages), [`minimax`](https://ailoot.ai/models/da/#m=minimax%2Fminimax-m3&route=Core&caller=minimax&fmt=messages), [`minimax-latest`](https://ailoot.ai/models/da/#m=minimax%2Fminimax-m3&route=Core&caller=minimax-latest&fmt=messages), [`minimax-text`](https://ailoot.ai/models/da/#m=minimax%2Fminimax-m3&route=Core&caller=minimax-text&fmt=messages), [`minimax-text-latest`](https://ailoot.ai/models/da/#m=minimax%2Fminimax-m3&route=Core&caller=minimax-text-latest&fmt=messages), [`MiniMax-M3`](https://ailoot.ai/models/da/#m=minimax%2Fminimax-m3&route=Core&caller=MiniMax-M3&fmt=messages), [`MiniMax-M3`](https://ailoot.ai/models/da/#m=minimax%2Fminimax-m3&route=Ultra&caller=MiniMax-M3&fmt=messages)

**Ailoot · OpenAI Responses** `POST /v1/responses` `minimax/minimax-m3`

[`minimax/minimax-m3`](https://ailoot.ai/models/da/#m=minimax%2Fminimax-m3&route=Core&caller=minimax%2Fminimax-m3&fmt=responses)

MiniMax /`minimax/minimax-m3`

Model-ID

- `MiniMax-M3`
- `minimax`
- `minimax-latest`
- `minimax-text`
- `minimax-text-latest`
- `minimax/minimax-m3`

### Start

MiniMax M3 er en multimodal model til vedvarende programmering og agentarbejde, som bruger MiniMax Sparse Attention og er udformet til lang kontekst. Dens angivne Ultra-chatgrænseflader modtager tekst og returnerer tekstsvar.

Accepterede input

Tekst · Billeder

Resultater

Tekst

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

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

Inputtyper

`text`, `image`

Outputtyper

`text`

Kontekst

1.000.000 tokens

Maksimalt output

1.000.000 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 minimax/minimax-m3 | 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,0003 US$ */ 1K*

Output

0,0012 US$ */ 1K*

Cachelæsning

≈0,00006 US$ */ 1K*

Cacheskrivning

0,0003 US$ */ 1K*

Cacheskrivning, 5 min.

0,0003 US$ */ 1K tokens*

#### Priser efter anmodningens længde · OpenAI Responses

| Anmodningens størrelse, tokens | Input | Output | Cachelæsning | Cacheskrivning | Cache 5 min. | Cache 1 time |
| --- | --- | --- | --- | --- | --- | --- |
| Anmodningens størrelse, tokens(0; 524.288\] | Input0,0003 US$ | Output0,0012 US$ | Cachelæsning≈0,00006 US$ | Cacheskrivning0,0003 US$ | Cache 5 min.0,0003 US$ | Cache 1 timeGrundsats: — |
| Anmodningens størrelse, tokens(524.288; 1.000.000\] | Input0,0006 US$ | Output0,0024 US$ | Cachelæsning≈0,00012 US$ | Cacheskrivning0,0006 US$ | Cache 5 min.0,0006 US$ | Cache 1 timeGrundsats: — |

Takster i USD pr. 1K tokens. Hvis ingen takst er angivet, overtages grundtaksten for denne metode; «—» betyder, at ingen grundtakst er angivet.

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

#### Detaljer om referencetariffen

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

Modellens referenceplaner

#### Priser efter konfiguration

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

| Konfiguration | Takstplan | Konteksttokens, mere end | Konteksttokens, op til og med | Beløb |
| --- | --- | --- | --- | --- |
| KonfigurationOpenAI Chat · Grundtakster pr. token | TakstplanGrundtakst | Konteksttokens, mere end— | Konteksttokens, op til og medIngen øvre grænse | Beløb Input · Inputtokens **$0.0006** / 1K tokens Output · Outputtokens **$0.0024** / 1K tokens Input · Cachelæsning **$0.00012** / 1K tokens Input · Cacheskrivning **—** / 1K tokens Input · Cacheskrivning, 1 time **—** / 1K tokens |
| KonfigurationOpenAI Chat · Trin 1 efter anmodningens længde | Takstplan— | Konteksttokens, mere end0 | Konteksttokens, op til og medIngen øvre grænse | Beløb Input · Inputtokens **$0.0006** / 1K tokens Output · Outputtokens **$0.0024** / 1K tokens Input · Cachelæsning **$0.00012** / 1K tokens Input · Cacheskrivning **—** / 1K tokens Input · Cacheskrivning, 1 time **—** / 1K tokens |
| KonfigurationAnthropic Messages · Grundtakster pr. token | TakstplanGrundtakst | Konteksttokens, mere end— | Konteksttokens, op til og medIngen øvre grænse | Beløb Input · Inputtokens **$0.0006** / 1K tokens Output · Outputtokens **$0.0024** / 1K tokens Input · Cachelæsning **$0.00012** / 1K tokens Input · Cacheskrivning **—** / 1K tokens Input · Cacheskrivning, 1 time **—** / 1K tokens |
| KonfigurationAnthropic Messages · Trin 1 efter anmodningens længde | Takstplan— | Konteksttokens, mere end0 | Konteksttokens, op til og medIngen øvre grænse | Beløb Input · Inputtokens **$0.0006** / 1K tokens Output · Outputtokens **$0.0024** / 1K tokens Input · Cachelæsning **$0.00012** / 1K tokens Input · Cacheskrivning **—** / 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": "minimax/minimax-m3", "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": "minimax/minimax-m3", "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="minimax/minimax-m3", 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: "minimax/minimax-m3", 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="minimax/minimax-m3", 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> [`MiniMax-M3`](https://ailoot.ai/models/da/#m=minimax%2Fminimax-m3&route=Core&caller=MiniMax-M3&fmt=responses), [`minimax`](https://ailoot.ai/models/da/#m=minimax%2Fminimax-m3&route=Core&caller=minimax&fmt=responses), [`minimax-latest`](https://ailoot.ai/models/da/#m=minimax%2Fminimax-m3&route=Core&caller=minimax-latest&fmt=responses), [`minimax-text`](https://ailoot.ai/models/da/#m=minimax%2Fminimax-m3&route=Core&caller=minimax-text&fmt=responses), [`minimax-text-latest`](https://ailoot.ai/models/da/#m=minimax%2Fminimax-m3&route=Core&caller=minimax-text-latest&fmt=responses), [`minimax/minimax-m3`](https://ailoot.ai/models/da/#m=minimax%2Fminimax-m3&route=Core&caller=minimax%2Fminimax-m3&fmt=responses)
**Ailoot Ultra** [`MiniMax-M3`](https://ailoot.ai/models/da/#m=minimax%2Fminimax-m3&route=Ultra&caller=MiniMax-M3), [`minimax/minimax-m3`](https://ailoot.ai/models/da/#m=minimax%2Fminimax-m3&route=Ultra&caller=minimax%2Fminimax-m3)

#### Aliaser for metodestier

`/chat/completions`

#### Relaterede kalder-ID’er

[`minimax/minimax-m3`](https://ailoot.ai/models/da/#m=minimax%2Fminimax-m3&route=Core&caller=minimax%2Fminimax-m3&fmt=responses), [`minimax/minimax-m3`](https://ailoot.ai/models/da/#m=minimax%2Fminimax-m3&route=Ultra&caller=minimax%2Fminimax-m3), [`minimax`](https://ailoot.ai/models/da/#m=minimax%2Fminimax-m3&route=Core&caller=minimax&fmt=responses), [`minimax-latest`](https://ailoot.ai/models/da/#m=minimax%2Fminimax-m3&route=Core&caller=minimax-latest&fmt=responses), [`minimax-text`](https://ailoot.ai/models/da/#m=minimax%2Fminimax-m3&route=Core&caller=minimax-text&fmt=responses), [`minimax-text-latest`](https://ailoot.ai/models/da/#m=minimax%2Fminimax-m3&route=Core&caller=minimax-text-latest&fmt=responses), [`MiniMax-M3`](https://ailoot.ai/models/da/#m=minimax%2Fminimax-m3&route=Core&caller=MiniMax-M3&fmt=responses), [`MiniMax-M3`](https://ailoot.ai/models/da/#m=minimax%2Fminimax-m3&route=Ultra&caller=MiniMax-M3)

**Ailoot · OpenAI Chat** `POST /v1/chat/completions` `minimax/minimax-m3`

[`minimax/minimax-m3`](https://ailoot.ai/models/da/#m=minimax%2Fminimax-m3&route=Core&caller=minimax%2Fminimax-m3&fmt=chat)

MiniMax /`minimax/minimax-m3`

Model-ID

- `MiniMax-M3`
- `minimax`
- `minimax-latest`
- `minimax-text`
- `minimax-text-latest`
- `minimax/minimax-m3`

### Start

MiniMax M3 er en multimodal model til vedvarende programmering og agentarbejde, som bruger MiniMax Sparse Attention og er udformet til lang kontekst. Dens angivne Ultra-chatgrænseflader modtager tekst og returnerer tekstsvar.

Accepterede input

Tekst · Billeder

Resultater

Tekst

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

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

Inputtyper

`text`, `image`

Outputtyper

`text`

Kontekst

1.000.000 tokens

Maksimalt output

524.288 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 minimax/minimax-m3 | 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,0003 US$ */ 1K*

Output

0,0012 US$ */ 1K*

Cachelæsning

≈0,00006 US$ */ 1K*

Cacheskrivning

0,0003 US$ */ 1K*

Cacheskrivning, 5 min.

0,0003 US$ */ 1K tokens*

#### Priser efter anmodningens længde · OpenAI Chat

| Anmodningens størrelse, tokens | Input | Output | Cachelæsning | Cacheskrivning | Cache 5 min. | Cache 1 time |
| --- | --- | --- | --- | --- | --- | --- |
| Anmodningens størrelse, tokens(0; 524.288\] | Input0,0003 US$ | Output0,0012 US$ | Cachelæsning≈0,00006 US$ | Cacheskrivning0,0003 US$ | Cache 5 min.0,0003 US$ | Cache 1 timeGrundsats: — |
| Anmodningens størrelse, tokens(524.288; 1.000.000\] | Input0,0006 US$ | Output0,0024 US$ | Cachelæsning≈0,00012 US$ | Cacheskrivning0,0006 US$ | Cache 5 min.0,0006 US$ | Cache 1 timeGrundsats: — |

Takster i USD pr. 1K tokens. Hvis ingen takst er angivet, overtages grundtaksten for denne metode; «—» betyder, at ingen grundtakst er angivet.

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

#### Detaljer om referencetariffen

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

Modellens referenceplaner

#### Priser efter konfiguration

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

| Konfiguration | Takstplan | Konteksttokens, mere end | Konteksttokens, op til og med | Beløb |
| --- | --- | --- | --- | --- |
| KonfigurationOpenAI Chat · Grundtakster pr. token | TakstplanGrundtakst | Konteksttokens, mere end— | Konteksttokens, op til og medIngen øvre grænse | Beløb Input · Inputtokens **$0.0006** / 1K tokens Output · Outputtokens **$0.0024** / 1K tokens Input · Cachelæsning **$0.00012** / 1K tokens Input · Cacheskrivning **—** / 1K tokens Input · Cacheskrivning, 1 time **—** / 1K tokens |
| KonfigurationOpenAI Chat · Trin 1 efter anmodningens længde | Takstplan— | Konteksttokens, mere end0 | Konteksttokens, op til og medIngen øvre grænse | Beløb Input · Inputtokens **$0.0006** / 1K tokens Output · Outputtokens **$0.0024** / 1K tokens Input · Cachelæsning **$0.00012** / 1K tokens Input · Cacheskrivning **—** / 1K tokens Input · Cacheskrivning, 1 time **—** / 1K tokens |
| KonfigurationAnthropic Messages · Grundtakster pr. token | TakstplanGrundtakst | Konteksttokens, mere end— | Konteksttokens, op til og medIngen øvre grænse | Beløb Input · Inputtokens **$0.0006** / 1K tokens Output · Outputtokens **$0.0024** / 1K tokens Input · Cachelæsning **$0.00012** / 1K tokens Input · Cacheskrivning **—** / 1K tokens Input · Cacheskrivning, 1 time **—** / 1K tokens |
| KonfigurationAnthropic Messages · Trin 1 efter anmodningens længde | Takstplan— | Konteksttokens, mere end0 | Konteksttokens, op til og medIngen øvre grænse | Beløb Input · Inputtokens **$0.0006** / 1K tokens Output · Outputtokens **$0.0024** / 1K tokens Input · Cachelæsning **$0.00012** / 1K tokens Input · Cacheskrivning **—** / 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": "minimax/minimax-m3", "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": "minimax/minimax-m3", "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="minimax/minimax-m3",
    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: "minimax/minimax-m3",
  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='minimax/minimax-m3',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> [`MiniMax-M3`](https://ailoot.ai/models/da/#m=minimax%2Fminimax-m3&route=Core&caller=MiniMax-M3&fmt=chat), [`minimax`](https://ailoot.ai/models/da/#m=minimax%2Fminimax-m3&route=Core&caller=minimax&fmt=chat), [`minimax-latest`](https://ailoot.ai/models/da/#m=minimax%2Fminimax-m3&route=Core&caller=minimax-latest&fmt=chat), [`minimax-text`](https://ailoot.ai/models/da/#m=minimax%2Fminimax-m3&route=Core&caller=minimax-text&fmt=chat), [`minimax-text-latest`](https://ailoot.ai/models/da/#m=minimax%2Fminimax-m3&route=Core&caller=minimax-text-latest&fmt=chat), [`minimax/minimax-m3`](https://ailoot.ai/models/da/#m=minimax%2Fminimax-m3&route=Core&caller=minimax%2Fminimax-m3&fmt=chat)
**Ailoot Ultra** [`MiniMax-M3`](https://ailoot.ai/models/da/#m=minimax%2Fminimax-m3&route=Ultra&caller=MiniMax-M3&fmt=chat), [`minimax/minimax-m3`](https://ailoot.ai/models/da/#m=minimax%2Fminimax-m3&route=Ultra&caller=minimax%2Fminimax-m3&fmt=chat)

#### Aliaser for metodestier

`/chat/completions`

#### Relaterede kalder-ID’er

[`minimax/minimax-m3`](https://ailoot.ai/models/da/#m=minimax%2Fminimax-m3&route=Core&caller=minimax%2Fminimax-m3&fmt=chat), [`minimax/minimax-m3`](https://ailoot.ai/models/da/#m=minimax%2Fminimax-m3&route=Ultra&caller=minimax%2Fminimax-m3&fmt=chat), [`minimax`](https://ailoot.ai/models/da/#m=minimax%2Fminimax-m3&route=Core&caller=minimax&fmt=chat), [`minimax-latest`](https://ailoot.ai/models/da/#m=minimax%2Fminimax-m3&route=Core&caller=minimax-latest&fmt=chat), [`minimax-text`](https://ailoot.ai/models/da/#m=minimax%2Fminimax-m3&route=Core&caller=minimax-text&fmt=chat), [`minimax-text-latest`](https://ailoot.ai/models/da/#m=minimax%2Fminimax-m3&route=Core&caller=minimax-text-latest&fmt=chat), [`MiniMax-M3`](https://ailoot.ai/models/da/#m=minimax%2Fminimax-m3&route=Core&caller=MiniMax-M3&fmt=chat), [`MiniMax-M3`](https://ailoot.ai/models/da/#m=minimax%2Fminimax-m3&route=Ultra&caller=MiniMax-M3&fmt=chat)

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

[`minimax/minimax-m3`](https://ailoot.ai/models/da/#m=minimax%2Fminimax-m3&route=Ultra&caller=minimax%2Fminimax-m3&fmt=chat)

MiniMax /`minimax/minimax-m3`

Model-ID

- `MiniMax-M3`
- `minimax/minimax-m3`

### Start

MiniMax M3 er en multimodal model til vedvarende programmering og agentarbejde, som bruger MiniMax Sparse Attention og er udformet til lang kontekst. Dens angivne Ultra-chatgrænseflader modtager tekst og returnerer tekstsvar.

Accepterede input

Tekst

Resultater

Tekst

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

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

Inputtyper

`text`

Outputtyper

`text`

Outputformat

json eller SSE

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

Kombinationer af inputmaterialer

**Tekst** · UTF8-tekst

`messages[].content`

Metodeparametre og livscyklus

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

Livscyklus: `synchronous_or_streamed`

Send det præcise model-ID med messages.

Kontekstlængde er ikke et outputloft.

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

### Priser

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

Hurtig tilstand

Standardpris Når hurtig tilstand er valgt

flex-tilstand

Standardpris Når flex-tilstanden er valgt

Maksimal ræsonneringsindsats

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

#### Ailoot-takster

#### Priser efter konfiguration

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

| Konfiguration | Takstplan | Konteksttokens, mere end | Konteksttokens, op til og med | Beløb |
| --- | --- | --- | --- | --- |
| KonfigurationGrundtakster for tokens | TakstplanGrundtakst | Konteksttokens, mere end— | Konteksttokens, op til og medIngen øvre grænse | Beløb Input · Inputtokens **$0.0006** / 1K tokens Output · Outputtokens **$0.0024** / 1K tokens Input · Cachelæsning **$0.00012** / 1K tokens Input · Cacheskrivning **—** / 1K tokens Input · Cacheskrivning, 1 time **—** / 1K tokens |
| KonfigurationAnmodningslængde · niveau 1 | Takstplan— | Konteksttokens, mere end0 | Konteksttokens, op til og medIngen øvre grænse | Beløb Input · Inputtokens **$0.0006** / 1K tokens Output · Outputtokens **$0.0024** / 1K tokens Input · Cachelæsning **$0.00012** / 1K tokens Input · Cacheskrivning **—** / 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": "minimax/minimax-m3", "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='minimax/minimax-m3',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='minimax/minimax-m3',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> [`MiniMax-M3`](https://ailoot.ai/models/da/#m=minimax%2Fminimax-m3&route=Core&caller=MiniMax-M3&fmt=chat), [`minimax`](https://ailoot.ai/models/da/#m=minimax%2Fminimax-m3&route=Core&caller=minimax&fmt=chat), [`minimax-latest`](https://ailoot.ai/models/da/#m=minimax%2Fminimax-m3&route=Core&caller=minimax-latest&fmt=chat), [`minimax-text`](https://ailoot.ai/models/da/#m=minimax%2Fminimax-m3&route=Core&caller=minimax-text&fmt=chat), [`minimax-text-latest`](https://ailoot.ai/models/da/#m=minimax%2Fminimax-m3&route=Core&caller=minimax-text-latest&fmt=chat), [`minimax/minimax-m3`](https://ailoot.ai/models/da/#m=minimax%2Fminimax-m3&route=Core&caller=minimax%2Fminimax-m3&fmt=chat)
**Ailoot Ultra** [`MiniMax-M3`](https://ailoot.ai/models/da/#m=minimax%2Fminimax-m3&route=Ultra&caller=MiniMax-M3&fmt=chat), [`minimax/minimax-m3`](https://ailoot.ai/models/da/#m=minimax%2Fminimax-m3&route=Ultra&caller=minimax%2Fminimax-m3&fmt=chat)

#### Aliaser for metodestier

`/chat/completions`

#### Relaterede kalder-ID’er

[`minimax/minimax-m3`](https://ailoot.ai/models/da/#m=minimax%2Fminimax-m3&route=Core&caller=minimax%2Fminimax-m3&fmt=chat), [`minimax/minimax-m3`](https://ailoot.ai/models/da/#m=minimax%2Fminimax-m3&route=Ultra&caller=minimax%2Fminimax-m3&fmt=chat), [`minimax`](https://ailoot.ai/models/da/#m=minimax%2Fminimax-m3&route=Core&caller=minimax&fmt=chat), [`minimax-latest`](https://ailoot.ai/models/da/#m=minimax%2Fminimax-m3&route=Core&caller=minimax-latest&fmt=chat), [`minimax-text`](https://ailoot.ai/models/da/#m=minimax%2Fminimax-m3&route=Core&caller=minimax-text&fmt=chat), [`minimax-text-latest`](https://ailoot.ai/models/da/#m=minimax%2Fminimax-m3&route=Core&caller=minimax-text-latest&fmt=chat), [`MiniMax-M3`](https://ailoot.ai/models/da/#m=minimax%2Fminimax-m3&route=Core&caller=MiniMax-M3&fmt=chat), [`MiniMax-M3`](https://ailoot.ai/models/da/#m=minimax%2Fminimax-m3&route=Ultra&caller=MiniMax-M3&fmt=chat)

**Ailoot Ultra · Anthropic Messages** `POST /v1/messages` `minimax/minimax-m3`

[`minimax/minimax-m3`](https://ailoot.ai/models/da/#m=minimax%2Fminimax-m3&route=Ultra&caller=minimax%2Fminimax-m3&fmt=messages)

MiniMax /`minimax/minimax-m3`

Model-ID

- `MiniMax-M3`
- `minimax/minimax-m3`

### Start

MiniMax M3 er en multimodal model til vedvarende programmering og agentarbejde, som bruger MiniMax Sparse Attention og er udformet til lang kontekst. Dens angivne Ultra-chatgrænseflader modtager tekst og returnerer tekstsvar.

Accepterede input

Tekst

Resultater

json · sse

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

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

Inputtyper

`text`

Outputtyper

`json`, `sse`

Outputformat

JSON eller SSE

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

Kombinationer af inputmaterialer

**Tekst** · UTF-8-tekst

`messages[].content som streng`

Metodeparametre og livscyklus

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

Livscyklus: `synchronous_or_streamed`

### Priser

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

Hurtig tilstand

Standardpris Når hurtig tilstand er valgt

flex-tilstand

Standardpris Når flex-tilstanden er valgt

Maksimal ræsonneringsindsats

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

#### Ailoot-takster

#### Priser efter konfiguration

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

| Konfiguration | Takstplan | Konteksttokens, mere end | Konteksttokens, op til og med | Beløb |
| --- | --- | --- | --- | --- |
| KonfigurationGrundtakster for tokens | TakstplanGrundtakst | Konteksttokens, mere end— | Konteksttokens, op til og medIngen øvre grænse | Beløb Input · Inputtokens **$0.0006** / 1K tokens Output · Outputtokens **$0.0024** / 1K tokens Input · Cachelæsning **$0.00012** / 1K tokens Input · Cacheskrivning **—** / 1K tokens Input · Cacheskrivning, 1 time **—** / 1K tokens |
| KonfigurationAnmodningslængde · niveau 1 | Takstplan— | Konteksttokens, mere end0 | Konteksttokens, op til og medIngen øvre grænse | Beløb Input · Inputtokens **$0.0006** / 1K tokens Output · Outputtokens **$0.0024** / 1K tokens Input · Cachelæsning **$0.00012** / 1K tokens Input · Cacheskrivning **—** / 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": "minimax/minimax-m3",
  "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': 'minimax/minimax-m3', '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': 'minimax/minimax-m3', '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> [`MiniMax-M3`](https://ailoot.ai/models/da/#m=minimax%2Fminimax-m3&route=Core&caller=MiniMax-M3&fmt=messages), [`minimax`](https://ailoot.ai/models/da/#m=minimax%2Fminimax-m3&route=Core&caller=minimax&fmt=messages), [`minimax-latest`](https://ailoot.ai/models/da/#m=minimax%2Fminimax-m3&route=Core&caller=minimax-latest&fmt=messages), [`minimax-text`](https://ailoot.ai/models/da/#m=minimax%2Fminimax-m3&route=Core&caller=minimax-text&fmt=messages), [`minimax-text-latest`](https://ailoot.ai/models/da/#m=minimax%2Fminimax-m3&route=Core&caller=minimax-text-latest&fmt=messages), [`minimax/minimax-m3`](https://ailoot.ai/models/da/#m=minimax%2Fminimax-m3&route=Core&caller=minimax%2Fminimax-m3&fmt=messages)
**Ailoot Ultra** [`MiniMax-M3`](https://ailoot.ai/models/da/#m=minimax%2Fminimax-m3&route=Ultra&caller=MiniMax-M3&fmt=messages), [`minimax/minimax-m3`](https://ailoot.ai/models/da/#m=minimax%2Fminimax-m3&route=Ultra&caller=minimax%2Fminimax-m3&fmt=messages)

#### Aliaser for metodestier

`/chat/completions`

#### Relaterede kalder-ID’er

[`minimax/minimax-m3`](https://ailoot.ai/models/da/#m=minimax%2Fminimax-m3&route=Core&caller=minimax%2Fminimax-m3&fmt=messages), [`minimax/minimax-m3`](https://ailoot.ai/models/da/#m=minimax%2Fminimax-m3&route=Ultra&caller=minimax%2Fminimax-m3&fmt=messages), [`minimax`](https://ailoot.ai/models/da/#m=minimax%2Fminimax-m3&route=Core&caller=minimax&fmt=messages), [`minimax-latest`](https://ailoot.ai/models/da/#m=minimax%2Fminimax-m3&route=Core&caller=minimax-latest&fmt=messages), [`minimax-text`](https://ailoot.ai/models/da/#m=minimax%2Fminimax-m3&route=Core&caller=minimax-text&fmt=messages), [`minimax-text-latest`](https://ailoot.ai/models/da/#m=minimax%2Fminimax-m3&route=Core&caller=minimax-text-latest&fmt=messages), [`MiniMax-M3`](https://ailoot.ai/models/da/#m=minimax%2Fminimax-m3&route=Core&caller=MiniMax-M3&fmt=messages), [`MiniMax-M3`](https://ailoot.ai/models/da/#m=minimax%2Fminimax-m3&route=Ultra&caller=MiniMax-M3&fmt=messages)

FAQ · MiniMax: MiniMax M3

Hvilke input og resultater er tilgængelige?

`POST /v1/messages` · `MiniMax-M3`: `text`, `image` → `text` `POST /v1/responses` · `MiniMax-M3`: `text`, `image` → `text` `POST /v1/chat/completions` · `MiniMax-M3`: `text`, `image` → `text` `POST /v1/chat/completions` · `MiniMax-M3`: `text` → `text` `POST /v1/messages` · `MiniMax-M3`: `text` → `json`, `sse` `POST /v1/messages` · `minimax`: `text`, `image` → `text` `POST /v1/responses` · `minimax`: `text`, `image` → `text` `POST /v1/chat/completions` · `minimax`: `text`, `image` → `text` `POST /v1/messages` · `minimax-latest`: `text`, `image` → `text` `POST /v1/responses` · `minimax-latest`: `text`, `image` → `text` `POST /v1/chat/completions` · `minimax-latest`: `text`, `image` → `text` `POST /v1/messages` · `minimax-text`: `text`, `image` → `text` `POST /v1/responses` · `minimax-text`: `text`, `image` → `text` `POST /v1/chat/completions` · `minimax-text`: `text`, `image` → `text` `POST /v1/messages` · `minimax-text-latest`: `text`, `image` → `text` `POST /v1/responses` · `minimax-text-latest`: `text`, `image` → `text` `POST /v1/chat/completions` · `minimax-text-latest`: `text`, `image` → `text` `POST /v1/messages` · `minimax/minimax-m3`: `text`, `image` → `text` `POST /v1/responses` · `minimax/minimax-m3`: `text`, `image` → `text` `POST /v1/chat/completions` · `minimax/minimax-m3`: `text`, `image` → `text` `POST /v1/chat/completions` · `minimax/minimax-m3`: `text` → `text` `POST /v1/messages` · `minimax/minimax-m3`: `text` → `json`, `sse`

Hvilke felter bruger anmodningen?

`POST /v1/messages` · `MiniMax-M3`: `model`, `messages`, `system`, `max_tokens`, `stream`, `metadata` `POST /v1/responses` · `MiniMax-M3`: `model`, `input`, `instructions`, `stream` `POST /v1/chat/completions` · `MiniMax-M3`: `model`, `messages`, `stream` `POST /v1/chat/completions` · `MiniMax-M3`: `model`, `messages`, `stream` `POST /v1/messages` · `MiniMax-M3`: `model`, `messages`, `max_tokens`, `stream` `POST /v1/messages` · `minimax`: `model`, `messages`, `system`, `max_tokens`, `stream`, `metadata` `POST /v1/responses` · `minimax`: `model`, `input`, `instructions`, `stream` `POST /v1/chat/completions` · `minimax`: `model`, `messages`, `stream` `POST /v1/messages` · `minimax-latest`: `model`, `messages`, `system`, `max_tokens`, `stream`, `metadata` `POST /v1/responses` · `minimax-latest`: `model`, `input`, `instructions`, `stream` `POST /v1/chat/completions` · `minimax-latest`: `model`, `messages`, `stream` `POST /v1/messages` · `minimax-text`: `model`, `messages`, `system`, `max_tokens`, `stream`, `metadata` `POST /v1/responses` · `minimax-text`: `model`, `input`, `instructions`, `stream` `POST /v1/chat/completions` · `minimax-text`: `model`, `messages`, `stream` `POST /v1/messages` · `minimax-text-latest`: `model`, `messages`, `system`, `max_tokens`, `stream`, `metadata` `POST /v1/responses` · `minimax-text-latest`: `model`, `input`, `instructions`, `stream` `POST /v1/chat/completions` · `minimax-text-latest`: `model`, `messages`, `stream` `POST /v1/messages` · `minimax/minimax-m3`: `model`, `messages`, `system`, `max_tokens`, `stream`, `metadata` `POST /v1/responses` · `minimax/minimax-m3`: `model`, `input`, `instructions`, `stream` `POST /v1/chat/completions` · `minimax/minimax-m3`: `model`, `messages`, `stream` `POST /v1/chat/completions` · `minimax/minimax-m3`: `model`, `messages`, `stream`, `modalities`, `provider` `POST /v1/messages` · `minimax/minimax-m3`: `model`, `messages`, `max_tokens`, `stream`

Hvilke grænser gælder?

`POST /v1/messages` · `MiniMax-M3`: `ctx`: `1000000`; `max_out`: `524288`; `messages.min_items`: `1`; `max_tokens.minimum`: `1` `POST /v1/responses` · `MiniMax-M3`: `ctx`: `1000000`; `max_out`: `1000000` `POST /v1/chat/completions` · `MiniMax-M3`: `ctx`: `1000000`; `max_out`: `524288`; `messages.min_items`: `1` `POST /v1/chat/completions` · `MiniMax-M3`: `messages.min_items`: `1` `POST /v1/messages` · `minimax`: `ctx`: `1000000`; `max_out`: `524288`; `messages.min_items`: `1`; `max_tokens.minimum`: `1` `POST /v1/responses` · `minimax`: `ctx`: `1000000`; `max_out`: `1000000` `POST /v1/chat/completions` · `minimax`: `ctx`: `1000000`; `max_out`: `524288`; `messages.min_items`: `1` `POST /v1/messages` · `minimax-latest`: `ctx`: `1000000`; `max_out`: `524288`; `messages.min_items`: `1`; `max_tokens.minimum`: `1` `POST /v1/responses` · `minimax-latest`: `ctx`: `1000000`; `max_out`: `1000000` `POST /v1/chat/completions` · `minimax-latest`: `ctx`: `1000000`; `max_out`: `524288`; `messages.min_items`: `1` `POST /v1/messages` · `minimax-text`: `ctx`: `1000000`; `max_out`: `524288`; `messages.min_items`: `1`; `max_tokens.minimum`: `1` `POST /v1/responses` · `minimax-text`: `ctx`: `1000000`; `max_out`: `1000000` `POST /v1/chat/completions` · `minimax-text`: `ctx`: `1000000`; `max_out`: `524288`; `messages.min_items`: `1` `POST /v1/messages` · `minimax-text-latest`: `ctx`: `1000000`; `max_out`: `524288`; `messages.min_items`: `1`; `max_tokens.minimum`: `1` `POST /v1/responses` · `minimax-text-latest`: `ctx`: `1000000`; `max_out`: `1000000` `POST /v1/chat/completions` · `minimax-text-latest`: `ctx`: `1000000`; `max_out`: `524288`; `messages.min_items`: `1` `POST /v1/messages` · `minimax/minimax-m3`: `ctx`: `1000000`; `max_out`: `524288`; `messages.min_items`: `1`; `max_tokens.minimum`: `1` `POST /v1/responses` · `minimax/minimax-m3`: `ctx`: `1000000`; `max_out`: `1000000` `POST /v1/chat/completions` · `minimax/minimax-m3`: `ctx`: `1000000`; `max_out`: `524288`; `messages.min_items`: `1` `POST /v1/chat/completions` · `minimax/minimax-m3`: `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.
