Source: https://ailoot.ai/models/de-ch/gemini-3-8-flash/
Canonical: https://ailoot.ai/models/de-ch/gemini-3-8-flash/
Language: de-ch

# Google: Gemini 3.8 Flash

[Markdown](https://ailoot.ai/models/de-ch/gemini-3-8-flash/index.md) · [JSON](https://ailoot.ai/models/de-ch/gemini-3-8-flash/facts.json)

## [Google: Gemini 3.8 Flash](https://ailoot.ai/models/de-ch/gemini-3-8-flash/)

Gemini 3.8 Flash ist Googles vielseitiges multimodales Modell für länger andauernde Softwareentwicklung, Agenten und komplexe wissensbasierte Aufgaben. Es verarbeitet Text, Bilder, Audio, Video und PDF, gibt Text aus und bietet die Denkstufen low, medium und high sowie Werkzeuge und strukturierte Ausgaben. Die dokumentierten Eingabe- und Ausgabegrenzen betragen 1’048’576 beziehungsweise 65’536 Token.

- [**Ailoot · Anthropic Messages** `POST /v1/messages` `gemini-3.8-flash`](https://ailoot.ai/models/de-ch/gemini-3-8-flash/#method-0)
- [**Ailoot · Gemini generateContent** `POST /v1beta/models/{model}:generateContent` `gemini-3.8-flash`](https://ailoot.ai/models/de-ch/gemini-3-8-flash/#method-1)
- [**Ailoot Ultra · OpenAI Chat** `POST /v1/chat/completions` `gemini-3.8-flash`](https://ailoot.ai/models/de-ch/gemini-3-8-flash/#method-2)
- [**Ailoot Ultra · Anthropic Messages** `POST /v1/messages` `gemini-3.8-flash`](https://ailoot.ai/models/de-ch/gemini-3-8-flash/#method-3)
- [**Ailoot Ultra · OpenAI Chat** `POST /v1/chat/completions` `google/gemini-3.8-flash`](https://ailoot.ai/models/de-ch/gemini-3-8-flash/#method-4)
- [**Ailoot Ultra · Anthropic Messages** `POST /v1/messages` `google/gemini-3.8-flash`](https://ailoot.ai/models/de-ch/gemini-3-8-flash/#method-5)
- [**Ailoot Ultra · OpenAI Chat** `POST /v1/chat/completions` `~google/gemini-flash-latest`](https://ailoot.ai/models/de-ch/gemini-3-8-flash/#method-6)
- [**Ailoot Ultra · Anthropic Messages** `POST /v1/messages` `~google/gemini-flash-latest`](https://ailoot.ai/models/de-ch/gemini-3-8-flash/#method-7)

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

Gemini 3.8 Flash ist Googles Modell mit Textausgabe für länger andauernde Softwareentwicklung, mehrstufige Agenten und komplexe wissensbasierte Arbeitsabläufe. Es baut auf Gemini 3.7 Flash auf und verbessert Softwareentwicklung und wissensbasierte Agentenarbeit. Es verarbeitet Text, Bilder, Audio, Video und PDF, sodass sich ein schriftliches Ziel mit dem tatsächlich zur Lösung benötigten Material verbinden lässt. Das nutzbare Ergebnis ist eine Codeänderung, eine erläuterte Analyse, eine schriftliche Antwort oder ein strukturierter Datensatz.

Stellen Sie für einen Programmierauftrag die Anforderung, relevante Dateien, das beobachtete Verhalten und die zu erhaltenden Bedingungen bereit. Ein Screenshot kann die gewünschte Oberfläche zeigen, während Protokolle oder ein reproduzierbares Beispiel den Fehler belegen. Bitten Sie bei der Fehlersuche das Modell, eine Abweichung zwischen dem sichtbaren Zustand eines Formulars und seinem gespeicherten Wert nachzuverfolgen, den verantwortlichen Codepfad zu ermitteln und eine gezielte Korrektur vorzuschlagen. Benennen Sie das gewünschte Endergebnis klar, damit auch eine längere Folge von Untersuchungen und Werkzeugaufrufen ein konkretes Abschlusskriterium behält.

Verwenden Sie für länger laufende Aufgaben kleinere Denkschritte, wiederholte Werkzeugaufrufe und Prüfungen der Zwischenergebnisse. Die Denkstufen low, medium und high steuern den Umfang des Denkprozesses; medium ist der dokumentierte Standard. low eignet sich für einen schnellen Entwurf oder eine klar begrenzte Analyse, während high für schwierige Mathematik, Programmierung oder mehrstufige Aufgaben vorgesehen ist. Gemini 3.8 Flash unterstützt die Denkstufe minimal nicht. Eine länger andauernde Fehlersuche und eine einfache Feldextraktion benötigen deshalb unterschiedliche Denkstufen statt derselben Einstellung für jede Anfrage.

Zu den dokumentierten Werkzeugen gehören Funktionsaufrufe, Codeausführung, Dateisuche, Such-Grounding, Google Maps Grounding und URL-Kontext; Computer Use ist als Vorschaufunktion aufgeführt. Strukturierte Ausgaben definieren ein maschinenlesbares Ergebnis. Funktionen sollten einen klaren Zweck und definierte Parameter haben: Das Modell kann eine Funktion anfordern, während die angebundene Anwendung den Vorgang ausführt und sein Ergebnis zurückgibt. Erhalten Sie über mehrere Gesprächsschritte hinweg die Funktionsidentitäten und das tatsächlich zurückgegebene Material. Eine hilfreiche abschliessende Antwort erläutert, welche Belege die vorgeschlagene Korrektur oder den extrahierten Wert stützen.

Der Migrationsleitfaden für 3.8 verwendet die Steuerung über Denkstufen anstelle der älteren Konfiguration eines Denkbudgets und empfiehlt, veraltete Sampling-Parameter sowie vorab ausgefüllte Modellnachrichten zu entfernen. Er verlangt ausserdem, Denksignaturen im betreffenden zustandslosen Ablauf zu erhalten und Funktionsantworten ihren Aufrufen anhand von Identität und Name zuzuordnen. Diese Details sind bei der Fortsetzung einer mehrstufigen Aufgabe wichtig: Der nächste Gesprächsschritt benötigt den tatsächlichen bisherigen Kontext statt einer umgeschriebenen Darstellung, die das Werkzeugergebnis oder die Signatur verliert. Formulieren Sie Frage und gewünschte Ausgabe in der neuen Nutzernachricht ausdrücklich.

Benennen Sie bei multimodaler Wissensarbeit die relevanten Dokumentseiten, das Diagramm, den Audioabschnitt oder das Videoereignis und geben Sie an, wie diese zur Antwort beitragen sollen. Ein Dokumentvergleich kann eine Tabelle der Unterschiede mit Quellenpassagen verlangen; eine Frage zu einem Diagramm kann nach den sichtbaren Werten und der daraus gestützten Schlussfolgerung fragen. Eine Videoanalyse kann eine Beschreibung der Ereignisse verlangen, die eine Feststellung begründen. Das Modell gibt zu diesen Eingaben Text zurück. Erzeugte Bilder, Sprache und Live-Audiointeraktion gehören zu separaten Modellprofilen.

Seine Gemini API-Grenzen betragen 1’048’576 Eingabetoken und 65’536 Ausgabetoken; dies entspricht dem nativen Modell mit bis zu 1M Kontext und 64K Textausgabe. Anweisungen, Gesprächsverlauf und bereitgestellte Medien belegen Eingabekontext, und Denkprozess oder ein langes Endergebnis müssen in das dokumentierte Ausgabebudget passen. Google führt für dieses Herstellerprofil ausserdem Caching, Stapelverarbeitung sowie Flex- und Priority-Verarbeitung auf. Behalten Sie bei unabhängigen Elementen eine stabile Elementkennung und ein ausdrückliches Ausgabeformat bei, damit jedes Ergebnis mit seiner Quelle verbunden bleibt.

Zu möglichen Einschränkungen gehören Halluzinationen, gelegentliche Verzögerungen oder Zeitüberschreitungen und ein höherer Tokenverbrauch bei grösserem Denkaufwand. Sein Wissensstand reicht bis März 2026, wobei manche Bereiche weiterhin auf Januar 2025 begrenzt sind. Stellen Sie aktuelle Belege bereit oder verwenden Sie die dokumentierten Grounding-Werkzeuge, wenn die Aufgabe von späteren Informationen abhängt. Prüfen Sie Quellenangaben, Berechnungen und vorgeschlagenen Code anhand der tatsächlichen Eingaben und Ausführungsergebnisse. Das nutzbare Endergebnis sollte eine belegte Feststellung von einer ungeklärten Frage unterscheiden, ohne eine flüssig formulierte Antwort als Nachweis für das gewünschte Ergebnis anzusehen.

Praktische Aufgabe

### Praktische Aufgabe

Technisches Beispiel auf Englisch

```
Diagnose an unsaved form value

Review this form flow: the input displays draft.name; typing updates draft.name; Save sends original.name; after reload the old name reappears. Explain the mismatch and propose a minimal correction in framework-neutral pseudocode. Include a regression scenario that types a new name, saves, reloads, and checks the stored value. Do not claim any browser action occurred.
```

#### Erwartetes Ergebnis

```
A cause explanation, corrected Save pseudocode and an end-to-end regression scenario.
```

#### Ergebnis prüfen

```
The submitted value comes from the edited draft, and the reload check verifies persistence rather than just the visible input.
```

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

[`gemini-3.8-flash`](https://ailoot.ai/models/de-ch/#m=google%2Fgemini-3.8-flash&route=Core&caller=gemini-3.8-flash&fmt=messages)

Google /`gemini-3.8-flash`

### Einstieg

Gemini 3.8 Flash ist Googles vielseitiges multimodales Modell für länger andauernde Softwareentwicklung, Agenten und komplexe wissensbasierte Aufgaben. Es verarbeitet Text, Bilder, Audio, Video und PDF, gibt Text aus und bietet die Denkstufen low, medium und high sowie Werkzeuge und strukturierte Ausgaben. Die dokumentierten Eingabe- und Ausgabegrenzen betragen 1’048’576 beziehungsweise 65’536 Token.

Zulässige Eingaben

Text · Bilder

Ergebnisse

Text

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

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

Eingabe

`text`, `image`

Ausgabe

`text`

Kontext

1'048'576 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 gemini-3.8-flash | 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 Model-specific | Standard— |
| Feld`top_p` | Typ`number` | AnforderungOptional | Werte und Limits Model-specific | Standard— |
| Feld`stop_sequences` | Typ`string[]` | AnforderungOptional | Werte und Limits Model-specific | Standard— |
| Feld`tools` | Typ`tool[]` | AnforderungOptional | Werte und Limits Model-specific | 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 Model-specific | Standard— |
| Feld`thinking.type` | Typ`string` | AnforderungOptional | Werte und Limits Model-specific | Standard— |
| Feld`thinking.budget_tokens` | Typ`integer` | AnforderungOptional | Werte und Limits Model-specific | Standard— |
| Feld`output_config.effort` | Typ`string` | AnforderungOptional | Werte und Limits Model-specific | Standard— |
| Feld`metadata` | Typ`object` | AnforderungOptional | Werte und Limits | Standard— |
| Feld`cache_control` | Typ`object` | AnforderungOptional | Werte und Limits Model-specific | 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.00075 */ 1K*

Ausgabe

$ 0.00375 */ 1K*

Cache lesen

$ 0.000075 */ 1K*

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 abschliessenden Verbrauchsdatensatzes. [So funktionieren Reservierung und Abrechnung →](https://ailoot.ai/docs/de-ch/billing/reserve/)

#### Details zum Referenztarif

Referenztarifstaffeln auf Modellebene ändern weder Methodenauswahl noch Kostenvoranschläge oder Gebühren. Für die aktive Abrechnung gelten die Tarife der ausgewählten Ailoot-Methode.

Referenztarifstaffeln des Modells

#### Preise nach Konfiguration

Ordnen Sie jede Gebühr den angezeigten Bedingungen zu. Verwenden Sie für jede Gruppe alternativer Konfigurationen einen Tarif.

| Konfiguration | Tarifstaffel | Gebühr |
| --- | --- | --- |
| KonfigurationOpenAI Chat · Token-Basispreise | TarifstaffelGrundtarif | Gebühr Eingabe · Eingabetoken **$0.003** / 1K Tokens Ausgabe · Ausgabetoken **$0.015** / 1K Tokens Eingabe · Cache lesen **$0.0003** / 1K Tokens Eingabe · Cache schreiben **—** / 1K Tokens Eingabe · Cache schreiben, 1 Stunde **—** / 1K Tokens |
| KonfigurationAnthropic Messages · Token-Basispreise | TarifstaffelGrundtarif | Gebühr Eingabe · Eingabetoken **$0.003** / 1K Tokens Ausgabe · Ausgabetoken **$0.015** / 1K Tokens Eingabe · Cache lesen **$0.0003** / 1K Tokens Eingabe · Cache schreiben **—** / 1K Tokens Eingabe · Cache schreiben, 1 Stunde **—** / 1K Tokens |

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

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

```python
import anthropic
import os

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

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

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

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

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

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

saveResult(msg);
```

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

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

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

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

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

<strong>Ailoot</strong> [`gemini-3.8-flash`](https://ailoot.ai/models/de-ch/#m=google%2Fgemini-3.8-flash&route=Core&caller=gemini-3.8-flash&fmt=messages)
**Ailoot Ultra** [`gemini-3.8-flash`](https://ailoot.ai/models/de-ch/#m=google%2Fgemini-3.8-flash&route=Ultra&caller=gemini-3.8-flash&fmt=messages), [`google/gemini-3.8-flash`](https://ailoot.ai/models/de-ch/#m=google%2Fgemini-3.8-flash&route=Ultra&caller=google%2Fgemini-3.8-flash&fmt=messages), [`~google/gemini-flash-latest`](https://ailoot.ai/models/de-ch/#m=google%2Fgemini-3.8-flash&route=Ultra&caller=~google%2Fgemini-flash-latest&fmt=messages)

#### Aliasnamen für Methodenpfade

`/chat/completions`

#### Zugehörige Aufrufer-IDs

[`google/gemini-3.8-flash`](https://ailoot.ai/models/de-ch/#m=google%2Fgemini-3.8-flash&route=Ultra&caller=google%2Fgemini-3.8-flash&fmt=messages), [`~google/gemini-flash-latest`](https://ailoot.ai/models/de-ch/#m=google%2Fgemini-3.8-flash&route=Ultra&caller=~google%2Fgemini-flash-latest&fmt=messages), [`gemini-3.8-flash`](https://ailoot.ai/models/de-ch/#m=google%2Fgemini-3.8-flash&route=Core&caller=gemini-3.8-flash&fmt=messages), [`gemini-3.8-flash`](https://ailoot.ai/models/de-ch/#m=google%2Fgemini-3.8-flash&route=Ultra&caller=gemini-3.8-flash&fmt=messages)

**Ailoot · Gemini generateContent** `POST /v1beta/models/{model}:generateContent` `gemini-3.8-flash`

[`gemini-3.8-flash`](https://ailoot.ai/models/de-ch/#m=google%2Fgemini-3.8-flash&route=Core&caller=gemini-3.8-flash&fmt=gemini)

Google /`gemini-3.8-flash`

### Einstieg

Gemini 3.8 Flash ist Googles vielseitiges multimodales Modell für länger andauernde Softwareentwicklung, Agenten und komplexe wissensbasierte Aufgaben. Es verarbeitet Text, Bilder, Audio, Video und PDF, gibt Text aus und bietet die Denkstufen low, medium und high sowie Werkzeuge und strukturierte Ausgaben. Die dokumentierten Eingabe- und Ausgabegrenzen betragen 1’048’576 beziehungsweise 65’536 Token.

Zulässige Eingaben

Text · Bilder

Ergebnisse

Text

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

**Ailoot · Gemini generateContent** `POST /v1beta/models/{model}:generateContent`

Eingabe

`text`, `image`

Ausgabe

`text`

Ausgabeformat

json oder unterstütztes Streaming

| Feld | Typ | Anforderung | Werte und Limits | Standard |
| --- | --- | --- | --- | --- |
| Feld`path.model` | Typ`string` | AnforderungErforderlich | Werte und Limits gemini-3.8-flash | Standard— |
| Feld`contents` | Typ`content[]` | AnforderungErforderlich | Werte und Limits Mindestanzahl Elemente: 1 | Standard— |
| Feld`contents[].role` | Typ`string` | AnforderungOptional | Werte und Limits user, model | Standard— |
| Feld`contents[].parts` | Typ`part[]` | AnforderungErforderlich | Werte und Limits | Standard— |
| Feld`systemInstruction` | Typ`content` | AnforderungOptional | Werte und Limits | Standard— |
| Feld`generationConfig.maxOutputTokens` | Typ`integer` | AnforderungOptional | Werte und Limits Minimum: 1 Model-specific | Standard— |
| Feld`generationConfig.temperature` | Typ`number` | AnforderungOptional | Werte und Limits Model-specific | Standard— |
| Feld`generationConfig.topP` | Typ`number` | AnforderungOptional | Werte und Limits Model-specific | Standard— |
| Feld`generationConfig.topK` | Typ`integer` | AnforderungOptional | Werte und Limits Model-specific | Standard— |
| Feld`generationConfig.stopSequences` | Typ`string[]` | AnforderungOptional | Werte und Limits Model-specific | Standard— |
| Feld`generationConfig.thinkingConfig.includeThoughts` | Typ`boolean` | AnforderungOptional | Werte und Limits Model-specific | Standard— |
| Feld`generationConfig.thinkingConfig.thinkingBudget` | Typ`integer` | AnforderungOptional | Werte und Limits Model-specific | Standard— |
| Feld`tools[].functionDeclarations` | Typ`function_declaration[]` | AnforderungOptional | Werte und Limits Model-specific | Standard— |
| Feld`toolConfig.functionCallingConfig.mode` | Typ`string` | AnforderungOptional | Werte und Limits Model-specific | Standard— |
| Feld`safetySettings` | Typ`object[]` | AnforderungOptional | Werte und Limits Model-specific | Standard— |
| Feld`sessionId` | Typ`string` | AnforderungOptional | Werte und Limits | Standard— |

Kombinationen von Eingabematerialien

**Text** · UTF8-Text

`contents[].parts[].text`

**Text + Bild**

`parts[].inlineData={mimeType,data}`

Methodenparameter und Lebenszyklus

| Parameter | Vertrag |
| --- | --- |
| Parameter`material_types` | Vertragtext, image |
| Parameter`required` | Vertragcontents |
| 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.00075 */ 1K*

Ausgabe

$ 0.00375 */ 1K*

Cache lesen

$ 0.000075 */ 1K*

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 abschliessenden Verbrauchsdatensatzes. [So funktionieren Reservierung und Abrechnung →](https://ailoot.ai/docs/de-ch/billing/reserve/)

#### Details zum Referenztarif

Referenztarifstaffeln auf Modellebene ändern weder Methodenauswahl noch Kostenvoranschläge oder Gebühren. Für die aktive Abrechnung gelten die Tarife der ausgewählten Ailoot-Methode.

Referenztarifstaffeln des Modells

#### Preise nach Konfiguration

Ordnen Sie jede Gebühr den angezeigten Bedingungen zu. Verwenden Sie für jede Gruppe alternativer Konfigurationen einen Tarif.

| Konfiguration | Tarifstaffel | Gebühr |
| --- | --- | --- |
| KonfigurationOpenAI Chat · Token-Basispreise | TarifstaffelGrundtarif | Gebühr Eingabe · Eingabetoken **$0.003** / 1K Tokens Ausgabe · Ausgabetoken **$0.015** / 1K Tokens Eingabe · Cache lesen **$0.0003** / 1K Tokens Eingabe · Cache schreiben **—** / 1K Tokens Eingabe · Cache schreiben, 1 Stunde **—** / 1K Tokens |
| KonfigurationAnthropic Messages · Token-Basispreise | TarifstaffelGrundtarif | Gebühr Eingabe · Eingabetoken **$0.003** / 1K Tokens Ausgabe · Ausgabetoken **$0.015** / 1K Tokens Eingabe · Cache lesen **$0.0003** / 1K Tokens Eingabe · Cache schreiben **—** / 1K Tokens Eingabe · Cache schreiben, 1 Stunde **—** / 1K Tokens |

### Beispielanfragen

#### Ailoot · Gemini generateContent

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('{"contents": []}')
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["contents"]=[{"role":"user","parts":[{"text":"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/v1beta/models/gemini-3.8-flash:generateContent \
  -H "x-goog-api-key: $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('{"contents": [{"role": "user", "parts": [{"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["contents"][0]["parts"].append({"inlineData":{"mimeType":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/v1beta/models/gemini-3.8-flash:generateContent \
  -H "x-goog-api-key: $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 google import genai
from google.genai import types
import os

if not os.environ.get("AILOOT_API_KEY", "").strip(): raise SystemExit("Set AILOOT_API_KEY before making a request")
client = genai.Client(
    api_key=os.environ["AILOOT_API_KEY"],
    http_options=types.HttpOptions(base_url="https://api.ailoot.ai"),
)
resp = client.models.generate_content(model="gemini-3.8-flash", contents="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_json_dict())
```

```js
import { GoogleGenAI } from "@google/genai";

if (!process.env.AILOOT_API_KEY?.trim()) throw new Error("Set AILOOT_API_KEY before making a request");
const ai = new GoogleGenAI({ apiKey: process.env.AILOOT_API_KEY, httpOptions: { baseUrl: "https://api.ailoot.ai" } });
const resp = await ai.models.generateContent({ model: "gemini-3.8-flash", contents: "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 google import genai
from google.genai import types
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=genai.Client(api_key=os.environ["AILOOT_API_KEY"],http_options=types.HttpOptions(base_url="https://api.ailoot.ai"))
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))

count=0
with Path("stream-events.jsonl").open("w",encoding="utf-8") as log:
    for chunk in client.models.generate_content_stream(model='gemini-3.8-flash',contents="Explain observations and hypotheses in three sentences."):
        payload=chunk.to_json_dict()
        log.write(json.dumps(payload,ensure_ascii=False)+"\n"); log.flush()
        save_result(payload,"stream-chunk-"+str(count))
        count+=1
```

### Ergebnisse abrufen und speichern

#### Ailoot · Gemini generateContent

json oder unterstütztes Streaming

##### Alle fertiggestellten Ergebnisse aufbewahren

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

Alle Kandidaten und Teile einschliesslich Funktionsaufrufen, Gedankensignaturen und Verbrauchsdaten beibehalten; Streaming-Abschnitte in der richtigen Reihenfolge zusammensetzen.

##### 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`responseId` | Typstring |
| Feld`modelVersion` | Typstring |
| Feld`candidates[].content.parts[]` | Typtext\|inlineData\|functionCall\|other part |
| Feld`candidates[].finishReason` | Typstring |
| Feld`usageMetadata` | 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

<strong>Ailoot</strong> [`gemini-3.8-flash`](https://ailoot.ai/models/de-ch/#m=google%2Fgemini-3.8-flash&route=Core&caller=gemini-3.8-flash&fmt=gemini)
**Ailoot Ultra** [`gemini-3.8-flash`](https://ailoot.ai/models/de-ch/#m=google%2Fgemini-3.8-flash&route=Ultra&caller=gemini-3.8-flash), [`google/gemini-3.8-flash`](https://ailoot.ai/models/de-ch/#m=google%2Fgemini-3.8-flash&route=Ultra&caller=google%2Fgemini-3.8-flash), [`~google/gemini-flash-latest`](https://ailoot.ai/models/de-ch/#m=google%2Fgemini-3.8-flash&route=Ultra&caller=~google%2Fgemini-flash-latest)

#### Aliasnamen für Methodenpfade

`/chat/completions`

#### Zugehörige Aufrufer-IDs

[`google/gemini-3.8-flash`](https://ailoot.ai/models/de-ch/#m=google%2Fgemini-3.8-flash&route=Ultra&caller=google%2Fgemini-3.8-flash), [`~google/gemini-flash-latest`](https://ailoot.ai/models/de-ch/#m=google%2Fgemini-3.8-flash&route=Ultra&caller=~google%2Fgemini-flash-latest), [`gemini-3.8-flash`](https://ailoot.ai/models/de-ch/#m=google%2Fgemini-3.8-flash&route=Core&caller=gemini-3.8-flash&fmt=gemini), [`gemini-3.8-flash`](https://ailoot.ai/models/de-ch/#m=google%2Fgemini-3.8-flash&route=Ultra&caller=gemini-3.8-flash)

**Ailoot Ultra · OpenAI Chat** `POST /v1/chat/completions` `gemini-3.8-flash`

[`gemini-3.8-flash`](https://ailoot.ai/models/de-ch/#m=google%2Fgemini-3.8-flash&route=Ultra&caller=gemini-3.8-flash&fmt=chat)

Google /`gemini-3.8-flash`

Modell-ID

- `gemini-3.8-flash`
- `google/gemini-3.8-flash`
- `~google/gemini-flash-latest`

### Einstieg

Gemini 3.8 Flash ist Googles vielseitiges multimodales Modell für länger andauernde Softwareentwicklung, Agenten und komplexe wissensbasierte Aufgaben. Es verarbeitet Text, Bilder, Audio, Video und PDF, gibt Text aus und bietet die Denkstufen low, medium und high sowie Werkzeuge und strukturierte Ausgaben. Die dokumentierten Eingabe- und Ausgabegrenzen betragen 1’048’576 beziehungsweise 65’536 Token.

Zulässige Eingaben

Text

Ergebnisse

Text

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

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

Eingabe

`text`

Ausgabe

`text`

Ausgabeformat

json oder SSE

| Feld | Typ | Anforderung | Werte und Limits | Standard |
| --- | --- | --- | --- | --- |
| Feld`model` | Typ`string` | AnforderungErforderlich | Werte und Limits gemini-3.8-flash | Standard— |
| Feld`messages` | Typ`message[]` | AnforderungErforderlich | Werte und Limits Mindestanzahl Elemente: 1 | Standard— |
| Feld`messages[].role` | Typ`string` | AnforderungErforderlich | Werte und Limits Model-specific | Standard— |
| Feld`messages[].content` | Typ`string` | AnforderungOptional | Werte und Limits Gilt, wenn: Textgespräch | Standard— |
| Feld`stream` | Typ`boolean` | AnforderungOptional | Werte und Limits | Standardfalse |

Kombinationen von Eingabematerialien

**Text** · UTF8-Text

`messages[].content`

Methodenparameter und Lebenszyklus

| Parameter | Vertrag |
| --- | --- |
| Parameter`content_type` | Vertragapplication/json |
| Parameter`required` | Vertragmodel, messages |
| Parameter`material_types` | Vertragtext |
| Parameter`messages` | VertragNachrichtenarray mit role/content-Struktur |
| Parameter`file_material` | VertragTatsächliches UTF-8-Dokument als wörtlicher Text eingefügt; keine Datei-ID abgeleitet |
| Parameter`optional_controls` | Vertragstream |
| Parameter`control_scope` | VertragTextgespräch; stream ist ein boolescher Wert und standardmässig false. |
| Parameter`output_modalities` | Vertragtext |
| Parameter`hosted_operations` | Vertragfalse |
| Parameter`multimodal_input_binding` | Vertragnull |

Methodenaliasnamen: `/chat/completions`

Lebenszyklus: `synchronous_or_streamed`

Die genaue Modell-ID zusammen mit messages senden.

Die Kontextlänge ist keine Ausgabeobergrenze.

Eine Textdatei kann wörtlichen Text liefern; Bild-, Audio- und Dateiobjekteingaben benötigen eine exakte Zuordnung.

### Tarife

Tarifangaben erweitern die Anfrageoptionen nicht. Unterstützte Parameter stehen bei der ausgewählten Methode.

Schnellmodus

Nicht angegeben Wenn der Schnellmodus ausgewählt ist

Flex-Modus

Nicht angegeben Wenn der Modus flex ausgewählt ist

Maximaler Denkaufwand

Nicht angegeben Wenn beim maximalen Denkaufwand die Standardanpassung (default) verwendet wird

Preise für explizites Caching

Nicht aktiviert Wenn explizites Caching angefordert wird

#### Ailoot-Tarife

#### Preise nach Konfiguration

| Konfiguration | Tarifstaffel | Gebühr |
| --- | --- | --- |
| KonfigurationBasistarife für Token | TarifstaffelGrundtarif | Gebühr Eingabe · Eingabetoken **$0.003** / 1K Tokens Ausgabe · Ausgabetoken **$0.015** / 1K Tokens Eingabe · Cache lesen **$0.0003** / 1K Tokens Eingabe · Cache schreiben **—** / 1K Tokens Eingabe · Cache schreiben, 1 Stunde **—** / 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 abschliessenden Verbrauchsdatensatzes. [So funktionieren Reservierung und Abrechnung →](https://ailoot.ai/docs/de-ch/billing/reserve/)

### Beispielanfragen

#### Ailoot Ultra · OpenAI Chat

curlPython SDK

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

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

```python
from openai import OpenAI
import os

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

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

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

### Ergebnisse abrufen und speichern

#### Ailoot Ultra · 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

<strong>Ailoot</strong> [`gemini-3.8-flash`](https://ailoot.ai/models/de-ch/#m=google%2Fgemini-3.8-flash&route=Core&caller=gemini-3.8-flash)
**Ailoot Ultra** [`gemini-3.8-flash`](https://ailoot.ai/models/de-ch/#m=google%2Fgemini-3.8-flash&route=Ultra&caller=gemini-3.8-flash&fmt=chat), [`google/gemini-3.8-flash`](https://ailoot.ai/models/de-ch/#m=google%2Fgemini-3.8-flash&route=Ultra&caller=google%2Fgemini-3.8-flash&fmt=chat), [`~google/gemini-flash-latest`](https://ailoot.ai/models/de-ch/#m=google%2Fgemini-3.8-flash&route=Ultra&caller=~google%2Fgemini-flash-latest&fmt=chat)

#### Aliasnamen für Methodenpfade

`/chat/completions`

#### Zugehörige Aufrufer-IDs

[`google/gemini-3.8-flash`](https://ailoot.ai/models/de-ch/#m=google%2Fgemini-3.8-flash&route=Ultra&caller=google%2Fgemini-3.8-flash&fmt=chat), [`~google/gemini-flash-latest`](https://ailoot.ai/models/de-ch/#m=google%2Fgemini-3.8-flash&route=Ultra&caller=~google%2Fgemini-flash-latest&fmt=chat), [`gemini-3.8-flash`](https://ailoot.ai/models/de-ch/#m=google%2Fgemini-3.8-flash&route=Core&caller=gemini-3.8-flash), [`gemini-3.8-flash`](https://ailoot.ai/models/de-ch/#m=google%2Fgemini-3.8-flash&route=Ultra&caller=gemini-3.8-flash&fmt=chat)

**Ailoot Ultra · Anthropic Messages** `POST /v1/messages` `gemini-3.8-flash`

[`gemini-3.8-flash`](https://ailoot.ai/models/de-ch/#m=google%2Fgemini-3.8-flash&route=Ultra&caller=gemini-3.8-flash&fmt=messages)

Google /`gemini-3.8-flash`

Modell-ID

- `gemini-3.8-flash`
- `google/gemini-3.8-flash`
- `~google/gemini-flash-latest`

### Einstieg

Gemini 3.8 Flash ist Googles vielseitiges multimodales Modell für länger andauernde Softwareentwicklung, Agenten und komplexe wissensbasierte Aufgaben. Es verarbeitet Text, Bilder, Audio, Video und PDF, gibt Text aus und bietet die Denkstufen low, medium und high sowie Werkzeuge und strukturierte Ausgaben. Die dokumentierten Eingabe- und Ausgabegrenzen betragen 1’048’576 beziehungsweise 65’536 Token.

Zulässige Eingaben

Text

Ergebnisse

json · sse

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

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

Eingabe

`text`

Ausgabe

`json`, `sse`

Ausgabeformat

JSON oder SSE

| Feld | Typ | Anforderung | Werte und Limits | Standard |
| --- | --- | --- | --- | --- |
| Feld`model` | Typ`string` | AnforderungErforderlich | Werte und Limits gemini-3.8-flash | Standard— |
| Feld`messages` | Typ`message[]` | AnforderungErforderlich | Werte und Limits | Standard— |
| Feld`messages[].role` | Typ`string` | AnforderungErforderlich | Werte und Limits user, assistant | Standard— |
| Feld`messages[].content` | Typ`string` | AnforderungErforderlich | Werte und Limits | Standard— |
| Feld`max_tokens` | Typ`integer` | AnforderungErforderlich | Werte und Limits | Standard— |
| Feld`stream` | Typ`boolean` | AnforderungOptional | Werte und Limits | Standardfalse |

Kombinationen von Eingabematerialien

**Text** · UTF-8-Text

`Zeichenfolge messages[].content`

Methodenparameter und Lebenszyklus

| Parameter | Vertrag |
| --- | --- |
| Parameter`content_type` | Vertragapplication/json |
| Parameter`required` | Vertragmodel, messages, max\_tokens |
| Parameter`optional_controls` | Vertragstream |
| Parameter`material_types` | Vertragtext |
| Parameter`text_file_material` | VertragDas tatsächliche UTF-8-Dokument lesen und seinen Text in die angegebene Zeichenfolge für Eingabe oder Nachrichteninhalt einfügen. |

Lebenszyklus: `synchronous_or_streamed`

### Tarife

Tarifangaben erweitern die Anfrageoptionen nicht. Unterstützte Parameter stehen bei der ausgewählten Methode.

Schnellmodus

Nicht angegeben Wenn der Schnellmodus ausgewählt ist

Flex-Modus

Nicht angegeben Wenn der Modus flex ausgewählt ist

Maximaler Denkaufwand

Nicht angegeben Wenn beim maximalen Denkaufwand die Standardanpassung (default) verwendet wird

Preise für explizites Caching

Nicht aktiviert Wenn explizites Caching angefordert wird

#### Ailoot-Tarife

#### Preise nach Konfiguration

| Konfiguration | Tarifstaffel | Gebühr |
| --- | --- | --- |
| KonfigurationBasistarife für Token | TarifstaffelGrundtarif | Gebühr Eingabe · Eingabetoken **$0.003** / 1K Tokens Ausgabe · Ausgabetoken **$0.015** / 1K Tokens Eingabe · Cache lesen **$0.0003** / 1K Tokens Eingabe · Cache schreiben **—** / 1K Tokens Eingabe · Cache schreiben, 1 Stunde **—** / 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 abschliessenden Verbrauchsdatensatzes. [So funktionieren Reservierung und Abrechnung →](https://ailoot.ai/docs/de-ch/billing/reserve/)

### Beispielanfragen

#### Ailoot Ultra · Anthropic Messages

Vollständiger minimaler JSON-Bodycurl · eigenes UTF-8-Dokument verwendenPython · das vollständige Ergebnis speichern

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

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

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

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

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

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

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

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

### Ergebnisse abrufen und speichern

#### Ailoot Ultra · 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

<strong>Ailoot</strong> [`gemini-3.8-flash`](https://ailoot.ai/models/de-ch/#m=google%2Fgemini-3.8-flash&route=Core&caller=gemini-3.8-flash&fmt=messages)
**Ailoot Ultra** [`gemini-3.8-flash`](https://ailoot.ai/models/de-ch/#m=google%2Fgemini-3.8-flash&route=Ultra&caller=gemini-3.8-flash&fmt=messages), [`google/gemini-3.8-flash`](https://ailoot.ai/models/de-ch/#m=google%2Fgemini-3.8-flash&route=Ultra&caller=google%2Fgemini-3.8-flash&fmt=messages), [`~google/gemini-flash-latest`](https://ailoot.ai/models/de-ch/#m=google%2Fgemini-3.8-flash&route=Ultra&caller=~google%2Fgemini-flash-latest&fmt=messages)

#### Aliasnamen für Methodenpfade

`/chat/completions`

#### Zugehörige Aufrufer-IDs

[`google/gemini-3.8-flash`](https://ailoot.ai/models/de-ch/#m=google%2Fgemini-3.8-flash&route=Ultra&caller=google%2Fgemini-3.8-flash&fmt=messages), [`~google/gemini-flash-latest`](https://ailoot.ai/models/de-ch/#m=google%2Fgemini-3.8-flash&route=Ultra&caller=~google%2Fgemini-flash-latest&fmt=messages), [`gemini-3.8-flash`](https://ailoot.ai/models/de-ch/#m=google%2Fgemini-3.8-flash&route=Core&caller=gemini-3.8-flash&fmt=messages), [`gemini-3.8-flash`](https://ailoot.ai/models/de-ch/#m=google%2Fgemini-3.8-flash&route=Ultra&caller=gemini-3.8-flash&fmt=messages)

**Ailoot Ultra · OpenAI Chat** `POST /v1/chat/completions` `google/gemini-3.8-flash`

[`google/gemini-3.8-flash`](https://ailoot.ai/models/de-ch/#m=google%2Fgemini-3.8-flash&route=Ultra&caller=google%2Fgemini-3.8-flash&fmt=chat)

Google /`google/gemini-3.8-flash`

Modell-ID

- `gemini-3.8-flash`
- `google/gemini-3.8-flash`
- `~google/gemini-flash-latest`

### Einstieg

Gemini 3.8 Flash ist Googles vielseitiges multimodales Modell für länger andauernde Softwareentwicklung, Agenten und komplexe wissensbasierte Aufgaben. Es verarbeitet Text, Bilder, Audio, Video und PDF, gibt Text aus und bietet die Denkstufen low, medium und high sowie Werkzeuge und strukturierte Ausgaben. Die dokumentierten Eingabe- und Ausgabegrenzen betragen 1’048’576 beziehungsweise 65’536 Token.

Zulässige Eingaben

Text

Ergebnisse

Text

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

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

Eingabe

`text`

Ausgabe

`text`

Ausgabeformat

json oder SSE

| Feld | Typ | Anforderung | Werte und Limits | Standard |
| --- | --- | --- | --- | --- |
| Feld`model` | Typ`string` | AnforderungErforderlich | Werte und Limits google/gemini-3.8-flash | 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. Model-specific | 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 Model-specific | Standard— |
| Feld`max_tokens` | Typ`integer` | AnforderungOptional | Werte und Limits Minimum: 1 Model-specific | Standard— |
| Feld`max_completion_tokens` | Typ`integer` | AnforderungOptional | Werte und Limits Minimum: 1 Model-specific | Standard— |
| Feld`stream` | Typ`boolean` | AnforderungOptional | Werte und Limits | Standardfalse |
| Feld`stream_options.include_usage` | Typ`boolean` | AnforderungOptional | Werte und Limits Model-specific | Standard— |
| Feld`temperature` | Typ`number` | AnforderungOptional | Werte und Limits Model-specific | Standard— |
| Feld`top_p` | Typ`number` | AnforderungOptional | Werte und Limits Model-specific | Standard— |
| Feld`stop` | Typ`string\|string[]` | AnforderungOptional | Werte und Limits Model-specific | Standard— |
| Feld`tools` | Typ`function_tool[]` | AnforderungOptional | Werte und Limits Model-specific | Standard— |
| Feld`tools[].type` | Typ`string` | AnforderungOptional | Werte und Limits function Model-specific | 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 Model-specific | Standard— |
| Feld`parallel_tool_calls` | Typ`boolean` | AnforderungOptional | Werte und Limits Model-specific | Standard— |
| Feld`response_format` | Typ`object` | AnforderungOptional | Werte und Limits Model-specific | Standard— |
| Feld`reasoning_effort` | Typ`string` | AnforderungOptional | Werte und Limits Model-specific | Standard— |
| Feld`reasoning` | Typ`object` | AnforderungOptional | Werte und Limits Model-specific | Standard— |
| Feld`service_tier` | Typ`string` | AnforderungOptional | Werte und Limits Model-specific | Standard— |
| Feld`instructions` | Typ`string` | AnforderungOptional | Werte und Limits Kompatibilitätsfeld | Standard— |
| Feld`functions` | Typ`function[]` | AnforderungOptional | Werte und Limits Model-specific | Standard— |
| Feld`function_call` | Typ`string\|object` | AnforderungOptional | Werte und Limits Model-specific | Standard— |
| Feld`prompt_cache_options` | Typ`object` | AnforderungOptional | Werte und Limits Model-specific | Standard— |
| Feld`modalities` | Typ`string[]` | AnforderungOptional | Werte und Limits text | Standard— |
| Feld`provider` | Typ`object` | AnforderungOptional | Werte und Limits Bedingungen: provider.options wird auf dieser Ultra-Textroute abgelehnt | Standard— |
| Feld`cache_control.ttl` | Typ`string` | AnforderungOptional | Werte und Limits Bedingungen: 1h wird in den tatsächlichen Prompt-Cache-Feldern abgelehnt | Standard— |

Kombinationen von Eingabematerialien

**Text** · UTF8-Text

`messages[].content`

Methodenparameter und Lebenszyklus

| Parameter | Vertrag |
| --- | --- |
| Parameter`content_type` | Vertragapplication/json |
| Parameter`required` | Vertragmodel, messages |
| Parameter`material_types` | Vertragtext |
| Parameter`messages` | VertragNachrichtenarray mit role/content-Struktur |
| Parameter`file_material` | VertragTatsächliches UTF-8-Dokument als wörtlicher Text eingefügt; keine Datei-ID abgeleitet |
| Parameter`optional_controls` | Vertragstream, temperature, top\_p, stop, max\_tokens, max\_completion\_tokens, reasoning, response\_format, tools, tool\_choice |
| Parameter`control_scope` | VertragModellspezifisch; benutzerseitige Funktionswerkzeuge unterscheiden sich von gehosteten Werkzeugen |
| Parameter`output_modalities` | Vertragtext |
| Parameter`hosted_operations` | Vertragfalse |
| Parameter`multimodal_input_binding` | Vertragnull |

Lebenszyklus: `synchronous_or_streamed`

Die genaue Modell-ID zusammen mit messages senden.

Die Kontextlänge ist keine Ausgabeobergrenze.

Eine Textdatei kann wörtlichen Text liefern; Bild-, Audio- und Dateiobjekteingaben benötigen eine exakte Zuordnung.

### Tarife

Tarifangaben erweitern die Anfrageoptionen nicht. Unterstützte Parameter stehen bei der ausgewählten Methode.

Schnellmodus

Nicht angegeben Wenn der Schnellmodus ausgewählt ist

Flex-Modus

Nicht angegeben Wenn der Modus flex ausgewählt ist

Maximaler Denkaufwand

Nicht angegeben Wenn beim maximalen Denkaufwand die Standardanpassung (default) verwendet wird

Preise für explizites Caching

Nicht aktiviert Wenn explizites Caching angefordert wird

#### Ailoot-Tarife

#### Preise nach Konfiguration

| Konfiguration | Tarifstaffel | Gebühr |
| --- | --- | --- |
| KonfigurationBasistarife für Token | TarifstaffelGrundtarif | Gebühr Eingabe · Eingabetoken **$0.003** / 1K Tokens Ausgabe · Ausgabetoken **$0.015** / 1K Tokens Eingabe · Cache lesen **$0.0003** / 1K Tokens Eingabe · Cache schreiben **—** / 1K Tokens Eingabe · Cache schreiben, 1 Stunde **—** / 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 abschliessenden Verbrauchsdatensatzes. [So funktionieren Reservierung und Abrechnung →](https://ailoot.ai/docs/de-ch/billing/reserve/)

### Beispielanfragen

#### Ailoot Ultra · OpenAI Chat

curlPython SDKPython-Stream

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

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

```python
from openai import OpenAI
import os

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

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

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

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

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

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

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

### Ergebnisse abrufen und speichern

#### Ailoot Ultra · 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

<strong>Ailoot</strong> [`gemini-3.8-flash`](https://ailoot.ai/models/de-ch/#m=google%2Fgemini-3.8-flash&route=Core&caller=gemini-3.8-flash)
**Ailoot Ultra** [`gemini-3.8-flash`](https://ailoot.ai/models/de-ch/#m=google%2Fgemini-3.8-flash&route=Ultra&caller=gemini-3.8-flash&fmt=chat), [`google/gemini-3.8-flash`](https://ailoot.ai/models/de-ch/#m=google%2Fgemini-3.8-flash&route=Ultra&caller=google%2Fgemini-3.8-flash&fmt=chat), [`~google/gemini-flash-latest`](https://ailoot.ai/models/de-ch/#m=google%2Fgemini-3.8-flash&route=Ultra&caller=~google%2Fgemini-flash-latest&fmt=chat)

#### Aliasnamen für Methodenpfade

`/chat/completions`

#### Zugehörige Aufrufer-IDs

[`google/gemini-3.8-flash`](https://ailoot.ai/models/de-ch/#m=google%2Fgemini-3.8-flash&route=Ultra&caller=google%2Fgemini-3.8-flash&fmt=chat), [`~google/gemini-flash-latest`](https://ailoot.ai/models/de-ch/#m=google%2Fgemini-3.8-flash&route=Ultra&caller=~google%2Fgemini-flash-latest&fmt=chat), [`gemini-3.8-flash`](https://ailoot.ai/models/de-ch/#m=google%2Fgemini-3.8-flash&route=Core&caller=gemini-3.8-flash), [`gemini-3.8-flash`](https://ailoot.ai/models/de-ch/#m=google%2Fgemini-3.8-flash&route=Ultra&caller=gemini-3.8-flash&fmt=chat)

**Ailoot Ultra · Anthropic Messages** `POST /v1/messages` `google/gemini-3.8-flash`

[`google/gemini-3.8-flash`](https://ailoot.ai/models/de-ch/#m=google%2Fgemini-3.8-flash&route=Ultra&caller=google%2Fgemini-3.8-flash&fmt=messages)

Google /`google/gemini-3.8-flash`

Modell-ID

- `gemini-3.8-flash`
- `google/gemini-3.8-flash`
- `~google/gemini-flash-latest`

### Einstieg

Gemini 3.8 Flash ist Googles vielseitiges multimodales Modell für länger andauernde Softwareentwicklung, Agenten und komplexe wissensbasierte Aufgaben. Es verarbeitet Text, Bilder, Audio, Video und PDF, gibt Text aus und bietet die Denkstufen low, medium und high sowie Werkzeuge und strukturierte Ausgaben. Die dokumentierten Eingabe- und Ausgabegrenzen betragen 1’048’576 beziehungsweise 65’536 Token.

Zulässige Eingaben

Text

Ergebnisse

json · sse

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

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

Eingabe

`text`

Ausgabe

`json`, `sse`

Ausgabeformat

JSON oder SSE

| Feld | Typ | Anforderung | Werte und Limits | Standard |
| --- | --- | --- | --- | --- |
| Feld`model` | Typ`string` | AnforderungErforderlich | Werte und Limits google/gemini-3.8-flash | Standard— |
| Feld`messages` | Typ`message[]` | AnforderungErforderlich | Werte und Limits | Standard— |
| Feld`messages[].role` | Typ`string` | AnforderungErforderlich | Werte und Limits user, assistant | Standard— |
| Feld`messages[].content` | Typ`string` | AnforderungErforderlich | Werte und Limits | Standard— |
| Feld`max_tokens` | Typ`integer` | AnforderungErforderlich | Werte und Limits | Standard— |
| Feld`stream` | Typ`boolean` | AnforderungOptional | Werte und Limits | Standardfalse |

Kombinationen von Eingabematerialien

**Text** · UTF-8-Text

`Zeichenfolge messages[].content`

Methodenparameter und Lebenszyklus

| Parameter | Vertrag |
| --- | --- |
| Parameter`content_type` | Vertragapplication/json |
| Parameter`required` | Vertragmodel, messages, max\_tokens |
| Parameter`optional_controls` | Vertragstream |
| Parameter`material_types` | Vertragtext |
| Parameter`text_file_material` | VertragDas tatsächliche UTF-8-Dokument lesen und seinen Text in die angegebene Zeichenfolge für Eingabe oder Nachrichteninhalt einfügen. |

Lebenszyklus: `synchronous_or_streamed`

### Tarife

Tarifangaben erweitern die Anfrageoptionen nicht. Unterstützte Parameter stehen bei der ausgewählten Methode.

Schnellmodus

Nicht angegeben Wenn der Schnellmodus ausgewählt ist

Flex-Modus

Nicht angegeben Wenn der Modus flex ausgewählt ist

Maximaler Denkaufwand

Nicht angegeben Wenn beim maximalen Denkaufwand die Standardanpassung (default) verwendet wird

Preise für explizites Caching

Nicht aktiviert Wenn explizites Caching angefordert wird

#### Ailoot-Tarife

#### Preise nach Konfiguration

| Konfiguration | Tarifstaffel | Gebühr |
| --- | --- | --- |
| KonfigurationBasistarife für Token | TarifstaffelGrundtarif | Gebühr Eingabe · Eingabetoken **$0.003** / 1K Tokens Ausgabe · Ausgabetoken **$0.015** / 1K Tokens Eingabe · Cache lesen **$0.0003** / 1K Tokens Eingabe · Cache schreiben **—** / 1K Tokens Eingabe · Cache schreiben, 1 Stunde **—** / 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 abschliessenden Verbrauchsdatensatzes. [So funktionieren Reservierung und Abrechnung →](https://ailoot.ai/docs/de-ch/billing/reserve/)

### Beispielanfragen

#### Ailoot Ultra · Anthropic Messages

Vollständiger minimaler JSON-Bodycurl · eigenes UTF-8-Dokument verwendenPython · das vollständige Ergebnis speichern

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

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

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

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

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

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

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

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

### Ergebnisse abrufen und speichern

#### Ailoot Ultra · 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

<strong>Ailoot</strong> [`gemini-3.8-flash`](https://ailoot.ai/models/de-ch/#m=google%2Fgemini-3.8-flash&route=Core&caller=gemini-3.8-flash&fmt=messages)
**Ailoot Ultra** [`gemini-3.8-flash`](https://ailoot.ai/models/de-ch/#m=google%2Fgemini-3.8-flash&route=Ultra&caller=gemini-3.8-flash&fmt=messages), [`google/gemini-3.8-flash`](https://ailoot.ai/models/de-ch/#m=google%2Fgemini-3.8-flash&route=Ultra&caller=google%2Fgemini-3.8-flash&fmt=messages), [`~google/gemini-flash-latest`](https://ailoot.ai/models/de-ch/#m=google%2Fgemini-3.8-flash&route=Ultra&caller=~google%2Fgemini-flash-latest&fmt=messages)

#### Aliasnamen für Methodenpfade

`/chat/completions`

#### Zugehörige Aufrufer-IDs

[`google/gemini-3.8-flash`](https://ailoot.ai/models/de-ch/#m=google%2Fgemini-3.8-flash&route=Ultra&caller=google%2Fgemini-3.8-flash&fmt=messages), [`~google/gemini-flash-latest`](https://ailoot.ai/models/de-ch/#m=google%2Fgemini-3.8-flash&route=Ultra&caller=~google%2Fgemini-flash-latest&fmt=messages), [`gemini-3.8-flash`](https://ailoot.ai/models/de-ch/#m=google%2Fgemini-3.8-flash&route=Core&caller=gemini-3.8-flash&fmt=messages), [`gemini-3.8-flash`](https://ailoot.ai/models/de-ch/#m=google%2Fgemini-3.8-flash&route=Ultra&caller=gemini-3.8-flash&fmt=messages)

**Ailoot Ultra · OpenAI Chat** `POST /v1/chat/completions` `~google/gemini-flash-latest`

[`~google/gemini-flash-latest`](https://ailoot.ai/models/de-ch/#m=google%2Fgemini-3.8-flash&route=Ultra&caller=~google%2Fgemini-flash-latest&fmt=chat)

Google /`~google/gemini-flash-latest`

Modell-ID

- `gemini-3.8-flash`
- `google/gemini-3.8-flash`
- `~google/gemini-flash-latest`

### Einstieg

Gemini 3.8 Flash ist Googles vielseitiges multimodales Modell für länger andauernde Softwareentwicklung, Agenten und komplexe wissensbasierte Aufgaben. Es verarbeitet Text, Bilder, Audio, Video und PDF, gibt Text aus und bietet die Denkstufen low, medium und high sowie Werkzeuge und strukturierte Ausgaben. Die dokumentierten Eingabe- und Ausgabegrenzen betragen 1’048’576 beziehungsweise 65’536 Token.

Zulässige Eingaben

Text

Ergebnisse

Text

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

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

Eingabe

`text`

Ausgabe

`text`

Ausgabeformat

json or SSE

| Feld | Typ | Anforderung | Werte und Limits | Standard |
| --- | --- | --- | --- | --- |
| Feld`model` | Typ`string` | AnforderungErforderlich | Werte und Limits ~google/gemini-flash-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: These roles are explicitly represented by Source compatibility types; the exact model role set remains model-specific. Model-specific | 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; use actual returned ID | Standard— |
| Feld`messages[].name` | Typ`string` | AnforderungOptional | Werte und Limits | Standard— |
| Feld`messages[].reasoning_content` | Typ`string` | AnforderungOptional | Werte und Limits Gilt, wenn: Round-trip actual returned reasoning where this model uses it | Standard— |
| Feld`messages[].reasoning_details` | Typ`object\|array` | AnforderungOptional | Werte und Limits Model-specific | Standard— |
| Feld`max_tokens` | Typ`integer` | AnforderungOptional | Werte und Limits Minimum: 1 Model-specific | Standard— |
| Feld`max_completion_tokens` | Typ`integer` | AnforderungOptional | Werte und Limits Minimum: 1 Model-specific | Standard— |
| Feld`stream` | Typ`boolean` | AnforderungOptional | Werte und Limits | Standardfalse |
| Feld`stream_options.include_usage` | Typ`boolean` | AnforderungOptional | Werte und Limits Model-specific | Standard— |
| Feld`temperature` | Typ`number` | AnforderungOptional | Werte und Limits Model-specific | Standard— |
| Feld`top_p` | Typ`number` | AnforderungOptional | Werte und Limits Model-specific | Standard— |
| Feld`stop` | Typ`string\|string[]` | AnforderungOptional | Werte und Limits Model-specific | Standard— |
| Feld`tools` | Typ`function_tool[]` | AnforderungOptional | Werte und Limits Model-specific | Standard— |
| Feld`tools[].type` | Typ`string` | AnforderungOptional | Werte und Limits function Model-specific | Standard— |
| Feld`tools[].function.name` | Typ`string` | AnforderungErforderlich | Werte und Limits Gilt, wenn: function tool supplied | 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 Model-specific | Standard— |
| Feld`parallel_tool_calls` | Typ`boolean` | AnforderungOptional | Werte und Limits Model-specific | Standard— |
| Feld`response_format` | Typ`object` | AnforderungOptional | Werte und Limits Model-specific | Standard— |
| Feld`reasoning_effort` | Typ`string` | AnforderungOptional | Werte und Limits Model-specific | Standard— |
| Feld`reasoning` | Typ`object` | AnforderungOptional | Werte und Limits Model-specific | Standard— |
| Feld`service_tier` | Typ`string` | AnforderungOptional | Werte und Limits Model-specific | Standard— |
| Feld`instructions` | Typ`string` | AnforderungOptional | Werte und Limits Kompatibilitätsfeld | Standard— |
| Feld`functions` | Typ`function[]` | AnforderungOptional | Werte und Limits Model-specific | Standard— |
| Feld`function_call` | Typ`string\|object` | AnforderungOptional | Werte und Limits Model-specific | Standard— |
| Feld`prompt_cache_options` | Typ`object` | AnforderungOptional | Werte und Limits Model-specific | Standard— |
| Feld`modalities` | Typ`string[]` | AnforderungOptional | Werte und Limits text | Standard— |
| Feld`provider` | Typ`object` | AnforderungOptional | Werte und Limits Bedingungen: provider.options is rejected on this Ultra text route | Standard— |
| Feld`cache_control.ttl` | Typ`string` | AnforderungOptional | Werte und Limits Bedingungen: 1h is rejected in actual prompt-cache locations | Standard— |

Kombinationen von Eingabematerialien

**Text** · UTF8 text

`messages[].content`

Methodenparameter und Lebenszyklus

| Parameter | Vertrag |
| --- | --- |
| Parameter`content_type` | Vertragapplication/json |
| Parameter`required` | Vertragmodel, messages |
| Parameter`material_types` | Vertragtext |
| Parameter`messages` | Vertragmessage array with role/content shape |
| Parameter`file_material` | Vertragactual UTF-8 document inserted as literal text; no file ID inferred |
| Parameter`optional_controls` | Vertragstream, temperature, top\_p, stop, max\_tokens, max\_completion\_tokens, reasoning, response\_format, tools, tool\_choice |
| Parameter`control_scope` | Vertragmodel-specific; user function tools differ from hosted tools |
| Parameter`output_modalities` | Vertragtext |
| Parameter`hosted_operations` | Vertragfalse |
| Parameter`multimodal_input_binding` | Vertragnull |

Lebenszyklus: `synchronous_or_streamed`

Send exact model ID with messages.

Context length is not an output cap.

A text file may supply literal text; image/audio/file-object inputs need exact binding.

### Tarife

Tarifangaben erweitern die Anfrageoptionen nicht. Unterstützte Parameter stehen bei der ausgewählten Methode.

Schnellmodus

Nicht angegeben Wenn der Schnellmodus ausgewählt ist

Flex-Modus

Nicht angegeben Wenn der Modus flex ausgewählt ist

Maximaler Denkaufwand

Nicht angegeben Wenn beim maximalen Denkaufwand die Standardanpassung (default) verwendet wird

Preise für explizites Caching

Nicht aktiviert Wenn explizites Caching angefordert wird

#### Ailoot-Tarife

#### Preise nach Konfiguration

| Konfiguration | Tarifstaffel | Gebühr |
| --- | --- | --- |
| KonfigurationToken-Basistarife | TarifstaffelGrundtarif | Gebühr Eingabe · Eingabetoken **$0.003** / 1K Tokens Ausgabe · Ausgabetoken **$0.015** / 1K Tokens Eingabe · Cache lesen **$0.0003** / 1K Tokens Eingabe · Cache schreiben **—** / 1K Tokens Eingabe · Cache schreiben, 1 Stunde **—** / 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 abschliessenden Verbrauchsdatensatzes. [So funktionieren Reservierung und Abrechnung →](https://ailoot.ai/docs/de-ch/billing/reserve/)

### Beispielanfragen

#### Ailoot Ultra · OpenAI Chat

curlPython SDKPython-Stream

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

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

```python
from openai import OpenAI
import os

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

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

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

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

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

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

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

### Ergebnisse abrufen und speichern

#### Ailoot Ultra · OpenAI Chat

json or SSE

##### Alle fertiggestellten Ergebnisse aufbewahren

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

Keep every choice and its content/tool calls/reasoning. In SSE assemble deltas by choice/tool index, retain the final finish reason and usage.

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

Keep request/response IDs and headers. No generic text job retrieval URL is supplied.

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` | BedingungInvalid required fields, material representation or parameter value | Nächster SchrittCorrect the indicated fields before a new creation request. |

### Aliasnamen

#### Modellaliasnamen

<strong>Ailoot</strong> [`gemini-3.8-flash`](https://ailoot.ai/models/de-ch/#m=google%2Fgemini-3.8-flash&route=Core&caller=gemini-3.8-flash)
**Ailoot Ultra** [`gemini-3.8-flash`](https://ailoot.ai/models/de-ch/#m=google%2Fgemini-3.8-flash&route=Ultra&caller=gemini-3.8-flash&fmt=chat), [`google/gemini-3.8-flash`](https://ailoot.ai/models/de-ch/#m=google%2Fgemini-3.8-flash&route=Ultra&caller=google%2Fgemini-3.8-flash&fmt=chat), [`~google/gemini-flash-latest`](https://ailoot.ai/models/de-ch/#m=google%2Fgemini-3.8-flash&route=Ultra&caller=~google%2Fgemini-flash-latest&fmt=chat)

#### Aliasnamen für Methodenpfade

`/chat/completions`

#### Zugehörige Aufrufer-IDs

[`google/gemini-3.8-flash`](https://ailoot.ai/models/de-ch/#m=google%2Fgemini-3.8-flash&route=Ultra&caller=google%2Fgemini-3.8-flash&fmt=chat), [`~google/gemini-flash-latest`](https://ailoot.ai/models/de-ch/#m=google%2Fgemini-3.8-flash&route=Ultra&caller=~google%2Fgemini-flash-latest&fmt=chat), [`gemini-3.8-flash`](https://ailoot.ai/models/de-ch/#m=google%2Fgemini-3.8-flash&route=Core&caller=gemini-3.8-flash), [`gemini-3.8-flash`](https://ailoot.ai/models/de-ch/#m=google%2Fgemini-3.8-flash&route=Ultra&caller=gemini-3.8-flash&fmt=chat)

**Ailoot Ultra · Anthropic Messages** `POST /v1/messages` `~google/gemini-flash-latest`

[`~google/gemini-flash-latest`](https://ailoot.ai/models/de-ch/#m=google%2Fgemini-3.8-flash&route=Ultra&caller=~google%2Fgemini-flash-latest&fmt=messages)

Google /`~google/gemini-flash-latest`

Modell-ID

- `gemini-3.8-flash`
- `google/gemini-3.8-flash`
- `~google/gemini-flash-latest`

### Einstieg

Gemini 3.8 Flash ist Googles vielseitiges multimodales Modell für länger andauernde Softwareentwicklung, Agenten und komplexe wissensbasierte Aufgaben. Es verarbeitet Text, Bilder, Audio, Video und PDF, gibt Text aus und bietet die Denkstufen low, medium und high sowie Werkzeuge und strukturierte Ausgaben. Die dokumentierten Eingabe- und Ausgabegrenzen betragen 1’048’576 beziehungsweise 65’536 Token.

Zulässige Eingaben

Text

Ergebnisse

json · sse

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

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

Eingabe

`text`

Ausgabe

`json`, `sse`

Ausgabeformat

JSON or SSE

| Feld | Typ | Anforderung | Werte und Limits | Standard |
| --- | --- | --- | --- | --- |
| Feld`model` | Typ`string` | AnforderungErforderlich | Werte und Limits ~google/gemini-flash-latest | Standard— |
| Feld`messages` | Typ`message[]` | AnforderungErforderlich | Werte und Limits | Standard— |
| Feld`messages[].role` | Typ`string` | AnforderungErforderlich | Werte und Limits user, assistant | Standard— |
| Feld`messages[].content` | Typ`string` | AnforderungErforderlich | Werte und Limits | Standard— |
| Feld`max_tokens` | Typ`integer` | AnforderungErforderlich | Werte und Limits | Standard— |
| Feld`stream` | Typ`boolean` | AnforderungOptional | Werte und Limits | Standardfalse |

Kombinationen von Eingabematerialien

**Text** · UTF-8 text

`messages[].content string`

Methodenparameter und Lebenszyklus

| Parameter | Vertrag |
| --- | --- |
| Parameter`content_type` | Vertragapplication/json |
| Parameter`required` | Vertragmodel, messages, max\_tokens |
| Parameter`optional_controls` | Vertragstream |
| Parameter`material_types` | Vertragtext |
| Parameter`text_file_material` | VertragRead the actual UTF-8 document and put its text in the indicated input or message content string. |

Lebenszyklus: `synchronous_or_streamed`

### Tarife

Tarifangaben erweitern die Anfrageoptionen nicht. Unterstützte Parameter stehen bei der ausgewählten Methode.

Schnellmodus

Nicht angegeben Wenn der Schnellmodus ausgewählt ist

Flex-Modus

Nicht angegeben Wenn der Modus flex ausgewählt ist

Maximaler Denkaufwand

Nicht angegeben Wenn beim maximalen Denkaufwand die Standardanpassung (default) verwendet wird

Preise für explizites Caching

Nicht aktiviert Wenn explizites Caching angefordert wird

#### Ailoot-Tarife

#### Preise nach Konfiguration

| Konfiguration | Tarifstaffel | Gebühr |
| --- | --- | --- |
| KonfigurationToken-Basistarife | TarifstaffelGrundtarif | Gebühr Eingabe · Eingabetoken **$0.003** / 1K Tokens Ausgabe · Ausgabetoken **$0.015** / 1K Tokens Eingabe · Cache lesen **$0.0003** / 1K Tokens Eingabe · Cache schreiben **—** / 1K Tokens Eingabe · Cache schreiben, 1 Stunde **—** / 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 abschliessenden Verbrauchsdatensatzes. [So funktionieren Reservierung und Abrechnung →](https://ailoot.ai/docs/de-ch/billing/reserve/)

### Beispielanfragen

#### Ailoot Ultra · Anthropic Messages

Vollständiger minimaler JSON-Bodycurl · eigenes UTF-8-Dokument verwendenPython · das vollständige Ergebnis speichern

```json
{
  "model": "~google/gemini-flash-latest",
  "max_tokens": 128,
  "messages": [
    {
      "role": "user",
      "content": "Summarize the incident report."
    }
  ],
  "stream": false
}
```

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

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

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

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

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

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

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

### Ergebnisse abrufen und speichern

#### Ailoot Ultra · Anthropic Messages

JSON or SSE

##### Alle fertiggestellten Ergebnisse aufbewahren

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

Keep all content blocks, thinking signatures and actual tool-use IDs. Assemble all SSE block deltas; a first text block is not the complete output.

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

Keep request/response IDs and headers. No generic text job retrieval URL is supplied.

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` | BedingungInvalid required fields, material representation or parameter value | Nächster SchrittCorrect the indicated fields before a new creation request. |

### Aliasnamen

#### Modellaliasnamen

<strong>Ailoot</strong> [`gemini-3.8-flash`](https://ailoot.ai/models/de-ch/#m=google%2Fgemini-3.8-flash&route=Core&caller=gemini-3.8-flash&fmt=messages)
**Ailoot Ultra** [`gemini-3.8-flash`](https://ailoot.ai/models/de-ch/#m=google%2Fgemini-3.8-flash&route=Ultra&caller=gemini-3.8-flash&fmt=messages), [`google/gemini-3.8-flash`](https://ailoot.ai/models/de-ch/#m=google%2Fgemini-3.8-flash&route=Ultra&caller=google%2Fgemini-3.8-flash&fmt=messages), [`~google/gemini-flash-latest`](https://ailoot.ai/models/de-ch/#m=google%2Fgemini-3.8-flash&route=Ultra&caller=~google%2Fgemini-flash-latest&fmt=messages)

#### Aliasnamen für Methodenpfade

`/chat/completions`

#### Zugehörige Aufrufer-IDs

[`google/gemini-3.8-flash`](https://ailoot.ai/models/de-ch/#m=google%2Fgemini-3.8-flash&route=Ultra&caller=google%2Fgemini-3.8-flash&fmt=messages), [`~google/gemini-flash-latest`](https://ailoot.ai/models/de-ch/#m=google%2Fgemini-3.8-flash&route=Ultra&caller=~google%2Fgemini-flash-latest&fmt=messages), [`gemini-3.8-flash`](https://ailoot.ai/models/de-ch/#m=google%2Fgemini-3.8-flash&route=Core&caller=gemini-3.8-flash&fmt=messages), [`gemini-3.8-flash`](https://ailoot.ai/models/de-ch/#m=google%2Fgemini-3.8-flash&route=Ultra&caller=gemini-3.8-flash&fmt=messages)

FAQ · Google: Gemini 3.8 Flash

Welche Eingaben und Ergebnisse sind verfügbar?

`POST /v1/messages` · `gemini-3.8-flash`: `text`, `image` → `text` `POST /v1beta/models/{model}:generateContent` · `gemini-3.8-flash`: `text`, `image` → `text` `POST /v1/chat/completions` · `gemini-3.8-flash`: `text` → `text` `POST /v1/messages` · `gemini-3.8-flash`: `text` → `json`, `sse` `POST /v1/chat/completions` · `google/gemini-3.8-flash`: `text` → `text` `POST /v1/messages` · `google/gemini-3.8-flash`: `text` → `json`, `sse` `POST /v1/chat/completions` · `~google/gemini-flash-latest`: `text` → `text` `POST /v1/messages` · `~google/gemini-flash-latest`: `text` → `json`, `sse`

Welche Felder verwendet die Anfrage?

`POST /v1/messages` · `gemini-3.8-flash`: `model`, `messages`, `system`, `max_tokens`, `stream`, `metadata` `POST /v1beta/models/{model}:generateContent` · `gemini-3.8-flash`: `contents`, `systemInstruction`, `sessionId` `POST /v1/chat/completions` · `gemini-3.8-flash`: `model`, `messages`, `stream` `POST /v1/messages` · `gemini-3.8-flash`: `model`, `messages`, `max_tokens`, `stream` `POST /v1/chat/completions` · `google/gemini-3.8-flash`: `model`, `messages`, `stream`, `modalities`, `provider` `POST /v1/messages` · `google/gemini-3.8-flash`: `model`, `messages`, `max_tokens`, `stream` `POST /v1/chat/completions` · `~google/gemini-flash-latest`: `model`, `messages`, `stream`, `modalities`, `provider` `POST /v1/messages` · `~google/gemini-flash-latest`: `model`, `messages`, `max_tokens`, `stream`

Welche Grenzen gelten?

`POST /v1/messages` · `gemini-3.8-flash`: `ctx`: `1048576`; `max_out`: `65536`; `messages.min_items`: `1`; `max_tokens.minimum`: `1` `POST /v1beta/models/{model}:generateContent` · `gemini-3.8-flash`: `contents.min_items`: `1` `POST /v1/chat/completions` · `gemini-3.8-flash`: `messages.min_items`: `1` `POST /v1/chat/completions` · `google/gemini-3.8-flash`: `messages.min_items`: `1` `POST /v1/chat/completions` · `~google/gemini-flash-latest`: `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-ch/billing/subscriptions/) · [Modellpreise ansehen](https://ailoot.ai/models/de-ch/)

## 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-ch)

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