Source: https://ailoot.ai/models/de/k3-256k/
Canonical: https://ailoot.ai/models/de/k3-256k/
Language: de

# MoonshotAI: Kimi K3 (256K)

[Markdown](https://ailoot.ai/models/de/k3-256k/index.md) · [JSON](https://ailoot.ai/models/de/k3-256k/facts.json)

## [k3-256k](https://ailoot.ai/models/de/k3-256k/)

Kimi-K3-Variante mit 262 144 Tokens Kontext für Entwicklung sowie Text- und Bildanalyse.

- [**Ailoot · Anthropic Messages** `POST /v1/messages` `k3-256k`](https://ailoot.ai/models/de/k3-256k/#method-0)
- [**Ailoot · OpenAI Responses** `POST /v1/responses` `k3-256k`](https://ailoot.ai/models/de/k3-256k/#method-1)
- [**Ailoot · OpenAI Chat** `POST /v1/chat/completions` `k3-256k`](https://ailoot.ai/models/de/k3-256k/#method-2)
- [**Ailoot · Anthropic Messages** `POST /v1/messages` `kimi-256k`](https://ailoot.ai/models/de/k3-256k/#method-3)
- [**Ailoot · OpenAI Responses** `POST /v1/responses` `kimi-256k`](https://ailoot.ai/models/de/k3-256k/#method-4)
- [**Ailoot · OpenAI Chat** `POST /v1/chat/completions` `kimi-256k`](https://ailoot.ai/models/de/k3-256k/#method-5)
- [**Ailoot · Anthropic Messages** `POST /v1/messages` `kimi-256k-latest`](https://ailoot.ai/models/de/k3-256k/#method-6)
- [**Ailoot · OpenAI Responses** `POST /v1/responses` `kimi-256k-latest`](https://ailoot.ai/models/de/k3-256k/#method-7)
- [**Ailoot · OpenAI Chat** `POST /v1/chat/completions` `kimi-256k-latest`](https://ailoot.ai/models/de/k3-256k/#method-8)

Über das Modell

Diese Beschreibung erläutert die Fähigkeiten des Modells. Die über Ailoot verfügbaren Eingaben, Ausgaben und Optionen sind unten für die ausgewählte Methode aufgeführt.

#### K3 mit fester Fenstergröße

`k3-256k` ist eine Kimi-K3-Variante mit **262 144 Tokens** Kontext. Sie behält die K3-Ausrichtung bei: lange Ingenieuraufgaben, Code- und Werkzeugarbeit sowie die Analyse visueller Materialien. Die Fenstergröße ist für diese Variante festgelegt; Anforderungen, Projektmaterialien und Arbeitsverlauf müssen daher in einen gemeinsamen Umfang passen.

#### Code und visuelle Rückmeldungen

Das Modell dient schrittweiser Entwicklung mit dem Lesen eines Repositorys, Änderungen und der Verwendung von Ausführungsergebnissen. Der Hersteller beschreibt K3 bei der Optimierung von Berechnungscode, Compilererstellung und Arbeit mit großen Projekten. Visuelle Materialien können helfen, die Umsetzung mit dem sichtbaren Bildschirmzustand zu verbinden.

Für `k3-256k` ist Bildeingabe bestätigt. Diese Karte akzeptiert Text und Bilder; das Modell gibt Text zurück. Terminalwerkzeuge, Dateilesen oder Programmausführung müssen von der Anwendung angebunden werden; ihre Ergebnisse lassen sich zur Fortsetzung des Dialogs verwenden.

#### Forschungsarbeit

K3 verbindet Literatur- und Datenanalyse mit Programmierung. Mit Werkzeugen kann es an der Umsetzung von Berechnungen, der Prüfung von Formeln und der Vorbereitung interaktiver Analysematerialien mitwirken. Dieser Zweck ist bei Aufgaben hilfreich, deren Schlussfolgerungen mit Berechnungen verbunden und in ihrer Entstehung gezeigt werden sollen.

#### Reasoning und Aufbau

Die Stufen `low`, `high` und `max` werden unterstützt; die aktuelle Herstellerkonfiguration nennt `high` als Standardwert für `k3-256k`. Bei Werkzeugarbeit verwendet das Modell den Verlauf früherer Antworten und Gedankengänge.

Die K3-Architektur umfasst insgesamt **2,8 Billionen Parameter** und ungefähr **104 Milliarden aktive Parameter**. Für langen Kontext werden Kimi Delta Attention und Attention Residuals verwendet, für visuelle Eingaben MoonViT-V2. Diese Karte bietet ausdrücklich die Variante mit 262 144 Tokens Fenstergröße.

#### Grenzen langer Sitzungen

K3 ist empfindlich gegenüber der Vollständigkeit des Reasoning-Verlaufs. Der Hersteller warnt, dass eine unvollständige Übermittlung dieses Verlaufs oder ein Wechsel zu K3 während einer Arbeit mit einem anderen Modell die Antworten instabil machen kann. In komplexen Aufgaben ist es gelegentlich übermäßig initiativ: Bei einem mehrdeutigen Ziel kann es eine Aktion selbst wählen. Für Werkzeugarbeit müssen erlaubte Aktionen und Stoppbedingungen daher ausdrücklich vorgegeben werden.

Praktische Aufgabe

### Praktische Aufgabe

Technisches Beispiel auf Englisch

```
Preserve evaluation order in a compiler rewrite

A compiler optimizer replaces f() * 0 with 0. In this language, function calls may log messages or raise errors, and left-to-right evaluation is observable. Explain why the rewrite is unsafe, give the condition under which it would be valid and propose two regression tests. Return a focused optimization rule rather than a whole compiler design.
```

#### Erwartetes Ergebnis

```
A concise diagnosis, a guarded rewrite rule and two tests covering observable effects.
```

#### Ergebnis prüfen

```
The rule does not discard a call unless its lack of observable effects is established.
```

**Ailoot · Anthropic Messages** `POST /v1/messages` `k3-256k`

[`k3-256k`](https://ailoot.ai/models/de/#m=k3-256k&route=Core&caller=k3-256k&fmt=messages)

Moonshot /`k3-256k`

Modell-ID

- `k3-256k`
- `kimi-256k`
- `kimi-256k-latest`

### Start

Kimi-K3-Variante mit 262 144 Tokens Kontext für Entwicklung sowie Text- und Bildanalyse.

Zulässige Eingaben

Text · Bilder

Ergebnisse

Text

### In Ailoot verfügbar · Eingaben und Methoden

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

Eingabetypen

`text`, `image`

Ausgabetypen

`text`

Kontext

262.144 tokens

Maximale Ausgabe

65.536 tokens

Ausgabeformat

json oder SSE

| Feld | Typ | Anforderung | Werte und Limits | Standard |
| --- | --- | --- | --- | --- |
| Feld`model` | Typ`string` | AnforderungErforderlich | Werte und Limits k3-256k | Standard— |
| Feld`messages` | Typ`message[]` | AnforderungErforderlich | Werte und Limits Mindestanzahl Elemente: 1 | Standard— |
| Feld`messages[].role` | Typ`string` | AnforderungErforderlich | Werte und Limits user, assistant | Standard— |
| Feld`messages[].content` | Typ`string\|content_block[]` | AnforderungErforderlich | Werte und Limits | Standard— |
| Feld`system` | Typ`string\|content_block[]` | AnforderungOptional | Werte und Limits | Standard— |
| Feld`max_tokens` | Typ`integer` | AnforderungErforderlich | Werte und Limits Minimum: 1 Limit gilt für: Genaue Obergrenze des ausgewählten Modells bzw. seiner Modellkarte | Standard— |
| Feld`stream` | Typ`boolean` | AnforderungOptional | Werte und Limits | Standardfalse |
| Feld`temperature` | Typ`number` | AnforderungOptional | Werte und Limits Modellabhängig | Standard— |
| Feld`top_p` | Typ`number` | AnforderungOptional | Werte und Limits Modellabhängig | Standard— |
| Feld`stop_sequences` | Typ`string[]` | AnforderungOptional | Werte und Limits Modellabhängig | Standard— |
| Feld`tools` | Typ`tool[]` | AnforderungOptional | Werte und Limits Modellabhängig | Standard— |
| Feld`tools[].name` | Typ`string` | AnforderungOptional | Werte und Limits Gilt, wenn: Werkzeug bereitgestellt | Standard— |
| Feld`tools[].description` | Typ`string` | AnforderungOptional | Werte und Limits | Standard— |
| Feld`tools[].input_schema` | Typ`JSON_schema` | AnforderungOptional | Werte und Limits | Standard— |
| Feld`tool_choice` | Typ`object` | AnforderungOptional | Werte und Limits Modellabhängig | Standard— |
| Feld`thinking.type` | Typ`string` | AnforderungOptional | Werte und Limits Modellabhängig | Standard— |
| Feld`thinking.budget_tokens` | Typ`integer` | AnforderungOptional | Werte und Limits Modellabhängig | Standard— |
| Feld`output_config.effort` | Typ`string` | AnforderungOptional | Werte und Limits Modellabhängig | Standard— |
| Feld`metadata` | Typ`object` | AnforderungOptional | Werte und Limits | Standard— |
| Feld`cache_control` | Typ`object` | AnforderungOptional | Werte und Limits Modellabhängig | Standard— |

Kombinationen von Eingabematerialien

**Text** · UTF8-Text

`messages[].content oder Block mit type=text`

**Text + Bild**

`{type:image,source:{type:base64,media_type,data}} oder Quelle mit type=url`

Methodenparameter und Lebenszyklus

| Parameter | Vertrag |
| --- | --- |
| Parameter`material_types` | Vertragtext, image |
| Parameter`required` | Vertragmodel, messages, max\_tokens |
| Parameter`optional_controls` | Vertragnull |
| Parameter`content_type` | Vertragapplication/json |
| Parameter`text_file_material` | VertragTatsächlicher UTF-8-Inhalt wird als Text eingefügt; Datei-IDs/URLs müssen separat und exakt unterstützt werden |

Lebenszyklus: `exact retained published method`

Methodenstrukturen und IDs sind exakt; die Fähigkeiten des Anbieters sind von der Zulassung einer Anfrage zu unterscheiden.

### Tarife

#### Ailoot-Methodentarife

Eingabe

0,003 $ */ 1K*

Ausgabe

0,015 $ */ 1K*

Cache-Lesen

0,0003 $ */ 1K*

Cache-Schreiben

0,003 $ */ 1K*

Cache-Schreiben, 5 Min.

0,003 $ */ 1K tokens*

Ailoot reserviert vor einer Anfrage einen geschätzten Betrag. Nach dem Ergebnis rechnet Ailoot die endgültige Gebühr anhand des gemessenen Verbrauchs ab. Bei Streaming erfolgt die Abrechnung anhand des abschließenden Verbrauchsdatensatzes. [So funktionieren Reservierung und Abrechnung →](https://ailoot.ai/docs/de/billing/reserve/)

### Beispielanfragen

#### Ailoot · Anthropic Messages

TextbeispielEingabe, BildPython 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": "k3-256k", "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": "k3-256k", "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="k3-256k",
    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: "k3-256k",
  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='k3-256k',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")
```

### Ergebnisse abrufen und speichern

#### Ailoot · Anthropic Messages

json oder SSE

##### Alle fertiggestellten Ergebnisse aufbewahren

Bewahren Sie jede vollständig zurückgegebene Antwort, Datei und jeden Inhaltsteil auf.

Alle Inhaltsblöcke, Thinking-Signaturen und tatsächlichen Werkzeugaufruf-IDs beibehalten. Alle SSE-Blockdeltas zusammensetzen; der erste Textblock ist nicht die vollständige Ausgabe.

##### Wenn die ursprüngliche Antwort geprüft werden muss

Anfrage- und Antwort-IDs sowie Header beibehalten. Eine allgemeine URL zum Abrufen von Textaufträgen wird nicht angegeben.

Antwortfelder

| Feld | Typ |
| --- | --- |
| Feld`id` | Typstring |
| Feld`model` | Typstring |
| Feld`content[]` | Typtext\|thinking\|tool\_use\|other content block |
| Feld`stop_reason` | Typstring\|null |
| Feld`usage` | Typobject |

Fehler und nächste Schritte

| Antwort | Bedingung | Nächster Schritt |
| --- | --- | --- |
| Antwort400 · `invalid_request_error` | BedingungPflichtfelder, Darstellung des Eingabematerials oder Parameterwert ungültig | Nächster SchrittDie angegebenen Felder vor einer neuen Erstellungsanfrage korrigieren. |

### Aliasnamen

#### Modellaliasnamen

**Ailoot** [`k3-256k`](https://ailoot.ai/models/de/#m=k3-256k&route=Core&caller=k3-256k&fmt=messages), [`kimi-256k`](https://ailoot.ai/models/de/#m=k3-256k&route=Core&caller=kimi-256k&fmt=messages), [`kimi-256k-latest`](https://ailoot.ai/models/de/#m=k3-256k&route=Core&caller=kimi-256k-latest&fmt=messages)

#### Aliasnamen für Methodenpfade

Verwenden Sie die oben angezeigten Methodenpfade.

#### Zugehörige Aufrufer-IDs

[`k3-256k`](https://ailoot.ai/models/de/#m=k3-256k&route=Core&caller=k3-256k&fmt=messages), [`kimi-256k`](https://ailoot.ai/models/de/#m=k3-256k&route=Core&caller=kimi-256k&fmt=messages), [`kimi-256k-latest`](https://ailoot.ai/models/de/#m=k3-256k&route=Core&caller=kimi-256k-latest&fmt=messages)

**Ailoot · OpenAI Responses** `POST /v1/responses` `k3-256k`

[`k3-256k`](https://ailoot.ai/models/de/#m=k3-256k&route=Core&caller=k3-256k&fmt=responses)

Moonshot /`k3-256k`

Modell-ID

- `k3-256k`
- `kimi-256k`
- `kimi-256k-latest`

### Start

Kimi-K3-Variante mit 262 144 Tokens Kontext für Entwicklung sowie Text- und Bildanalyse.

Zulässige Eingaben

Text · Bilder

Ergebnisse

Text

### In Ailoot verfügbar · Eingaben und Methoden

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

Eingabetypen

`text`, `image`

Ausgabetypen

`text`

Kontext

262.144 tokens

Maximale Ausgabe

65.536 tokens

Ausgabeformat

json oder SSE

| Feld | Typ | Anforderung | Werte und Limits | Standard |
| --- | --- | --- | --- | --- |
| Feld`model` | Typ`string` | AnforderungErforderlich | Werte und Limits k3-256k | Standard— |
| Feld`input` | Typ`string\|input_item[]` | AnforderungErforderlich | Werte und Limits | Standard— |
| Feld`instructions` | Typ`string` | AnforderungOptional | Werte und Limits | Standard— |
| Feld`input[].type` | Typ`string` | AnforderungOptional | Werte und Limits message, reasoning, function\_call, function\_call\_output | Standard— |
| Feld`input[].content` | Typ`string\|content_part[]` | AnforderungOptional | Werte und Limits | Standard— |
| Feld`input[].call_id` | Typ`string` | AnforderungOptional | Werte und Limits Gilt, wenn: function\_call\_output; den tatsächlich zurückgegebenen Wert von call\_id beibehalten | Standard— |
| Feld`input[].output` | Typ`string\|content_part[]` | AnforderungOptional | Werte und Limits Gilt, wenn: function\_call\_output | Standard— |
| Feld`max_output_tokens` | Typ`integer` | AnforderungOptional | Werte und Limits Minimum: 1 Modellabhängig | Standard— |
| Feld`stream` | Typ`boolean` | AnforderungOptional | Werte und Limits | Standardfalse |
| Feld`temperature` | Typ`number` | AnforderungOptional | Werte und Limits Modellabhängig | Standard— |
| Feld`top_p` | Typ`number` | AnforderungOptional | Werte und Limits Modellabhängig | Standard— |
| Feld`tools` | Typ`tool[]` | AnforderungOptional | Werte und Limits Modellabhängig | Standard— |
| Feld`tool_choice` | Typ`string\|object` | AnforderungOptional | Werte und Limits Modellabhängig | Standard— |
| Feld`parallel_tool_calls` | Typ`boolean` | AnforderungOptional | Werte und Limits Modellabhängig | Standard— |
| Feld`reasoning.effort` | Typ`string` | AnforderungOptional | Werte und Limits Modellabhängig | Standard— |
| Feld`reasoning.summary` | Typ`string` | AnforderungOptional | Werte und Limits Modellabhängig | Standard— |
| Feld`text.format` | Typ`object` | AnforderungOptional | Werte und Limits Modellabhängig | Standard— |
| Feld`text.verbosity` | Typ`string` | AnforderungOptional | Werte und Limits Modellabhängig | Standard— |
| Feld`include` | Typ`string[]` | AnforderungOptional | Werte und Limits Modellabhängig | Standard— |
| Feld`store` | Typ`boolean` | AnforderungOptional | Werte und Limits Modellabhängig | Standard— |
| Feld`previous_response_id` | Typ`string` | AnforderungOptional | Werte und Limits ID-Anforderung: Nur eine tatsächliche Antwort-ID aus einer unterstützten Fortsetzung Modellabhängig | Standard— |
| Feld`service_tier` | Typ`string` | AnforderungOptional | Werte und Limits Modellabhängig | Standard— |
| Feld`prompt_cache_key` | Typ`string` | AnforderungOptional | Werte und Limits Modellabhängig | Standard— |
| Feld`prompt_cache_options` | Typ`object` | AnforderungOptional | Werte und Limits Modellabhängig | Standard— |

Kombinationen von Eingabematerialien

**Text** · UTF8-Text

`Eingabetext oder input_text-Teil`

**Text + Bild**

`{type:input_image,image_url}`

Methodenparameter und Lebenszyklus

| Parameter | Vertrag |
| --- | --- |
| Parameter`material_types` | Vertragtext, image |
| Parameter`required` | Vertragmodel, input |
| Parameter`optional_controls` | Vertragnull |
| Parameter`content_type` | Vertragapplication/json |
| Parameter`text_file_material` | VertragTatsächlicher UTF-8-Inhalt wird als Text eingefügt; Datei-IDs/URLs müssen separat und exakt unterstützt werden |

Lebenszyklus: `exact retained published method`

Methodenstrukturen und IDs sind exakt; die Fähigkeiten des Anbieters sind von der Zulassung einer Anfrage zu unterscheiden.

### Tarife

#### Ailoot-Methodentarife

Eingabe

0,003 $ */ 1K*

Ausgabe

0,015 $ */ 1K*

Cache-Lesen

0,0003 $ */ 1K*

Cache-Schreiben

0,003 $ */ 1K*

Cache-Schreiben, 5 Min.

0,003 $ */ 1K tokens*

Ailoot reserviert vor einer Anfrage einen geschätzten Betrag. Nach dem Ergebnis rechnet Ailoot die endgültige Gebühr anhand des gemessenen Verbrauchs ab. Bei Streaming erfolgt die Abrechnung anhand des abschließenden Verbrauchsdatensatzes. [So funktionieren Reservierung und Abrechnung →](https://ailoot.ai/docs/de/billing/reserve/)

### Beispielanfragen

#### Ailoot · OpenAI Responses

TextbeispielEingabe, BildPython 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": "k3-256k", "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": "k3-256k", "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="k3-256k", 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: "k3-256k", 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="k3-256k", 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")
```

### Ergebnisse abrufen und speichern

#### Ailoot · OpenAI Responses

json oder SSE

##### Alle fertiggestellten Ergebnisse aufbewahren

Bewahren Sie jede vollständig zurückgegebene Antwort, Datei und jeden Inhaltsteil auf.

Alle Ausgabeelemente und Inhaltsteile, die tatsächliche call\_id der Funktion, verschlüsselte Reasoning-Daten und Verbrauchsdaten beibehalten. Beim Streaming die vollständige Identität von Ereignis und Element bewahren.

##### Wenn die ursprüngliche Antwort geprüft werden muss

Anfrage- und Antwort-IDs sowie Header beibehalten. Eine allgemeine URL zum Abrufen von Textaufträgen wird nicht angegeben.

Antwortfelder

| Feld | Typ |
| --- | --- |
| Feld`id` | Typstring |
| Feld`status` | Typstring |
| Feld`output[]` | Typmessage\|reasoning\|function\_call\|other item |
| Feld`output[].content[]` | Typcontent part |
| Feld`usage` | Typobject |

Fehler und nächste Schritte

| Antwort | Bedingung | Nächster Schritt |
| --- | --- | --- |
| Antwort400 · `invalid_request_error` | BedingungPflichtfelder, Darstellung des Eingabematerials oder Parameterwert ungültig | Nächster SchrittDie angegebenen Felder vor einer neuen Erstellungsanfrage korrigieren. |

### Aliasnamen

#### Modellaliasnamen

**Ailoot** [`k3-256k`](https://ailoot.ai/models/de/#m=k3-256k&route=Core&caller=k3-256k&fmt=responses), [`kimi-256k`](https://ailoot.ai/models/de/#m=k3-256k&route=Core&caller=kimi-256k&fmt=responses), [`kimi-256k-latest`](https://ailoot.ai/models/de/#m=k3-256k&route=Core&caller=kimi-256k-latest&fmt=responses)

#### Aliasnamen für Methodenpfade

Verwenden Sie die oben angezeigten Methodenpfade.

#### Zugehörige Aufrufer-IDs

[`k3-256k`](https://ailoot.ai/models/de/#m=k3-256k&route=Core&caller=k3-256k&fmt=responses), [`kimi-256k`](https://ailoot.ai/models/de/#m=k3-256k&route=Core&caller=kimi-256k&fmt=responses), [`kimi-256k-latest`](https://ailoot.ai/models/de/#m=k3-256k&route=Core&caller=kimi-256k-latest&fmt=responses)

**Ailoot · OpenAI Chat** `POST /v1/chat/completions` `k3-256k`

[`k3-256k`](https://ailoot.ai/models/de/#m=k3-256k&route=Core&caller=k3-256k&fmt=chat)

Moonshot /`k3-256k`

Modell-ID

- `k3-256k`
- `kimi-256k`
- `kimi-256k-latest`

### Start

Kimi-K3-Variante mit 262 144 Tokens Kontext für Entwicklung sowie Text- und Bildanalyse.

Zulässige Eingaben

Text · Bilder

Ergebnisse

Text

### In Ailoot verfügbar · Eingaben und Methoden

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

Eingabetypen

`text`, `image`

Ausgabetypen

`text`

Kontext

262.144 tokens

Maximale Ausgabe

65.536 tokens

Ausgabeformat

json oder SSE

| Feld | Typ | Anforderung | Werte und Limits | Standard |
| --- | --- | --- | --- | --- |
| Feld`model` | Typ`string` | AnforderungErforderlich | Werte und Limits k3-256k | Standard— |
| Feld`messages` | Typ`message[]` | AnforderungErforderlich | Werte und Limits Mindestanzahl Elemente: 1 | Standard— |
| Feld`messages[].role` | Typ`string` | AnforderungErforderlich | Werte und Limits Beispiele: system, user, assistant, tool, function Bedingungen: Diese Rollen sind in den Kompatibilitätstypen des Quellcodes ausdrücklich dargestellt; der genaue Rollenumfang bleibt modellspezifisch. Modellabhängig | Standard— |
| Feld`messages[].content` | Typ`string\|content_part[]\|null` | AnforderungOptional | Werte und Limits | Standard— |
| Feld`messages[].tool_calls` | Typ`tool_call[]` | AnforderungOptional | Werte und Limits | Standard— |
| Feld`messages[].tool_call_id` | Typ`string` | AnforderungOptional | Werte und Limits Gilt, wenn: role=tool; die tatsächlich zurückgegebene ID verwenden | Standard— |
| Feld`messages[].name` | Typ`string` | AnforderungOptional | Werte und Limits | Standard— |
| Feld`messages[].reasoning_content` | Typ`string` | AnforderungOptional | Werte und Limits Gilt, wenn: Tatsächlich zurückgegebene Reasoning-Daten erneut übermitteln, sofern dieses Modell sie verwendet | Standard— |
| Feld`messages[].reasoning_details` | Typ`object\|array` | AnforderungOptional | Werte und Limits Modellabhängig | Standard— |
| Feld`max_tokens` | Typ`integer` | AnforderungOptional | Werte und Limits Minimum: 1 Modellabhängig | Standard— |
| Feld`max_completion_tokens` | Typ`integer` | AnforderungOptional | Werte und Limits Minimum: 1 Modellabhängig | Standard— |
| Feld`stream` | Typ`boolean` | AnforderungOptional | Werte und Limits | Standardfalse |
| Feld`stream_options.include_usage` | Typ`boolean` | AnforderungOptional | Werte und Limits Modellabhängig | Standard— |
| Feld`temperature` | Typ`number` | AnforderungOptional | Werte und Limits Modellabhängig | Standard— |
| Feld`top_p` | Typ`number` | AnforderungOptional | Werte und Limits Modellabhängig | Standard— |
| Feld`stop` | Typ`string\|string[]` | AnforderungOptional | Werte und Limits Modellabhängig | Standard— |
| Feld`tools` | Typ`function_tool[]` | AnforderungOptional | Werte und Limits Modellabhängig | Standard— |
| Feld`tools[].type` | Typ`string` | AnforderungOptional | Werte und Limits Modellabhängig | Standard— |
| Feld`tools[].function.name` | Typ`string` | AnforderungErforderlich | Werte und Limits Gilt, wenn: Funktionswerkzeug bereitgestellt | Standard— |
| Feld`tools[].function.description` | Typ`string` | AnforderungOptional | Werte und Limits | Standard— |
| Feld`tools[].function.parameters` | Typ`JSON_schema` | AnforderungOptional | Werte und Limits | Standard— |
| Feld`tool_choice` | Typ`string\|object` | AnforderungOptional | Werte und Limits Modellabhängig | Standard— |
| Feld`parallel_tool_calls` | Typ`boolean` | AnforderungOptional | Werte und Limits Modellabhängig | Standard— |
| Feld`response_format` | Typ`object` | AnforderungOptional | Werte und Limits Modellabhängig | Standard— |
| Feld`reasoning_effort` | Typ`string` | AnforderungOptional | Werte und Limits Modellabhängig | Standard— |
| Feld`reasoning` | Typ`object` | AnforderungOptional | Werte und Limits Modellabhängig | Standard— |
| Feld`service_tier` | Typ`string` | AnforderungOptional | Werte und Limits Modellabhängig | Standard— |
| Feld`instructions` | Typ`string` | AnforderungOptional | Werte und Limits Kompatibilitätsfeld | Standard— |
| Feld`functions` | Typ`function[]` | AnforderungOptional | Werte und Limits Modellabhängig | Standard— |
| Feld`function_call` | Typ`string\|object` | AnforderungOptional | Werte und Limits Modellabhängig | Standard— |
| Feld`prompt_cache_options` | Typ`object` | AnforderungOptional | Werte und Limits Modellabhängig | Standard— |

Kombinationen von Eingabematerialien

**Text** · UTF8-Text

`messages[].content`

**Text + Bild**

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

Methodenparameter und Lebenszyklus

| Parameter | Vertrag |
| --- | --- |
| Parameter`material_types` | Vertragtext, image |
| Parameter`required` | Vertragmodel, messages |
| Parameter`optional_controls` | Vertragnull |
| Parameter`content_type` | Vertragapplication/json |
| Parameter`text_file_material` | VertragTatsächlicher UTF-8-Inhalt wird als Text eingefügt; Datei-IDs/URLs müssen separat und exakt unterstützt werden |

Lebenszyklus: `exact retained published method`

Methodenstrukturen und IDs sind exakt; die Fähigkeiten des Anbieters sind von der Zulassung einer Anfrage zu unterscheiden.

### Tarife

#### Ailoot-Methodentarife

Eingabe

0,003 $ */ 1K*

Ausgabe

0,015 $ */ 1K*

Cache-Lesen

0,0003 $ */ 1K*

Cache-Schreiben

0,003 $ */ 1K*

Cache-Schreiben, 5 Min.

0,003 $ */ 1K tokens*

Ailoot reserviert vor einer Anfrage einen geschätzten Betrag. Nach dem Ergebnis rechnet Ailoot die endgültige Gebühr anhand des gemessenen Verbrauchs ab. Bei Streaming erfolgt die Abrechnung anhand des abschließenden Verbrauchsdatensatzes. [So funktionieren Reservierung und Abrechnung →](https://ailoot.ai/docs/de/billing/reserve/)

### Beispielanfragen

#### Ailoot · OpenAI Chat

TextbeispielEingabe, BildPython 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": "k3-256k", "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": "k3-256k", "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="k3-256k",
    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: "k3-256k",
  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='k3-256k',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")
```

### Ergebnisse abrufen und speichern

#### Ailoot · OpenAI Chat

json oder SSE

##### Alle fertiggestellten Ergebnisse aufbewahren

Bewahren Sie jede vollständig zurückgegebene Antwort, Datei und jeden Inhaltsteil auf.

Alle Antwortvarianten mit ihren Inhalten, Werkzeugaufrufen und Reasoning-Daten beibehalten. In SSE die Deltas nach Varianten- und Werkzeugindex zusammensetzen; endgültigen Beendigungsgrund und Verbrauchsdaten beibehalten.

##### Wenn die ursprüngliche Antwort geprüft werden muss

Anfrage- und Antwort-IDs sowie Header beibehalten. Eine allgemeine URL zum Abrufen von Textaufträgen wird nicht angegeben.

Antwortfelder

| Feld | Typ |
| --- | --- |
| Feld`choices[].index` | Typinteger |
| Feld`choices[].message.content` | Typstring\|null |
| Feld`choices[].message.tool_calls` | Typtool\_call\[\] |
| Feld`choices[].message.reasoning_content` | Typstring |
| Feld`choices[].message.reasoning_details` | Typobject\|array |
| Feld`choices[].finish_reason` | Typstring\|null |
| Feld`usage` | Typobject |

Fehler und nächste Schritte

| Antwort | Bedingung | Nächster Schritt |
| --- | --- | --- |
| Antwort400 · `invalid_request_error` | BedingungPflichtfelder, Darstellung des Eingabematerials oder Parameterwert ungültig | Nächster SchrittDie angegebenen Felder vor einer neuen Erstellungsanfrage korrigieren. |

### Aliasnamen

#### Modellaliasnamen

**Ailoot** [`k3-256k`](https://ailoot.ai/models/de/#m=k3-256k&route=Core&caller=k3-256k&fmt=chat), [`kimi-256k`](https://ailoot.ai/models/de/#m=k3-256k&route=Core&caller=kimi-256k&fmt=chat), [`kimi-256k-latest`](https://ailoot.ai/models/de/#m=k3-256k&route=Core&caller=kimi-256k-latest&fmt=chat)

#### Aliasnamen für Methodenpfade

Verwenden Sie die oben angezeigten Methodenpfade.

#### Zugehörige Aufrufer-IDs

[`k3-256k`](https://ailoot.ai/models/de/#m=k3-256k&route=Core&caller=k3-256k&fmt=chat), [`kimi-256k`](https://ailoot.ai/models/de/#m=k3-256k&route=Core&caller=kimi-256k&fmt=chat), [`kimi-256k-latest`](https://ailoot.ai/models/de/#m=k3-256k&route=Core&caller=kimi-256k-latest&fmt=chat)

**Ailoot · Anthropic Messages** `POST /v1/messages` `kimi-256k`

[`kimi-256k`](https://ailoot.ai/models/de/#m=k3-256k&route=Core&caller=kimi-256k&fmt=messages)

Moonshot /`kimi-256k`

Modell-ID

- `k3-256k`
- `kimi-256k`
- `kimi-256k-latest`

### Start

Kimi-K3-Variante mit 262 144 Tokens Kontext für Entwicklung sowie Text- und Bildanalyse.

Zulässige Eingaben

Text · Bilder

Ergebnisse

Text

### In Ailoot verfügbar · Eingaben und Methoden

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

Eingabetypen

`text`, `image`

Ausgabetypen

`text`

Kontext

262.144 tokens

Maximale Ausgabe

65.536 tokens

Ausgabeformat

json oder SSE

| Feld | Typ | Anforderung | Werte und Limits | Standard |
| --- | --- | --- | --- | --- |
| Feld`model` | Typ`string` | AnforderungErforderlich | Werte und Limits kimi-256k | Standard— |
| Feld`messages` | Typ`message[]` | AnforderungErforderlich | Werte und Limits Mindestanzahl Elemente: 1 | Standard— |
| Feld`messages[].role` | Typ`string` | AnforderungErforderlich | Werte und Limits user, assistant | Standard— |
| Feld`messages[].content` | Typ`string\|content_block[]` | AnforderungErforderlich | Werte und Limits | Standard— |
| Feld`system` | Typ`string\|content_block[]` | AnforderungOptional | Werte und Limits | Standard— |
| Feld`max_tokens` | Typ`integer` | AnforderungErforderlich | Werte und Limits Minimum: 1 Limit gilt für: Genaue Obergrenze des ausgewählten Modells bzw. seiner Modellkarte | Standard— |
| Feld`stream` | Typ`boolean` | AnforderungOptional | Werte und Limits | Standardfalse |
| Feld`temperature` | Typ`number` | AnforderungOptional | Werte und Limits Modellabhängig | Standard— |
| Feld`top_p` | Typ`number` | AnforderungOptional | Werte und Limits Modellabhängig | Standard— |
| Feld`stop_sequences` | Typ`string[]` | AnforderungOptional | Werte und Limits Modellabhängig | Standard— |
| Feld`tools` | Typ`tool[]` | AnforderungOptional | Werte und Limits Modellabhängig | Standard— |
| Feld`tools[].name` | Typ`string` | AnforderungOptional | Werte und Limits Gilt, wenn: Werkzeug bereitgestellt | Standard— |
| Feld`tools[].description` | Typ`string` | AnforderungOptional | Werte und Limits | Standard— |
| Feld`tools[].input_schema` | Typ`JSON_schema` | AnforderungOptional | Werte und Limits | Standard— |
| Feld`tool_choice` | Typ`object` | AnforderungOptional | Werte und Limits Modellabhängig | Standard— |
| Feld`thinking.type` | Typ`string` | AnforderungOptional | Werte und Limits Modellabhängig | Standard— |
| Feld`thinking.budget_tokens` | Typ`integer` | AnforderungOptional | Werte und Limits Modellabhängig | Standard— |
| Feld`output_config.effort` | Typ`string` | AnforderungOptional | Werte und Limits Modellabhängig | Standard— |
| Feld`metadata` | Typ`object` | AnforderungOptional | Werte und Limits | Standard— |
| Feld`cache_control` | Typ`object` | AnforderungOptional | Werte und Limits Modellabhängig | Standard— |

Kombinationen von Eingabematerialien

**Text** · UTF8-Text

`messages[].content oder Block mit type=text`

**Text + Bild**

`{type:image,source:{type:base64,media_type,data}} oder Quelle mit type=url`

Methodenparameter und Lebenszyklus

| Parameter | Vertrag |
| --- | --- |
| Parameter`material_types` | Vertragtext, image |
| Parameter`required` | Vertragmodel, messages, max\_tokens |
| Parameter`optional_controls` | Vertragnull |
| Parameter`content_type` | Vertragapplication/json |
| Parameter`text_file_material` | VertragTatsächlicher UTF-8-Inhalt wird als Text eingefügt; Datei-IDs/URLs müssen separat und exakt unterstützt werden |

Lebenszyklus: `exact retained published method`

Methodenstrukturen und IDs sind exakt; die Fähigkeiten des Anbieters sind von der Zulassung einer Anfrage zu unterscheiden.

### Tarife

#### Ailoot-Methodentarife

Eingabe

0,003 $ */ 1K*

Ausgabe

0,015 $ */ 1K*

Cache-Lesen

0,0003 $ */ 1K*

Cache-Schreiben

0,003 $ */ 1K*

Cache-Schreiben, 5 Min.

0,003 $ */ 1K tokens*

Ailoot reserviert vor einer Anfrage einen geschätzten Betrag. Nach dem Ergebnis rechnet Ailoot die endgültige Gebühr anhand des gemessenen Verbrauchs ab. Bei Streaming erfolgt die Abrechnung anhand des abschließenden Verbrauchsdatensatzes. [So funktionieren Reservierung und Abrechnung →](https://ailoot.ai/docs/de/billing/reserve/)

### Beispielanfragen

#### Ailoot · Anthropic Messages

TextbeispielEingabe, BildPython 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": "kimi-256k", "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": "kimi-256k", "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="kimi-256k",
    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: "kimi-256k",
  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='kimi-256k',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")
```

### Ergebnisse abrufen und speichern

#### Ailoot · Anthropic Messages

json oder SSE

##### Alle fertiggestellten Ergebnisse aufbewahren

Bewahren Sie jede vollständig zurückgegebene Antwort, Datei und jeden Inhaltsteil auf.

Alle Inhaltsblöcke, Thinking-Signaturen und tatsächlichen Werkzeugaufruf-IDs beibehalten. Alle SSE-Blockdeltas zusammensetzen; der erste Textblock ist nicht die vollständige Ausgabe.

##### Wenn die ursprüngliche Antwort geprüft werden muss

Anfrage- und Antwort-IDs sowie Header beibehalten. Eine allgemeine URL zum Abrufen von Textaufträgen wird nicht angegeben.

Antwortfelder

| Feld | Typ |
| --- | --- |
| Feld`id` | Typstring |
| Feld`model` | Typstring |
| Feld`content[]` | Typtext\|thinking\|tool\_use\|other content block |
| Feld`stop_reason` | Typstring\|null |
| Feld`usage` | Typobject |

Fehler und nächste Schritte

| Antwort | Bedingung | Nächster Schritt |
| --- | --- | --- |
| Antwort400 · `invalid_request_error` | BedingungPflichtfelder, Darstellung des Eingabematerials oder Parameterwert ungültig | Nächster SchrittDie angegebenen Felder vor einer neuen Erstellungsanfrage korrigieren. |

### Aliasnamen

#### Modellaliasnamen

**Ailoot** [`k3-256k`](https://ailoot.ai/models/de/#m=k3-256k&route=Core&caller=k3-256k&fmt=messages), [`kimi-256k`](https://ailoot.ai/models/de/#m=k3-256k&route=Core&caller=kimi-256k&fmt=messages), [`kimi-256k-latest`](https://ailoot.ai/models/de/#m=k3-256k&route=Core&caller=kimi-256k-latest&fmt=messages)

#### Aliasnamen für Methodenpfade

Verwenden Sie die oben angezeigten Methodenpfade.

#### Zugehörige Aufrufer-IDs

[`k3-256k`](https://ailoot.ai/models/de/#m=k3-256k&route=Core&caller=k3-256k&fmt=messages), [`kimi-256k`](https://ailoot.ai/models/de/#m=k3-256k&route=Core&caller=kimi-256k&fmt=messages), [`kimi-256k-latest`](https://ailoot.ai/models/de/#m=k3-256k&route=Core&caller=kimi-256k-latest&fmt=messages)

**Ailoot · OpenAI Responses** `POST /v1/responses` `kimi-256k`

[`kimi-256k`](https://ailoot.ai/models/de/#m=k3-256k&route=Core&caller=kimi-256k&fmt=responses)

Moonshot /`kimi-256k`

Modell-ID

- `k3-256k`
- `kimi-256k`
- `kimi-256k-latest`

### Start

Kimi-K3-Variante mit 262 144 Tokens Kontext für Entwicklung sowie Text- und Bildanalyse.

Zulässige Eingaben

Text · Bilder

Ergebnisse

Text

### In Ailoot verfügbar · Eingaben und Methoden

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

Eingabetypen

`text`, `image`

Ausgabetypen

`text`

Kontext

262.144 tokens

Maximale Ausgabe

65.536 tokens

Ausgabeformat

json oder SSE

| Feld | Typ | Anforderung | Werte und Limits | Standard |
| --- | --- | --- | --- | --- |
| Feld`model` | Typ`string` | AnforderungErforderlich | Werte und Limits kimi-256k | Standard— |
| Feld`input` | Typ`string\|input_item[]` | AnforderungErforderlich | Werte und Limits | Standard— |
| Feld`instructions` | Typ`string` | AnforderungOptional | Werte und Limits | Standard— |
| Feld`input[].type` | Typ`string` | AnforderungOptional | Werte und Limits message, reasoning, function\_call, function\_call\_output | Standard— |
| Feld`input[].content` | Typ`string\|content_part[]` | AnforderungOptional | Werte und Limits | Standard— |
| Feld`input[].call_id` | Typ`string` | AnforderungOptional | Werte und Limits Gilt, wenn: function\_call\_output; den tatsächlich zurückgegebenen Wert von call\_id beibehalten | Standard— |
| Feld`input[].output` | Typ`string\|content_part[]` | AnforderungOptional | Werte und Limits Gilt, wenn: function\_call\_output | Standard— |
| Feld`max_output_tokens` | Typ`integer` | AnforderungOptional | Werte und Limits Minimum: 1 Modellabhängig | Standard— |
| Feld`stream` | Typ`boolean` | AnforderungOptional | Werte und Limits | Standardfalse |
| Feld`temperature` | Typ`number` | AnforderungOptional | Werte und Limits Modellabhängig | Standard— |
| Feld`top_p` | Typ`number` | AnforderungOptional | Werte und Limits Modellabhängig | Standard— |
| Feld`tools` | Typ`tool[]` | AnforderungOptional | Werte und Limits Modellabhängig | Standard— |
| Feld`tool_choice` | Typ`string\|object` | AnforderungOptional | Werte und Limits Modellabhängig | Standard— |
| Feld`parallel_tool_calls` | Typ`boolean` | AnforderungOptional | Werte und Limits Modellabhängig | Standard— |
| Feld`reasoning.effort` | Typ`string` | AnforderungOptional | Werte und Limits Modellabhängig | Standard— |
| Feld`reasoning.summary` | Typ`string` | AnforderungOptional | Werte und Limits Modellabhängig | Standard— |
| Feld`text.format` | Typ`object` | AnforderungOptional | Werte und Limits Modellabhängig | Standard— |
| Feld`text.verbosity` | Typ`string` | AnforderungOptional | Werte und Limits Modellabhängig | Standard— |
| Feld`include` | Typ`string[]` | AnforderungOptional | Werte und Limits Modellabhängig | Standard— |
| Feld`store` | Typ`boolean` | AnforderungOptional | Werte und Limits Modellabhängig | Standard— |
| Feld`previous_response_id` | Typ`string` | AnforderungOptional | Werte und Limits ID-Anforderung: Nur eine tatsächliche Antwort-ID aus einer unterstützten Fortsetzung Modellabhängig | Standard— |
| Feld`service_tier` | Typ`string` | AnforderungOptional | Werte und Limits Modellabhängig | Standard— |
| Feld`prompt_cache_key` | Typ`string` | AnforderungOptional | Werte und Limits Modellabhängig | Standard— |
| Feld`prompt_cache_options` | Typ`object` | AnforderungOptional | Werte und Limits Modellabhängig | Standard— |

Kombinationen von Eingabematerialien

**Text** · UTF8-Text

`Eingabetext oder input_text-Teil`

**Text + Bild**

`{type:input_image,image_url}`

Methodenparameter und Lebenszyklus

| Parameter | Vertrag |
| --- | --- |
| Parameter`material_types` | Vertragtext, image |
| Parameter`required` | Vertragmodel, input |
| Parameter`optional_controls` | Vertragnull |
| Parameter`content_type` | Vertragapplication/json |
| Parameter`text_file_material` | VertragTatsächlicher UTF-8-Inhalt wird als Text eingefügt; Datei-IDs/URLs müssen separat und exakt unterstützt werden |

Lebenszyklus: `exact retained published method`

Methodenstrukturen und IDs sind exakt; die Fähigkeiten des Anbieters sind von der Zulassung einer Anfrage zu unterscheiden.

### Tarife

#### Ailoot-Methodentarife

Eingabe

0,003 $ */ 1K*

Ausgabe

0,015 $ */ 1K*

Cache-Lesen

0,0003 $ */ 1K*

Cache-Schreiben

0,003 $ */ 1K*

Cache-Schreiben, 5 Min.

0,003 $ */ 1K tokens*

Ailoot reserviert vor einer Anfrage einen geschätzten Betrag. Nach dem Ergebnis rechnet Ailoot die endgültige Gebühr anhand des gemessenen Verbrauchs ab. Bei Streaming erfolgt die Abrechnung anhand des abschließenden Verbrauchsdatensatzes. [So funktionieren Reservierung und Abrechnung →](https://ailoot.ai/docs/de/billing/reserve/)

### Beispielanfragen

#### Ailoot · OpenAI Responses

TextbeispielEingabe, BildPython 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": "kimi-256k", "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": "kimi-256k", "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="kimi-256k", 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: "kimi-256k", 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="kimi-256k", 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")
```

### Ergebnisse abrufen und speichern

#### Ailoot · OpenAI Responses

json oder SSE

##### Alle fertiggestellten Ergebnisse aufbewahren

Bewahren Sie jede vollständig zurückgegebene Antwort, Datei und jeden Inhaltsteil auf.

Alle Ausgabeelemente und Inhaltsteile, die tatsächliche call\_id der Funktion, verschlüsselte Reasoning-Daten und Verbrauchsdaten beibehalten. Beim Streaming die vollständige Identität von Ereignis und Element bewahren.

##### Wenn die ursprüngliche Antwort geprüft werden muss

Anfrage- und Antwort-IDs sowie Header beibehalten. Eine allgemeine URL zum Abrufen von Textaufträgen wird nicht angegeben.

Antwortfelder

| Feld | Typ |
| --- | --- |
| Feld`id` | Typstring |
| Feld`status` | Typstring |
| Feld`output[]` | Typmessage\|reasoning\|function\_call\|other item |
| Feld`output[].content[]` | Typcontent part |
| Feld`usage` | Typobject |

Fehler und nächste Schritte

| Antwort | Bedingung | Nächster Schritt |
| --- | --- | --- |
| Antwort400 · `invalid_request_error` | BedingungPflichtfelder, Darstellung des Eingabematerials oder Parameterwert ungültig | Nächster SchrittDie angegebenen Felder vor einer neuen Erstellungsanfrage korrigieren. |

### Aliasnamen

#### Modellaliasnamen

**Ailoot** [`k3-256k`](https://ailoot.ai/models/de/#m=k3-256k&route=Core&caller=k3-256k&fmt=responses), [`kimi-256k`](https://ailoot.ai/models/de/#m=k3-256k&route=Core&caller=kimi-256k&fmt=responses), [`kimi-256k-latest`](https://ailoot.ai/models/de/#m=k3-256k&route=Core&caller=kimi-256k-latest&fmt=responses)

#### Aliasnamen für Methodenpfade

Verwenden Sie die oben angezeigten Methodenpfade.

#### Zugehörige Aufrufer-IDs

[`k3-256k`](https://ailoot.ai/models/de/#m=k3-256k&route=Core&caller=k3-256k&fmt=responses), [`kimi-256k`](https://ailoot.ai/models/de/#m=k3-256k&route=Core&caller=kimi-256k&fmt=responses), [`kimi-256k-latest`](https://ailoot.ai/models/de/#m=k3-256k&route=Core&caller=kimi-256k-latest&fmt=responses)

**Ailoot · OpenAI Chat** `POST /v1/chat/completions` `kimi-256k`

[`kimi-256k`](https://ailoot.ai/models/de/#m=k3-256k&route=Core&caller=kimi-256k&fmt=chat)

Moonshot /`kimi-256k`

Modell-ID

- `k3-256k`
- `kimi-256k`
- `kimi-256k-latest`

### Start

Kimi-K3-Variante mit 262 144 Tokens Kontext für Entwicklung sowie Text- und Bildanalyse.

Zulässige Eingaben

Text · Bilder

Ergebnisse

Text

### In Ailoot verfügbar · Eingaben und Methoden

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

Eingabetypen

`text`, `image`

Ausgabetypen

`text`

Kontext

262.144 tokens

Maximale Ausgabe

65.536 tokens

Ausgabeformat

json oder SSE

| Feld | Typ | Anforderung | Werte und Limits | Standard |
| --- | --- | --- | --- | --- |
| Feld`model` | Typ`string` | AnforderungErforderlich | Werte und Limits kimi-256k | Standard— |
| Feld`messages` | Typ`message[]` | AnforderungErforderlich | Werte und Limits Mindestanzahl Elemente: 1 | Standard— |
| Feld`messages[].role` | Typ`string` | AnforderungErforderlich | Werte und Limits Beispiele: system, user, assistant, tool, function Bedingungen: Diese Rollen sind in den Kompatibilitätstypen des Quellcodes ausdrücklich dargestellt; der genaue Rollenumfang bleibt modellspezifisch. Modellabhängig | Standard— |
| Feld`messages[].content` | Typ`string\|content_part[]\|null` | AnforderungOptional | Werte und Limits | Standard— |
| Feld`messages[].tool_calls` | Typ`tool_call[]` | AnforderungOptional | Werte und Limits | Standard— |
| Feld`messages[].tool_call_id` | Typ`string` | AnforderungOptional | Werte und Limits Gilt, wenn: role=tool; die tatsächlich zurückgegebene ID verwenden | Standard— |
| Feld`messages[].name` | Typ`string` | AnforderungOptional | Werte und Limits | Standard— |
| Feld`messages[].reasoning_content` | Typ`string` | AnforderungOptional | Werte und Limits Gilt, wenn: Tatsächlich zurückgegebene Reasoning-Daten erneut übermitteln, sofern dieses Modell sie verwendet | Standard— |
| Feld`messages[].reasoning_details` | Typ`object\|array` | AnforderungOptional | Werte und Limits Modellabhängig | Standard— |
| Feld`max_tokens` | Typ`integer` | AnforderungOptional | Werte und Limits Minimum: 1 Modellabhängig | Standard— |
| Feld`max_completion_tokens` | Typ`integer` | AnforderungOptional | Werte und Limits Minimum: 1 Modellabhängig | Standard— |
| Feld`stream` | Typ`boolean` | AnforderungOptional | Werte und Limits | Standardfalse |
| Feld`stream_options.include_usage` | Typ`boolean` | AnforderungOptional | Werte und Limits Modellabhängig | Standard— |
| Feld`temperature` | Typ`number` | AnforderungOptional | Werte und Limits Modellabhängig | Standard— |
| Feld`top_p` | Typ`number` | AnforderungOptional | Werte und Limits Modellabhängig | Standard— |
| Feld`stop` | Typ`string\|string[]` | AnforderungOptional | Werte und Limits Modellabhängig | Standard— |
| Feld`tools` | Typ`function_tool[]` | AnforderungOptional | Werte und Limits Modellabhängig | Standard— |
| Feld`tools[].type` | Typ`string` | AnforderungOptional | Werte und Limits Modellabhängig | Standard— |
| Feld`tools[].function.name` | Typ`string` | AnforderungErforderlich | Werte und Limits Gilt, wenn: Funktionswerkzeug bereitgestellt | Standard— |
| Feld`tools[].function.description` | Typ`string` | AnforderungOptional | Werte und Limits | Standard— |
| Feld`tools[].function.parameters` | Typ`JSON_schema` | AnforderungOptional | Werte und Limits | Standard— |
| Feld`tool_choice` | Typ`string\|object` | AnforderungOptional | Werte und Limits Modellabhängig | Standard— |
| Feld`parallel_tool_calls` | Typ`boolean` | AnforderungOptional | Werte und Limits Modellabhängig | Standard— |
| Feld`response_format` | Typ`object` | AnforderungOptional | Werte und Limits Modellabhängig | Standard— |
| Feld`reasoning_effort` | Typ`string` | AnforderungOptional | Werte und Limits Modellabhängig | Standard— |
| Feld`reasoning` | Typ`object` | AnforderungOptional | Werte und Limits Modellabhängig | Standard— |
| Feld`service_tier` | Typ`string` | AnforderungOptional | Werte und Limits Modellabhängig | Standard— |
| Feld`instructions` | Typ`string` | AnforderungOptional | Werte und Limits Kompatibilitätsfeld | Standard— |
| Feld`functions` | Typ`function[]` | AnforderungOptional | Werte und Limits Modellabhängig | Standard— |
| Feld`function_call` | Typ`string\|object` | AnforderungOptional | Werte und Limits Modellabhängig | Standard— |
| Feld`prompt_cache_options` | Typ`object` | AnforderungOptional | Werte und Limits Modellabhängig | Standard— |

Kombinationen von Eingabematerialien

**Text** · UTF8-Text

`messages[].content`

**Text + Bild**

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

Methodenparameter und Lebenszyklus

| Parameter | Vertrag |
| --- | --- |
| Parameter`material_types` | Vertragtext, image |
| Parameter`required` | Vertragmodel, messages |
| Parameter`optional_controls` | Vertragnull |
| Parameter`content_type` | Vertragapplication/json |
| Parameter`text_file_material` | VertragTatsächlicher UTF-8-Inhalt wird als Text eingefügt; Datei-IDs/URLs müssen separat und exakt unterstützt werden |

Lebenszyklus: `exact retained published method`

Methodenstrukturen und IDs sind exakt; die Fähigkeiten des Anbieters sind von der Zulassung einer Anfrage zu unterscheiden.

### Tarife

#### Ailoot-Methodentarife

Eingabe

0,003 $ */ 1K*

Ausgabe

0,015 $ */ 1K*

Cache-Lesen

0,0003 $ */ 1K*

Cache-Schreiben

0,003 $ */ 1K*

Cache-Schreiben, 5 Min.

0,003 $ */ 1K tokens*

Ailoot reserviert vor einer Anfrage einen geschätzten Betrag. Nach dem Ergebnis rechnet Ailoot die endgültige Gebühr anhand des gemessenen Verbrauchs ab. Bei Streaming erfolgt die Abrechnung anhand des abschließenden Verbrauchsdatensatzes. [So funktionieren Reservierung und Abrechnung →](https://ailoot.ai/docs/de/billing/reserve/)

### Beispielanfragen

#### Ailoot · OpenAI Chat

TextbeispielEingabe, BildPython 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": "kimi-256k", "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": "kimi-256k", "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="kimi-256k",
    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: "kimi-256k",
  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='kimi-256k',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")
```

### Ergebnisse abrufen und speichern

#### Ailoot · OpenAI Chat

json oder SSE

##### Alle fertiggestellten Ergebnisse aufbewahren

Bewahren Sie jede vollständig zurückgegebene Antwort, Datei und jeden Inhaltsteil auf.

Alle Antwortvarianten mit ihren Inhalten, Werkzeugaufrufen und Reasoning-Daten beibehalten. In SSE die Deltas nach Varianten- und Werkzeugindex zusammensetzen; endgültigen Beendigungsgrund und Verbrauchsdaten beibehalten.

##### Wenn die ursprüngliche Antwort geprüft werden muss

Anfrage- und Antwort-IDs sowie Header beibehalten. Eine allgemeine URL zum Abrufen von Textaufträgen wird nicht angegeben.

Antwortfelder

| Feld | Typ |
| --- | --- |
| Feld`choices[].index` | Typinteger |
| Feld`choices[].message.content` | Typstring\|null |
| Feld`choices[].message.tool_calls` | Typtool\_call\[\] |
| Feld`choices[].message.reasoning_content` | Typstring |
| Feld`choices[].message.reasoning_details` | Typobject\|array |
| Feld`choices[].finish_reason` | Typstring\|null |
| Feld`usage` | Typobject |

Fehler und nächste Schritte

| Antwort | Bedingung | Nächster Schritt |
| --- | --- | --- |
| Antwort400 · `invalid_request_error` | BedingungPflichtfelder, Darstellung des Eingabematerials oder Parameterwert ungültig | Nächster SchrittDie angegebenen Felder vor einer neuen Erstellungsanfrage korrigieren. |

### Aliasnamen

#### Modellaliasnamen

**Ailoot** [`k3-256k`](https://ailoot.ai/models/de/#m=k3-256k&route=Core&caller=k3-256k&fmt=chat), [`kimi-256k`](https://ailoot.ai/models/de/#m=k3-256k&route=Core&caller=kimi-256k&fmt=chat), [`kimi-256k-latest`](https://ailoot.ai/models/de/#m=k3-256k&route=Core&caller=kimi-256k-latest&fmt=chat)

#### Aliasnamen für Methodenpfade

Verwenden Sie die oben angezeigten Methodenpfade.

#### Zugehörige Aufrufer-IDs

[`k3-256k`](https://ailoot.ai/models/de/#m=k3-256k&route=Core&caller=k3-256k&fmt=chat), [`kimi-256k`](https://ailoot.ai/models/de/#m=k3-256k&route=Core&caller=kimi-256k&fmt=chat), [`kimi-256k-latest`](https://ailoot.ai/models/de/#m=k3-256k&route=Core&caller=kimi-256k-latest&fmt=chat)

**Ailoot · Anthropic Messages** `POST /v1/messages` `kimi-256k-latest`

[`kimi-256k-latest`](https://ailoot.ai/models/de/#m=k3-256k&route=Core&caller=kimi-256k-latest&fmt=messages)

Moonshot /`kimi-256k-latest`

Modell-ID

- `k3-256k`
- `kimi-256k`
- `kimi-256k-latest`

### Start

Kimi-K3-Variante mit 262 144 Tokens Kontext für Entwicklung sowie Text- und Bildanalyse.

Zulässige Eingaben

Text · Bilder

Ergebnisse

Text

### In Ailoot verfügbar · Eingaben und Methoden

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

Eingabetypen

`text`, `image`

Ausgabetypen

`text`

Kontext

262.144 tokens

Maximale Ausgabe

65.536 tokens

Ausgabeformat

json oder SSE

| Feld | Typ | Anforderung | Werte und Limits | Standard |
| --- | --- | --- | --- | --- |
| Feld`model` | Typ`string` | AnforderungErforderlich | Werte und Limits kimi-256k-latest | Standard— |
| Feld`messages` | Typ`message[]` | AnforderungErforderlich | Werte und Limits Mindestanzahl Elemente: 1 | Standard— |
| Feld`messages[].role` | Typ`string` | AnforderungErforderlich | Werte und Limits user, assistant | Standard— |
| Feld`messages[].content` | Typ`string\|content_block[]` | AnforderungErforderlich | Werte und Limits | Standard— |
| Feld`system` | Typ`string\|content_block[]` | AnforderungOptional | Werte und Limits | Standard— |
| Feld`max_tokens` | Typ`integer` | AnforderungErforderlich | Werte und Limits Minimum: 1 Limit gilt für: Genaue Obergrenze des ausgewählten Modells bzw. seiner Modellkarte | Standard— |
| Feld`stream` | Typ`boolean` | AnforderungOptional | Werte und Limits | Standardfalse |
| Feld`temperature` | Typ`number` | AnforderungOptional | Werte und Limits Modellabhängig | Standard— |
| Feld`top_p` | Typ`number` | AnforderungOptional | Werte und Limits Modellabhängig | Standard— |
| Feld`stop_sequences` | Typ`string[]` | AnforderungOptional | Werte und Limits Modellabhängig | Standard— |
| Feld`tools` | Typ`tool[]` | AnforderungOptional | Werte und Limits Modellabhängig | Standard— |
| Feld`tools[].name` | Typ`string` | AnforderungOptional | Werte und Limits Gilt, wenn: Werkzeug bereitgestellt | Standard— |
| Feld`tools[].description` | Typ`string` | AnforderungOptional | Werte und Limits | Standard— |
| Feld`tools[].input_schema` | Typ`JSON_schema` | AnforderungOptional | Werte und Limits | Standard— |
| Feld`tool_choice` | Typ`object` | AnforderungOptional | Werte und Limits Modellabhängig | Standard— |
| Feld`thinking.type` | Typ`string` | AnforderungOptional | Werte und Limits Modellabhängig | Standard— |
| Feld`thinking.budget_tokens` | Typ`integer` | AnforderungOptional | Werte und Limits Modellabhängig | Standard— |
| Feld`output_config.effort` | Typ`string` | AnforderungOptional | Werte und Limits Modellabhängig | Standard— |
| Feld`metadata` | Typ`object` | AnforderungOptional | Werte und Limits | Standard— |
| Feld`cache_control` | Typ`object` | AnforderungOptional | Werte und Limits Modellabhängig | Standard— |

Kombinationen von Eingabematerialien

**Text** · UTF8-Text

`messages[].content oder Block mit type=text`

**Text + Bild**

`{type:image,source:{type:base64,media_type,data}} oder Quelle mit type=url`

Methodenparameter und Lebenszyklus

| Parameter | Vertrag |
| --- | --- |
| Parameter`material_types` | Vertragtext, image |
| Parameter`required` | Vertragmodel, messages, max\_tokens |
| Parameter`optional_controls` | Vertragnull |
| Parameter`content_type` | Vertragapplication/json |
| Parameter`text_file_material` | VertragTatsächlicher UTF-8-Inhalt wird als Text eingefügt; Datei-IDs/URLs müssen separat und exakt unterstützt werden |

Lebenszyklus: `exact retained published method`

Methodenstrukturen und IDs sind exakt; die Fähigkeiten des Anbieters sind von der Zulassung einer Anfrage zu unterscheiden.

### Tarife

#### Ailoot-Methodentarife

Eingabe

0,003 $ */ 1K*

Ausgabe

0,015 $ */ 1K*

Cache-Lesen

0,0003 $ */ 1K*

Cache-Schreiben

0,003 $ */ 1K*

Cache-Schreiben, 5 Min.

0,003 $ */ 1K tokens*

Ailoot reserviert vor einer Anfrage einen geschätzten Betrag. Nach dem Ergebnis rechnet Ailoot die endgültige Gebühr anhand des gemessenen Verbrauchs ab. Bei Streaming erfolgt die Abrechnung anhand des abschließenden Verbrauchsdatensatzes. [So funktionieren Reservierung und Abrechnung →](https://ailoot.ai/docs/de/billing/reserve/)

### Beispielanfragen

#### Ailoot · Anthropic Messages

TextbeispielEingabe, BildPython 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": "kimi-256k-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": "kimi-256k-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="kimi-256k-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: "kimi-256k-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='kimi-256k-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")
```

### Ergebnisse abrufen und speichern

#### Ailoot · Anthropic Messages

json oder SSE

##### Alle fertiggestellten Ergebnisse aufbewahren

Bewahren Sie jede vollständig zurückgegebene Antwort, Datei und jeden Inhaltsteil auf.

Alle Inhaltsblöcke, Thinking-Signaturen und tatsächlichen Werkzeugaufruf-IDs beibehalten. Alle SSE-Blockdeltas zusammensetzen; der erste Textblock ist nicht die vollständige Ausgabe.

##### Wenn die ursprüngliche Antwort geprüft werden muss

Anfrage- und Antwort-IDs sowie Header beibehalten. Eine allgemeine URL zum Abrufen von Textaufträgen wird nicht angegeben.

Antwortfelder

| Feld | Typ |
| --- | --- |
| Feld`id` | Typstring |
| Feld`model` | Typstring |
| Feld`content[]` | Typtext\|thinking\|tool\_use\|other content block |
| Feld`stop_reason` | Typstring\|null |
| Feld`usage` | Typobject |

Fehler und nächste Schritte

| Antwort | Bedingung | Nächster Schritt |
| --- | --- | --- |
| Antwort400 · `invalid_request_error` | BedingungPflichtfelder, Darstellung des Eingabematerials oder Parameterwert ungültig | Nächster SchrittDie angegebenen Felder vor einer neuen Erstellungsanfrage korrigieren. |

### Aliasnamen

#### Modellaliasnamen

**Ailoot** [`k3-256k`](https://ailoot.ai/models/de/#m=k3-256k&route=Core&caller=k3-256k&fmt=messages), [`kimi-256k`](https://ailoot.ai/models/de/#m=k3-256k&route=Core&caller=kimi-256k&fmt=messages), [`kimi-256k-latest`](https://ailoot.ai/models/de/#m=k3-256k&route=Core&caller=kimi-256k-latest&fmt=messages)

#### Aliasnamen für Methodenpfade

Verwenden Sie die oben angezeigten Methodenpfade.

#### Zugehörige Aufrufer-IDs

[`k3-256k`](https://ailoot.ai/models/de/#m=k3-256k&route=Core&caller=k3-256k&fmt=messages), [`kimi-256k`](https://ailoot.ai/models/de/#m=k3-256k&route=Core&caller=kimi-256k&fmt=messages), [`kimi-256k-latest`](https://ailoot.ai/models/de/#m=k3-256k&route=Core&caller=kimi-256k-latest&fmt=messages)

**Ailoot · OpenAI Responses** `POST /v1/responses` `kimi-256k-latest`

[`kimi-256k-latest`](https://ailoot.ai/models/de/#m=k3-256k&route=Core&caller=kimi-256k-latest&fmt=responses)

Moonshot /`kimi-256k-latest`

Modell-ID

- `k3-256k`
- `kimi-256k`
- `kimi-256k-latest`

### Start

Kimi-K3-Variante mit 262 144 Tokens Kontext für Entwicklung sowie Text- und Bildanalyse.

Zulässige Eingaben

Text · Bilder

Ergebnisse

Text

### In Ailoot verfügbar · Eingaben und Methoden

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

Eingabetypen

`text`, `image`

Ausgabetypen

`text`

Kontext

262.144 tokens

Maximale Ausgabe

65.536 tokens

Ausgabeformat

json oder SSE

| Feld | Typ | Anforderung | Werte und Limits | Standard |
| --- | --- | --- | --- | --- |
| Feld`model` | Typ`string` | AnforderungErforderlich | Werte und Limits kimi-256k-latest | Standard— |
| Feld`input` | Typ`string\|input_item[]` | AnforderungErforderlich | Werte und Limits | Standard— |
| Feld`instructions` | Typ`string` | AnforderungOptional | Werte und Limits | Standard— |
| Feld`input[].type` | Typ`string` | AnforderungOptional | Werte und Limits message, reasoning, function\_call, function\_call\_output | Standard— |
| Feld`input[].content` | Typ`string\|content_part[]` | AnforderungOptional | Werte und Limits | Standard— |
| Feld`input[].call_id` | Typ`string` | AnforderungOptional | Werte und Limits Gilt, wenn: function\_call\_output; den tatsächlich zurückgegebenen Wert von call\_id beibehalten | Standard— |
| Feld`input[].output` | Typ`string\|content_part[]` | AnforderungOptional | Werte und Limits Gilt, wenn: function\_call\_output | Standard— |
| Feld`max_output_tokens` | Typ`integer` | AnforderungOptional | Werte und Limits Minimum: 1 Modellabhängig | Standard— |
| Feld`stream` | Typ`boolean` | AnforderungOptional | Werte und Limits | Standardfalse |
| Feld`temperature` | Typ`number` | AnforderungOptional | Werte und Limits Modellabhängig | Standard— |
| Feld`top_p` | Typ`number` | AnforderungOptional | Werte und Limits Modellabhängig | Standard— |
| Feld`tools` | Typ`tool[]` | AnforderungOptional | Werte und Limits Modellabhängig | Standard— |
| Feld`tool_choice` | Typ`string\|object` | AnforderungOptional | Werte und Limits Modellabhängig | Standard— |
| Feld`parallel_tool_calls` | Typ`boolean` | AnforderungOptional | Werte und Limits Modellabhängig | Standard— |
| Feld`reasoning.effort` | Typ`string` | AnforderungOptional | Werte und Limits Modellabhängig | Standard— |
| Feld`reasoning.summary` | Typ`string` | AnforderungOptional | Werte und Limits Modellabhängig | Standard— |
| Feld`text.format` | Typ`object` | AnforderungOptional | Werte und Limits Modellabhängig | Standard— |
| Feld`text.verbosity` | Typ`string` | AnforderungOptional | Werte und Limits Modellabhängig | Standard— |
| Feld`include` | Typ`string[]` | AnforderungOptional | Werte und Limits Modellabhängig | Standard— |
| Feld`store` | Typ`boolean` | AnforderungOptional | Werte und Limits Modellabhängig | Standard— |
| Feld`previous_response_id` | Typ`string` | AnforderungOptional | Werte und Limits ID-Anforderung: Nur eine tatsächliche Antwort-ID aus einer unterstützten Fortsetzung Modellabhängig | Standard— |
| Feld`service_tier` | Typ`string` | AnforderungOptional | Werte und Limits Modellabhängig | Standard— |
| Feld`prompt_cache_key` | Typ`string` | AnforderungOptional | Werte und Limits Modellabhängig | Standard— |
| Feld`prompt_cache_options` | Typ`object` | AnforderungOptional | Werte und Limits Modellabhängig | Standard— |

Kombinationen von Eingabematerialien

**Text** · UTF8-Text

`Eingabetext oder input_text-Teil`

**Text + Bild**

`{type:input_image,image_url}`

Methodenparameter und Lebenszyklus

| Parameter | Vertrag |
| --- | --- |
| Parameter`material_types` | Vertragtext, image |
| Parameter`required` | Vertragmodel, input |
| Parameter`optional_controls` | Vertragnull |
| Parameter`content_type` | Vertragapplication/json |
| Parameter`text_file_material` | VertragTatsächlicher UTF-8-Inhalt wird als Text eingefügt; Datei-IDs/URLs müssen separat und exakt unterstützt werden |

Lebenszyklus: `exact retained published method`

Methodenstrukturen und IDs sind exakt; die Fähigkeiten des Anbieters sind von der Zulassung einer Anfrage zu unterscheiden.

### Tarife

#### Ailoot-Methodentarife

Eingabe

0,003 $ */ 1K*

Ausgabe

0,015 $ */ 1K*

Cache-Lesen

0,0003 $ */ 1K*

Cache-Schreiben

0,003 $ */ 1K*

Cache-Schreiben, 5 Min.

0,003 $ */ 1K tokens*

Ailoot reserviert vor einer Anfrage einen geschätzten Betrag. Nach dem Ergebnis rechnet Ailoot die endgültige Gebühr anhand des gemessenen Verbrauchs ab. Bei Streaming erfolgt die Abrechnung anhand des abschließenden Verbrauchsdatensatzes. [So funktionieren Reservierung und Abrechnung →](https://ailoot.ai/docs/de/billing/reserve/)

### Beispielanfragen

#### Ailoot · OpenAI Responses

TextbeispielEingabe, BildPython 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": "kimi-256k-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": "kimi-256k-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="kimi-256k-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: "kimi-256k-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="kimi-256k-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")
```

### Ergebnisse abrufen und speichern

#### Ailoot · OpenAI Responses

json oder SSE

##### Alle fertiggestellten Ergebnisse aufbewahren

Bewahren Sie jede vollständig zurückgegebene Antwort, Datei und jeden Inhaltsteil auf.

Alle Ausgabeelemente und Inhaltsteile, die tatsächliche call\_id der Funktion, verschlüsselte Reasoning-Daten und Verbrauchsdaten beibehalten. Beim Streaming die vollständige Identität von Ereignis und Element bewahren.

##### Wenn die ursprüngliche Antwort geprüft werden muss

Anfrage- und Antwort-IDs sowie Header beibehalten. Eine allgemeine URL zum Abrufen von Textaufträgen wird nicht angegeben.

Antwortfelder

| Feld | Typ |
| --- | --- |
| Feld`id` | Typstring |
| Feld`status` | Typstring |
| Feld`output[]` | Typmessage\|reasoning\|function\_call\|other item |
| Feld`output[].content[]` | Typcontent part |
| Feld`usage` | Typobject |

Fehler und nächste Schritte

| Antwort | Bedingung | Nächster Schritt |
| --- | --- | --- |
| Antwort400 · `invalid_request_error` | BedingungPflichtfelder, Darstellung des Eingabematerials oder Parameterwert ungültig | Nächster SchrittDie angegebenen Felder vor einer neuen Erstellungsanfrage korrigieren. |

### Aliasnamen

#### Modellaliasnamen

**Ailoot** [`k3-256k`](https://ailoot.ai/models/de/#m=k3-256k&route=Core&caller=k3-256k&fmt=responses), [`kimi-256k`](https://ailoot.ai/models/de/#m=k3-256k&route=Core&caller=kimi-256k&fmt=responses), [`kimi-256k-latest`](https://ailoot.ai/models/de/#m=k3-256k&route=Core&caller=kimi-256k-latest&fmt=responses)

#### Aliasnamen für Methodenpfade

Verwenden Sie die oben angezeigten Methodenpfade.

#### Zugehörige Aufrufer-IDs

[`k3-256k`](https://ailoot.ai/models/de/#m=k3-256k&route=Core&caller=k3-256k&fmt=responses), [`kimi-256k`](https://ailoot.ai/models/de/#m=k3-256k&route=Core&caller=kimi-256k&fmt=responses), [`kimi-256k-latest`](https://ailoot.ai/models/de/#m=k3-256k&route=Core&caller=kimi-256k-latest&fmt=responses)

**Ailoot · OpenAI Chat** `POST /v1/chat/completions` `kimi-256k-latest`

[`kimi-256k-latest`](https://ailoot.ai/models/de/#m=k3-256k&route=Core&caller=kimi-256k-latest&fmt=chat)

Moonshot /`kimi-256k-latest`

Modell-ID

- `k3-256k`
- `kimi-256k`
- `kimi-256k-latest`

### Start

Kimi-K3-Variante mit 262 144 Tokens Kontext für Entwicklung sowie Text- und Bildanalyse.

Zulässige Eingaben

Text · Bilder

Ergebnisse

Text

### In Ailoot verfügbar · Eingaben und Methoden

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

Eingabetypen

`text`, `image`

Ausgabetypen

`text`

Kontext

262.144 tokens

Maximale Ausgabe

65.536 tokens

Ausgabeformat

json oder SSE

| Feld | Typ | Anforderung | Werte und Limits | Standard |
| --- | --- | --- | --- | --- |
| Feld`model` | Typ`string` | AnforderungErforderlich | Werte und Limits kimi-256k-latest | Standard— |
| Feld`messages` | Typ`message[]` | AnforderungErforderlich | Werte und Limits Mindestanzahl Elemente: 1 | Standard— |
| Feld`messages[].role` | Typ`string` | AnforderungErforderlich | Werte und Limits Beispiele: system, user, assistant, tool, function Bedingungen: Diese Rollen sind in den Kompatibilitätstypen des Quellcodes ausdrücklich dargestellt; der genaue Rollenumfang bleibt modellspezifisch. Modellabhängig | Standard— |
| Feld`messages[].content` | Typ`string\|content_part[]\|null` | AnforderungOptional | Werte und Limits | Standard— |
| Feld`messages[].tool_calls` | Typ`tool_call[]` | AnforderungOptional | Werte und Limits | Standard— |
| Feld`messages[].tool_call_id` | Typ`string` | AnforderungOptional | Werte und Limits Gilt, wenn: role=tool; die tatsächlich zurückgegebene ID verwenden | Standard— |
| Feld`messages[].name` | Typ`string` | AnforderungOptional | Werte und Limits | Standard— |
| Feld`messages[].reasoning_content` | Typ`string` | AnforderungOptional | Werte und Limits Gilt, wenn: Tatsächlich zurückgegebene Reasoning-Daten erneut übermitteln, sofern dieses Modell sie verwendet | Standard— |
| Feld`messages[].reasoning_details` | Typ`object\|array` | AnforderungOptional | Werte und Limits Modellabhängig | Standard— |
| Feld`max_tokens` | Typ`integer` | AnforderungOptional | Werte und Limits Minimum: 1 Modellabhängig | Standard— |
| Feld`max_completion_tokens` | Typ`integer` | AnforderungOptional | Werte und Limits Minimum: 1 Modellabhängig | Standard— |
| Feld`stream` | Typ`boolean` | AnforderungOptional | Werte und Limits | Standardfalse |
| Feld`stream_options.include_usage` | Typ`boolean` | AnforderungOptional | Werte und Limits Modellabhängig | Standard— |
| Feld`temperature` | Typ`number` | AnforderungOptional | Werte und Limits Modellabhängig | Standard— |
| Feld`top_p` | Typ`number` | AnforderungOptional | Werte und Limits Modellabhängig | Standard— |
| Feld`stop` | Typ`string\|string[]` | AnforderungOptional | Werte und Limits Modellabhängig | Standard— |
| Feld`tools` | Typ`function_tool[]` | AnforderungOptional | Werte und Limits Modellabhängig | Standard— |
| Feld`tools[].type` | Typ`string` | AnforderungOptional | Werte und Limits Modellabhängig | Standard— |
| Feld`tools[].function.name` | Typ`string` | AnforderungErforderlich | Werte und Limits Gilt, wenn: Funktionswerkzeug bereitgestellt | Standard— |
| Feld`tools[].function.description` | Typ`string` | AnforderungOptional | Werte und Limits | Standard— |
| Feld`tools[].function.parameters` | Typ`JSON_schema` | AnforderungOptional | Werte und Limits | Standard— |
| Feld`tool_choice` | Typ`string\|object` | AnforderungOptional | Werte und Limits Modellabhängig | Standard— |
| Feld`parallel_tool_calls` | Typ`boolean` | AnforderungOptional | Werte und Limits Modellabhängig | Standard— |
| Feld`response_format` | Typ`object` | AnforderungOptional | Werte und Limits Modellabhängig | Standard— |
| Feld`reasoning_effort` | Typ`string` | AnforderungOptional | Werte und Limits Modellabhängig | Standard— |
| Feld`reasoning` | Typ`object` | AnforderungOptional | Werte und Limits Modellabhängig | Standard— |
| Feld`service_tier` | Typ`string` | AnforderungOptional | Werte und Limits Modellabhängig | Standard— |
| Feld`instructions` | Typ`string` | AnforderungOptional | Werte und Limits Kompatibilitätsfeld | Standard— |
| Feld`functions` | Typ`function[]` | AnforderungOptional | Werte und Limits Modellabhängig | Standard— |
| Feld`function_call` | Typ`string\|object` | AnforderungOptional | Werte und Limits Modellabhängig | Standard— |
| Feld`prompt_cache_options` | Typ`object` | AnforderungOptional | Werte und Limits Modellabhängig | Standard— |

Kombinationen von Eingabematerialien

**Text** · UTF8-Text

`messages[].content`

**Text + Bild**

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

Methodenparameter und Lebenszyklus

| Parameter | Vertrag |
| --- | --- |
| Parameter`material_types` | Vertragtext, image |
| Parameter`required` | Vertragmodel, messages |
| Parameter`optional_controls` | Vertragnull |
| Parameter`content_type` | Vertragapplication/json |
| Parameter`text_file_material` | VertragTatsächlicher UTF-8-Inhalt wird als Text eingefügt; Datei-IDs/URLs müssen separat und exakt unterstützt werden |

Lebenszyklus: `exact retained published method`

Methodenstrukturen und IDs sind exakt; die Fähigkeiten des Anbieters sind von der Zulassung einer Anfrage zu unterscheiden.

### Tarife

#### Ailoot-Methodentarife

Eingabe

0,003 $ */ 1K*

Ausgabe

0,015 $ */ 1K*

Cache-Lesen

0,0003 $ */ 1K*

Cache-Schreiben

0,003 $ */ 1K*

Cache-Schreiben, 5 Min.

0,003 $ */ 1K tokens*

Ailoot reserviert vor einer Anfrage einen geschätzten Betrag. Nach dem Ergebnis rechnet Ailoot die endgültige Gebühr anhand des gemessenen Verbrauchs ab. Bei Streaming erfolgt die Abrechnung anhand des abschließenden Verbrauchsdatensatzes. [So funktionieren Reservierung und Abrechnung →](https://ailoot.ai/docs/de/billing/reserve/)

### Beispielanfragen

#### Ailoot · OpenAI Chat

TextbeispielEingabe, BildPython 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": "kimi-256k-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": "kimi-256k-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="kimi-256k-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: "kimi-256k-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='kimi-256k-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")
```

### Ergebnisse abrufen und speichern

#### Ailoot · OpenAI Chat

json oder SSE

##### Alle fertiggestellten Ergebnisse aufbewahren

Bewahren Sie jede vollständig zurückgegebene Antwort, Datei und jeden Inhaltsteil auf.

Alle Antwortvarianten mit ihren Inhalten, Werkzeugaufrufen und Reasoning-Daten beibehalten. In SSE die Deltas nach Varianten- und Werkzeugindex zusammensetzen; endgültigen Beendigungsgrund und Verbrauchsdaten beibehalten.

##### Wenn die ursprüngliche Antwort geprüft werden muss

Anfrage- und Antwort-IDs sowie Header beibehalten. Eine allgemeine URL zum Abrufen von Textaufträgen wird nicht angegeben.

Antwortfelder

| Feld | Typ |
| --- | --- |
| Feld`choices[].index` | Typinteger |
| Feld`choices[].message.content` | Typstring\|null |
| Feld`choices[].message.tool_calls` | Typtool\_call\[\] |
| Feld`choices[].message.reasoning_content` | Typstring |
| Feld`choices[].message.reasoning_details` | Typobject\|array |
| Feld`choices[].finish_reason` | Typstring\|null |
| Feld`usage` | Typobject |

Fehler und nächste Schritte

| Antwort | Bedingung | Nächster Schritt |
| --- | --- | --- |
| Antwort400 · `invalid_request_error` | BedingungPflichtfelder, Darstellung des Eingabematerials oder Parameterwert ungültig | Nächster SchrittDie angegebenen Felder vor einer neuen Erstellungsanfrage korrigieren. |

### Aliasnamen

#### Modellaliasnamen

**Ailoot** [`k3-256k`](https://ailoot.ai/models/de/#m=k3-256k&route=Core&caller=k3-256k&fmt=chat), [`kimi-256k`](https://ailoot.ai/models/de/#m=k3-256k&route=Core&caller=kimi-256k&fmt=chat), [`kimi-256k-latest`](https://ailoot.ai/models/de/#m=k3-256k&route=Core&caller=kimi-256k-latest&fmt=chat)

#### Aliasnamen für Methodenpfade

Verwenden Sie die oben angezeigten Methodenpfade.

#### Zugehörige Aufrufer-IDs

[`k3-256k`](https://ailoot.ai/models/de/#m=k3-256k&route=Core&caller=k3-256k&fmt=chat), [`kimi-256k`](https://ailoot.ai/models/de/#m=k3-256k&route=Core&caller=kimi-256k&fmt=chat), [`kimi-256k-latest`](https://ailoot.ai/models/de/#m=k3-256k&route=Core&caller=kimi-256k-latest&fmt=chat)

FAQ · MoonshotAI: Kimi K3 (256K)

Welche Eingaben und Ergebnisse sind verfügbar?

`POST /v1/messages` · `k3-256k`: `text`, `image` → `text` `POST /v1/responses` · `k3-256k`: `text`, `image` → `text` `POST /v1/chat/completions` · `k3-256k`: `text`, `image` → `text` `POST /v1/messages` · `kimi-256k`: `text`, `image` → `text` `POST /v1/responses` · `kimi-256k`: `text`, `image` → `text` `POST /v1/chat/completions` · `kimi-256k`: `text`, `image` → `text` `POST /v1/messages` · `kimi-256k-latest`: `text`, `image` → `text` `POST /v1/responses` · `kimi-256k-latest`: `text`, `image` → `text` `POST /v1/chat/completions` · `kimi-256k-latest`: `text`, `image` → `text`

Welche Felder verwendet die Anfrage?

`POST /v1/messages` · `k3-256k`: `model`, `messages`, `system`, `max_tokens`, `stream`, `metadata` `POST /v1/responses` · `k3-256k`: `model`, `input`, `instructions`, `stream` `POST /v1/chat/completions` · `k3-256k`: `model`, `messages`, `stream` `POST /v1/messages` · `kimi-256k`: `model`, `messages`, `system`, `max_tokens`, `stream`, `metadata` `POST /v1/responses` · `kimi-256k`: `model`, `input`, `instructions`, `stream` `POST /v1/chat/completions` · `kimi-256k`: `model`, `messages`, `stream` `POST /v1/messages` · `kimi-256k-latest`: `model`, `messages`, `system`, `max_tokens`, `stream`, `metadata` `POST /v1/responses` · `kimi-256k-latest`: `model`, `input`, `instructions`, `stream` `POST /v1/chat/completions` · `kimi-256k-latest`: `model`, `messages`, `stream`

Welche Grenzen gelten?

`POST /v1/messages` · `k3-256k`: `ctx`: `262144`; `max_out`: `65536`; `messages.min_items`: `1`; `max_tokens.minimum`: `1` `POST /v1/responses` · `k3-256k`: `ctx`: `262144`; `max_out`: `65536` `POST /v1/chat/completions` · `k3-256k`: `ctx`: `262144`; `max_out`: `65536`; `messages.min_items`: `1` `POST /v1/messages` · `kimi-256k`: `ctx`: `262144`; `max_out`: `65536`; `messages.min_items`: `1`; `max_tokens.minimum`: `1` `POST /v1/responses` · `kimi-256k`: `ctx`: `262144`; `max_out`: `65536` `POST /v1/chat/completions` · `kimi-256k`: `ctx`: `262144`; `max_out`: `65536`; `messages.min_items`: `1` `POST /v1/messages` · `kimi-256k-latest`: `ctx`: `262144`; `max_out`: `65536`; `messages.min_items`: `1`; `max_tokens.minimum`: `1` `POST /v1/responses` · `kimi-256k-latest`: `ctx`: `262144`; `max_out`: `65536` `POST /v1/chat/completions` · `kimi-256k-latest`: `ctx`: `262144`; `max_out`: `65536`; `messages.min_items`: `1`

Verbinden Sie Ailoot mit Claude Code, OpenCode, Hermes oder Ihrer eigenen Anwendung.

## Das Unternehmen und sein Projektportfolio

Das Unternehmen und sein Projektportfolio: Millionen von Kunden; monatliche Umsätze in Milliardenhöhe.

## Tokens mit Rabatt kaufen.

Aborabatt für regelmäßige Arbeit. Aktionscodes bieten bis 50% beim Tokenkauf.

Abo

Wählen Sie einen Tarif mit Rabatt für Ihre regelmäßigen Anfragen.

Aktionscode bis 50%

Geben Sie den Code beim Kauf ein. Der Preis wird nach den gültigen Aktionsbedingungen berechnet.

Ausgaben in der Historie

Modell, Tokens und Betrag werden für jede Anfrage gespeichert.

[Abo wählen](https://ailoot.ai/docs/de/billing/subscriptions/) · [Modellpreise ansehen](https://ailoot.ai/models/de/)

## Verbinden Sie die API mit dem Produkt, das Sie verkaufen.

SaaS, Anwendungen und Bots nach dem offiziellen Angebot und Lizenzvertrag von Ailoot. Fordern Sie für den Weiterverkauf eine Reseller-Lizenz an.

Kommerzielle Anwendung

Integrieren Sie Text-, Bild-, Video- und Audioerzeugung in kostenpflichtige Funktionen Ihres Dienstes.

Reseller-Lizenz

Senden Sie Projektbeschreibung und Zugangsmodell. Fordern Sie schriftliche Nutzungs- und Weiterverkaufsbedingungen an.

Dokumente auf der Website

Offizielles Angebot, Lizenzvertrag und Datenschutzerklärung sind vor der Verbindung zugänglich.

[Reseller-Lizenz anfordern](mailto:support@ailoot.ai) · [Offizielles Angebot und Lizenzvertrag](https://ailoot.ai/legal/offer?lang=de)

## Ailoot · Das Unternehmen und sein Projektportfolio





Ailoot baut auf bewährte Betriebserfahrung, einen großen Kundenstamm, stabilen Service und kontinuierliche KPI-Kontrolle.





Das Unternehmen und sein Projektportfolio: Millionen von Kunden; monatliche Umsätze in Milliardenhöhe.





Ailoot nutzt diese Betriebserfahrung für den API-Zugang zu KI-Funktionen in Kundenprodukten, Agenten, Anwendungen und Automatisierungen.
