Source: https://ailoot.ai/models/id/claude-fable-5-1/
Canonical: https://ailoot.ai/models/id/claude-fable-5-1/
Language: id

# Anthropic: Claude Fable 5.1

[Markdown](https://ailoot.ai/models/id/claude-fable-5-1/index.md) · [JSON](https://ailoot.ai/models/id/claude-fable-5-1/facts.json)

## [Anthropic: Claude Fable 5.1](https://ailoot.ai/models/id/claude-fable-5-1/)

Claude Fable 5.1 ditujukan untuk penelitian kompleks, perubahan kode berskala besar, dan analisis profesional yang panjang. Menghubungkan informasi dalam konteks besar serta bekerja dengan teks dan gambar terperinci.

- [**Ailoot · Anthropic Messages** `POST /v1/messages` `claude-fable-5-1`](https://ailoot.ai/models/id/claude-fable-5-1/#method-0)
- [**Ailoot · OpenAI Responses** `POST /v1/responses` `claude-fable-5-1`](https://ailoot.ai/models/id/claude-fable-5-1/#method-1)
- [**Ailoot · OpenAI Chat** `POST /v1/chat/completions` `claude-fable-5-1`](https://ailoot.ai/models/id/claude-fable-5-1/#method-2)
- [**Ailoot · Anthropic Messages** `POST /v1/messages` `claude`](https://ailoot.ai/models/id/claude-fable-5-1/#method-3)
- [**Ailoot · OpenAI Responses** `POST /v1/responses` `claude`](https://ailoot.ai/models/id/claude-fable-5-1/#method-4)
- [**Ailoot · OpenAI Chat** `POST /v1/chat/completions` `claude`](https://ailoot.ai/models/id/claude-fable-5-1/#method-5)
- [**Ailoot · Anthropic Messages** `POST /v1/messages` `claude-fable`](https://ailoot.ai/models/id/claude-fable-5-1/#method-6)
- [**Ailoot · Anthropic Messages** `POST /v1/messages` `claude-fable-latest`](https://ailoot.ai/models/id/claude-fable-5-1/#method-7)
- [**Ailoot · Anthropic Messages** `POST /v1/messages` `claude-latest`](https://ailoot.ai/models/id/claude-fable-5-1/#method-8)
- [**Ailoot · OpenAI Responses** `POST /v1/responses` `claude-latest`](https://ailoot.ai/models/id/claude-fable-5-1/#method-9)
- [**Ailoot · OpenAI Chat** `POST /v1/chat/completions` `claude-latest`](https://ailoot.ai/models/id/claude-fable-5-1/#method-10)
- [**Ailoot Ultra · OpenAI Chat** `POST /v1/chat/completions` `anthropic/claude-fable-5.1`](https://ailoot.ai/models/id/claude-fable-5-1/#method-11)
- [**Ailoot Ultra · Anthropic Messages** `POST /v1/messages` `anthropic/claude-fable-5.1`](https://ailoot.ai/models/id/claude-fable-5-1/#method-12)
- [**Ailoot Ultra · OpenAI Chat** `POST /v1/chat/completions` `~anthropic/claude-fable-latest`](https://ailoot.ai/models/id/claude-fable-5-1/#method-13)
- [**Ailoot Ultra · Anthropic Messages** `POST /v1/messages` `~anthropic/claude-fable-latest`](https://ailoot.ai/models/id/claude-fable-5-1/#method-14)

Tentang model

Deskripsi ini mencakup kemampuan model. Masukan, keluaran, dan opsi yang tersedia di Ailoot tercantum di bawah untuk metode yang dipilih.

Claude Fable 5.1 ditujukan untuk pekerjaan yang dimulai dari pertanyaan terbuka dan berlanjut hingga hasil yang dapat diperiksa. Dalam pemrograman, Anthropic menekankan perubahan pada banyak berkas, refaktor besar, migrasi, debugging, dan pemeriksaan kode. Dalam penelitian, fokusnya adalah rangkaian langkah pencarian, perbandingan materi, dan pemeliharaan arah saat informasi baru diterima.

#### Meneliti penyebab dan menyusun hasil akhir

Model dapat membantu menemukan akar penyebab kesalahan perangkat lunak yang kompleks, merencanakan perbaikan, dan memeriksa solusi yang diusulkan. Dalam pekerjaan informasi, kemampuan menghubungkan detail yang berjauhan dalam kumpulan materi besar berguna. Tugas dapat berlanjut setelah kesimpulan awal: analisis dikembangkan menjadi isi dokumen, lembar kerja dengan rumus, atau presentasi.

Materi jadi tersebut dihasilkan melalui alat aplikasi. Eksekusi kode, pembacaan berkas, pencarian informasi, dan tindakan dalam antarmuka juga memerlukan lingkungan yang terhubung. Anthropic menjelaskan kelanjutan setelah tindakan gagal dan pemulihan alur kerja dalam antarmuka, tetapi ketersediaan sarana serta operasi yang diizinkan ditentukan oleh aplikasi.

#### Grafik dan tabel yang padat

Masukan berupa **teks dan gambar**, sedangkan hasil langsung model adalah **teks**. Penggunaan visual mencakup grafik padat, materi keuangan, dan tabel dalam dokumen. Ketika halaman sumber memuat banyak detail kecil, pembesaran atau pemotongan tambahan melalui alat dapat membantu memusatkan perhatian pada area yang diperlukan.

Format masukan visual biasa pada layanan produsen: JPEG/PNG/GIF/WebP, dengan bingkai pertama untuk animasi. Dalam analisis native: sisi panjang — 2576 piksel, 4784 token visual; gambar besar diperkecil sebelum dianalisis. Dukungan berkas dan parameter ditentukan oleh metode aplikasi.

Dalam contoh penelitian, produsen menunjukkan penggunaan Fable 5.1 untuk melatih jaringan saraf yang merekonstruksi peta ketinggian Venus dari data radar. Ini merupakan contoh pekerjaan data dan pemrograman, bukan jenis keluaran media tersendiri dari model.

#### Pekerjaan panjang dan kedalaman analisis

Penalaran adaptif Fable 5.1 **selalu diaktifkan**. Parameter `effort` menentukan kedalaman: tersedia `low`, `medium`, `high`, `xhigh`, dan `max`, dengan `high` sebagai standar. Konteks berjumlah **1 juta token**, dengan jawaban maksimum **128 ribu token**. Batas waktu pengetahuan bawaan yang dapat diandalkan adalah **Juni 2026**.

Produsen menyediakan perubahan tingkat upaya selama percakapan dan pesan kemajuan pekerjaan ketika aplikasi mendukung mekanisme tersebut. Jika aplikasi mengirim blok penalaran yang telah disimpan, keterkaitannya dengan model dan riwayat asli penting. Perubahan pada pesan sebelumnya, instruksi sistem, atau definisi alat terdahulu dapat membuat blok berikutnya tidak valid: saat keterkaitan diperiksa, permintaan ditolak atau blok yang terdampak dikeluarkan. Fable 5.1 membaca penalaran tersimpan dari model Claude yang lebih awal, sedangkan model-model tersebut tidak membaca blok miliknya. Blok yang tidak kompatibel dikeluarkan sebelum giliran berikutnya, dan pekerjaan berlanjut tanpanya. Fable 5.1 menggunakan cara pembagian teks menjadi token yang sama dengan Fable 5; jumlah materi perlu dinilai untuk model yang dipilih.

#### Karakteristik yang memengaruhi hasil

Pada tingkat upaya rendah, Fable 5.1 dapat memilih menjawab dari pengetahuan bawaan alih-alih melakukan pencarian. Jika pertanyaan memerlukan pemeriksaan terkini, nyatakan hal tersebut secara eksplisit dan sediakan alat yang diperlukan. Model terkadang menulis teks padat, jarang melaporkan kemajuan sementara, atau mengganti seluruh berkas ketika yang diharapkan adalah perubahan setempat; gaya dan batas perubahan yang diperlukan sebaiknya ditentukan sejak awal.

Jika metode menyediakan kendali alat, model produsen mendukung pemilihan otomatis `auto` dan penonaktifan alat `none`. Pemanggilan paksa tidak didukung, baik untuk alat mana pun (`any`) maupun alat tertentu berdasarkan nama (`tool`). Aturan perlindungan mengizinkan penelitian kesalahan dan kerentanan dalam kode sumber, tetapi membatasi sebagian tugas sensitif, termasuk pengembangan eksploit.

Dalam metode yang mendukung pengaturan tersebut, kelanjutan jawaban dari awal yang telah ditentukan dan nilai `temperature`, `top_p`, serta `top_k` yang tidak standar tidak diterima. Teks yang dihasilkan model memuat penandaan statistik Anthropic: penandaan tersebut tidak mengubah makna, kualitas, dan keterbacaan serta tidak menambahkan karakter atau token tersembunyi.

Tugas praktis

### Tugas praktis

Contoh teknis dalam bahasa Inggris

```
Trace a cross-layer duplicate write

Investigate this flow: handler calls save(order); save retries its entire body after a timeout; its body inserts the order, then sends email. A timeout occurs after insertion but before acknowledgement, and the retry inserts again. Propose the smallest coordinated handler/repository change and tests; preserve the email template and public request fields.
```

#### Hasil yang diharapkan

```
A causal explanation, scoped pseudocode patch for the two layers, and tests for a timeout after insertion and repeated request delivery.
```

#### Periksa hasil

```
The proposed fix prevents duplicate persisted orders across retries and explicitly handles email delivery without claiming tests were run.
```

**Ailoot · Anthropic Messages** `POST /v1/messages` `claude-fable-5-1`

[`claude-fable-5-1`](https://ailoot.ai/models/id/#m=anthropic%2Fclaude-fable-5.1&route=Core&caller=claude-fable-5-1&fmt=messages)

Anthropic /`claude-fable-5-1`

ID model

- `claude-fable-5-1`
- `claude`
- `claude-fable`
- `claude-fable-latest`
- `claude-latest`

### Mulai

Claude Fable 5.1 ditujukan untuk penelitian kompleks, perubahan kode berskala besar, dan analisis profesional yang panjang. Menghubungkan informasi dalam konteks besar serta bekerja dengan teks dan gambar terperinci.

Masukan yang diterima

Teks · Gambar

Hasil

Teks

### Tersedia di Ailoot · masukan & metode

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

Masukan

`text`, `image`

Keluaran

`text`

Konteks

1.000.000 tokens

Keluaran maksimum

131.072 tokens

Format keluaran

json atau SSE

| Kolom | Jenis | Persyaratan | Nilai & batasan | Bawaan |
| --- | --- | --- | --- | --- |
| Kolom`model` | Jenis`string` | PersyaratanWajib | Nilai & batasan claude-fable-5-1 | Bawaan— |
| Kolom`messages` | Jenis`message[]` | PersyaratanWajib | Nilai & batasan Item minimum: 1 | Bawaan— |
| Kolom`messages[].role` | Jenis`string` | PersyaratanWajib | Nilai & batasan user, assistant | Bawaan— |
| Kolom`messages[].content` | Jenis`string\|content_block[]` | PersyaratanWajib | Nilai & batasan | Bawaan— |
| Kolom`system` | Jenis`string\|content_block[]` | PersyaratanOpsional | Nilai & batasan | Bawaan— |
| Kolom`max_tokens` | Jenis`integer` | PersyaratanWajib | Nilai & batasan Minimum: 1 Batas berlaku untuk: batas maksimum yang tepat untuk model/kartu yang dipilih | Bawaan— |
| Kolom`stream` | Jenis`boolean` | PersyaratanOpsional | Nilai & batasan | Bawaanfalse |
| Kolom`temperature` | Jenis`number` | PersyaratanOpsional | Nilai & batasan Bergantung pada model | Bawaan— |
| Kolom`top_p` | Jenis`number` | PersyaratanOpsional | Nilai & batasan Bergantung pada model | Bawaan— |
| Kolom`stop_sequences` | Jenis`string[]` | PersyaratanOpsional | Nilai & batasan Bergantung pada model | Bawaan— |
| Kolom`tools` | Jenis`tool[]` | PersyaratanOpsional | Nilai & batasan Bergantung pada model | Bawaan— |
| Kolom`tools[].name` | Jenis`string` | PersyaratanOpsional | Nilai & batasan Berlaku jika: alat disediakan | Bawaan— |
| Kolom`tools[].description` | Jenis`string` | PersyaratanOpsional | Nilai & batasan | Bawaan— |
| Kolom`tools[].input_schema` | Jenis`JSON_schema` | PersyaratanOpsional | Nilai & batasan | Bawaan— |
| Kolom`tool_choice` | Jenis`object` | PersyaratanOpsional | Nilai & batasan Bergantung pada model | Bawaan— |
| Kolom`thinking.type` | Jenis`string` | PersyaratanOpsional | Nilai & batasan Bergantung pada model | Bawaan— |
| Kolom`thinking.budget_tokens` | Jenis`integer` | PersyaratanOpsional | Nilai & batasan Bergantung pada model | Bawaan— |
| Kolom`output_config.effort` | Jenis`string` | PersyaratanOpsional | Nilai & batasan Bergantung pada model | Bawaan— |
| Kolom`metadata` | Jenis`object` | PersyaratanOpsional | Nilai & batasan | Bawaan— |
| Kolom`cache_control` | Jenis`object` | PersyaratanOpsional | Nilai & batasan Bergantung pada model | Bawaan— |

Kombinasi bahan masukan

**Teks** · Teks UTF8

`messages[].content atau blok type=text`

**Teks + gambar**

`{type:image,source:{type:base64,media_type,data}} atau sumber dengan type=url`

Parameter metode dan siklus hidup

| Parameter | Kontrak |
| --- | --- |
| Parameter`material_types` | Kontraktext, image |
| Parameter`required` | Kontrakmodel, messages, max\_tokens |
| Parameter`optional_controls` | Kontraknull |
| Parameter`content_type` | Kontrakapplication/json |
| Parameter`text_file_material` | Kontrakkonten UTF-8 aktual dimasukkan sebagai teks; ID file atau alamat URL (URLs) memerlukan dukungan yang tepat dan terpisah |

Siklus hidup: `exact retained published method`

Struktur metode dan ID bersifat eksak; kemampuan pemasok terpisah dari penerimaan permintaan.

### Paket

#### Tarif metode Ailoot

Masukan

US$0,01 */ 1K*

Keluaran

US$0,05 */ 1K*

Pembacaan cache

US$0,00025 */ 1K*

Penulisan cache

US$0,0125 */ 1K*

Penulisan cache, 5 menit

US$0,0125 */ 1K tokens*

Penulisan cache, 1 jam

US$0,02 */ 1K tokens*

web\_search\_call

US$0,01 *per pemanggilan*

Jumlah pemanggilan maksimum web\_search\_call

8

Ailoot mencadangkan perkiraan dana sebelum permintaan. Setelah hasil diterima, tagihan akhir diselesaikan berdasarkan penggunaan yang terukur. Penyelesaian tagihan streaming menggunakan catatan penggunaan akhir. [Cara kerja cadangan dan penyelesaian tagihan →](https://ailoot.ai/docs/id/billing/reserve/)

#### Detail tarif referensi

Jadwal referensi tingkat model tidak mengubah pemilihan metode, estimasi harga, atau biaya. Biaya aktif menggunakan tarif metode Ailoot yang dipilih.

Jadwal referensi model

#### Harga menurut konfigurasi

Cocokkan setiap biaya dengan kondisi yang ditampilkan. Gunakan satu tarif untuk setiap kelompok konfigurasi alternatif.

| Konfigurasi | Jadwal tarif | Token konteks, lebih dari | Token konteks, hingga dan termasuk | Biaya |
| --- | --- | --- | --- | --- |
| KonfigurasiOpenAI Chat · Tarif dasar token | Jadwal tarifTarif dasar | Token konteks, lebih dari— | Token konteks, hingga dan termasukTanpa batas atas | Biaya Masukan · Token masukan **$0.02** / 1K token Keluaran · Token keluaran **$0.1** / 1K token Masukan · Pembacaan cache **$0.0005** / 1K token Masukan · Penulisan cache **$0.025** / 1K token Masukan · Penulisan cache, 1 jam **$0.04** / 1K token |
| KonfigurasiOpenAI Chat · Tingkat 1 berdasarkan panjang permintaan | Jadwal tarif— | Token konteks, lebih dari0 | Token konteks, hingga dan termasukTanpa batas atas | Biaya Masukan · Token masukan **$0.02** / 1K token Keluaran · Token keluaran **$0.1** / 1K token Masukan · Pembacaan cache **$0.0005** / 1K token Masukan · Penulisan cache **$0.025** / 1K token Masukan · Penulisan cache, 1 jam **$0.04** / 1K token |
| KonfigurasiAnthropic Messages · Tarif dasar token | Jadwal tarifTarif dasar | Token konteks, lebih dari— | Token konteks, hingga dan termasukTanpa batas atas | Biaya Masukan · Token masukan **$0.02** / 1K token Keluaran · Token keluaran **$0.1** / 1K token Masukan · Pembacaan cache **$0.0005** / 1K token Masukan · Penulisan cache **$0.025** / 1K token Masukan · Penulisan cache, 1 jam **$0.04** / 1K token |
| KonfigurasiAnthropic Messages · Tingkat 1 berdasarkan panjang permintaan | Jadwal tarif— | Token konteks, lebih dari0 | Token konteks, hingga dan termasukTanpa batas atas | Biaya Masukan · Token masukan **$0.02** / 1K token Keluaran · Token keluaran **$0.1** / 1K token Masukan · Pembacaan cache **$0.0005** / 1K token Masukan · Penulisan cache **$0.025** / 1K token Masukan · Penulisan cache, 1 jam **$0.04** / 1K token |

### Contoh permintaan

#### Ailoot · Anthropic Messages

Contoh teksMasukan, gambarPython SDKNode.js SDKAliran Python

```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": "claude-fable-5-1", "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": "claude-fable-5-1", "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="claude-fable-5-1",
    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: "claude-fable-5-1",
  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='claude-fable-5-1',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")
```

### Terima dan simpan hasil

#### Ailoot · Anthropic Messages

json atau SSE

##### Simpan semua hasil yang selesai

Simpan setiap respons lengkap, berkas, dan bagian konten yang dikembalikan.

Simpan semua blok konten, tanda tangan penalaran, dan ID penggunaan alat yang sebenarnya. Gabungkan semua delta blok SSE; blok teks pertama bukan keseluruhan keluaran.

##### Jika respons asli perlu diperiksa

Simpan ID permintaan/respons dan header. URL umum untuk pengambilan tugas teks tidak disediakan.

Kolom respons

| Kolom | Jenis |
| --- | --- |
| Kolom`id` | Jenisstring |
| Kolom`model` | Jenisstring |
| Kolom`content[]` | Jenistext\|thinking\|tool\_use\|other content block |
| Kolom`stop_reason` | Jenisstring\|null |
| Kolom`usage` | Jenisobject |

Kesalahan dan langkah berikutnya

| Respons | Kondisi | Langkah berikutnya |
| --- | --- | --- |
| Respons400 · `invalid_request_error` | KondisiBidang wajib, representasi materi, atau nilai parameter tidak valid | Langkah berikutnyaPerbaiki bidang yang ditunjukkan sebelum permintaan pembuatan baru. |

### Alias

#### Alias model

<strong>Ailoot</strong> [`claude-fable-5-1`](https://ailoot.ai/models/id/#m=anthropic%2Fclaude-fable-5.1&route=Core&caller=claude-fable-5-1&fmt=messages), [`claude`](https://ailoot.ai/models/id/#m=anthropic%2Fclaude-fable-5.1&route=Core&caller=claude&fmt=messages), [`claude-fable`](https://ailoot.ai/models/id/#m=anthropic%2Fclaude-fable-5.1&route=Core&caller=claude-fable&fmt=messages), [`claude-fable-latest`](https://ailoot.ai/models/id/#m=anthropic%2Fclaude-fable-5.1&route=Core&caller=claude-fable-latest&fmt=messages), [`claude-latest`](https://ailoot.ai/models/id/#m=anthropic%2Fclaude-fable-5.1&route=Core&caller=claude-latest&fmt=messages)
**Ailoot Ultra** [`anthropic/claude-fable-5.1`](https://ailoot.ai/models/id/#m=anthropic%2Fclaude-fable-5.1&route=Ultra&caller=anthropic%2Fclaude-fable-5.1&fmt=messages), [`~anthropic/claude-fable-latest`](https://ailoot.ai/models/id/#m=anthropic%2Fclaude-fable-5.1&route=Ultra&caller=~anthropic%2Fclaude-fable-latest&fmt=messages)

#### Alias jalur metode

Gunakan jalur metode yang ditampilkan di atas.

#### ID pemanggil terkait

[`anthropic/claude-fable-5.1`](https://ailoot.ai/models/id/#m=anthropic%2Fclaude-fable-5.1&route=Ultra&caller=anthropic%2Fclaude-fable-5.1&fmt=messages), [`claude`](https://ailoot.ai/models/id/#m=anthropic%2Fclaude-fable-5.1&route=Core&caller=claude&fmt=messages), [`claude-fable`](https://ailoot.ai/models/id/#m=anthropic%2Fclaude-fable-5.1&route=Core&caller=claude-fable&fmt=messages), [`claude-fable-latest`](https://ailoot.ai/models/id/#m=anthropic%2Fclaude-fable-5.1&route=Core&caller=claude-fable-latest&fmt=messages), [`claude-latest`](https://ailoot.ai/models/id/#m=anthropic%2Fclaude-fable-5.1&route=Core&caller=claude-latest&fmt=messages), [`~anthropic/claude-fable-latest`](https://ailoot.ai/models/id/#m=anthropic%2Fclaude-fable-5.1&route=Ultra&caller=~anthropic%2Fclaude-fable-latest&fmt=messages), [`claude-fable-5-1`](https://ailoot.ai/models/id/#m=anthropic%2Fclaude-fable-5.1&route=Core&caller=claude-fable-5-1&fmt=messages)

**Ailoot · OpenAI Responses** `POST /v1/responses` `claude-fable-5-1`

[`claude-fable-5-1`](https://ailoot.ai/models/id/#m=anthropic%2Fclaude-fable-5.1&route=Core&caller=claude-fable-5-1&fmt=responses)

Anthropic /`claude-fable-5-1`

ID model

- `claude-fable-5-1`
- `claude`
- `claude-latest`

### Mulai

Claude Fable 5.1 ditujukan untuk penelitian kompleks, perubahan kode berskala besar, dan analisis profesional yang panjang. Menghubungkan informasi dalam konteks besar serta bekerja dengan teks dan gambar terperinci.

Masukan yang diterima

Teks · Gambar

Hasil

Teks

### Tersedia di Ailoot · masukan & metode

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

Masukan

`text`, `image`

Keluaran

`text`

Konteks

1.000.000 tokens

Keluaran maksimum

131.072 tokens

Format keluaran

json atau SSE

| Kolom | Jenis | Persyaratan | Nilai & batasan | Bawaan |
| --- | --- | --- | --- | --- |
| Kolom`model` | Jenis`string` | PersyaratanWajib | Nilai & batasan claude-fable-5-1 | Bawaan— |
| Kolom`input` | Jenis`string\|input_item[]` | PersyaratanWajib | Nilai & batasan | Bawaan— |
| Kolom`instructions` | Jenis`string` | PersyaratanOpsional | Nilai & batasan | Bawaan— |
| Kolom`input[].type` | Jenis`string` | PersyaratanOpsional | Nilai & batasan message, reasoning, function\_call, function\_call\_output | Bawaan— |
| Kolom`input[].content` | Jenis`string\|content_part[]` | PersyaratanOpsional | Nilai & batasan | Bawaan— |
| Kolom`input[].call_id` | Jenis`string` | PersyaratanOpsional | Nilai & batasan Berlaku jika: function\_call\_output; pertahankan call\_id yang benar-benar dikembalikan | Bawaan— |
| Kolom`input[].output` | Jenis`string\|content_part[]` | PersyaratanOpsional | Nilai & batasan Berlaku jika: function\_call\_output | Bawaan— |
| Kolom`max_output_tokens` | Jenis`integer` | PersyaratanOpsional | Nilai & batasan Minimum: 1 Bergantung pada model | Bawaan— |
| Kolom`stream` | Jenis`boolean` | PersyaratanOpsional | Nilai & batasan | Bawaanfalse |
| Kolom`temperature` | Jenis`number` | PersyaratanOpsional | Nilai & batasan Bergantung pada model | Bawaan— |
| Kolom`top_p` | Jenis`number` | PersyaratanOpsional | Nilai & batasan Bergantung pada model | Bawaan— |
| Kolom`tools` | Jenis`tool[]` | PersyaratanOpsional | Nilai & batasan Bergantung pada model | Bawaan— |
| Kolom`tool_choice` | Jenis`string\|object` | PersyaratanOpsional | Nilai & batasan Bergantung pada model | Bawaan— |
| Kolom`parallel_tool_calls` | Jenis`boolean` | PersyaratanOpsional | Nilai & batasan Bergantung pada model | Bawaan— |
| Kolom`reasoning.effort` | Jenis`string` | PersyaratanOpsional | Nilai & batasan Bergantung pada model | Bawaan— |
| Kolom`reasoning.summary` | Jenis`string` | PersyaratanOpsional | Nilai & batasan Bergantung pada model | Bawaan— |
| Kolom`text.format` | Jenis`object` | PersyaratanOpsional | Nilai & batasan Bergantung pada model | Bawaan— |
| Kolom`text.verbosity` | Jenis`string` | PersyaratanOpsional | Nilai & batasan Bergantung pada model | Bawaan— |
| Kolom`include` | Jenis`string[]` | PersyaratanOpsional | Nilai & batasan Bergantung pada model | Bawaan— |
| Kolom`store` | Jenis`boolean` | PersyaratanOpsional | Nilai & batasan Bergantung pada model | Bawaan— |
| Kolom`previous_response_id` | Jenis`string` | PersyaratanOpsional | Nilai & batasan Persyaratan ID: Hanya ID respons yang benar-benar diperoleh dari kelanjutan yang didukung Bergantung pada model | Bawaan— |
| Kolom`service_tier` | Jenis`string` | PersyaratanOpsional | Nilai & batasan Bergantung pada model | Bawaan— |
| Kolom`prompt_cache_key` | Jenis`string` | PersyaratanOpsional | Nilai & batasan Bergantung pada model | Bawaan— |
| Kolom`prompt_cache_options` | Jenis`object` | PersyaratanOpsional | Nilai & batasan Bergantung pada model | Bawaan— |

Kombinasi bahan masukan

**Teks** · Teks UTF8

`Teks masukan atau bagian input_text`

**Teks + gambar**

`{type:input_image,image_url}`

Parameter metode dan siklus hidup

| Parameter | Kontrak |
| --- | --- |
| Parameter`material_types` | Kontraktext, image |
| Parameter`required` | Kontrakmodel, input |
| Parameter`optional_controls` | Kontraknull |
| Parameter`content_type` | Kontrakapplication/json |
| Parameter`text_file_material` | Kontrakkonten UTF-8 aktual dimasukkan sebagai teks; ID file atau alamat URL (URLs) memerlukan dukungan yang tepat dan terpisah |

Siklus hidup: `exact retained published method`

Struktur metode dan ID bersifat eksak; kemampuan pemasok terpisah dari penerimaan permintaan.

### Paket

#### Tarif metode Ailoot

Masukan

US$0,01 */ 1K*

Keluaran

US$0,05 */ 1K*

Pembacaan cache

US$0,00025 */ 1K*

Penulisan cache

US$0,0125 */ 1K*

Penulisan cache, 5 menit

US$0,0125 */ 1K tokens*

Penulisan cache, 1 jam

US$0,02 */ 1K tokens*

web\_search\_call

US$0,01 *per pemanggilan*

Jumlah pemanggilan maksimum web\_search\_call

8

Ailoot mencadangkan perkiraan dana sebelum permintaan. Setelah hasil diterima, tagihan akhir diselesaikan berdasarkan penggunaan yang terukur. Penyelesaian tagihan streaming menggunakan catatan penggunaan akhir. [Cara kerja cadangan dan penyelesaian tagihan →](https://ailoot.ai/docs/id/billing/reserve/)

#### Detail tarif referensi

Jadwal referensi tingkat model tidak mengubah pemilihan metode, estimasi harga, atau biaya. Biaya aktif menggunakan tarif metode Ailoot yang dipilih.

Jadwal referensi model

#### Harga menurut konfigurasi

Cocokkan setiap biaya dengan kondisi yang ditampilkan. Gunakan satu tarif untuk setiap kelompok konfigurasi alternatif.

| Konfigurasi | Jadwal tarif | Token konteks, lebih dari | Token konteks, hingga dan termasuk | Biaya |
| --- | --- | --- | --- | --- |
| KonfigurasiOpenAI Chat · Tarif dasar token | Jadwal tarifTarif dasar | Token konteks, lebih dari— | Token konteks, hingga dan termasukTanpa batas atas | Biaya Masukan · Token masukan **$0.02** / 1K token Keluaran · Token keluaran **$0.1** / 1K token Masukan · Pembacaan cache **$0.0005** / 1K token Masukan · Penulisan cache **$0.025** / 1K token Masukan · Penulisan cache, 1 jam **$0.04** / 1K token |
| KonfigurasiOpenAI Chat · Tingkat 1 berdasarkan panjang permintaan | Jadwal tarif— | Token konteks, lebih dari0 | Token konteks, hingga dan termasukTanpa batas atas | Biaya Masukan · Token masukan **$0.02** / 1K token Keluaran · Token keluaran **$0.1** / 1K token Masukan · Pembacaan cache **$0.0005** / 1K token Masukan · Penulisan cache **$0.025** / 1K token Masukan · Penulisan cache, 1 jam **$0.04** / 1K token |
| KonfigurasiAnthropic Messages · Tarif dasar token | Jadwal tarifTarif dasar | Token konteks, lebih dari— | Token konteks, hingga dan termasukTanpa batas atas | Biaya Masukan · Token masukan **$0.02** / 1K token Keluaran · Token keluaran **$0.1** / 1K token Masukan · Pembacaan cache **$0.0005** / 1K token Masukan · Penulisan cache **$0.025** / 1K token Masukan · Penulisan cache, 1 jam **$0.04** / 1K token |
| KonfigurasiAnthropic Messages · Tingkat 1 berdasarkan panjang permintaan | Jadwal tarif— | Token konteks, lebih dari0 | Token konteks, hingga dan termasukTanpa batas atas | Biaya Masukan · Token masukan **$0.02** / 1K token Keluaran · Token keluaran **$0.1** / 1K token Masukan · Pembacaan cache **$0.0005** / 1K token Masukan · Penulisan cache **$0.025** / 1K token Masukan · Penulisan cache, 1 jam **$0.04** / 1K token |

### Contoh permintaan

#### Ailoot · OpenAI Responses

Contoh teksMasukan, gambarPython SDKNode.js SDKAliran Python

```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": "claude-fable-5-1", "input": ""}')
f=Path(os.environ["AILOOT_TEXT_FILE"])
if not f.is_file():raise SystemExit("Choose your actual UTF-8 source material")
text=f.read_text(encoding="utf-8")
if not text.strip():raise SystemExit("Source material must contain text")
p["input"]="Summarize this material and quote supporting source passages.\n\n"+text
Path("request.json").write_text(json.dumps(p,ensure_ascii=False))
PY_REQUEST
curl --fail-with-body --silent --show-error https://api.ailoot.ai/v1/responses \
  -H "Authorization: Bearer $AILOOT_API_KEY" -H 'Content-Type: application/json' \
  --data-binary @request.json -D response-headers.txt -o result.json
python3 - <<'PY_RESULT'
import base64, json
from pathlib import Path

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

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

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

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

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

```python
from openai import OpenAI
import os

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

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

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

```js
import OpenAI from "openai";

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

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

saveResult(resp);
```

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

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

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

### Terima dan simpan hasil

#### Ailoot · OpenAI Responses

json atau SSE

##### Simpan semua hasil yang selesai

Simpan setiap respons lengkap, berkas, dan bagian konten yang dikembalikan.

Simpan setiap item keluaran dan bagian konten, call\_id fungsi yang sebenarnya, penalaran terenkripsi, dan data penggunaan. Saat streaming, pertahankan identitas peristiwa/item secara lengkap.

##### Jika respons asli perlu diperiksa

Simpan ID permintaan/respons dan header. URL umum untuk pengambilan tugas teks tidak disediakan.

Kolom respons

| Kolom | Jenis |
| --- | --- |
| Kolom`id` | Jenisstring |
| Kolom`status` | Jenisstring |
| Kolom`output[]` | Jenismessage\|reasoning\|function\_call\|other item |
| Kolom`output[].content[]` | Jeniscontent part |
| Kolom`usage` | Jenisobject |

Kesalahan dan langkah berikutnya

| Respons | Kondisi | Langkah berikutnya |
| --- | --- | --- |
| Respons400 · `invalid_request_error` | KondisiBidang wajib, representasi materi, atau nilai parameter tidak valid | Langkah berikutnyaPerbaiki bidang yang ditunjukkan sebelum permintaan pembuatan baru. |

### Alias

#### Alias model

<strong>Ailoot</strong> [`claude-fable-5-1`](https://ailoot.ai/models/id/#m=anthropic%2Fclaude-fable-5.1&route=Core&caller=claude-fable-5-1&fmt=responses), [`claude`](https://ailoot.ai/models/id/#m=anthropic%2Fclaude-fable-5.1&route=Core&caller=claude&fmt=responses), [`claude-fable`](https://ailoot.ai/models/id/#m=anthropic%2Fclaude-fable-5.1&route=Core&caller=claude-fable), [`claude-fable-latest`](https://ailoot.ai/models/id/#m=anthropic%2Fclaude-fable-5.1&route=Core&caller=claude-fable-latest), [`claude-latest`](https://ailoot.ai/models/id/#m=anthropic%2Fclaude-fable-5.1&route=Core&caller=claude-latest&fmt=responses)
**Ailoot Ultra** [`anthropic/claude-fable-5.1`](https://ailoot.ai/models/id/#m=anthropic%2Fclaude-fable-5.1&route=Ultra&caller=anthropic%2Fclaude-fable-5.1), [`~anthropic/claude-fable-latest`](https://ailoot.ai/models/id/#m=anthropic%2Fclaude-fable-5.1&route=Ultra&caller=~anthropic%2Fclaude-fable-latest)

#### Alias jalur metode

Gunakan jalur metode yang ditampilkan di atas.

#### ID pemanggil terkait

[`anthropic/claude-fable-5.1`](https://ailoot.ai/models/id/#m=anthropic%2Fclaude-fable-5.1&route=Ultra&caller=anthropic%2Fclaude-fable-5.1), [`claude`](https://ailoot.ai/models/id/#m=anthropic%2Fclaude-fable-5.1&route=Core&caller=claude&fmt=responses), [`claude-fable`](https://ailoot.ai/models/id/#m=anthropic%2Fclaude-fable-5.1&route=Core&caller=claude-fable), [`claude-fable-latest`](https://ailoot.ai/models/id/#m=anthropic%2Fclaude-fable-5.1&route=Core&caller=claude-fable-latest), [`claude-latest`](https://ailoot.ai/models/id/#m=anthropic%2Fclaude-fable-5.1&route=Core&caller=claude-latest&fmt=responses), [`~anthropic/claude-fable-latest`](https://ailoot.ai/models/id/#m=anthropic%2Fclaude-fable-5.1&route=Ultra&caller=~anthropic%2Fclaude-fable-latest), [`claude-fable-5-1`](https://ailoot.ai/models/id/#m=anthropic%2Fclaude-fable-5.1&route=Core&caller=claude-fable-5-1&fmt=responses)

**Ailoot · OpenAI Chat** `POST /v1/chat/completions` `claude-fable-5-1`

[`claude-fable-5-1`](https://ailoot.ai/models/id/#m=anthropic%2Fclaude-fable-5.1&route=Core&caller=claude-fable-5-1&fmt=chat)

Anthropic /`claude-fable-5-1`

ID model

- `claude-fable-5-1`
- `claude`
- `claude-latest`

### Mulai

Claude Fable 5.1 ditujukan untuk penelitian kompleks, perubahan kode berskala besar, dan analisis profesional yang panjang. Menghubungkan informasi dalam konteks besar serta bekerja dengan teks dan gambar terperinci.

Masukan yang diterima

Teks · Gambar

Hasil

Teks

### Tersedia di Ailoot · masukan & metode

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

Masukan

`text`, `image`

Keluaran

`text`

Konteks

1.000.000 tokens

Keluaran maksimum

131.072 tokens

Format keluaran

json atau SSE

| Kolom | Jenis | Persyaratan | Nilai & batasan | Bawaan |
| --- | --- | --- | --- | --- |
| Kolom`model` | Jenis`string` | PersyaratanWajib | Nilai & batasan claude-fable-5-1 | Bawaan— |
| Kolom`messages` | Jenis`message[]` | PersyaratanWajib | Nilai & batasan Item minimum: 1 | Bawaan— |
| Kolom`messages[].role` | Jenis`string` | PersyaratanWajib | Nilai & batasan Contoh: system, user, assistant, tool, function Kondisi: Peran ini direpresentasikan secara eksplisit oleh tipe kompatibilitas dalam kode sumber; kumpulan peran model yang tepat tetap khusus untuk tiap model. Bergantung pada model | Bawaan— |
| Kolom`messages[].content` | Jenis`string\|content_part[]\|null` | PersyaratanOpsional | Nilai & batasan | Bawaan— |
| Kolom`messages[].tool_calls` | Jenis`tool_call[]` | PersyaratanOpsional | Nilai & batasan | Bawaan— |
| Kolom`messages[].tool_call_id` | Jenis`string` | PersyaratanOpsional | Nilai & batasan Berlaku jika: role=tool; gunakan ID yang benar-benar dikembalikan | Bawaan— |
| Kolom`messages[].name` | Jenis`string` | PersyaratanOpsional | Nilai & batasan | Bawaan— |
| Kolom`messages[].reasoning_content` | Jenis`string` | PersyaratanOpsional | Nilai & batasan Berlaku jika: Kirim kembali penalaran yang benar-benar dikembalikan jika model ini menggunakannya | Bawaan— |
| Kolom`messages[].reasoning_details` | Jenis`object\|array` | PersyaratanOpsional | Nilai & batasan Bergantung pada model | Bawaan— |
| Kolom`max_tokens` | Jenis`integer` | PersyaratanOpsional | Nilai & batasan Minimum: 1 Bergantung pada model | Bawaan— |
| Kolom`max_completion_tokens` | Jenis`integer` | PersyaratanOpsional | Nilai & batasan Minimum: 1 Bergantung pada model | Bawaan— |
| Kolom`stream` | Jenis`boolean` | PersyaratanOpsional | Nilai & batasan | Bawaanfalse |
| Kolom`stream_options.include_usage` | Jenis`boolean` | PersyaratanOpsional | Nilai & batasan Bergantung pada model | Bawaan— |
| Kolom`temperature` | Jenis`number` | PersyaratanOpsional | Nilai & batasan Bergantung pada model | Bawaan— |
| Kolom`top_p` | Jenis`number` | PersyaratanOpsional | Nilai & batasan Bergantung pada model | Bawaan— |
| Kolom`stop` | Jenis`string\|string[]` | PersyaratanOpsional | Nilai & batasan Bergantung pada model | Bawaan— |
| Kolom`tools` | Jenis`function_tool[]` | PersyaratanOpsional | Nilai & batasan Bergantung pada model | Bawaan— |
| Kolom`tools[].type` | Jenis`string` | PersyaratanOpsional | Nilai & batasan Bergantung pada model | Bawaan— |
| Kolom`tools[].function.name` | Jenis`string` | PersyaratanWajib | Nilai & batasan Berlaku jika: alat fungsi disediakan | Bawaan— |
| Kolom`tools[].function.description` | Jenis`string` | PersyaratanOpsional | Nilai & batasan | Bawaan— |
| Kolom`tools[].function.parameters` | Jenis`JSON_schema` | PersyaratanOpsional | Nilai & batasan | Bawaan— |
| Kolom`tool_choice` | Jenis`string\|object` | PersyaratanOpsional | Nilai & batasan Bergantung pada model | Bawaan— |
| Kolom`parallel_tool_calls` | Jenis`boolean` | PersyaratanOpsional | Nilai & batasan Bergantung pada model | Bawaan— |
| Kolom`response_format` | Jenis`object` | PersyaratanOpsional | Nilai & batasan Bergantung pada model | Bawaan— |
| Kolom`reasoning_effort` | Jenis`string` | PersyaratanOpsional | Nilai & batasan Bergantung pada model | Bawaan— |
| Kolom`reasoning` | Jenis`object` | PersyaratanOpsional | Nilai & batasan Bergantung pada model | Bawaan— |
| Kolom`service_tier` | Jenis`string` | PersyaratanOpsional | Nilai & batasan Bergantung pada model | Bawaan— |
| Kolom`instructions` | Jenis`string` | PersyaratanOpsional | Nilai & batasan Kolom kompatibilitas | Bawaan— |
| Kolom`functions` | Jenis`function[]` | PersyaratanOpsional | Nilai & batasan Bergantung pada model | Bawaan— |
| Kolom`function_call` | Jenis`string\|object` | PersyaratanOpsional | Nilai & batasan Bergantung pada model | Bawaan— |
| Kolom`prompt_cache_options` | Jenis`object` | PersyaratanOpsional | Nilai & batasan Bergantung pada model | Bawaan— |

Kombinasi bahan masukan

**Teks** · Teks UTF8

`messages[].content`

**Teks + gambar**

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

Parameter metode dan siklus hidup

| Parameter | Kontrak |
| --- | --- |
| Parameter`material_types` | Kontraktext, image |
| Parameter`required` | Kontrakmodel, messages |
| Parameter`optional_controls` | Kontraknull |
| Parameter`content_type` | Kontrakapplication/json |
| Parameter`text_file_material` | Kontrakkonten UTF-8 aktual dimasukkan sebagai teks; ID file atau alamat URL (URLs) memerlukan dukungan yang tepat dan terpisah |

Siklus hidup: `exact retained published method`

Struktur metode dan ID bersifat eksak; kemampuan pemasok terpisah dari penerimaan permintaan.

### Paket

#### Tarif metode Ailoot

Masukan

US$0,01 */ 1K*

Keluaran

US$0,05 */ 1K*

Pembacaan cache

US$0,00025 */ 1K*

Penulisan cache

US$0,0125 */ 1K*

Penulisan cache, 5 menit

US$0,0125 */ 1K tokens*

Penulisan cache, 1 jam

US$0,02 */ 1K tokens*

web\_search\_call

US$0,01 *per pemanggilan*

Jumlah pemanggilan maksimum web\_search\_call

8

Ailoot mencadangkan perkiraan dana sebelum permintaan. Setelah hasil diterima, tagihan akhir diselesaikan berdasarkan penggunaan yang terukur. Penyelesaian tagihan streaming menggunakan catatan penggunaan akhir. [Cara kerja cadangan dan penyelesaian tagihan →](https://ailoot.ai/docs/id/billing/reserve/)

#### Detail tarif referensi

Jadwal referensi tingkat model tidak mengubah pemilihan metode, estimasi harga, atau biaya. Biaya aktif menggunakan tarif metode Ailoot yang dipilih.

Jadwal referensi model

#### Harga menurut konfigurasi

Cocokkan setiap biaya dengan kondisi yang ditampilkan. Gunakan satu tarif untuk setiap kelompok konfigurasi alternatif.

| Konfigurasi | Jadwal tarif | Token konteks, lebih dari | Token konteks, hingga dan termasuk | Biaya |
| --- | --- | --- | --- | --- |
| KonfigurasiOpenAI Chat · Tarif dasar token | Jadwal tarifTarif dasar | Token konteks, lebih dari— | Token konteks, hingga dan termasukTanpa batas atas | Biaya Masukan · Token masukan **$0.02** / 1K token Keluaran · Token keluaran **$0.1** / 1K token Masukan · Pembacaan cache **$0.0005** / 1K token Masukan · Penulisan cache **$0.025** / 1K token Masukan · Penulisan cache, 1 jam **$0.04** / 1K token |
| KonfigurasiOpenAI Chat · Tingkat 1 berdasarkan panjang permintaan | Jadwal tarif— | Token konteks, lebih dari0 | Token konteks, hingga dan termasukTanpa batas atas | Biaya Masukan · Token masukan **$0.02** / 1K token Keluaran · Token keluaran **$0.1** / 1K token Masukan · Pembacaan cache **$0.0005** / 1K token Masukan · Penulisan cache **$0.025** / 1K token Masukan · Penulisan cache, 1 jam **$0.04** / 1K token |
| KonfigurasiAnthropic Messages · Tarif dasar token | Jadwal tarifTarif dasar | Token konteks, lebih dari— | Token konteks, hingga dan termasukTanpa batas atas | Biaya Masukan · Token masukan **$0.02** / 1K token Keluaran · Token keluaran **$0.1** / 1K token Masukan · Pembacaan cache **$0.0005** / 1K token Masukan · Penulisan cache **$0.025** / 1K token Masukan · Penulisan cache, 1 jam **$0.04** / 1K token |
| KonfigurasiAnthropic Messages · Tingkat 1 berdasarkan panjang permintaan | Jadwal tarif— | Token konteks, lebih dari0 | Token konteks, hingga dan termasukTanpa batas atas | Biaya Masukan · Token masukan **$0.02** / 1K token Keluaran · Token keluaran **$0.1** / 1K token Masukan · Pembacaan cache **$0.0005** / 1K token Masukan · Penulisan cache **$0.025** / 1K token Masukan · Penulisan cache, 1 jam **$0.04** / 1K token |

### Contoh permintaan

#### Ailoot · OpenAI Chat

Contoh teksMasukan, gambarPython SDKNode.js SDKAliran Python

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

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

```python
from openai import OpenAI
import os

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

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

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

```js
import OpenAI from "openai";

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

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

saveResult(resp);
```

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

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

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

with client.chat.completions.stream(model='claude-fable-5-1',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")
```

### Terima dan simpan hasil

#### Ailoot · OpenAI Chat

json atau SSE

##### Simpan semua hasil yang selesai

Simpan setiap respons lengkap, berkas, dan bagian konten yang dikembalikan.

Simpan setiap alternatif jawaban beserta konten, panggilan alat, dan penalarannya. Dalam SSE, gabungkan delta menurut indeks alternatif jawaban/alat, lalu pertahankan alasan penghentian akhir dan data penggunaan.

##### Jika respons asli perlu diperiksa

Simpan ID permintaan/respons dan header. URL umum untuk pengambilan tugas teks tidak disediakan.

Kolom respons

| Kolom | Jenis |
| --- | --- |
| Kolom`choices[].index` | Jenisinteger |
| Kolom`choices[].message.content` | Jenisstring\|null |
| Kolom`choices[].message.tool_calls` | Jenistool\_call\[\] |
| Kolom`choices[].message.reasoning_content` | Jenisstring |
| Kolom`choices[].message.reasoning_details` | Jenisobject\|array |
| Kolom`choices[].finish_reason` | Jenisstring\|null |
| Kolom`usage` | Jenisobject |

Kesalahan dan langkah berikutnya

| Respons | Kondisi | Langkah berikutnya |
| --- | --- | --- |
| Respons400 · `invalid_request_error` | KondisiBidang wajib, representasi materi, atau nilai parameter tidak valid | Langkah berikutnyaPerbaiki bidang yang ditunjukkan sebelum permintaan pembuatan baru. |

### Alias

#### Alias model

<strong>Ailoot</strong> [`claude-fable-5-1`](https://ailoot.ai/models/id/#m=anthropic%2Fclaude-fable-5.1&route=Core&caller=claude-fable-5-1&fmt=chat), [`claude`](https://ailoot.ai/models/id/#m=anthropic%2Fclaude-fable-5.1&route=Core&caller=claude&fmt=chat), [`claude-fable`](https://ailoot.ai/models/id/#m=anthropic%2Fclaude-fable-5.1&route=Core&caller=claude-fable), [`claude-fable-latest`](https://ailoot.ai/models/id/#m=anthropic%2Fclaude-fable-5.1&route=Core&caller=claude-fable-latest), [`claude-latest`](https://ailoot.ai/models/id/#m=anthropic%2Fclaude-fable-5.1&route=Core&caller=claude-latest&fmt=chat)
**Ailoot Ultra** [`anthropic/claude-fable-5.1`](https://ailoot.ai/models/id/#m=anthropic%2Fclaude-fable-5.1&route=Ultra&caller=anthropic%2Fclaude-fable-5.1&fmt=chat), [`~anthropic/claude-fable-latest`](https://ailoot.ai/models/id/#m=anthropic%2Fclaude-fable-5.1&route=Ultra&caller=~anthropic%2Fclaude-fable-latest&fmt=chat)

#### Alias jalur metode

Gunakan jalur metode yang ditampilkan di atas.

#### ID pemanggil terkait

[`anthropic/claude-fable-5.1`](https://ailoot.ai/models/id/#m=anthropic%2Fclaude-fable-5.1&route=Ultra&caller=anthropic%2Fclaude-fable-5.1&fmt=chat), [`claude`](https://ailoot.ai/models/id/#m=anthropic%2Fclaude-fable-5.1&route=Core&caller=claude&fmt=chat), [`claude-fable`](https://ailoot.ai/models/id/#m=anthropic%2Fclaude-fable-5.1&route=Core&caller=claude-fable), [`claude-fable-latest`](https://ailoot.ai/models/id/#m=anthropic%2Fclaude-fable-5.1&route=Core&caller=claude-fable-latest), [`claude-latest`](https://ailoot.ai/models/id/#m=anthropic%2Fclaude-fable-5.1&route=Core&caller=claude-latest&fmt=chat), [`~anthropic/claude-fable-latest`](https://ailoot.ai/models/id/#m=anthropic%2Fclaude-fable-5.1&route=Ultra&caller=~anthropic%2Fclaude-fable-latest&fmt=chat), [`claude-fable-5-1`](https://ailoot.ai/models/id/#m=anthropic%2Fclaude-fable-5.1&route=Core&caller=claude-fable-5-1&fmt=chat)

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

[`claude`](https://ailoot.ai/models/id/#m=anthropic%2Fclaude-fable-5.1&route=Core&caller=claude&fmt=messages)

Anthropic /`claude`

ID model

- `claude-fable-5-1`
- `claude`
- `claude-fable`
- `claude-fable-latest`
- `claude-latest`

### Mulai

Claude Fable 5.1 ditujukan untuk penelitian kompleks, perubahan kode berskala besar, dan analisis profesional yang panjang. Menghubungkan informasi dalam konteks besar serta bekerja dengan teks dan gambar terperinci.

Masukan yang diterima

Teks · Gambar

Hasil

Teks

### Tersedia di Ailoot · masukan & metode

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

Masukan

`text`, `image`

Keluaran

`text`

Konteks

1.000.000 tokens

Keluaran maksimum

131.072 tokens

Format keluaran

json or SSE

| Kolom | Jenis | Persyaratan | Nilai & batasan | Bawaan |
| --- | --- | --- | --- | --- |
| Kolom`model` | Jenis`string` | PersyaratanWajib | Nilai & batasan claude | Bawaan— |
| Kolom`messages` | Jenis`message[]` | PersyaratanWajib | Nilai & batasan Item minimum: 1 | Bawaan— |
| Kolom`messages[].role` | Jenis`string` | PersyaratanWajib | Nilai & batasan user, assistant | Bawaan— |
| Kolom`messages[].content` | Jenis`string\|content_block[]` | PersyaratanWajib | Nilai & batasan | Bawaan— |
| Kolom`system` | Jenis`string\|content_block[]` | PersyaratanOpsional | Nilai & batasan | Bawaan— |
| Kolom`max_tokens` | Jenis`integer` | PersyaratanWajib | Nilai & batasan Minimum: 1 Batas berlaku untuk: batas maksimum yang tepat untuk model/kartu yang dipilih | Bawaan— |
| Kolom`stream` | Jenis`boolean` | PersyaratanOpsional | Nilai & batasan | Bawaanfalse |
| Kolom`temperature` | Jenis`number` | PersyaratanOpsional | Nilai & batasan Bergantung pada model | Bawaan— |
| Kolom`top_p` | Jenis`number` | PersyaratanOpsional | Nilai & batasan Bergantung pada model | Bawaan— |
| Kolom`stop_sequences` | Jenis`string[]` | PersyaratanOpsional | Nilai & batasan Bergantung pada model | Bawaan— |
| Kolom`tools` | Jenis`tool[]` | PersyaratanOpsional | Nilai & batasan Bergantung pada model | Bawaan— |
| Kolom`tools[].name` | Jenis`string` | PersyaratanOpsional | Nilai & batasan Berlaku jika: tool supplied | Bawaan— |
| Kolom`tools[].description` | Jenis`string` | PersyaratanOpsional | Nilai & batasan | Bawaan— |
| Kolom`tools[].input_schema` | Jenis`JSON_schema` | PersyaratanOpsional | Nilai & batasan | Bawaan— |
| Kolom`tool_choice` | Jenis`object` | PersyaratanOpsional | Nilai & batasan Bergantung pada model | Bawaan— |
| Kolom`thinking.type` | Jenis`string` | PersyaratanOpsional | Nilai & batasan Bergantung pada model | Bawaan— |
| Kolom`thinking.budget_tokens` | Jenis`integer` | PersyaratanOpsional | Nilai & batasan Bergantung pada model | Bawaan— |
| Kolom`output_config.effort` | Jenis`string` | PersyaratanOpsional | Nilai & batasan Bergantung pada model | Bawaan— |
| Kolom`metadata` | Jenis`object` | PersyaratanOpsional | Nilai & batasan | Bawaan— |
| Kolom`cache_control` | Jenis`object` | PersyaratanOpsional | Nilai & batasan Bergantung pada model | Bawaan— |

Kombinasi bahan masukan

**Teks** · Teks UTF8

`messages[].content or type=text block`

**Teks + gambar**

`{type:image,source:{type:base64,media_type,data}} or source type=url`

Parameter metode dan siklus hidup

| Parameter | Kontrak |
| --- | --- |
| Parameter`material_types` | Kontraktext, image |
| Parameter`required` | Kontrakmodel, messages, max\_tokens |
| Parameter`optional_controls` | Kontraknull |
| Parameter`content_type` | Kontrakapplication/json |
| Parameter`text_file_material` | Kontrakkonten UTF-8 aktual dimasukkan sebagai teks; ID file atau alamat URL (URLs) memerlukan dukungan yang tepat dan terpisah |

Siklus hidup: `exact retained published method`

Struktur metode dan ID bersifat eksak; kemampuan pemasok terpisah dari penerimaan permintaan.

### Paket

#### Tarif metode Ailoot

Masukan

US$0,01 */ 1K*

Keluaran

US$0,05 */ 1K*

Pembacaan cache

US$0,00025 */ 1K*

Penulisan cache

US$0,0125 */ 1K*

Penulisan cache, 5 menit

US$0,0125 */ 1K tokens*

Penulisan cache, 1 jam

US$0,02 */ 1K tokens*

web\_search\_call

US$0,01 *per pemanggilan*

Jumlah pemanggilan maksimum web\_search\_call

8

Ailoot mencadangkan perkiraan dana sebelum permintaan. Setelah hasil diterima, tagihan akhir diselesaikan berdasarkan penggunaan yang terukur. Penyelesaian tagihan streaming menggunakan catatan penggunaan akhir. [Cara kerja cadangan dan penyelesaian tagihan →](https://ailoot.ai/docs/id/billing/reserve/)

#### Detail tarif referensi

Jadwal referensi tingkat model tidak mengubah pemilihan metode, estimasi harga, atau biaya. Biaya aktif menggunakan tarif metode Ailoot yang dipilih.

Jadwal referensi model

#### Harga menurut konfigurasi

Cocokkan setiap biaya dengan kondisi yang ditampilkan. Gunakan satu tarif untuk setiap kelompok konfigurasi alternatif.

| Konfigurasi | Jadwal tarif | Token konteks, lebih dari | Token konteks, hingga dan termasuk | Biaya |
| --- | --- | --- | --- | --- |
| KonfigurasiOpenAI Chat · Tarif dasar token | Jadwal tarifTarif dasar | Token konteks, lebih dari— | Token konteks, hingga dan termasukTanpa batas atas | Biaya Masukan · Token masukan **$0.02** / 1K token Keluaran · Token keluaran **$0.1** / 1K token Masukan · Pembacaan cache **$0.0005** / 1K token Masukan · Penulisan cache **$0.025** / 1K token Masukan · Penulisan cache, 1 jam **$0.04** / 1K token |
| KonfigurasiOpenAI Chat · Tingkat 1 berdasarkan panjang permintaan | Jadwal tarif— | Token konteks, lebih dari0 | Token konteks, hingga dan termasukTanpa batas atas | Biaya Masukan · Token masukan **$0.02** / 1K token Keluaran · Token keluaran **$0.1** / 1K token Masukan · Pembacaan cache **$0.0005** / 1K token Masukan · Penulisan cache **$0.025** / 1K token Masukan · Penulisan cache, 1 jam **$0.04** / 1K token |
| KonfigurasiAnthropic Messages · Tarif dasar token | Jadwal tarifTarif dasar | Token konteks, lebih dari— | Token konteks, hingga dan termasukTanpa batas atas | Biaya Masukan · Token masukan **$0.02** / 1K token Keluaran · Token keluaran **$0.1** / 1K token Masukan · Pembacaan cache **$0.0005** / 1K token Masukan · Penulisan cache **$0.025** / 1K token Masukan · Penulisan cache, 1 jam **$0.04** / 1K token |
| KonfigurasiAnthropic Messages · Tingkat 1 berdasarkan panjang permintaan | Jadwal tarif— | Token konteks, lebih dari0 | Token konteks, hingga dan termasukTanpa batas atas | Biaya Masukan · Token masukan **$0.02** / 1K token Keluaran · Token keluaran **$0.1** / 1K token Masukan · Pembacaan cache **$0.0005** / 1K token Masukan · Penulisan cache **$0.025** / 1K token Masukan · Penulisan cache, 1 jam **$0.04** / 1K token |

### Contoh permintaan

#### Ailoot · Anthropic Messages

Contoh teksMasukan, gambarPython SDKNode.js SDKAliran Python

```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": "claude", "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": "claude", "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="claude",
    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: "claude",
  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='claude',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")
```

### Terima dan simpan hasil

#### Ailoot · Anthropic Messages

json or SSE

##### Simpan semua hasil yang selesai

Simpan setiap respons lengkap, berkas, dan bagian konten yang dikembalikan.

Simpan semua blok konten, tanda tangan penalaran, dan ID penggunaan alat yang sebenarnya. Gabungkan semua delta blok SSE; blok teks pertama bukan keseluruhan keluaran.

##### Jika respons asli perlu diperiksa

Simpan ID permintaan/respons dan header. URL umum untuk pengambilan tugas teks tidak disediakan.

Kolom respons

| Kolom | Jenis |
| --- | --- |
| Kolom`id` | Jenisstring |
| Kolom`model` | Jenisstring |
| Kolom`content[]` | Jenistext\|thinking\|tool\_use\|other content block |
| Kolom`stop_reason` | Jenisstring\|null |
| Kolom`usage` | Jenisobject |

Kesalahan dan langkah berikutnya

| Respons | Kondisi | Langkah berikutnya |
| --- | --- | --- |
| Respons400 · `invalid_request_error` | KondisiBidang wajib, representasi materi, atau nilai parameter tidak valid | Langkah berikutnyaPerbaiki bidang yang ditunjukkan sebelum permintaan pembuatan baru. |

### Alias

#### Alias model

<strong>Ailoot</strong> [`claude-fable-5-1`](https://ailoot.ai/models/id/#m=anthropic%2Fclaude-fable-5.1&route=Core&caller=claude-fable-5-1&fmt=messages), [`claude`](https://ailoot.ai/models/id/#m=anthropic%2Fclaude-fable-5.1&route=Core&caller=claude&fmt=messages), [`claude-fable`](https://ailoot.ai/models/id/#m=anthropic%2Fclaude-fable-5.1&route=Core&caller=claude-fable&fmt=messages), [`claude-fable-latest`](https://ailoot.ai/models/id/#m=anthropic%2Fclaude-fable-5.1&route=Core&caller=claude-fable-latest&fmt=messages), [`claude-latest`](https://ailoot.ai/models/id/#m=anthropic%2Fclaude-fable-5.1&route=Core&caller=claude-latest&fmt=messages)
**Ailoot Ultra** [`anthropic/claude-fable-5.1`](https://ailoot.ai/models/id/#m=anthropic%2Fclaude-fable-5.1&route=Ultra&caller=anthropic%2Fclaude-fable-5.1&fmt=messages), [`~anthropic/claude-fable-latest`](https://ailoot.ai/models/id/#m=anthropic%2Fclaude-fable-5.1&route=Ultra&caller=~anthropic%2Fclaude-fable-latest&fmt=messages)

#### Alias jalur metode

Gunakan jalur metode yang ditampilkan di atas.

#### ID pemanggil terkait

[`anthropic/claude-fable-5.1`](https://ailoot.ai/models/id/#m=anthropic%2Fclaude-fable-5.1&route=Ultra&caller=anthropic%2Fclaude-fable-5.1&fmt=messages), [`claude`](https://ailoot.ai/models/id/#m=anthropic%2Fclaude-fable-5.1&route=Core&caller=claude&fmt=messages), [`claude-fable`](https://ailoot.ai/models/id/#m=anthropic%2Fclaude-fable-5.1&route=Core&caller=claude-fable&fmt=messages), [`claude-fable-latest`](https://ailoot.ai/models/id/#m=anthropic%2Fclaude-fable-5.1&route=Core&caller=claude-fable-latest&fmt=messages), [`claude-latest`](https://ailoot.ai/models/id/#m=anthropic%2Fclaude-fable-5.1&route=Core&caller=claude-latest&fmt=messages), [`~anthropic/claude-fable-latest`](https://ailoot.ai/models/id/#m=anthropic%2Fclaude-fable-5.1&route=Ultra&caller=~anthropic%2Fclaude-fable-latest&fmt=messages), [`claude-fable-5-1`](https://ailoot.ai/models/id/#m=anthropic%2Fclaude-fable-5.1&route=Core&caller=claude-fable-5-1&fmt=messages)

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

[`claude`](https://ailoot.ai/models/id/#m=anthropic%2Fclaude-fable-5.1&route=Core&caller=claude&fmt=responses)

Anthropic /`claude`

ID model

- `claude-fable-5-1`
- `claude`
- `claude-latest`

### Mulai

Claude Fable 5.1 ditujukan untuk penelitian kompleks, perubahan kode berskala besar, dan analisis profesional yang panjang. Menghubungkan informasi dalam konteks besar serta bekerja dengan teks dan gambar terperinci.

Masukan yang diterima

Teks · Gambar

Hasil

Teks

### Tersedia di Ailoot · masukan & metode

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

Masukan

`text`, `image`

Keluaran

`text`

Konteks

1.000.000 tokens

Keluaran maksimum

131.072 tokens

Format keluaran

json or SSE

| Kolom | Jenis | Persyaratan | Nilai & batasan | Bawaan |
| --- | --- | --- | --- | --- |
| Kolom`model` | Jenis`string` | PersyaratanWajib | Nilai & batasan claude | Bawaan— |
| Kolom`input` | Jenis`string\|input_item[]` | PersyaratanWajib | Nilai & batasan | Bawaan— |
| Kolom`instructions` | Jenis`string` | PersyaratanOpsional | Nilai & batasan | Bawaan— |
| Kolom`input[].type` | Jenis`string` | PersyaratanOpsional | Nilai & batasan message, reasoning, function\_call, function\_call\_output | Bawaan— |
| Kolom`input[].content` | Jenis`string\|content_part[]` | PersyaratanOpsional | Nilai & batasan | Bawaan— |
| Kolom`input[].call_id` | Jenis`string` | PersyaratanOpsional | Nilai & batasan Berlaku jika: function\_call\_output; pertahankan call\_id yang benar-benar dikembalikan | Bawaan— |
| Kolom`input[].output` | Jenis`string\|content_part[]` | PersyaratanOpsional | Nilai & batasan Berlaku jika: function\_call\_output | Bawaan— |
| Kolom`max_output_tokens` | Jenis`integer` | PersyaratanOpsional | Nilai & batasan Minimum: 1 Bergantung pada model | Bawaan— |
| Kolom`stream` | Jenis`boolean` | PersyaratanOpsional | Nilai & batasan | Bawaanfalse |
| Kolom`temperature` | Jenis`number` | PersyaratanOpsional | Nilai & batasan Bergantung pada model | Bawaan— |
| Kolom`top_p` | Jenis`number` | PersyaratanOpsional | Nilai & batasan Bergantung pada model | Bawaan— |
| Kolom`tools` | Jenis`tool[]` | PersyaratanOpsional | Nilai & batasan Bergantung pada model | Bawaan— |
| Kolom`tool_choice` | Jenis`string\|object` | PersyaratanOpsional | Nilai & batasan Bergantung pada model | Bawaan— |
| Kolom`parallel_tool_calls` | Jenis`boolean` | PersyaratanOpsional | Nilai & batasan Bergantung pada model | Bawaan— |
| Kolom`reasoning.effort` | Jenis`string` | PersyaratanOpsional | Nilai & batasan Bergantung pada model | Bawaan— |
| Kolom`reasoning.summary` | Jenis`string` | PersyaratanOpsional | Nilai & batasan Bergantung pada model | Bawaan— |
| Kolom`text.format` | Jenis`object` | PersyaratanOpsional | Nilai & batasan Bergantung pada model | Bawaan— |
| Kolom`text.verbosity` | Jenis`string` | PersyaratanOpsional | Nilai & batasan Bergantung pada model | Bawaan— |
| Kolom`include` | Jenis`string[]` | PersyaratanOpsional | Nilai & batasan Bergantung pada model | Bawaan— |
| Kolom`store` | Jenis`boolean` | PersyaratanOpsional | Nilai & batasan Bergantung pada model | Bawaan— |
| Kolom`previous_response_id` | Jenis`string` | PersyaratanOpsional | Nilai & batasan Persyaratan ID: Hanya ID respons yang benar-benar diperoleh dari kelanjutan yang didukung Bergantung pada model | Bawaan— |
| Kolom`service_tier` | Jenis`string` | PersyaratanOpsional | Nilai & batasan Bergantung pada model | Bawaan— |
| Kolom`prompt_cache_key` | Jenis`string` | PersyaratanOpsional | Nilai & batasan Bergantung pada model | Bawaan— |
| Kolom`prompt_cache_options` | Jenis`object` | PersyaratanOpsional | Nilai & batasan Bergantung pada model | Bawaan— |

Kombinasi bahan masukan

**Teks** · Teks UTF8

`input text or input_text part`

**Teks + gambar**

`{type:input_image,image_url}`

Parameter metode dan siklus hidup

| Parameter | Kontrak |
| --- | --- |
| Parameter`material_types` | Kontraktext, image |
| Parameter`required` | Kontrakmodel, input |
| Parameter`optional_controls` | Kontraknull |
| Parameter`content_type` | Kontrakapplication/json |
| Parameter`text_file_material` | Kontrakkonten UTF-8 aktual dimasukkan sebagai teks; ID file atau alamat URL (URLs) memerlukan dukungan yang tepat dan terpisah |

Siklus hidup: `exact retained published method`

Struktur metode dan ID bersifat eksak; kemampuan pemasok terpisah dari penerimaan permintaan.

### Paket

#### Tarif metode Ailoot

Masukan

US$0,01 */ 1K*

Keluaran

US$0,05 */ 1K*

Pembacaan cache

US$0,00025 */ 1K*

Penulisan cache

US$0,0125 */ 1K*

Penulisan cache, 5 menit

US$0,0125 */ 1K tokens*

Penulisan cache, 1 jam

US$0,02 */ 1K tokens*

web\_search\_call

US$0,01 *per pemanggilan*

Jumlah pemanggilan maksimum web\_search\_call

8

Ailoot mencadangkan perkiraan dana sebelum permintaan. Setelah hasil diterima, tagihan akhir diselesaikan berdasarkan penggunaan yang terukur. Penyelesaian tagihan streaming menggunakan catatan penggunaan akhir. [Cara kerja cadangan dan penyelesaian tagihan →](https://ailoot.ai/docs/id/billing/reserve/)

#### Detail tarif referensi

Jadwal referensi tingkat model tidak mengubah pemilihan metode, estimasi harga, atau biaya. Biaya aktif menggunakan tarif metode Ailoot yang dipilih.

Jadwal referensi model

#### Harga menurut konfigurasi

Cocokkan setiap biaya dengan kondisi yang ditampilkan. Gunakan satu tarif untuk setiap kelompok konfigurasi alternatif.

| Konfigurasi | Jadwal tarif | Token konteks, lebih dari | Token konteks, hingga dan termasuk | Biaya |
| --- | --- | --- | --- | --- |
| KonfigurasiOpenAI Chat · Tarif dasar token | Jadwal tarifTarif dasar | Token konteks, lebih dari— | Token konteks, hingga dan termasukTanpa batas atas | Biaya Masukan · Token masukan **$0.02** / 1K token Keluaran · Token keluaran **$0.1** / 1K token Masukan · Pembacaan cache **$0.0005** / 1K token Masukan · Penulisan cache **$0.025** / 1K token Masukan · Penulisan cache, 1 jam **$0.04** / 1K token |
| KonfigurasiOpenAI Chat · Tingkat 1 berdasarkan panjang permintaan | Jadwal tarif— | Token konteks, lebih dari0 | Token konteks, hingga dan termasukTanpa batas atas | Biaya Masukan · Token masukan **$0.02** / 1K token Keluaran · Token keluaran **$0.1** / 1K token Masukan · Pembacaan cache **$0.0005** / 1K token Masukan · Penulisan cache **$0.025** / 1K token Masukan · Penulisan cache, 1 jam **$0.04** / 1K token |
| KonfigurasiAnthropic Messages · Tarif dasar token | Jadwal tarifTarif dasar | Token konteks, lebih dari— | Token konteks, hingga dan termasukTanpa batas atas | Biaya Masukan · Token masukan **$0.02** / 1K token Keluaran · Token keluaran **$0.1** / 1K token Masukan · Pembacaan cache **$0.0005** / 1K token Masukan · Penulisan cache **$0.025** / 1K token Masukan · Penulisan cache, 1 jam **$0.04** / 1K token |
| KonfigurasiAnthropic Messages · Tingkat 1 berdasarkan panjang permintaan | Jadwal tarif— | Token konteks, lebih dari0 | Token konteks, hingga dan termasukTanpa batas atas | Biaya Masukan · Token masukan **$0.02** / 1K token Keluaran · Token keluaran **$0.1** / 1K token Masukan · Pembacaan cache **$0.0005** / 1K token Masukan · Penulisan cache **$0.025** / 1K token Masukan · Penulisan cache, 1 jam **$0.04** / 1K token |

### Contoh permintaan

#### Ailoot · OpenAI Responses

Contoh teksMasukan, gambarPython SDKNode.js SDKAliran Python

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

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

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

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

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

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

```python
from openai import OpenAI
import os

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

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

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

```js
import OpenAI from "openai";

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

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

saveResult(resp);
```

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

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

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

### Terima dan simpan hasil

#### Ailoot · OpenAI Responses

json or SSE

##### Simpan semua hasil yang selesai

Simpan setiap respons lengkap, berkas, dan bagian konten yang dikembalikan.

Simpan setiap item keluaran dan bagian konten, call\_id fungsi yang sebenarnya, penalaran terenkripsi, dan data penggunaan. Saat streaming, pertahankan identitas peristiwa/item secara lengkap.

##### Jika respons asli perlu diperiksa

Simpan ID permintaan/respons dan header. URL umum untuk pengambilan tugas teks tidak disediakan.

Kolom respons

| Kolom | Jenis |
| --- | --- |
| Kolom`id` | Jenisstring |
| Kolom`status` | Jenisstring |
| Kolom`output[]` | Jenismessage\|reasoning\|function\_call\|other item |
| Kolom`output[].content[]` | Jeniscontent part |
| Kolom`usage` | Jenisobject |

Kesalahan dan langkah berikutnya

| Respons | Kondisi | Langkah berikutnya |
| --- | --- | --- |
| Respons400 · `invalid_request_error` | KondisiBidang wajib, representasi materi, atau nilai parameter tidak valid | Langkah berikutnyaPerbaiki bidang yang ditunjukkan sebelum permintaan pembuatan baru. |

### Alias

#### Alias model

<strong>Ailoot</strong> [`claude-fable-5-1`](https://ailoot.ai/models/id/#m=anthropic%2Fclaude-fable-5.1&route=Core&caller=claude-fable-5-1&fmt=responses), [`claude`](https://ailoot.ai/models/id/#m=anthropic%2Fclaude-fable-5.1&route=Core&caller=claude&fmt=responses), [`claude-fable`](https://ailoot.ai/models/id/#m=anthropic%2Fclaude-fable-5.1&route=Core&caller=claude-fable), [`claude-fable-latest`](https://ailoot.ai/models/id/#m=anthropic%2Fclaude-fable-5.1&route=Core&caller=claude-fable-latest), [`claude-latest`](https://ailoot.ai/models/id/#m=anthropic%2Fclaude-fable-5.1&route=Core&caller=claude-latest&fmt=responses)
**Ailoot Ultra** [`anthropic/claude-fable-5.1`](https://ailoot.ai/models/id/#m=anthropic%2Fclaude-fable-5.1&route=Ultra&caller=anthropic%2Fclaude-fable-5.1), [`~anthropic/claude-fable-latest`](https://ailoot.ai/models/id/#m=anthropic%2Fclaude-fable-5.1&route=Ultra&caller=~anthropic%2Fclaude-fable-latest)

#### Alias jalur metode

Gunakan jalur metode yang ditampilkan di atas.

#### ID pemanggil terkait

[`anthropic/claude-fable-5.1`](https://ailoot.ai/models/id/#m=anthropic%2Fclaude-fable-5.1&route=Ultra&caller=anthropic%2Fclaude-fable-5.1), [`claude`](https://ailoot.ai/models/id/#m=anthropic%2Fclaude-fable-5.1&route=Core&caller=claude&fmt=responses), [`claude-fable`](https://ailoot.ai/models/id/#m=anthropic%2Fclaude-fable-5.1&route=Core&caller=claude-fable), [`claude-fable-latest`](https://ailoot.ai/models/id/#m=anthropic%2Fclaude-fable-5.1&route=Core&caller=claude-fable-latest), [`claude-latest`](https://ailoot.ai/models/id/#m=anthropic%2Fclaude-fable-5.1&route=Core&caller=claude-latest&fmt=responses), [`~anthropic/claude-fable-latest`](https://ailoot.ai/models/id/#m=anthropic%2Fclaude-fable-5.1&route=Ultra&caller=~anthropic%2Fclaude-fable-latest), [`claude-fable-5-1`](https://ailoot.ai/models/id/#m=anthropic%2Fclaude-fable-5.1&route=Core&caller=claude-fable-5-1&fmt=responses)

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

[`claude`](https://ailoot.ai/models/id/#m=anthropic%2Fclaude-fable-5.1&route=Core&caller=claude&fmt=chat)

Anthropic /`claude`

ID model

- `claude-fable-5-1`
- `claude`
- `claude-latest`

### Mulai

Claude Fable 5.1 ditujukan untuk penelitian kompleks, perubahan kode berskala besar, dan analisis profesional yang panjang. Menghubungkan informasi dalam konteks besar serta bekerja dengan teks dan gambar terperinci.

Masukan yang diterima

Teks · Gambar

Hasil

Teks

### Tersedia di Ailoot · masukan & metode

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

Masukan

`text`, `image`

Keluaran

`text`

Konteks

1.000.000 tokens

Keluaran maksimum

131.072 tokens

Format keluaran

json or SSE

| Kolom | Jenis | Persyaratan | Nilai & batasan | Bawaan |
| --- | --- | --- | --- | --- |
| Kolom`model` | Jenis`string` | PersyaratanWajib | Nilai & batasan claude | Bawaan— |
| Kolom`messages` | Jenis`message[]` | PersyaratanWajib | Nilai & batasan Item minimum: 1 | Bawaan— |
| Kolom`messages[].role` | Jenis`string` | PersyaratanWajib | Nilai & batasan Contoh: system, user, assistant, tool, function Kondisi: Peran ini direpresentasikan secara eksplisit oleh tipe kompatibilitas dalam kode sumber; kumpulan peran model yang tepat tetap khusus untuk tiap model. Bergantung pada model | Bawaan— |
| Kolom`messages[].content` | Jenis`string\|content_part[]\|null` | PersyaratanOpsional | Nilai & batasan | Bawaan— |
| Kolom`messages[].tool_calls` | Jenis`tool_call[]` | PersyaratanOpsional | Nilai & batasan | Bawaan— |
| Kolom`messages[].tool_call_id` | Jenis`string` | PersyaratanOpsional | Nilai & batasan Berlaku jika: role=tool; gunakan ID yang benar-benar dikembalikan | Bawaan— |
| Kolom`messages[].name` | Jenis`string` | PersyaratanOpsional | Nilai & batasan | Bawaan— |
| Kolom`messages[].reasoning_content` | Jenis`string` | PersyaratanOpsional | Nilai & batasan Berlaku jika: Kirim kembali penalaran yang benar-benar dikembalikan jika model ini menggunakannya | Bawaan— |
| Kolom`messages[].reasoning_details` | Jenis`object\|array` | PersyaratanOpsional | Nilai & batasan Bergantung pada model | Bawaan— |
| Kolom`max_tokens` | Jenis`integer` | PersyaratanOpsional | Nilai & batasan Minimum: 1 Bergantung pada model | Bawaan— |
| Kolom`max_completion_tokens` | Jenis`integer` | PersyaratanOpsional | Nilai & batasan Minimum: 1 Bergantung pada model | Bawaan— |
| Kolom`stream` | Jenis`boolean` | PersyaratanOpsional | Nilai & batasan | Bawaanfalse |
| Kolom`stream_options.include_usage` | Jenis`boolean` | PersyaratanOpsional | Nilai & batasan Bergantung pada model | Bawaan— |
| Kolom`temperature` | Jenis`number` | PersyaratanOpsional | Nilai & batasan Bergantung pada model | Bawaan— |
| Kolom`top_p` | Jenis`number` | PersyaratanOpsional | Nilai & batasan Bergantung pada model | Bawaan— |
| Kolom`stop` | Jenis`string\|string[]` | PersyaratanOpsional | Nilai & batasan Bergantung pada model | Bawaan— |
| Kolom`tools` | Jenis`function_tool[]` | PersyaratanOpsional | Nilai & batasan Bergantung pada model | Bawaan— |
| Kolom`tools[].type` | Jenis`string` | PersyaratanOpsional | Nilai & batasan Bergantung pada model | Bawaan— |
| Kolom`tools[].function.name` | Jenis`string` | PersyaratanWajib | Nilai & batasan Berlaku jika: function tool supplied | Bawaan— |
| Kolom`tools[].function.description` | Jenis`string` | PersyaratanOpsional | Nilai & batasan | Bawaan— |
| Kolom`tools[].function.parameters` | Jenis`JSON_schema` | PersyaratanOpsional | Nilai & batasan | Bawaan— |
| Kolom`tool_choice` | Jenis`string\|object` | PersyaratanOpsional | Nilai & batasan Bergantung pada model | Bawaan— |
| Kolom`parallel_tool_calls` | Jenis`boolean` | PersyaratanOpsional | Nilai & batasan Bergantung pada model | Bawaan— |
| Kolom`response_format` | Jenis`object` | PersyaratanOpsional | Nilai & batasan Bergantung pada model | Bawaan— |
| Kolom`reasoning_effort` | Jenis`string` | PersyaratanOpsional | Nilai & batasan Bergantung pada model | Bawaan— |
| Kolom`reasoning` | Jenis`object` | PersyaratanOpsional | Nilai & batasan Bergantung pada model | Bawaan— |
| Kolom`service_tier` | Jenis`string` | PersyaratanOpsional | Nilai & batasan Bergantung pada model | Bawaan— |
| Kolom`instructions` | Jenis`string` | PersyaratanOpsional | Nilai & batasan Kolom kompatibilitas | Bawaan— |
| Kolom`functions` | Jenis`function[]` | PersyaratanOpsional | Nilai & batasan Bergantung pada model | Bawaan— |
| Kolom`function_call` | Jenis`string\|object` | PersyaratanOpsional | Nilai & batasan Bergantung pada model | Bawaan— |
| Kolom`prompt_cache_options` | Jenis`object` | PersyaratanOpsional | Nilai & batasan Bergantung pada model | Bawaan— |

Kombinasi bahan masukan

**Teks** · Teks UTF8

`messages[].content`

**Teks + gambar**

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

Parameter metode dan siklus hidup

| Parameter | Kontrak |
| --- | --- |
| Parameter`material_types` | Kontraktext, image |
| Parameter`required` | Kontrakmodel, messages |
| Parameter`optional_controls` | Kontraknull |
| Parameter`content_type` | Kontrakapplication/json |
| Parameter`text_file_material` | Kontrakkonten UTF-8 aktual dimasukkan sebagai teks; ID file atau alamat URL (URLs) memerlukan dukungan yang tepat dan terpisah |

Siklus hidup: `exact retained published method`

Struktur metode dan ID bersifat eksak; kemampuan pemasok terpisah dari penerimaan permintaan.

### Paket

#### Tarif metode Ailoot

Masukan

US$0,01 */ 1K*

Keluaran

US$0,05 */ 1K*

Pembacaan cache

US$0,00025 */ 1K*

Penulisan cache

US$0,0125 */ 1K*

Penulisan cache, 5 menit

US$0,0125 */ 1K tokens*

Penulisan cache, 1 jam

US$0,02 */ 1K tokens*

web\_search\_call

US$0,01 *per pemanggilan*

Jumlah pemanggilan maksimum web\_search\_call

8

Ailoot mencadangkan perkiraan dana sebelum permintaan. Setelah hasil diterima, tagihan akhir diselesaikan berdasarkan penggunaan yang terukur. Penyelesaian tagihan streaming menggunakan catatan penggunaan akhir. [Cara kerja cadangan dan penyelesaian tagihan →](https://ailoot.ai/docs/id/billing/reserve/)

#### Detail tarif referensi

Jadwal referensi tingkat model tidak mengubah pemilihan metode, estimasi harga, atau biaya. Biaya aktif menggunakan tarif metode Ailoot yang dipilih.

Jadwal referensi model

#### Harga menurut konfigurasi

Cocokkan setiap biaya dengan kondisi yang ditampilkan. Gunakan satu tarif untuk setiap kelompok konfigurasi alternatif.

| Konfigurasi | Jadwal tarif | Token konteks, lebih dari | Token konteks, hingga dan termasuk | Biaya |
| --- | --- | --- | --- | --- |
| KonfigurasiOpenAI Chat · Tarif dasar token | Jadwal tarifTarif dasar | Token konteks, lebih dari— | Token konteks, hingga dan termasukTanpa batas atas | Biaya Masukan · Token masukan **$0.02** / 1K token Keluaran · Token keluaran **$0.1** / 1K token Masukan · Pembacaan cache **$0.0005** / 1K token Masukan · Penulisan cache **$0.025** / 1K token Masukan · Penulisan cache, 1 jam **$0.04** / 1K token |
| KonfigurasiOpenAI Chat · Tingkat 1 berdasarkan panjang permintaan | Jadwal tarif— | Token konteks, lebih dari0 | Token konteks, hingga dan termasukTanpa batas atas | Biaya Masukan · Token masukan **$0.02** / 1K token Keluaran · Token keluaran **$0.1** / 1K token Masukan · Pembacaan cache **$0.0005** / 1K token Masukan · Penulisan cache **$0.025** / 1K token Masukan · Penulisan cache, 1 jam **$0.04** / 1K token |
| KonfigurasiAnthropic Messages · Tarif dasar token | Jadwal tarifTarif dasar | Token konteks, lebih dari— | Token konteks, hingga dan termasukTanpa batas atas | Biaya Masukan · Token masukan **$0.02** / 1K token Keluaran · Token keluaran **$0.1** / 1K token Masukan · Pembacaan cache **$0.0005** / 1K token Masukan · Penulisan cache **$0.025** / 1K token Masukan · Penulisan cache, 1 jam **$0.04** / 1K token |
| KonfigurasiAnthropic Messages · Tingkat 1 berdasarkan panjang permintaan | Jadwal tarif— | Token konteks, lebih dari0 | Token konteks, hingga dan termasukTanpa batas atas | Biaya Masukan · Token masukan **$0.02** / 1K token Keluaran · Token keluaran **$0.1** / 1K token Masukan · Pembacaan cache **$0.0005** / 1K token Masukan · Penulisan cache **$0.025** / 1K token Masukan · Penulisan cache, 1 jam **$0.04** / 1K token |

### Contoh permintaan

#### Ailoot · OpenAI Chat

Contoh teksMasukan, gambarPython SDKNode.js SDKAliran Python

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

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

```python
from openai import OpenAI
import os

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

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

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

```js
import OpenAI from "openai";

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

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

saveResult(resp);
```

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

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

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

with client.chat.completions.stream(model='claude',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")
```

### Terima dan simpan hasil

#### Ailoot · OpenAI Chat

json or SSE

##### Simpan semua hasil yang selesai

Simpan setiap respons lengkap, berkas, dan bagian konten yang dikembalikan.

Simpan setiap alternatif jawaban beserta konten, panggilan alat, dan penalarannya. Dalam SSE, gabungkan delta menurut indeks alternatif jawaban/alat, lalu pertahankan alasan penghentian akhir dan data penggunaan.

##### Jika respons asli perlu diperiksa

Simpan ID permintaan/respons dan header. URL umum untuk pengambilan tugas teks tidak disediakan.

Kolom respons

| Kolom | Jenis |
| --- | --- |
| Kolom`choices[].index` | Jenisinteger |
| Kolom`choices[].message.content` | Jenisstring\|null |
| Kolom`choices[].message.tool_calls` | Jenistool\_call\[\] |
| Kolom`choices[].message.reasoning_content` | Jenisstring |
| Kolom`choices[].message.reasoning_details` | Jenisobject\|array |
| Kolom`choices[].finish_reason` | Jenisstring\|null |
| Kolom`usage` | Jenisobject |

Kesalahan dan langkah berikutnya

| Respons | Kondisi | Langkah berikutnya |
| --- | --- | --- |
| Respons400 · `invalid_request_error` | KondisiBidang wajib, representasi materi, atau nilai parameter tidak valid | Langkah berikutnyaPerbaiki bidang yang ditunjukkan sebelum permintaan pembuatan baru. |

### Alias

#### Alias model

<strong>Ailoot</strong> [`claude-fable-5-1`](https://ailoot.ai/models/id/#m=anthropic%2Fclaude-fable-5.1&route=Core&caller=claude-fable-5-1&fmt=chat), [`claude`](https://ailoot.ai/models/id/#m=anthropic%2Fclaude-fable-5.1&route=Core&caller=claude&fmt=chat), [`claude-fable`](https://ailoot.ai/models/id/#m=anthropic%2Fclaude-fable-5.1&route=Core&caller=claude-fable), [`claude-fable-latest`](https://ailoot.ai/models/id/#m=anthropic%2Fclaude-fable-5.1&route=Core&caller=claude-fable-latest), [`claude-latest`](https://ailoot.ai/models/id/#m=anthropic%2Fclaude-fable-5.1&route=Core&caller=claude-latest&fmt=chat)
**Ailoot Ultra** [`anthropic/claude-fable-5.1`](https://ailoot.ai/models/id/#m=anthropic%2Fclaude-fable-5.1&route=Ultra&caller=anthropic%2Fclaude-fable-5.1&fmt=chat), [`~anthropic/claude-fable-latest`](https://ailoot.ai/models/id/#m=anthropic%2Fclaude-fable-5.1&route=Ultra&caller=~anthropic%2Fclaude-fable-latest&fmt=chat)

#### Alias jalur metode

Gunakan jalur metode yang ditampilkan di atas.

#### ID pemanggil terkait

[`anthropic/claude-fable-5.1`](https://ailoot.ai/models/id/#m=anthropic%2Fclaude-fable-5.1&route=Ultra&caller=anthropic%2Fclaude-fable-5.1&fmt=chat), [`claude`](https://ailoot.ai/models/id/#m=anthropic%2Fclaude-fable-5.1&route=Core&caller=claude&fmt=chat), [`claude-fable`](https://ailoot.ai/models/id/#m=anthropic%2Fclaude-fable-5.1&route=Core&caller=claude-fable), [`claude-fable-latest`](https://ailoot.ai/models/id/#m=anthropic%2Fclaude-fable-5.1&route=Core&caller=claude-fable-latest), [`claude-latest`](https://ailoot.ai/models/id/#m=anthropic%2Fclaude-fable-5.1&route=Core&caller=claude-latest&fmt=chat), [`~anthropic/claude-fable-latest`](https://ailoot.ai/models/id/#m=anthropic%2Fclaude-fable-5.1&route=Ultra&caller=~anthropic%2Fclaude-fable-latest&fmt=chat), [`claude-fable-5-1`](https://ailoot.ai/models/id/#m=anthropic%2Fclaude-fable-5.1&route=Core&caller=claude-fable-5-1&fmt=chat)

**Ailoot · Anthropic Messages** `POST /v1/messages` `claude-fable`

[`claude-fable`](https://ailoot.ai/models/id/#m=anthropic%2Fclaude-fable-5.1&route=Core&caller=claude-fable&fmt=messages)

Anthropic /`claude-fable`

ID model

- `claude-fable-5-1`
- `claude`
- `claude-fable`
- `claude-fable-latest`
- `claude-latest`

### Mulai

Claude Fable 5.1 ditujukan untuk penelitian kompleks, perubahan kode berskala besar, dan analisis profesional yang panjang. Menghubungkan informasi dalam konteks besar serta bekerja dengan teks dan gambar terperinci.

Masukan yang diterima

Teks · Gambar

Hasil

Teks

### Tersedia di Ailoot · masukan & metode

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

Masukan

`text`, `image`

Keluaran

`text`

Konteks

1.000.000 tokens

Keluaran maksimum

131.072 tokens

Format keluaran

json or SSE

| Kolom | Jenis | Persyaratan | Nilai & batasan | Bawaan |
| --- | --- | --- | --- | --- |
| Kolom`model` | Jenis`string` | PersyaratanWajib | Nilai & batasan claude-fable | Bawaan— |
| Kolom`messages` | Jenis`message[]` | PersyaratanWajib | Nilai & batasan Item minimum: 1 | Bawaan— |
| Kolom`messages[].role` | Jenis`string` | PersyaratanWajib | Nilai & batasan user, assistant | Bawaan— |
| Kolom`messages[].content` | Jenis`string\|content_block[]` | PersyaratanWajib | Nilai & batasan | Bawaan— |
| Kolom`system` | Jenis`string\|content_block[]` | PersyaratanOpsional | Nilai & batasan | Bawaan— |
| Kolom`max_tokens` | Jenis`integer` | PersyaratanWajib | Nilai & batasan Minimum: 1 Batas berlaku untuk: batas maksimum yang tepat untuk model/kartu yang dipilih | Bawaan— |
| Kolom`stream` | Jenis`boolean` | PersyaratanOpsional | Nilai & batasan | Bawaanfalse |
| Kolom`temperature` | Jenis`number` | PersyaratanOpsional | Nilai & batasan Bergantung pada model | Bawaan— |
| Kolom`top_p` | Jenis`number` | PersyaratanOpsional | Nilai & batasan Bergantung pada model | Bawaan— |
| Kolom`stop_sequences` | Jenis`string[]` | PersyaratanOpsional | Nilai & batasan Bergantung pada model | Bawaan— |
| Kolom`tools` | Jenis`tool[]` | PersyaratanOpsional | Nilai & batasan Bergantung pada model | Bawaan— |
| Kolom`tools[].name` | Jenis`string` | PersyaratanOpsional | Nilai & batasan Berlaku jika: tool supplied | Bawaan— |
| Kolom`tools[].description` | Jenis`string` | PersyaratanOpsional | Nilai & batasan | Bawaan— |
| Kolom`tools[].input_schema` | Jenis`JSON_schema` | PersyaratanOpsional | Nilai & batasan | Bawaan— |
| Kolom`tool_choice` | Jenis`object` | PersyaratanOpsional | Nilai & batasan Bergantung pada model | Bawaan— |
| Kolom`thinking.type` | Jenis`string` | PersyaratanOpsional | Nilai & batasan Bergantung pada model | Bawaan— |
| Kolom`thinking.budget_tokens` | Jenis`integer` | PersyaratanOpsional | Nilai & batasan Bergantung pada model | Bawaan— |
| Kolom`output_config.effort` | Jenis`string` | PersyaratanOpsional | Nilai & batasan Bergantung pada model | Bawaan— |
| Kolom`metadata` | Jenis`object` | PersyaratanOpsional | Nilai & batasan | Bawaan— |
| Kolom`cache_control` | Jenis`object` | PersyaratanOpsional | Nilai & batasan Bergantung pada model | Bawaan— |

Kombinasi bahan masukan

**Teks** · Teks UTF8

`messages[].content or type=text block`

**Teks + gambar**

`{type:image,source:{type:base64,media_type,data}} or source type=url`

Parameter metode dan siklus hidup

| Parameter | Kontrak |
| --- | --- |
| Parameter`material_types` | Kontraktext, image |
| Parameter`required` | Kontrakmodel, messages, max\_tokens |
| Parameter`optional_controls` | Kontraknull |
| Parameter`content_type` | Kontrakapplication/json |
| Parameter`text_file_material` | Kontrakkonten UTF-8 aktual dimasukkan sebagai teks; ID file atau alamat URL (URLs) memerlukan dukungan yang tepat dan terpisah |

Siklus hidup: `exact retained published method`

Struktur metode dan ID bersifat eksak; kemampuan pemasok terpisah dari penerimaan permintaan.

### Paket

#### Tarif metode Ailoot

Masukan

US$0,01 */ 1K*

Keluaran

US$0,05 */ 1K*

Pembacaan cache

US$0,00025 */ 1K*

Penulisan cache

US$0,0125 */ 1K*

Penulisan cache, 5 menit

US$0,0125 */ 1K tokens*

Penulisan cache, 1 jam

US$0,02 */ 1K tokens*

web\_search\_call

US$0,01 *per pemanggilan*

Jumlah pemanggilan maksimum web\_search\_call

8

Ailoot mencadangkan perkiraan dana sebelum permintaan. Setelah hasil diterima, tagihan akhir diselesaikan berdasarkan penggunaan yang terukur. Penyelesaian tagihan streaming menggunakan catatan penggunaan akhir. [Cara kerja cadangan dan penyelesaian tagihan →](https://ailoot.ai/docs/id/billing/reserve/)

#### Detail tarif referensi

Jadwal referensi tingkat model tidak mengubah pemilihan metode, estimasi harga, atau biaya. Biaya aktif menggunakan tarif metode Ailoot yang dipilih.

Jadwal referensi model

#### Harga menurut konfigurasi

Cocokkan setiap biaya dengan kondisi yang ditampilkan. Gunakan satu tarif untuk setiap kelompok konfigurasi alternatif.

| Konfigurasi | Jadwal tarif | Token konteks, lebih dari | Token konteks, hingga dan termasuk | Biaya |
| --- | --- | --- | --- | --- |
| KonfigurasiOpenAI Chat · Tarif dasar token | Jadwal tarifTarif dasar | Token konteks, lebih dari— | Token konteks, hingga dan termasukTanpa batas atas | Biaya Masukan · Token masukan **$0.02** / 1K token Keluaran · Token keluaran **$0.1** / 1K token Masukan · Pembacaan cache **$0.0005** / 1K token Masukan · Penulisan cache **$0.025** / 1K token Masukan · Penulisan cache, 1 jam **$0.04** / 1K token |
| KonfigurasiOpenAI Chat · Tingkat 1 berdasarkan panjang permintaan | Jadwal tarif— | Token konteks, lebih dari0 | Token konteks, hingga dan termasukTanpa batas atas | Biaya Masukan · Token masukan **$0.02** / 1K token Keluaran · Token keluaran **$0.1** / 1K token Masukan · Pembacaan cache **$0.0005** / 1K token Masukan · Penulisan cache **$0.025** / 1K token Masukan · Penulisan cache, 1 jam **$0.04** / 1K token |
| KonfigurasiAnthropic Messages · Tarif dasar token | Jadwal tarifTarif dasar | Token konteks, lebih dari— | Token konteks, hingga dan termasukTanpa batas atas | Biaya Masukan · Token masukan **$0.02** / 1K token Keluaran · Token keluaran **$0.1** / 1K token Masukan · Pembacaan cache **$0.0005** / 1K token Masukan · Penulisan cache **$0.025** / 1K token Masukan · Penulisan cache, 1 jam **$0.04** / 1K token |
| KonfigurasiAnthropic Messages · Tingkat 1 berdasarkan panjang permintaan | Jadwal tarif— | Token konteks, lebih dari0 | Token konteks, hingga dan termasukTanpa batas atas | Biaya Masukan · Token masukan **$0.02** / 1K token Keluaran · Token keluaran **$0.1** / 1K token Masukan · Pembacaan cache **$0.0005** / 1K token Masukan · Penulisan cache **$0.025** / 1K token Masukan · Penulisan cache, 1 jam **$0.04** / 1K token |

### Contoh permintaan

#### Ailoot · Anthropic Messages

Contoh teksMasukan, gambarPython SDKNode.js SDKAliran Python

```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": "claude-fable", "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": "claude-fable", "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="claude-fable",
    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: "claude-fable",
  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='claude-fable',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")
```

### Terima dan simpan hasil

#### Ailoot · Anthropic Messages

json or SSE

##### Simpan semua hasil yang selesai

Simpan setiap respons lengkap, berkas, dan bagian konten yang dikembalikan.

Simpan semua blok konten, tanda tangan penalaran, dan ID penggunaan alat yang sebenarnya. Gabungkan semua delta blok SSE; blok teks pertama bukan keseluruhan keluaran.

##### Jika respons asli perlu diperiksa

Simpan ID permintaan/respons dan header. URL umum untuk pengambilan tugas teks tidak disediakan.

Kolom respons

| Kolom | Jenis |
| --- | --- |
| Kolom`id` | Jenisstring |
| Kolom`model` | Jenisstring |
| Kolom`content[]` | Jenistext\|thinking\|tool\_use\|other content block |
| Kolom`stop_reason` | Jenisstring\|null |
| Kolom`usage` | Jenisobject |

Kesalahan dan langkah berikutnya

| Respons | Kondisi | Langkah berikutnya |
| --- | --- | --- |
| Respons400 · `invalid_request_error` | KondisiBidang wajib, representasi materi, atau nilai parameter tidak valid | Langkah berikutnyaPerbaiki bidang yang ditunjukkan sebelum permintaan pembuatan baru. |

### Alias

#### Alias model

<strong>Ailoot</strong> [`claude-fable-5-1`](https://ailoot.ai/models/id/#m=anthropic%2Fclaude-fable-5.1&route=Core&caller=claude-fable-5-1&fmt=messages), [`claude`](https://ailoot.ai/models/id/#m=anthropic%2Fclaude-fable-5.1&route=Core&caller=claude&fmt=messages), [`claude-fable`](https://ailoot.ai/models/id/#m=anthropic%2Fclaude-fable-5.1&route=Core&caller=claude-fable&fmt=messages), [`claude-fable-latest`](https://ailoot.ai/models/id/#m=anthropic%2Fclaude-fable-5.1&route=Core&caller=claude-fable-latest&fmt=messages), [`claude-latest`](https://ailoot.ai/models/id/#m=anthropic%2Fclaude-fable-5.1&route=Core&caller=claude-latest&fmt=messages)
**Ailoot Ultra** [`anthropic/claude-fable-5.1`](https://ailoot.ai/models/id/#m=anthropic%2Fclaude-fable-5.1&route=Ultra&caller=anthropic%2Fclaude-fable-5.1&fmt=messages), [`~anthropic/claude-fable-latest`](https://ailoot.ai/models/id/#m=anthropic%2Fclaude-fable-5.1&route=Ultra&caller=~anthropic%2Fclaude-fable-latest&fmt=messages)

#### Alias jalur metode

Gunakan jalur metode yang ditampilkan di atas.

#### ID pemanggil terkait

[`anthropic/claude-fable-5.1`](https://ailoot.ai/models/id/#m=anthropic%2Fclaude-fable-5.1&route=Ultra&caller=anthropic%2Fclaude-fable-5.1&fmt=messages), [`claude`](https://ailoot.ai/models/id/#m=anthropic%2Fclaude-fable-5.1&route=Core&caller=claude&fmt=messages), [`claude-fable`](https://ailoot.ai/models/id/#m=anthropic%2Fclaude-fable-5.1&route=Core&caller=claude-fable&fmt=messages), [`claude-fable-latest`](https://ailoot.ai/models/id/#m=anthropic%2Fclaude-fable-5.1&route=Core&caller=claude-fable-latest&fmt=messages), [`claude-latest`](https://ailoot.ai/models/id/#m=anthropic%2Fclaude-fable-5.1&route=Core&caller=claude-latest&fmt=messages), [`~anthropic/claude-fable-latest`](https://ailoot.ai/models/id/#m=anthropic%2Fclaude-fable-5.1&route=Ultra&caller=~anthropic%2Fclaude-fable-latest&fmt=messages), [`claude-fable-5-1`](https://ailoot.ai/models/id/#m=anthropic%2Fclaude-fable-5.1&route=Core&caller=claude-fable-5-1&fmt=messages)

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

[`claude-fable-latest`](https://ailoot.ai/models/id/#m=anthropic%2Fclaude-fable-5.1&route=Core&caller=claude-fable-latest&fmt=messages)

Anthropic /`claude-fable-latest`

ID model

- `claude-fable-5-1`
- `claude`
- `claude-fable`
- `claude-fable-latest`
- `claude-latest`

### Mulai

Claude Fable 5.1 ditujukan untuk penelitian kompleks, perubahan kode berskala besar, dan analisis profesional yang panjang. Menghubungkan informasi dalam konteks besar serta bekerja dengan teks dan gambar terperinci.

Masukan yang diterima

Teks · Gambar

Hasil

Teks

### Tersedia di Ailoot · masukan & metode

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

Masukan

`text`, `image`

Keluaran

`text`

Konteks

1.000.000 tokens

Keluaran maksimum

131.072 tokens

Format keluaran

json or SSE

| Kolom | Jenis | Persyaratan | Nilai & batasan | Bawaan |
| --- | --- | --- | --- | --- |
| Kolom`model` | Jenis`string` | PersyaratanWajib | Nilai & batasan claude-fable-latest | Bawaan— |
| Kolom`messages` | Jenis`message[]` | PersyaratanWajib | Nilai & batasan Item minimum: 1 | Bawaan— |
| Kolom`messages[].role` | Jenis`string` | PersyaratanWajib | Nilai & batasan user, assistant | Bawaan— |
| Kolom`messages[].content` | Jenis`string\|content_block[]` | PersyaratanWajib | Nilai & batasan | Bawaan— |
| Kolom`system` | Jenis`string\|content_block[]` | PersyaratanOpsional | Nilai & batasan | Bawaan— |
| Kolom`max_tokens` | Jenis`integer` | PersyaratanWajib | Nilai & batasan Minimum: 1 Batas berlaku untuk: batas maksimum yang tepat untuk model/kartu yang dipilih | Bawaan— |
| Kolom`stream` | Jenis`boolean` | PersyaratanOpsional | Nilai & batasan | Bawaanfalse |
| Kolom`temperature` | Jenis`number` | PersyaratanOpsional | Nilai & batasan Bergantung pada model | Bawaan— |
| Kolom`top_p` | Jenis`number` | PersyaratanOpsional | Nilai & batasan Bergantung pada model | Bawaan— |
| Kolom`stop_sequences` | Jenis`string[]` | PersyaratanOpsional | Nilai & batasan Bergantung pada model | Bawaan— |
| Kolom`tools` | Jenis`tool[]` | PersyaratanOpsional | Nilai & batasan Bergantung pada model | Bawaan— |
| Kolom`tools[].name` | Jenis`string` | PersyaratanOpsional | Nilai & batasan Berlaku jika: tool supplied | Bawaan— |
| Kolom`tools[].description` | Jenis`string` | PersyaratanOpsional | Nilai & batasan | Bawaan— |
| Kolom`tools[].input_schema` | Jenis`JSON_schema` | PersyaratanOpsional | Nilai & batasan | Bawaan— |
| Kolom`tool_choice` | Jenis`object` | PersyaratanOpsional | Nilai & batasan Bergantung pada model | Bawaan— |
| Kolom`thinking.type` | Jenis`string` | PersyaratanOpsional | Nilai & batasan Bergantung pada model | Bawaan— |
| Kolom`thinking.budget_tokens` | Jenis`integer` | PersyaratanOpsional | Nilai & batasan Bergantung pada model | Bawaan— |
| Kolom`output_config.effort` | Jenis`string` | PersyaratanOpsional | Nilai & batasan Bergantung pada model | Bawaan— |
| Kolom`metadata` | Jenis`object` | PersyaratanOpsional | Nilai & batasan | Bawaan— |
| Kolom`cache_control` | Jenis`object` | PersyaratanOpsional | Nilai & batasan Bergantung pada model | Bawaan— |

Kombinasi bahan masukan

**Teks** · Teks UTF8

`messages[].content or type=text block`

**Teks + gambar**

`{type:image,source:{type:base64,media_type,data}} or source type=url`

Parameter metode dan siklus hidup

| Parameter | Kontrak |
| --- | --- |
| Parameter`material_types` | Kontraktext, image |
| Parameter`required` | Kontrakmodel, messages, max\_tokens |
| Parameter`optional_controls` | Kontraknull |
| Parameter`content_type` | Kontrakapplication/json |
| Parameter`text_file_material` | Kontrakkonten UTF-8 aktual dimasukkan sebagai teks; ID file atau alamat URL (URLs) memerlukan dukungan yang tepat dan terpisah |

Siklus hidup: `exact retained published method`

Struktur metode dan ID bersifat eksak; kemampuan pemasok terpisah dari penerimaan permintaan.

### Paket

#### Tarif metode Ailoot

Masukan

US$0,01 */ 1K*

Keluaran

US$0,05 */ 1K*

Pembacaan cache

US$0,00025 */ 1K*

Penulisan cache

US$0,0125 */ 1K*

Penulisan cache, 5 menit

US$0,0125 */ 1K tokens*

Penulisan cache, 1 jam

US$0,02 */ 1K tokens*

web\_search\_call

US$0,01 *per pemanggilan*

Jumlah pemanggilan maksimum web\_search\_call

8

Ailoot mencadangkan perkiraan dana sebelum permintaan. Setelah hasil diterima, tagihan akhir diselesaikan berdasarkan penggunaan yang terukur. Penyelesaian tagihan streaming menggunakan catatan penggunaan akhir. [Cara kerja cadangan dan penyelesaian tagihan →](https://ailoot.ai/docs/id/billing/reserve/)

#### Detail tarif referensi

Jadwal referensi tingkat model tidak mengubah pemilihan metode, estimasi harga, atau biaya. Biaya aktif menggunakan tarif metode Ailoot yang dipilih.

Jadwal referensi model

#### Harga menurut konfigurasi

Cocokkan setiap biaya dengan kondisi yang ditampilkan. Gunakan satu tarif untuk setiap kelompok konfigurasi alternatif.

| Konfigurasi | Jadwal tarif | Token konteks, lebih dari | Token konteks, hingga dan termasuk | Biaya |
| --- | --- | --- | --- | --- |
| KonfigurasiOpenAI Chat · Tarif dasar token | Jadwal tarifTarif dasar | Token konteks, lebih dari— | Token konteks, hingga dan termasukTanpa batas atas | Biaya Masukan · Token masukan **$0.02** / 1K token Keluaran · Token keluaran **$0.1** / 1K token Masukan · Pembacaan cache **$0.0005** / 1K token Masukan · Penulisan cache **$0.025** / 1K token Masukan · Penulisan cache, 1 jam **$0.04** / 1K token |
| KonfigurasiOpenAI Chat · Tingkat 1 berdasarkan panjang permintaan | Jadwal tarif— | Token konteks, lebih dari0 | Token konteks, hingga dan termasukTanpa batas atas | Biaya Masukan · Token masukan **$0.02** / 1K token Keluaran · Token keluaran **$0.1** / 1K token Masukan · Pembacaan cache **$0.0005** / 1K token Masukan · Penulisan cache **$0.025** / 1K token Masukan · Penulisan cache, 1 jam **$0.04** / 1K token |
| KonfigurasiAnthropic Messages · Tarif dasar token | Jadwal tarifTarif dasar | Token konteks, lebih dari— | Token konteks, hingga dan termasukTanpa batas atas | Biaya Masukan · Token masukan **$0.02** / 1K token Keluaran · Token keluaran **$0.1** / 1K token Masukan · Pembacaan cache **$0.0005** / 1K token Masukan · Penulisan cache **$0.025** / 1K token Masukan · Penulisan cache, 1 jam **$0.04** / 1K token |
| KonfigurasiAnthropic Messages · Tingkat 1 berdasarkan panjang permintaan | Jadwal tarif— | Token konteks, lebih dari0 | Token konteks, hingga dan termasukTanpa batas atas | Biaya Masukan · Token masukan **$0.02** / 1K token Keluaran · Token keluaran **$0.1** / 1K token Masukan · Pembacaan cache **$0.0005** / 1K token Masukan · Penulisan cache **$0.025** / 1K token Masukan · Penulisan cache, 1 jam **$0.04** / 1K token |

### Contoh permintaan

#### Ailoot · Anthropic Messages

Contoh teksMasukan, gambarPython SDKNode.js SDKAliran Python

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

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

```python
import anthropic
import os

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

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

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

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

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

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

saveResult(msg);
```

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

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

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

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

### Terima dan simpan hasil

#### Ailoot · Anthropic Messages

json or SSE

##### Simpan semua hasil yang selesai

Simpan setiap respons lengkap, berkas, dan bagian konten yang dikembalikan.

Simpan semua blok konten, tanda tangan penalaran, dan ID penggunaan alat yang sebenarnya. Gabungkan semua delta blok SSE; blok teks pertama bukan keseluruhan keluaran.

##### Jika respons asli perlu diperiksa

Simpan ID permintaan/respons dan header. URL umum untuk pengambilan tugas teks tidak disediakan.

Kolom respons

| Kolom | Jenis |
| --- | --- |
| Kolom`id` | Jenisstring |
| Kolom`model` | Jenisstring |
| Kolom`content[]` | Jenistext\|thinking\|tool\_use\|other content block |
| Kolom`stop_reason` | Jenisstring\|null |
| Kolom`usage` | Jenisobject |

Kesalahan dan langkah berikutnya

| Respons | Kondisi | Langkah berikutnya |
| --- | --- | --- |
| Respons400 · `invalid_request_error` | KondisiBidang wajib, representasi materi, atau nilai parameter tidak valid | Langkah berikutnyaPerbaiki bidang yang ditunjukkan sebelum permintaan pembuatan baru. |

### Alias

#### Alias model

<strong>Ailoot</strong> [`claude-fable-5-1`](https://ailoot.ai/models/id/#m=anthropic%2Fclaude-fable-5.1&route=Core&caller=claude-fable-5-1&fmt=messages), [`claude`](https://ailoot.ai/models/id/#m=anthropic%2Fclaude-fable-5.1&route=Core&caller=claude&fmt=messages), [`claude-fable`](https://ailoot.ai/models/id/#m=anthropic%2Fclaude-fable-5.1&route=Core&caller=claude-fable&fmt=messages), [`claude-fable-latest`](https://ailoot.ai/models/id/#m=anthropic%2Fclaude-fable-5.1&route=Core&caller=claude-fable-latest&fmt=messages), [`claude-latest`](https://ailoot.ai/models/id/#m=anthropic%2Fclaude-fable-5.1&route=Core&caller=claude-latest&fmt=messages)
**Ailoot Ultra** [`anthropic/claude-fable-5.1`](https://ailoot.ai/models/id/#m=anthropic%2Fclaude-fable-5.1&route=Ultra&caller=anthropic%2Fclaude-fable-5.1&fmt=messages), [`~anthropic/claude-fable-latest`](https://ailoot.ai/models/id/#m=anthropic%2Fclaude-fable-5.1&route=Ultra&caller=~anthropic%2Fclaude-fable-latest&fmt=messages)

#### Alias jalur metode

Gunakan jalur metode yang ditampilkan di atas.

#### ID pemanggil terkait

[`anthropic/claude-fable-5.1`](https://ailoot.ai/models/id/#m=anthropic%2Fclaude-fable-5.1&route=Ultra&caller=anthropic%2Fclaude-fable-5.1&fmt=messages), [`claude`](https://ailoot.ai/models/id/#m=anthropic%2Fclaude-fable-5.1&route=Core&caller=claude&fmt=messages), [`claude-fable`](https://ailoot.ai/models/id/#m=anthropic%2Fclaude-fable-5.1&route=Core&caller=claude-fable&fmt=messages), [`claude-fable-latest`](https://ailoot.ai/models/id/#m=anthropic%2Fclaude-fable-5.1&route=Core&caller=claude-fable-latest&fmt=messages), [`claude-latest`](https://ailoot.ai/models/id/#m=anthropic%2Fclaude-fable-5.1&route=Core&caller=claude-latest&fmt=messages), [`~anthropic/claude-fable-latest`](https://ailoot.ai/models/id/#m=anthropic%2Fclaude-fable-5.1&route=Ultra&caller=~anthropic%2Fclaude-fable-latest&fmt=messages), [`claude-fable-5-1`](https://ailoot.ai/models/id/#m=anthropic%2Fclaude-fable-5.1&route=Core&caller=claude-fable-5-1&fmt=messages)

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

[`claude-latest`](https://ailoot.ai/models/id/#m=anthropic%2Fclaude-fable-5.1&route=Core&caller=claude-latest&fmt=messages)

Anthropic /`claude-latest`

ID model

- `claude-fable-5-1`
- `claude`
- `claude-fable`
- `claude-fable-latest`
- `claude-latest`

### Mulai

Claude Fable 5.1 ditujukan untuk penelitian kompleks, perubahan kode berskala besar, dan analisis profesional yang panjang. Menghubungkan informasi dalam konteks besar serta bekerja dengan teks dan gambar terperinci.

Masukan yang diterima

Teks · Gambar

Hasil

Teks

### Tersedia di Ailoot · masukan & metode

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

Masukan

`text`, `image`

Keluaran

`text`

Konteks

1.000.000 tokens

Keluaran maksimum

131.072 tokens

Format keluaran

json or SSE

| Kolom | Jenis | Persyaratan | Nilai & batasan | Bawaan |
| --- | --- | --- | --- | --- |
| Kolom`model` | Jenis`string` | PersyaratanWajib | Nilai & batasan claude-latest | Bawaan— |
| Kolom`messages` | Jenis`message[]` | PersyaratanWajib | Nilai & batasan Item minimum: 1 | Bawaan— |
| Kolom`messages[].role` | Jenis`string` | PersyaratanWajib | Nilai & batasan user, assistant | Bawaan— |
| Kolom`messages[].content` | Jenis`string\|content_block[]` | PersyaratanWajib | Nilai & batasan | Bawaan— |
| Kolom`system` | Jenis`string\|content_block[]` | PersyaratanOpsional | Nilai & batasan | Bawaan— |
| Kolom`max_tokens` | Jenis`integer` | PersyaratanWajib | Nilai & batasan Minimum: 1 Batas berlaku untuk: batas maksimum yang tepat untuk model/kartu yang dipilih | Bawaan— |
| Kolom`stream` | Jenis`boolean` | PersyaratanOpsional | Nilai & batasan | Bawaanfalse |
| Kolom`temperature` | Jenis`number` | PersyaratanOpsional | Nilai & batasan Bergantung pada model | Bawaan— |
| Kolom`top_p` | Jenis`number` | PersyaratanOpsional | Nilai & batasan Bergantung pada model | Bawaan— |
| Kolom`stop_sequences` | Jenis`string[]` | PersyaratanOpsional | Nilai & batasan Bergantung pada model | Bawaan— |
| Kolom`tools` | Jenis`tool[]` | PersyaratanOpsional | Nilai & batasan Bergantung pada model | Bawaan— |
| Kolom`tools[].name` | Jenis`string` | PersyaratanOpsional | Nilai & batasan Berlaku jika: tool supplied | Bawaan— |
| Kolom`tools[].description` | Jenis`string` | PersyaratanOpsional | Nilai & batasan | Bawaan— |
| Kolom`tools[].input_schema` | Jenis`JSON_schema` | PersyaratanOpsional | Nilai & batasan | Bawaan— |
| Kolom`tool_choice` | Jenis`object` | PersyaratanOpsional | Nilai & batasan Bergantung pada model | Bawaan— |
| Kolom`thinking.type` | Jenis`string` | PersyaratanOpsional | Nilai & batasan Bergantung pada model | Bawaan— |
| Kolom`thinking.budget_tokens` | Jenis`integer` | PersyaratanOpsional | Nilai & batasan Bergantung pada model | Bawaan— |
| Kolom`output_config.effort` | Jenis`string` | PersyaratanOpsional | Nilai & batasan Bergantung pada model | Bawaan— |
| Kolom`metadata` | Jenis`object` | PersyaratanOpsional | Nilai & batasan | Bawaan— |
| Kolom`cache_control` | Jenis`object` | PersyaratanOpsional | Nilai & batasan Bergantung pada model | Bawaan— |

Kombinasi bahan masukan

**Teks** · Teks UTF8

`messages[].content or type=text block`

**Teks + gambar**

`{type:image,source:{type:base64,media_type,data}} or source type=url`

Parameter metode dan siklus hidup

| Parameter | Kontrak |
| --- | --- |
| Parameter`material_types` | Kontraktext, image |
| Parameter`required` | Kontrakmodel, messages, max\_tokens |
| Parameter`optional_controls` | Kontraknull |
| Parameter`content_type` | Kontrakapplication/json |
| Parameter`text_file_material` | Kontrakkonten UTF-8 aktual dimasukkan sebagai teks; ID file atau alamat URL (URLs) memerlukan dukungan yang tepat dan terpisah |

Siklus hidup: `exact retained published method`

Struktur metode dan ID bersifat eksak; kemampuan pemasok terpisah dari penerimaan permintaan.

### Paket

#### Tarif metode Ailoot

Masukan

US$0,01 */ 1K*

Keluaran

US$0,05 */ 1K*

Pembacaan cache

US$0,00025 */ 1K*

Penulisan cache

US$0,0125 */ 1K*

Penulisan cache, 5 menit

US$0,0125 */ 1K tokens*

Penulisan cache, 1 jam

US$0,02 */ 1K tokens*

web\_search\_call

US$0,01 *per pemanggilan*

Jumlah pemanggilan maksimum web\_search\_call

8

Ailoot mencadangkan perkiraan dana sebelum permintaan. Setelah hasil diterima, tagihan akhir diselesaikan berdasarkan penggunaan yang terukur. Penyelesaian tagihan streaming menggunakan catatan penggunaan akhir. [Cara kerja cadangan dan penyelesaian tagihan →](https://ailoot.ai/docs/id/billing/reserve/)

#### Detail tarif referensi

Jadwal referensi tingkat model tidak mengubah pemilihan metode, estimasi harga, atau biaya. Biaya aktif menggunakan tarif metode Ailoot yang dipilih.

Jadwal referensi model

#### Harga menurut konfigurasi

Cocokkan setiap biaya dengan kondisi yang ditampilkan. Gunakan satu tarif untuk setiap kelompok konfigurasi alternatif.

| Konfigurasi | Jadwal tarif | Token konteks, lebih dari | Token konteks, hingga dan termasuk | Biaya |
| --- | --- | --- | --- | --- |
| KonfigurasiOpenAI Chat · Tarif dasar token | Jadwal tarifTarif dasar | Token konteks, lebih dari— | Token konteks, hingga dan termasukTanpa batas atas | Biaya Masukan · Token masukan **$0.02** / 1K token Keluaran · Token keluaran **$0.1** / 1K token Masukan · Pembacaan cache **$0.0005** / 1K token Masukan · Penulisan cache **$0.025** / 1K token Masukan · Penulisan cache, 1 jam **$0.04** / 1K token |
| KonfigurasiOpenAI Chat · Tingkat 1 berdasarkan panjang permintaan | Jadwal tarif— | Token konteks, lebih dari0 | Token konteks, hingga dan termasukTanpa batas atas | Biaya Masukan · Token masukan **$0.02** / 1K token Keluaran · Token keluaran **$0.1** / 1K token Masukan · Pembacaan cache **$0.0005** / 1K token Masukan · Penulisan cache **$0.025** / 1K token Masukan · Penulisan cache, 1 jam **$0.04** / 1K token |
| KonfigurasiAnthropic Messages · Tarif dasar token | Jadwal tarifTarif dasar | Token konteks, lebih dari— | Token konteks, hingga dan termasukTanpa batas atas | Biaya Masukan · Token masukan **$0.02** / 1K token Keluaran · Token keluaran **$0.1** / 1K token Masukan · Pembacaan cache **$0.0005** / 1K token Masukan · Penulisan cache **$0.025** / 1K token Masukan · Penulisan cache, 1 jam **$0.04** / 1K token |
| KonfigurasiAnthropic Messages · Tingkat 1 berdasarkan panjang permintaan | Jadwal tarif— | Token konteks, lebih dari0 | Token konteks, hingga dan termasukTanpa batas atas | Biaya Masukan · Token masukan **$0.02** / 1K token Keluaran · Token keluaran **$0.1** / 1K token Masukan · Pembacaan cache **$0.0005** / 1K token Masukan · Penulisan cache **$0.025** / 1K token Masukan · Penulisan cache, 1 jam **$0.04** / 1K token |

### Contoh permintaan

#### Ailoot · Anthropic Messages

Contoh teksMasukan, gambarPython SDKNode.js SDKAliran Python

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

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

```python
import anthropic
import os

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

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

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

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

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

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

saveResult(msg);
```

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

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

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

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

### Terima dan simpan hasil

#### Ailoot · Anthropic Messages

json or SSE

##### Simpan semua hasil yang selesai

Simpan setiap respons lengkap, berkas, dan bagian konten yang dikembalikan.

Simpan semua blok konten, tanda tangan penalaran, dan ID penggunaan alat yang sebenarnya. Gabungkan semua delta blok SSE; blok teks pertama bukan keseluruhan keluaran.

##### Jika respons asli perlu diperiksa

Simpan ID permintaan/respons dan header. URL umum untuk pengambilan tugas teks tidak disediakan.

Kolom respons

| Kolom | Jenis |
| --- | --- |
| Kolom`id` | Jenisstring |
| Kolom`model` | Jenisstring |
| Kolom`content[]` | Jenistext\|thinking\|tool\_use\|other content block |
| Kolom`stop_reason` | Jenisstring\|null |
| Kolom`usage` | Jenisobject |

Kesalahan dan langkah berikutnya

| Respons | Kondisi | Langkah berikutnya |
| --- | --- | --- |
| Respons400 · `invalid_request_error` | KondisiBidang wajib, representasi materi, atau nilai parameter tidak valid | Langkah berikutnyaPerbaiki bidang yang ditunjukkan sebelum permintaan pembuatan baru. |

### Alias

#### Alias model

<strong>Ailoot</strong> [`claude-fable-5-1`](https://ailoot.ai/models/id/#m=anthropic%2Fclaude-fable-5.1&route=Core&caller=claude-fable-5-1&fmt=messages), [`claude`](https://ailoot.ai/models/id/#m=anthropic%2Fclaude-fable-5.1&route=Core&caller=claude&fmt=messages), [`claude-fable`](https://ailoot.ai/models/id/#m=anthropic%2Fclaude-fable-5.1&route=Core&caller=claude-fable&fmt=messages), [`claude-fable-latest`](https://ailoot.ai/models/id/#m=anthropic%2Fclaude-fable-5.1&route=Core&caller=claude-fable-latest&fmt=messages), [`claude-latest`](https://ailoot.ai/models/id/#m=anthropic%2Fclaude-fable-5.1&route=Core&caller=claude-latest&fmt=messages)
**Ailoot Ultra** [`anthropic/claude-fable-5.1`](https://ailoot.ai/models/id/#m=anthropic%2Fclaude-fable-5.1&route=Ultra&caller=anthropic%2Fclaude-fable-5.1&fmt=messages), [`~anthropic/claude-fable-latest`](https://ailoot.ai/models/id/#m=anthropic%2Fclaude-fable-5.1&route=Ultra&caller=~anthropic%2Fclaude-fable-latest&fmt=messages)

#### Alias jalur metode

Gunakan jalur metode yang ditampilkan di atas.

#### ID pemanggil terkait

[`anthropic/claude-fable-5.1`](https://ailoot.ai/models/id/#m=anthropic%2Fclaude-fable-5.1&route=Ultra&caller=anthropic%2Fclaude-fable-5.1&fmt=messages), [`claude`](https://ailoot.ai/models/id/#m=anthropic%2Fclaude-fable-5.1&route=Core&caller=claude&fmt=messages), [`claude-fable`](https://ailoot.ai/models/id/#m=anthropic%2Fclaude-fable-5.1&route=Core&caller=claude-fable&fmt=messages), [`claude-fable-latest`](https://ailoot.ai/models/id/#m=anthropic%2Fclaude-fable-5.1&route=Core&caller=claude-fable-latest&fmt=messages), [`claude-latest`](https://ailoot.ai/models/id/#m=anthropic%2Fclaude-fable-5.1&route=Core&caller=claude-latest&fmt=messages), [`~anthropic/claude-fable-latest`](https://ailoot.ai/models/id/#m=anthropic%2Fclaude-fable-5.1&route=Ultra&caller=~anthropic%2Fclaude-fable-latest&fmt=messages), [`claude-fable-5-1`](https://ailoot.ai/models/id/#m=anthropic%2Fclaude-fable-5.1&route=Core&caller=claude-fable-5-1&fmt=messages)

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

[`claude-latest`](https://ailoot.ai/models/id/#m=anthropic%2Fclaude-fable-5.1&route=Core&caller=claude-latest&fmt=responses)

Anthropic /`claude-latest`

ID model

- `claude-fable-5-1`
- `claude`
- `claude-latest`

### Mulai

Claude Fable 5.1 ditujukan untuk penelitian kompleks, perubahan kode berskala besar, dan analisis profesional yang panjang. Menghubungkan informasi dalam konteks besar serta bekerja dengan teks dan gambar terperinci.

Masukan yang diterima

Teks · Gambar

Hasil

Teks

### Tersedia di Ailoot · masukan & metode

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

Masukan

`text`, `image`

Keluaran

`text`

Konteks

1.000.000 tokens

Keluaran maksimum

131.072 tokens

Format keluaran

json or SSE

| Kolom | Jenis | Persyaratan | Nilai & batasan | Bawaan |
| --- | --- | --- | --- | --- |
| Kolom`model` | Jenis`string` | PersyaratanWajib | Nilai & batasan claude-latest | Bawaan— |
| Kolom`input` | Jenis`string\|input_item[]` | PersyaratanWajib | Nilai & batasan | Bawaan— |
| Kolom`instructions` | Jenis`string` | PersyaratanOpsional | Nilai & batasan | Bawaan— |
| Kolom`input[].type` | Jenis`string` | PersyaratanOpsional | Nilai & batasan message, reasoning, function\_call, function\_call\_output | Bawaan— |
| Kolom`input[].content` | Jenis`string\|content_part[]` | PersyaratanOpsional | Nilai & batasan | Bawaan— |
| Kolom`input[].call_id` | Jenis`string` | PersyaratanOpsional | Nilai & batasan Berlaku jika: function\_call\_output; pertahankan call\_id yang benar-benar dikembalikan | Bawaan— |
| Kolom`input[].output` | Jenis`string\|content_part[]` | PersyaratanOpsional | Nilai & batasan Berlaku jika: function\_call\_output | Bawaan— |
| Kolom`max_output_tokens` | Jenis`integer` | PersyaratanOpsional | Nilai & batasan Minimum: 1 Bergantung pada model | Bawaan— |
| Kolom`stream` | Jenis`boolean` | PersyaratanOpsional | Nilai & batasan | Bawaanfalse |
| Kolom`temperature` | Jenis`number` | PersyaratanOpsional | Nilai & batasan Bergantung pada model | Bawaan— |
| Kolom`top_p` | Jenis`number` | PersyaratanOpsional | Nilai & batasan Bergantung pada model | Bawaan— |
| Kolom`tools` | Jenis`tool[]` | PersyaratanOpsional | Nilai & batasan Bergantung pada model | Bawaan— |
| Kolom`tool_choice` | Jenis`string\|object` | PersyaratanOpsional | Nilai & batasan Bergantung pada model | Bawaan— |
| Kolom`parallel_tool_calls` | Jenis`boolean` | PersyaratanOpsional | Nilai & batasan Bergantung pada model | Bawaan— |
| Kolom`reasoning.effort` | Jenis`string` | PersyaratanOpsional | Nilai & batasan Bergantung pada model | Bawaan— |
| Kolom`reasoning.summary` | Jenis`string` | PersyaratanOpsional | Nilai & batasan Bergantung pada model | Bawaan— |
| Kolom`text.format` | Jenis`object` | PersyaratanOpsional | Nilai & batasan Bergantung pada model | Bawaan— |
| Kolom`text.verbosity` | Jenis`string` | PersyaratanOpsional | Nilai & batasan Bergantung pada model | Bawaan— |
| Kolom`include` | Jenis`string[]` | PersyaratanOpsional | Nilai & batasan Bergantung pada model | Bawaan— |
| Kolom`store` | Jenis`boolean` | PersyaratanOpsional | Nilai & batasan Bergantung pada model | Bawaan— |
| Kolom`previous_response_id` | Jenis`string` | PersyaratanOpsional | Nilai & batasan Persyaratan ID: Hanya ID respons yang benar-benar diperoleh dari kelanjutan yang didukung Bergantung pada model | Bawaan— |
| Kolom`service_tier` | Jenis`string` | PersyaratanOpsional | Nilai & batasan Bergantung pada model | Bawaan— |
| Kolom`prompt_cache_key` | Jenis`string` | PersyaratanOpsional | Nilai & batasan Bergantung pada model | Bawaan— |
| Kolom`prompt_cache_options` | Jenis`object` | PersyaratanOpsional | Nilai & batasan Bergantung pada model | Bawaan— |

Kombinasi bahan masukan

**Teks** · Teks UTF8

`input text or input_text part`

**Teks + gambar**

`{type:input_image,image_url}`

Parameter metode dan siklus hidup

| Parameter | Kontrak |
| --- | --- |
| Parameter`material_types` | Kontraktext, image |
| Parameter`required` | Kontrakmodel, input |
| Parameter`optional_controls` | Kontraknull |
| Parameter`content_type` | Kontrakapplication/json |
| Parameter`text_file_material` | Kontrakkonten UTF-8 aktual dimasukkan sebagai teks; ID file atau alamat URL (URLs) memerlukan dukungan yang tepat dan terpisah |

Siklus hidup: `exact retained published method`

Struktur metode dan ID bersifat eksak; kemampuan pemasok terpisah dari penerimaan permintaan.

### Paket

#### Tarif metode Ailoot

Masukan

US$0,01 */ 1K*

Keluaran

US$0,05 */ 1K*

Pembacaan cache

US$0,00025 */ 1K*

Penulisan cache

US$0,0125 */ 1K*

Penulisan cache, 5 menit

US$0,0125 */ 1K tokens*

Penulisan cache, 1 jam

US$0,02 */ 1K tokens*

web\_search\_call

US$0,01 *per pemanggilan*

Jumlah pemanggilan maksimum web\_search\_call

8

Ailoot mencadangkan perkiraan dana sebelum permintaan. Setelah hasil diterima, tagihan akhir diselesaikan berdasarkan penggunaan yang terukur. Penyelesaian tagihan streaming menggunakan catatan penggunaan akhir. [Cara kerja cadangan dan penyelesaian tagihan →](https://ailoot.ai/docs/id/billing/reserve/)

#### Detail tarif referensi

Jadwal referensi tingkat model tidak mengubah pemilihan metode, estimasi harga, atau biaya. Biaya aktif menggunakan tarif metode Ailoot yang dipilih.

Jadwal referensi model

#### Harga menurut konfigurasi

Cocokkan setiap biaya dengan kondisi yang ditampilkan. Gunakan satu tarif untuk setiap kelompok konfigurasi alternatif.

| Konfigurasi | Jadwal tarif | Token konteks, lebih dari | Token konteks, hingga dan termasuk | Biaya |
| --- | --- | --- | --- | --- |
| KonfigurasiOpenAI Chat · Tarif dasar token | Jadwal tarifTarif dasar | Token konteks, lebih dari— | Token konteks, hingga dan termasukTanpa batas atas | Biaya Masukan · Token masukan **$0.02** / 1K token Keluaran · Token keluaran **$0.1** / 1K token Masukan · Pembacaan cache **$0.0005** / 1K token Masukan · Penulisan cache **$0.025** / 1K token Masukan · Penulisan cache, 1 jam **$0.04** / 1K token |
| KonfigurasiOpenAI Chat · Tingkat 1 berdasarkan panjang permintaan | Jadwal tarif— | Token konteks, lebih dari0 | Token konteks, hingga dan termasukTanpa batas atas | Biaya Masukan · Token masukan **$0.02** / 1K token Keluaran · Token keluaran **$0.1** / 1K token Masukan · Pembacaan cache **$0.0005** / 1K token Masukan · Penulisan cache **$0.025** / 1K token Masukan · Penulisan cache, 1 jam **$0.04** / 1K token |
| KonfigurasiAnthropic Messages · Tarif dasar token | Jadwal tarifTarif dasar | Token konteks, lebih dari— | Token konteks, hingga dan termasukTanpa batas atas | Biaya Masukan · Token masukan **$0.02** / 1K token Keluaran · Token keluaran **$0.1** / 1K token Masukan · Pembacaan cache **$0.0005** / 1K token Masukan · Penulisan cache **$0.025** / 1K token Masukan · Penulisan cache, 1 jam **$0.04** / 1K token |
| KonfigurasiAnthropic Messages · Tingkat 1 berdasarkan panjang permintaan | Jadwal tarif— | Token konteks, lebih dari0 | Token konteks, hingga dan termasukTanpa batas atas | Biaya Masukan · Token masukan **$0.02** / 1K token Keluaran · Token keluaran **$0.1** / 1K token Masukan · Pembacaan cache **$0.0005** / 1K token Masukan · Penulisan cache **$0.025** / 1K token Masukan · Penulisan cache, 1 jam **$0.04** / 1K token |

### Contoh permintaan

#### Ailoot · OpenAI Responses

Contoh teksMasukan, gambarPython SDKNode.js SDKAliran Python

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

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

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

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

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

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

```python
from openai import OpenAI
import os

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

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

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

```js
import OpenAI from "openai";

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

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

saveResult(resp);
```

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

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

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

### Terima dan simpan hasil

#### Ailoot · OpenAI Responses

json or SSE

##### Simpan semua hasil yang selesai

Simpan setiap respons lengkap, berkas, dan bagian konten yang dikembalikan.

Simpan setiap item keluaran dan bagian konten, call\_id fungsi yang sebenarnya, penalaran terenkripsi, dan data penggunaan. Saat streaming, pertahankan identitas peristiwa/item secara lengkap.

##### Jika respons asli perlu diperiksa

Simpan ID permintaan/respons dan header. URL umum untuk pengambilan tugas teks tidak disediakan.

Kolom respons

| Kolom | Jenis |
| --- | --- |
| Kolom`id` | Jenisstring |
| Kolom`status` | Jenisstring |
| Kolom`output[]` | Jenismessage\|reasoning\|function\_call\|other item |
| Kolom`output[].content[]` | Jeniscontent part |
| Kolom`usage` | Jenisobject |

Kesalahan dan langkah berikutnya

| Respons | Kondisi | Langkah berikutnya |
| --- | --- | --- |
| Respons400 · `invalid_request_error` | KondisiBidang wajib, representasi materi, atau nilai parameter tidak valid | Langkah berikutnyaPerbaiki bidang yang ditunjukkan sebelum permintaan pembuatan baru. |

### Alias

#### Alias model

<strong>Ailoot</strong> [`claude-fable-5-1`](https://ailoot.ai/models/id/#m=anthropic%2Fclaude-fable-5.1&route=Core&caller=claude-fable-5-1&fmt=responses), [`claude`](https://ailoot.ai/models/id/#m=anthropic%2Fclaude-fable-5.1&route=Core&caller=claude&fmt=responses), [`claude-fable`](https://ailoot.ai/models/id/#m=anthropic%2Fclaude-fable-5.1&route=Core&caller=claude-fable), [`claude-fable-latest`](https://ailoot.ai/models/id/#m=anthropic%2Fclaude-fable-5.1&route=Core&caller=claude-fable-latest), [`claude-latest`](https://ailoot.ai/models/id/#m=anthropic%2Fclaude-fable-5.1&route=Core&caller=claude-latest&fmt=responses)
**Ailoot Ultra** [`anthropic/claude-fable-5.1`](https://ailoot.ai/models/id/#m=anthropic%2Fclaude-fable-5.1&route=Ultra&caller=anthropic%2Fclaude-fable-5.1), [`~anthropic/claude-fable-latest`](https://ailoot.ai/models/id/#m=anthropic%2Fclaude-fable-5.1&route=Ultra&caller=~anthropic%2Fclaude-fable-latest)

#### Alias jalur metode

Gunakan jalur metode yang ditampilkan di atas.

#### ID pemanggil terkait

[`anthropic/claude-fable-5.1`](https://ailoot.ai/models/id/#m=anthropic%2Fclaude-fable-5.1&route=Ultra&caller=anthropic%2Fclaude-fable-5.1), [`claude`](https://ailoot.ai/models/id/#m=anthropic%2Fclaude-fable-5.1&route=Core&caller=claude&fmt=responses), [`claude-fable`](https://ailoot.ai/models/id/#m=anthropic%2Fclaude-fable-5.1&route=Core&caller=claude-fable), [`claude-fable-latest`](https://ailoot.ai/models/id/#m=anthropic%2Fclaude-fable-5.1&route=Core&caller=claude-fable-latest), [`claude-latest`](https://ailoot.ai/models/id/#m=anthropic%2Fclaude-fable-5.1&route=Core&caller=claude-latest&fmt=responses), [`~anthropic/claude-fable-latest`](https://ailoot.ai/models/id/#m=anthropic%2Fclaude-fable-5.1&route=Ultra&caller=~anthropic%2Fclaude-fable-latest), [`claude-fable-5-1`](https://ailoot.ai/models/id/#m=anthropic%2Fclaude-fable-5.1&route=Core&caller=claude-fable-5-1&fmt=responses)

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

[`claude-latest`](https://ailoot.ai/models/id/#m=anthropic%2Fclaude-fable-5.1&route=Core&caller=claude-latest&fmt=chat)

Anthropic /`claude-latest`

ID model

- `claude-fable-5-1`
- `claude`
- `claude-latest`

### Mulai

Claude Fable 5.1 ditujukan untuk penelitian kompleks, perubahan kode berskala besar, dan analisis profesional yang panjang. Menghubungkan informasi dalam konteks besar serta bekerja dengan teks dan gambar terperinci.

Masukan yang diterima

Teks · Gambar

Hasil

Teks

### Tersedia di Ailoot · masukan & metode

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

Masukan

`text`, `image`

Keluaran

`text`

Konteks

1.000.000 tokens

Keluaran maksimum

131.072 tokens

Format keluaran

json or SSE

| Kolom | Jenis | Persyaratan | Nilai & batasan | Bawaan |
| --- | --- | --- | --- | --- |
| Kolom`model` | Jenis`string` | PersyaratanWajib | Nilai & batasan claude-latest | Bawaan— |
| Kolom`messages` | Jenis`message[]` | PersyaratanWajib | Nilai & batasan Item minimum: 1 | Bawaan— |
| Kolom`messages[].role` | Jenis`string` | PersyaratanWajib | Nilai & batasan Contoh: system, user, assistant, tool, function Kondisi: Peran ini direpresentasikan secara eksplisit oleh tipe kompatibilitas dalam kode sumber; kumpulan peran model yang tepat tetap khusus untuk tiap model. Bergantung pada model | Bawaan— |
| Kolom`messages[].content` | Jenis`string\|content_part[]\|null` | PersyaratanOpsional | Nilai & batasan | Bawaan— |
| Kolom`messages[].tool_calls` | Jenis`tool_call[]` | PersyaratanOpsional | Nilai & batasan | Bawaan— |
| Kolom`messages[].tool_call_id` | Jenis`string` | PersyaratanOpsional | Nilai & batasan Berlaku jika: role=tool; gunakan ID yang benar-benar dikembalikan | Bawaan— |
| Kolom`messages[].name` | Jenis`string` | PersyaratanOpsional | Nilai & batasan | Bawaan— |
| Kolom`messages[].reasoning_content` | Jenis`string` | PersyaratanOpsional | Nilai & batasan Berlaku jika: Kirim kembali penalaran yang benar-benar dikembalikan jika model ini menggunakannya | Bawaan— |
| Kolom`messages[].reasoning_details` | Jenis`object\|array` | PersyaratanOpsional | Nilai & batasan Bergantung pada model | Bawaan— |
| Kolom`max_tokens` | Jenis`integer` | PersyaratanOpsional | Nilai & batasan Minimum: 1 Bergantung pada model | Bawaan— |
| Kolom`max_completion_tokens` | Jenis`integer` | PersyaratanOpsional | Nilai & batasan Minimum: 1 Bergantung pada model | Bawaan— |
| Kolom`stream` | Jenis`boolean` | PersyaratanOpsional | Nilai & batasan | Bawaanfalse |
| Kolom`stream_options.include_usage` | Jenis`boolean` | PersyaratanOpsional | Nilai & batasan Bergantung pada model | Bawaan— |
| Kolom`temperature` | Jenis`number` | PersyaratanOpsional | Nilai & batasan Bergantung pada model | Bawaan— |
| Kolom`top_p` | Jenis`number` | PersyaratanOpsional | Nilai & batasan Bergantung pada model | Bawaan— |
| Kolom`stop` | Jenis`string\|string[]` | PersyaratanOpsional | Nilai & batasan Bergantung pada model | Bawaan— |
| Kolom`tools` | Jenis`function_tool[]` | PersyaratanOpsional | Nilai & batasan Bergantung pada model | Bawaan— |
| Kolom`tools[].type` | Jenis`string` | PersyaratanOpsional | Nilai & batasan Bergantung pada model | Bawaan— |
| Kolom`tools[].function.name` | Jenis`string` | PersyaratanWajib | Nilai & batasan Berlaku jika: function tool supplied | Bawaan— |
| Kolom`tools[].function.description` | Jenis`string` | PersyaratanOpsional | Nilai & batasan | Bawaan— |
| Kolom`tools[].function.parameters` | Jenis`JSON_schema` | PersyaratanOpsional | Nilai & batasan | Bawaan— |
| Kolom`tool_choice` | Jenis`string\|object` | PersyaratanOpsional | Nilai & batasan Bergantung pada model | Bawaan— |
| Kolom`parallel_tool_calls` | Jenis`boolean` | PersyaratanOpsional | Nilai & batasan Bergantung pada model | Bawaan— |
| Kolom`response_format` | Jenis`object` | PersyaratanOpsional | Nilai & batasan Bergantung pada model | Bawaan— |
| Kolom`reasoning_effort` | Jenis`string` | PersyaratanOpsional | Nilai & batasan Bergantung pada model | Bawaan— |
| Kolom`reasoning` | Jenis`object` | PersyaratanOpsional | Nilai & batasan Bergantung pada model | Bawaan— |
| Kolom`service_tier` | Jenis`string` | PersyaratanOpsional | Nilai & batasan Bergantung pada model | Bawaan— |
| Kolom`instructions` | Jenis`string` | PersyaratanOpsional | Nilai & batasan Kolom kompatibilitas | Bawaan— |
| Kolom`functions` | Jenis`function[]` | PersyaratanOpsional | Nilai & batasan Bergantung pada model | Bawaan— |
| Kolom`function_call` | Jenis`string\|object` | PersyaratanOpsional | Nilai & batasan Bergantung pada model | Bawaan— |
| Kolom`prompt_cache_options` | Jenis`object` | PersyaratanOpsional | Nilai & batasan Bergantung pada model | Bawaan— |

Kombinasi bahan masukan

**Teks** · Teks UTF8

`messages[].content`

**Teks + gambar**

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

Parameter metode dan siklus hidup

| Parameter | Kontrak |
| --- | --- |
| Parameter`material_types` | Kontraktext, image |
| Parameter`required` | Kontrakmodel, messages |
| Parameter`optional_controls` | Kontraknull |
| Parameter`content_type` | Kontrakapplication/json |
| Parameter`text_file_material` | Kontrakkonten UTF-8 aktual dimasukkan sebagai teks; ID file atau alamat URL (URLs) memerlukan dukungan yang tepat dan terpisah |

Siklus hidup: `exact retained published method`

Struktur metode dan ID bersifat eksak; kemampuan pemasok terpisah dari penerimaan permintaan.

### Paket

#### Tarif metode Ailoot

Masukan

US$0,01 */ 1K*

Keluaran

US$0,05 */ 1K*

Pembacaan cache

US$0,00025 */ 1K*

Penulisan cache

US$0,0125 */ 1K*

Penulisan cache, 5 menit

US$0,0125 */ 1K tokens*

Penulisan cache, 1 jam

US$0,02 */ 1K tokens*

web\_search\_call

US$0,01 *per pemanggilan*

Jumlah pemanggilan maksimum web\_search\_call

8

Ailoot mencadangkan perkiraan dana sebelum permintaan. Setelah hasil diterima, tagihan akhir diselesaikan berdasarkan penggunaan yang terukur. Penyelesaian tagihan streaming menggunakan catatan penggunaan akhir. [Cara kerja cadangan dan penyelesaian tagihan →](https://ailoot.ai/docs/id/billing/reserve/)

#### Detail tarif referensi

Jadwal referensi tingkat model tidak mengubah pemilihan metode, estimasi harga, atau biaya. Biaya aktif menggunakan tarif metode Ailoot yang dipilih.

Jadwal referensi model

#### Harga menurut konfigurasi

Cocokkan setiap biaya dengan kondisi yang ditampilkan. Gunakan satu tarif untuk setiap kelompok konfigurasi alternatif.

| Konfigurasi | Jadwal tarif | Token konteks, lebih dari | Token konteks, hingga dan termasuk | Biaya |
| --- | --- | --- | --- | --- |
| KonfigurasiOpenAI Chat · Tarif dasar token | Jadwal tarifTarif dasar | Token konteks, lebih dari— | Token konteks, hingga dan termasukTanpa batas atas | Biaya Masukan · Token masukan **$0.02** / 1K token Keluaran · Token keluaran **$0.1** / 1K token Masukan · Pembacaan cache **$0.0005** / 1K token Masukan · Penulisan cache **$0.025** / 1K token Masukan · Penulisan cache, 1 jam **$0.04** / 1K token |
| KonfigurasiOpenAI Chat · Tingkat 1 berdasarkan panjang permintaan | Jadwal tarif— | Token konteks, lebih dari0 | Token konteks, hingga dan termasukTanpa batas atas | Biaya Masukan · Token masukan **$0.02** / 1K token Keluaran · Token keluaran **$0.1** / 1K token Masukan · Pembacaan cache **$0.0005** / 1K token Masukan · Penulisan cache **$0.025** / 1K token Masukan · Penulisan cache, 1 jam **$0.04** / 1K token |
| KonfigurasiAnthropic Messages · Tarif dasar token | Jadwal tarifTarif dasar | Token konteks, lebih dari— | Token konteks, hingga dan termasukTanpa batas atas | Biaya Masukan · Token masukan **$0.02** / 1K token Keluaran · Token keluaran **$0.1** / 1K token Masukan · Pembacaan cache **$0.0005** / 1K token Masukan · Penulisan cache **$0.025** / 1K token Masukan · Penulisan cache, 1 jam **$0.04** / 1K token |
| KonfigurasiAnthropic Messages · Tingkat 1 berdasarkan panjang permintaan | Jadwal tarif— | Token konteks, lebih dari0 | Token konteks, hingga dan termasukTanpa batas atas | Biaya Masukan · Token masukan **$0.02** / 1K token Keluaran · Token keluaran **$0.1** / 1K token Masukan · Pembacaan cache **$0.0005** / 1K token Masukan · Penulisan cache **$0.025** / 1K token Masukan · Penulisan cache, 1 jam **$0.04** / 1K token |

### Contoh permintaan

#### Ailoot · OpenAI Chat

Contoh teksMasukan, gambarPython SDKNode.js SDKAliran Python

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

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

```python
from openai import OpenAI
import os

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

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

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

```js
import OpenAI from "openai";

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

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

saveResult(resp);
```

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

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

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

with client.chat.completions.stream(model='claude-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")
```

### Terima dan simpan hasil

#### Ailoot · OpenAI Chat

json or SSE

##### Simpan semua hasil yang selesai

Simpan setiap respons lengkap, berkas, dan bagian konten yang dikembalikan.

Simpan setiap alternatif jawaban beserta konten, panggilan alat, dan penalarannya. Dalam SSE, gabungkan delta menurut indeks alternatif jawaban/alat, lalu pertahankan alasan penghentian akhir dan data penggunaan.

##### Jika respons asli perlu diperiksa

Simpan ID permintaan/respons dan header. URL umum untuk pengambilan tugas teks tidak disediakan.

Kolom respons

| Kolom | Jenis |
| --- | --- |
| Kolom`choices[].index` | Jenisinteger |
| Kolom`choices[].message.content` | Jenisstring\|null |
| Kolom`choices[].message.tool_calls` | Jenistool\_call\[\] |
| Kolom`choices[].message.reasoning_content` | Jenisstring |
| Kolom`choices[].message.reasoning_details` | Jenisobject\|array |
| Kolom`choices[].finish_reason` | Jenisstring\|null |
| Kolom`usage` | Jenisobject |

Kesalahan dan langkah berikutnya

| Respons | Kondisi | Langkah berikutnya |
| --- | --- | --- |
| Respons400 · `invalid_request_error` | KondisiBidang wajib, representasi materi, atau nilai parameter tidak valid | Langkah berikutnyaPerbaiki bidang yang ditunjukkan sebelum permintaan pembuatan baru. |

### Alias

#### Alias model

<strong>Ailoot</strong> [`claude-fable-5-1`](https://ailoot.ai/models/id/#m=anthropic%2Fclaude-fable-5.1&route=Core&caller=claude-fable-5-1&fmt=chat), [`claude`](https://ailoot.ai/models/id/#m=anthropic%2Fclaude-fable-5.1&route=Core&caller=claude&fmt=chat), [`claude-fable`](https://ailoot.ai/models/id/#m=anthropic%2Fclaude-fable-5.1&route=Core&caller=claude-fable), [`claude-fable-latest`](https://ailoot.ai/models/id/#m=anthropic%2Fclaude-fable-5.1&route=Core&caller=claude-fable-latest), [`claude-latest`](https://ailoot.ai/models/id/#m=anthropic%2Fclaude-fable-5.1&route=Core&caller=claude-latest&fmt=chat)
**Ailoot Ultra** [`anthropic/claude-fable-5.1`](https://ailoot.ai/models/id/#m=anthropic%2Fclaude-fable-5.1&route=Ultra&caller=anthropic%2Fclaude-fable-5.1&fmt=chat), [`~anthropic/claude-fable-latest`](https://ailoot.ai/models/id/#m=anthropic%2Fclaude-fable-5.1&route=Ultra&caller=~anthropic%2Fclaude-fable-latest&fmt=chat)

#### Alias jalur metode

Gunakan jalur metode yang ditampilkan di atas.

#### ID pemanggil terkait

[`anthropic/claude-fable-5.1`](https://ailoot.ai/models/id/#m=anthropic%2Fclaude-fable-5.1&route=Ultra&caller=anthropic%2Fclaude-fable-5.1&fmt=chat), [`claude`](https://ailoot.ai/models/id/#m=anthropic%2Fclaude-fable-5.1&route=Core&caller=claude&fmt=chat), [`claude-fable`](https://ailoot.ai/models/id/#m=anthropic%2Fclaude-fable-5.1&route=Core&caller=claude-fable), [`claude-fable-latest`](https://ailoot.ai/models/id/#m=anthropic%2Fclaude-fable-5.1&route=Core&caller=claude-fable-latest), [`claude-latest`](https://ailoot.ai/models/id/#m=anthropic%2Fclaude-fable-5.1&route=Core&caller=claude-latest&fmt=chat), [`~anthropic/claude-fable-latest`](https://ailoot.ai/models/id/#m=anthropic%2Fclaude-fable-5.1&route=Ultra&caller=~anthropic%2Fclaude-fable-latest&fmt=chat), [`claude-fable-5-1`](https://ailoot.ai/models/id/#m=anthropic%2Fclaude-fable-5.1&route=Core&caller=claude-fable-5-1&fmt=chat)

**Ailoot Ultra · OpenAI Chat** `POST /v1/chat/completions` `anthropic/claude-fable-5.1`

[`anthropic/claude-fable-5.1`](https://ailoot.ai/models/id/#m=anthropic%2Fclaude-fable-5.1&route=Ultra&caller=anthropic%2Fclaude-fable-5.1&fmt=chat)

Anthropic /`anthropic/claude-fable-5.1`

ID model

- `anthropic/claude-fable-5.1`
- `~anthropic/claude-fable-latest`

### Mulai

Claude Fable 5.1 ditujukan untuk penelitian kompleks, perubahan kode berskala besar, dan analisis profesional yang panjang. Menghubungkan informasi dalam konteks besar serta bekerja dengan teks dan gambar terperinci.

Masukan yang diterima

Teks

Hasil

Teks

### Tersedia di Ailoot · masukan & metode

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

Masukan

`text`

Keluaran

`text`

Format keluaran

json atau SSE

| Kolom | Jenis | Persyaratan | Nilai & batasan | Bawaan |
| --- | --- | --- | --- | --- |
| Kolom`model` | Jenis`string` | PersyaratanWajib | Nilai & batasan anthropic/claude-fable-5.1 | Bawaan— |
| Kolom`messages` | Jenis`message[]` | PersyaratanWajib | Nilai & batasan Item minimum: 1 | Bawaan— |
| Kolom`messages[].role` | Jenis`string` | PersyaratanWajib | Nilai & batasan Contoh: system, user, assistant, tool, function Kondisi: Peran ini direpresentasikan secara eksplisit oleh tipe kompatibilitas dalam kode sumber; kumpulan peran model yang tepat tetap khusus untuk tiap model. Bergantung pada model | Bawaan— |
| Kolom`messages[].content` | Jenis`string\|content_part[]\|null` | PersyaratanOpsional | Nilai & batasan | Bawaan— |
| Kolom`messages[].tool_calls` | Jenis`tool_call[]` | PersyaratanOpsional | Nilai & batasan | Bawaan— |
| Kolom`messages[].tool_call_id` | Jenis`string` | PersyaratanOpsional | Nilai & batasan Berlaku jika: role=tool; gunakan ID yang benar-benar dikembalikan | Bawaan— |
| Kolom`messages[].name` | Jenis`string` | PersyaratanOpsional | Nilai & batasan | Bawaan— |
| Kolom`messages[].reasoning_content` | Jenis`string` | PersyaratanOpsional | Nilai & batasan Berlaku jika: Kirim kembali penalaran yang benar-benar dikembalikan jika model ini menggunakannya | Bawaan— |
| Kolom`messages[].reasoning_details` | Jenis`object\|array` | PersyaratanOpsional | Nilai & batasan Bergantung pada model | Bawaan— |
| Kolom`max_tokens` | Jenis`integer` | PersyaratanOpsional | Nilai & batasan Minimum: 1 Bergantung pada model | Bawaan— |
| Kolom`max_completion_tokens` | Jenis`integer` | PersyaratanOpsional | Nilai & batasan Minimum: 1 Bergantung pada model | Bawaan— |
| Kolom`stream` | Jenis`boolean` | PersyaratanOpsional | Nilai & batasan | Bawaanfalse |
| Kolom`stream_options.include_usage` | Jenis`boolean` | PersyaratanOpsional | Nilai & batasan Bergantung pada model | Bawaan— |
| Kolom`temperature` | Jenis`number` | PersyaratanOpsional | Nilai & batasan Bergantung pada model | Bawaan— |
| Kolom`top_p` | Jenis`number` | PersyaratanOpsional | Nilai & batasan Bergantung pada model | Bawaan— |
| Kolom`stop` | Jenis`string\|string[]` | PersyaratanOpsional | Nilai & batasan Bergantung pada model | Bawaan— |
| Kolom`tools` | Jenis`function_tool[]` | PersyaratanOpsional | Nilai & batasan Bergantung pada model | Bawaan— |
| Kolom`tools[].type` | Jenis`string` | PersyaratanOpsional | Nilai & batasan function Bergantung pada model | Bawaan— |
| Kolom`tools[].function.name` | Jenis`string` | PersyaratanWajib | Nilai & batasan Berlaku jika: alat fungsi disediakan | Bawaan— |
| Kolom`tools[].function.description` | Jenis`string` | PersyaratanOpsional | Nilai & batasan | Bawaan— |
| Kolom`tools[].function.parameters` | Jenis`JSON_schema` | PersyaratanOpsional | Nilai & batasan | Bawaan— |
| Kolom`tool_choice` | Jenis`string\|object` | PersyaratanOpsional | Nilai & batasan Bergantung pada model | Bawaan— |
| Kolom`parallel_tool_calls` | Jenis`boolean` | PersyaratanOpsional | Nilai & batasan Bergantung pada model | Bawaan— |
| Kolom`response_format` | Jenis`object` | PersyaratanOpsional | Nilai & batasan Bergantung pada model | Bawaan— |
| Kolom`reasoning_effort` | Jenis`string` | PersyaratanOpsional | Nilai & batasan Bergantung pada model | Bawaan— |
| Kolom`reasoning` | Jenis`object` | PersyaratanOpsional | Nilai & batasan Bergantung pada model | Bawaan— |
| Kolom`service_tier` | Jenis`string` | PersyaratanOpsional | Nilai & batasan Bergantung pada model | Bawaan— |
| Kolom`instructions` | Jenis`string` | PersyaratanOpsional | Nilai & batasan Kolom kompatibilitas | Bawaan— |
| Kolom`functions` | Jenis`function[]` | PersyaratanOpsional | Nilai & batasan Bergantung pada model | Bawaan— |
| Kolom`function_call` | Jenis`string\|object` | PersyaratanOpsional | Nilai & batasan Bergantung pada model | Bawaan— |
| Kolom`prompt_cache_options` | Jenis`object` | PersyaratanOpsional | Nilai & batasan Bergantung pada model | Bawaan— |
| Kolom`modalities` | Jenis`string[]` | PersyaratanOpsional | Nilai & batasan text | Bawaan— |
| Kolom`provider` | Jenis`object` | PersyaratanOpsional | Nilai & batasan Kondisi: provider.options ditolak pada rute teks Ultra ini | Bawaan— |
| Kolom`cache_control.ttl` | Jenis`string` | PersyaratanOpsional | Nilai & batasan Kondisi: 1h ditolak pada lokasi cache prompt yang digunakan | Bawaan— |

Kombinasi bahan masukan

**Teks** · Teks UTF8

`messages[].content`

Parameter metode dan siklus hidup

| Parameter | Kontrak |
| --- | --- |
| Parameter`content_type` | Kontrakapplication/json |
| Parameter`required` | Kontrakmodel, messages |
| Parameter`material_types` | Kontraktext |
| Parameter`messages` | Kontrakarray pesan dengan struktur role/content |
| Parameter`file_material` | Kontrakdokumen UTF-8 yang sebenarnya dimasukkan sebagai teks apa adanya; ID file tidak disimpulkan |
| Parameter`optional_controls` | Kontrakstream, temperature, top\_p, stop, max\_tokens, max\_completion\_tokens, reasoning, response\_format, tools, tool\_choice |
| Parameter`control_scope` | Kontrakkhusus model; alat fungsi pengguna berbeda dari alat yang dihosting |
| Parameter`output_modalities` | Kontraktext |
| Parameter`hosted_operations` | Kontrakfalse |
| Parameter`multimodal_input_binding` | Kontraknull |

Siklus hidup: `synchronous_or_streamed`

Kirim ID model yang tepat bersama messages.

Panjang konteks bukan batas keluaran.

File teks dapat menyediakan teks apa adanya; masukan gambar/audio/objek file memerlukan pengikatan yang tepat.

### Paket

Referensi tarif tidak menambah opsi permintaan. Parameter yang didukung tercantum pada metode yang dipilih.

Mode Fast

Tarif standar Saat mode fast dipilih

Mode Flex

Tarif standar Saat mode flex dipilih

Upaya penalaran maksimum

Tarif standar Saat upaya penalaran maksimum menggunakan penyesuaian default

Upaya penalaran · high

Tarif standar Saat upaya penalaran bernilai high

Upaya penalaran · low

Tarif standar Saat upaya penalaran bernilai low

Upaya penalaran · max

Tarif standar Saat upaya penalaran bernilai max

Upaya penalaran · medium

Tarif standar Saat upaya penalaran bernilai medium

Upaya penalaran · xhigh

Tarif standar Saat upaya penalaran bernilai xhigh

#### Tarif Ailoot

#### Harga menurut konfigurasi

Cocokkan setiap biaya dengan kondisi yang ditampilkan. Gunakan satu tarif untuk setiap kelompok konfigurasi alternatif.

| Konfigurasi | Jadwal tarif | Token konteks, lebih dari | Token konteks, hingga dan termasuk | Biaya |
| --- | --- | --- | --- | --- |
| KonfigurasiTarif dasar token | Jadwal tarifTarif dasar | Token konteks, lebih dari— | Token konteks, hingga dan termasukTanpa batas atas | Biaya Masukan · Token masukan **$0.02** / 1K token Keluaran · Token keluaran **$0.1** / 1K token Masukan · Pembacaan cache **$0.0005** / 1K token Masukan · Penulisan cache **$0.025** / 1K token Masukan · Penulisan cache, 1 jam **$0.04** / 1K token |
| KonfigurasiPanjang permintaan · tingkat 1 | Jadwal tarif— | Token konteks, lebih dari0 | Token konteks, hingga dan termasukTanpa batas atas | Biaya Masukan · Token masukan **$0.02** / 1K token Keluaran · Token keluaran **$0.1** / 1K token Masukan · Pembacaan cache **$0.0005** / 1K token Masukan · Penulisan cache **$0.025** / 1K token Masukan · Penulisan cache, 1 jam **$0.04** / 1K token |

Ailoot mencadangkan perkiraan dana sebelum permintaan. Setelah hasil diterima, tagihan akhir diselesaikan berdasarkan penggunaan yang terukur. Penyelesaian tagihan streaming menggunakan catatan penggunaan akhir. [Cara kerja cadangan dan penyelesaian tagihan →](https://ailoot.ai/docs/id/billing/reserve/)

### Contoh permintaan

#### Ailoot Ultra · OpenAI Chat

curlPython SDKAliran Python

```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": "anthropic/claude-fable-5.1", "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='anthropic/claude-fable-5.1',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='anthropic/claude-fable-5.1',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")
```

### Terima dan simpan hasil

#### Ailoot Ultra · OpenAI Chat

json atau SSE

##### Simpan semua hasil yang selesai

Simpan setiap respons lengkap, berkas, dan bagian konten yang dikembalikan.

Simpan setiap alternatif jawaban beserta konten, panggilan alat, dan penalarannya. Dalam SSE, gabungkan delta menurut indeks alternatif jawaban/alat, lalu pertahankan alasan penghentian akhir dan data penggunaan.

##### Jika respons asli perlu diperiksa

Simpan ID permintaan/respons dan header. URL umum untuk pengambilan tugas teks tidak disediakan.

Kolom respons

| Kolom | Jenis |
| --- | --- |
| Kolom`choices[].index` | Jenisinteger |
| Kolom`choices[].message.content` | Jenisstring\|null |
| Kolom`choices[].message.tool_calls` | Jenistool\_call\[\] |
| Kolom`choices[].message.reasoning_content` | Jenisstring |
| Kolom`choices[].message.reasoning_details` | Jenisobject\|array |
| Kolom`choices[].finish_reason` | Jenisstring\|null |
| Kolom`usage` | Jenisobject |

Kesalahan dan langkah berikutnya

| Respons | Kondisi | Langkah berikutnya |
| --- | --- | --- |
| Respons400 · `invalid_request_error` | KondisiBidang wajib, representasi materi, atau nilai parameter tidak valid | Langkah berikutnyaPerbaiki bidang yang ditunjukkan sebelum permintaan pembuatan baru. |

### Alias

#### Alias model

<strong>Ailoot</strong> [`claude-fable-5-1`](https://ailoot.ai/models/id/#m=anthropic%2Fclaude-fable-5.1&route=Core&caller=claude-fable-5-1&fmt=chat), [`claude`](https://ailoot.ai/models/id/#m=anthropic%2Fclaude-fable-5.1&route=Core&caller=claude&fmt=chat), [`claude-fable`](https://ailoot.ai/models/id/#m=anthropic%2Fclaude-fable-5.1&route=Core&caller=claude-fable), [`claude-fable-latest`](https://ailoot.ai/models/id/#m=anthropic%2Fclaude-fable-5.1&route=Core&caller=claude-fable-latest), [`claude-latest`](https://ailoot.ai/models/id/#m=anthropic%2Fclaude-fable-5.1&route=Core&caller=claude-latest&fmt=chat)
**Ailoot Ultra** [`anthropic/claude-fable-5.1`](https://ailoot.ai/models/id/#m=anthropic%2Fclaude-fable-5.1&route=Ultra&caller=anthropic%2Fclaude-fable-5.1&fmt=chat), [`~anthropic/claude-fable-latest`](https://ailoot.ai/models/id/#m=anthropic%2Fclaude-fable-5.1&route=Ultra&caller=~anthropic%2Fclaude-fable-latest&fmt=chat)

#### Alias jalur metode

Gunakan jalur metode yang ditampilkan di atas.

#### ID pemanggil terkait

[`anthropic/claude-fable-5.1`](https://ailoot.ai/models/id/#m=anthropic%2Fclaude-fable-5.1&route=Ultra&caller=anthropic%2Fclaude-fable-5.1&fmt=chat), [`claude`](https://ailoot.ai/models/id/#m=anthropic%2Fclaude-fable-5.1&route=Core&caller=claude&fmt=chat), [`claude-fable`](https://ailoot.ai/models/id/#m=anthropic%2Fclaude-fable-5.1&route=Core&caller=claude-fable), [`claude-fable-latest`](https://ailoot.ai/models/id/#m=anthropic%2Fclaude-fable-5.1&route=Core&caller=claude-fable-latest), [`claude-latest`](https://ailoot.ai/models/id/#m=anthropic%2Fclaude-fable-5.1&route=Core&caller=claude-latest&fmt=chat), [`~anthropic/claude-fable-latest`](https://ailoot.ai/models/id/#m=anthropic%2Fclaude-fable-5.1&route=Ultra&caller=~anthropic%2Fclaude-fable-latest&fmt=chat), [`claude-fable-5-1`](https://ailoot.ai/models/id/#m=anthropic%2Fclaude-fable-5.1&route=Core&caller=claude-fable-5-1&fmt=chat)

**Ailoot Ultra · Anthropic Messages** `POST /v1/messages` `anthropic/claude-fable-5.1`

[`anthropic/claude-fable-5.1`](https://ailoot.ai/models/id/#m=anthropic%2Fclaude-fable-5.1&route=Ultra&caller=anthropic%2Fclaude-fable-5.1&fmt=messages)

Anthropic /`anthropic/claude-fable-5.1`

ID model

- `anthropic/claude-fable-5.1`
- `~anthropic/claude-fable-latest`

### Mulai

Claude Fable 5.1 ditujukan untuk penelitian kompleks, perubahan kode berskala besar, dan analisis profesional yang panjang. Menghubungkan informasi dalam konteks besar serta bekerja dengan teks dan gambar terperinci.

Masukan yang diterima

Teks

Hasil

json · sse

### Tersedia di Ailoot · masukan & metode

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

Masukan

`text`

Keluaran

`json`, `sse`

Format keluaran

JSON atau SSE

| Kolom | Jenis | Persyaratan | Nilai & batasan | Bawaan |
| --- | --- | --- | --- | --- |
| Kolom`model` | Jenis`string` | PersyaratanWajib | Nilai & batasan anthropic/claude-fable-5.1 | Bawaan— |
| Kolom`messages` | Jenis`message[]` | PersyaratanWajib | Nilai & batasan | Bawaan— |
| Kolom`messages[].role` | Jenis`string` | PersyaratanWajib | Nilai & batasan user, assistant | Bawaan— |
| Kolom`messages[].content` | Jenis`string` | PersyaratanWajib | Nilai & batasan | Bawaan— |
| Kolom`max_tokens` | Jenis`integer` | PersyaratanWajib | Nilai & batasan | Bawaan— |
| Kolom`stream` | Jenis`boolean` | PersyaratanOpsional | Nilai & batasan | Bawaanfalse |

Kombinasi bahan masukan

**Teks** · Teks UTF-8

`string messages[].content`

Parameter metode dan siklus hidup

| Parameter | Kontrak |
| --- | --- |
| Parameter`content_type` | Kontrakapplication/json |
| Parameter`required` | Kontrakmodel, messages, max\_tokens |
| Parameter`optional_controls` | Kontrakstream |
| Parameter`material_types` | Kontraktext |
| Parameter`text_file_material` | KontrakBaca dokumen UTF-8 yang sebenarnya dan masukkan teksnya ke string masukan atau konten pesan yang ditunjukkan. |

Siklus hidup: `synchronous_or_streamed`

### Paket

Referensi tarif tidak menambah opsi permintaan. Parameter yang didukung tercantum pada metode yang dipilih.

Mode Fast

Tarif standar Saat mode fast dipilih

Mode Flex

Tarif standar Saat mode flex dipilih

Upaya penalaran maksimum

Tarif standar Saat upaya penalaran maksimum menggunakan penyesuaian default

Upaya penalaran · high

Tarif standar Saat upaya penalaran bernilai high

Upaya penalaran · low

Tarif standar Saat upaya penalaran bernilai low

Upaya penalaran · max

Tarif standar Saat upaya penalaran bernilai max

Upaya penalaran · medium

Tarif standar Saat upaya penalaran bernilai medium

Upaya penalaran · xhigh

Tarif standar Saat upaya penalaran bernilai xhigh

#### Tarif Ailoot

#### Harga menurut konfigurasi

Cocokkan setiap biaya dengan kondisi yang ditampilkan. Gunakan satu tarif untuk setiap kelompok konfigurasi alternatif.

| Konfigurasi | Jadwal tarif | Token konteks, lebih dari | Token konteks, hingga dan termasuk | Biaya |
| --- | --- | --- | --- | --- |
| KonfigurasiTarif dasar token | Jadwal tarifTarif dasar | Token konteks, lebih dari— | Token konteks, hingga dan termasukTanpa batas atas | Biaya Masukan · Token masukan **$0.02** / 1K token Keluaran · Token keluaran **$0.1** / 1K token Masukan · Pembacaan cache **$0.0005** / 1K token Masukan · Penulisan cache **$0.025** / 1K token Masukan · Penulisan cache, 1 jam **$0.04** / 1K token |
| KonfigurasiPanjang permintaan · tingkat 1 | Jadwal tarif— | Token konteks, lebih dari0 | Token konteks, hingga dan termasukTanpa batas atas | Biaya Masukan · Token masukan **$0.02** / 1K token Keluaran · Token keluaran **$0.1** / 1K token Masukan · Pembacaan cache **$0.0005** / 1K token Masukan · Penulisan cache **$0.025** / 1K token Masukan · Penulisan cache, 1 jam **$0.04** / 1K token |

Ailoot mencadangkan perkiraan dana sebelum permintaan. Setelah hasil diterima, tagihan akhir diselesaikan berdasarkan penggunaan yang terukur. Penyelesaian tagihan streaming menggunakan catatan penggunaan akhir. [Cara kerja cadangan dan penyelesaian tagihan →](https://ailoot.ai/docs/id/billing/reserve/)

### Contoh permintaan

#### Ailoot Ultra · Anthropic Messages

Isi permintaan JSON minimal yang lengkapcurl · gunakan dokumen UTF-8 AndaPython · simpan hasil secara lengkap

```json
{
  "model": "anthropic/claude-fable-5.1",
  "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': 'anthropic/claude-fable-5.1', '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': 'anthropic/claude-fable-5.1', '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))
```

### Terima dan simpan hasil

#### Ailoot Ultra · Anthropic Messages

JSON atau SSE

##### Simpan semua hasil yang selesai

Simpan setiap respons lengkap, berkas, dan bagian konten yang dikembalikan.

Simpan semua blok konten, tanda tangan penalaran, dan ID penggunaan alat yang sebenarnya. Gabungkan semua delta blok SSE; blok teks pertama bukan keseluruhan keluaran.

##### Jika respons asli perlu diperiksa

Simpan ID permintaan/respons dan header. URL umum untuk pengambilan tugas teks tidak disediakan.

Kolom respons

| Kolom | Jenis |
| --- | --- |
| Kolom`id` | Jenisstring |
| Kolom`model` | Jenisstring |
| Kolom`content[]` | Jenistext\|thinking\|tool\_use\|other content block |
| Kolom`stop_reason` | Jenisstring\|null |
| Kolom`usage` | Jenisobject |

Kesalahan dan langkah berikutnya

| Respons | Kondisi | Langkah berikutnya |
| --- | --- | --- |
| Respons400 · `invalid_request_error` | KondisiBidang wajib, representasi materi, atau nilai parameter tidak valid | Langkah berikutnyaPerbaiki bidang yang ditunjukkan sebelum permintaan pembuatan baru. |

### Alias

#### Alias model

<strong>Ailoot</strong> [`claude-fable-5-1`](https://ailoot.ai/models/id/#m=anthropic%2Fclaude-fable-5.1&route=Core&caller=claude-fable-5-1&fmt=messages), [`claude`](https://ailoot.ai/models/id/#m=anthropic%2Fclaude-fable-5.1&route=Core&caller=claude&fmt=messages), [`claude-fable`](https://ailoot.ai/models/id/#m=anthropic%2Fclaude-fable-5.1&route=Core&caller=claude-fable&fmt=messages), [`claude-fable-latest`](https://ailoot.ai/models/id/#m=anthropic%2Fclaude-fable-5.1&route=Core&caller=claude-fable-latest&fmt=messages), [`claude-latest`](https://ailoot.ai/models/id/#m=anthropic%2Fclaude-fable-5.1&route=Core&caller=claude-latest&fmt=messages)
**Ailoot Ultra** [`anthropic/claude-fable-5.1`](https://ailoot.ai/models/id/#m=anthropic%2Fclaude-fable-5.1&route=Ultra&caller=anthropic%2Fclaude-fable-5.1&fmt=messages), [`~anthropic/claude-fable-latest`](https://ailoot.ai/models/id/#m=anthropic%2Fclaude-fable-5.1&route=Ultra&caller=~anthropic%2Fclaude-fable-latest&fmt=messages)

#### Alias jalur metode

Gunakan jalur metode yang ditampilkan di atas.

#### ID pemanggil terkait

[`anthropic/claude-fable-5.1`](https://ailoot.ai/models/id/#m=anthropic%2Fclaude-fable-5.1&route=Ultra&caller=anthropic%2Fclaude-fable-5.1&fmt=messages), [`claude`](https://ailoot.ai/models/id/#m=anthropic%2Fclaude-fable-5.1&route=Core&caller=claude&fmt=messages), [`claude-fable`](https://ailoot.ai/models/id/#m=anthropic%2Fclaude-fable-5.1&route=Core&caller=claude-fable&fmt=messages), [`claude-fable-latest`](https://ailoot.ai/models/id/#m=anthropic%2Fclaude-fable-5.1&route=Core&caller=claude-fable-latest&fmt=messages), [`claude-latest`](https://ailoot.ai/models/id/#m=anthropic%2Fclaude-fable-5.1&route=Core&caller=claude-latest&fmt=messages), [`~anthropic/claude-fable-latest`](https://ailoot.ai/models/id/#m=anthropic%2Fclaude-fable-5.1&route=Ultra&caller=~anthropic%2Fclaude-fable-latest&fmt=messages), [`claude-fable-5-1`](https://ailoot.ai/models/id/#m=anthropic%2Fclaude-fable-5.1&route=Core&caller=claude-fable-5-1&fmt=messages)

**Ailoot Ultra · OpenAI Chat** `POST /v1/chat/completions` `~anthropic/claude-fable-latest`

[`~anthropic/claude-fable-latest`](https://ailoot.ai/models/id/#m=anthropic%2Fclaude-fable-5.1&route=Ultra&caller=~anthropic%2Fclaude-fable-latest&fmt=chat)

Anthropic /`~anthropic/claude-fable-latest`

ID model

- `anthropic/claude-fable-5.1`
- `~anthropic/claude-fable-latest`

### Mulai

Claude Fable 5.1 ditujukan untuk penelitian kompleks, perubahan kode berskala besar, dan analisis profesional yang panjang. Menghubungkan informasi dalam konteks besar serta bekerja dengan teks dan gambar terperinci.

Masukan yang diterima

Teks

Hasil

Teks

### Tersedia di Ailoot · masukan & metode

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

Masukan

`text`

Keluaran

`text`

Format keluaran

json atau SSE

| Kolom | Jenis | Persyaratan | Nilai & batasan | Bawaan |
| --- | --- | --- | --- | --- |
| Kolom`model` | Jenis`string` | PersyaratanWajib | Nilai & batasan ~anthropic/claude-fable-latest | Bawaan— |
| Kolom`messages` | Jenis`message[]` | PersyaratanWajib | Nilai & batasan Item minimum: 1 | Bawaan— |
| Kolom`messages[].role` | Jenis`string` | PersyaratanWajib | Nilai & batasan Contoh: system, user, assistant, tool, function Kondisi: Peran ini direpresentasikan secara eksplisit oleh tipe kompatibilitas dalam kode sumber; kumpulan peran model yang tepat tetap khusus untuk tiap model. Bergantung pada model | Bawaan— |
| Kolom`messages[].content` | Jenis`string\|content_part[]\|null` | PersyaratanOpsional | Nilai & batasan | Bawaan— |
| Kolom`messages[].tool_calls` | Jenis`tool_call[]` | PersyaratanOpsional | Nilai & batasan | Bawaan— |
| Kolom`messages[].tool_call_id` | Jenis`string` | PersyaratanOpsional | Nilai & batasan Berlaku jika: role=tool; gunakan ID yang benar-benar dikembalikan | Bawaan— |
| Kolom`messages[].name` | Jenis`string` | PersyaratanOpsional | Nilai & batasan | Bawaan— |
| Kolom`messages[].reasoning_content` | Jenis`string` | PersyaratanOpsional | Nilai & batasan Berlaku jika: Kirim kembali penalaran yang benar-benar dikembalikan jika model ini menggunakannya | Bawaan— |
| Kolom`messages[].reasoning_details` | Jenis`object\|array` | PersyaratanOpsional | Nilai & batasan Bergantung pada model | Bawaan— |
| Kolom`max_tokens` | Jenis`integer` | PersyaratanOpsional | Nilai & batasan Minimum: 1 Bergantung pada model | Bawaan— |
| Kolom`max_completion_tokens` | Jenis`integer` | PersyaratanOpsional | Nilai & batasan Minimum: 1 Bergantung pada model | Bawaan— |
| Kolom`stream` | Jenis`boolean` | PersyaratanOpsional | Nilai & batasan | Bawaanfalse |
| Kolom`stream_options.include_usage` | Jenis`boolean` | PersyaratanOpsional | Nilai & batasan Bergantung pada model | Bawaan— |
| Kolom`temperature` | Jenis`number` | PersyaratanOpsional | Nilai & batasan Bergantung pada model | Bawaan— |
| Kolom`top_p` | Jenis`number` | PersyaratanOpsional | Nilai & batasan Bergantung pada model | Bawaan— |
| Kolom`stop` | Jenis`string\|string[]` | PersyaratanOpsional | Nilai & batasan Bergantung pada model | Bawaan— |
| Kolom`tools` | Jenis`function_tool[]` | PersyaratanOpsional | Nilai & batasan Bergantung pada model | Bawaan— |
| Kolom`tools[].type` | Jenis`string` | PersyaratanOpsional | Nilai & batasan function Bergantung pada model | Bawaan— |
| Kolom`tools[].function.name` | Jenis`string` | PersyaratanWajib | Nilai & batasan Berlaku jika: alat fungsi disediakan | Bawaan— |
| Kolom`tools[].function.description` | Jenis`string` | PersyaratanOpsional | Nilai & batasan | Bawaan— |
| Kolom`tools[].function.parameters` | Jenis`JSON_schema` | PersyaratanOpsional | Nilai & batasan | Bawaan— |
| Kolom`tool_choice` | Jenis`string\|object` | PersyaratanOpsional | Nilai & batasan Bergantung pada model | Bawaan— |
| Kolom`parallel_tool_calls` | Jenis`boolean` | PersyaratanOpsional | Nilai & batasan Bergantung pada model | Bawaan— |
| Kolom`response_format` | Jenis`object` | PersyaratanOpsional | Nilai & batasan Bergantung pada model | Bawaan— |
| Kolom`reasoning_effort` | Jenis`string` | PersyaratanOpsional | Nilai & batasan Bergantung pada model | Bawaan— |
| Kolom`reasoning` | Jenis`object` | PersyaratanOpsional | Nilai & batasan Bergantung pada model | Bawaan— |
| Kolom`service_tier` | Jenis`string` | PersyaratanOpsional | Nilai & batasan Bergantung pada model | Bawaan— |
| Kolom`instructions` | Jenis`string` | PersyaratanOpsional | Nilai & batasan Kolom kompatibilitas | Bawaan— |
| Kolom`functions` | Jenis`function[]` | PersyaratanOpsional | Nilai & batasan Bergantung pada model | Bawaan— |
| Kolom`function_call` | Jenis`string\|object` | PersyaratanOpsional | Nilai & batasan Bergantung pada model | Bawaan— |
| Kolom`prompt_cache_options` | Jenis`object` | PersyaratanOpsional | Nilai & batasan Bergantung pada model | Bawaan— |
| Kolom`modalities` | Jenis`string[]` | PersyaratanOpsional | Nilai & batasan text | Bawaan— |
| Kolom`provider` | Jenis`object` | PersyaratanOpsional | Nilai & batasan Kondisi: provider.options ditolak pada rute teks Ultra ini | Bawaan— |
| Kolom`cache_control.ttl` | Jenis`string` | PersyaratanOpsional | Nilai & batasan Kondisi: 1h ditolak pada lokasi cache prompt yang digunakan | Bawaan— |

Kombinasi bahan masukan

**Teks** · Teks UTF8

`messages[].content`

Parameter metode dan siklus hidup

| Parameter | Kontrak |
| --- | --- |
| Parameter`content_type` | Kontrakapplication/json |
| Parameter`required` | Kontrakmodel, messages |
| Parameter`material_types` | Kontraktext |
| Parameter`messages` | Kontrakarray pesan dengan struktur role/content |
| Parameter`file_material` | Kontrakdokumen UTF-8 yang sebenarnya dimasukkan sebagai teks apa adanya; ID file tidak disimpulkan |
| Parameter`optional_controls` | Kontrakstream, temperature, top\_p, stop, max\_tokens, max\_completion\_tokens, reasoning, response\_format, tools, tool\_choice |
| Parameter`control_scope` | Kontrakkhusus model; alat fungsi pengguna berbeda dari alat yang dihosting |
| Parameter`output_modalities` | Kontraktext |
| Parameter`hosted_operations` | Kontrakfalse |
| Parameter`multimodal_input_binding` | Kontraknull |

Siklus hidup: `synchronous_or_streamed`

Kirim ID model yang tepat bersama messages.

Panjang konteks bukan batas keluaran.

File teks dapat menyediakan teks apa adanya; masukan gambar/audio/objek file memerlukan pengikatan yang tepat.

### Paket

Referensi tarif tidak menambah opsi permintaan. Parameter yang didukung tercantum pada metode yang dipilih.

Mode Fast

Tarif standar Saat mode fast dipilih

Mode Flex

Tarif standar Saat mode flex dipilih

Upaya penalaran maksimum

Tarif standar Saat upaya penalaran maksimum menggunakan penyesuaian default

Upaya penalaran · high

Tarif standar Saat upaya penalaran bernilai high

Upaya penalaran · low

Tarif standar Saat upaya penalaran bernilai low

Upaya penalaran · max

Tarif standar Saat upaya penalaran bernilai max

Upaya penalaran · medium

Tarif standar Saat upaya penalaran bernilai medium

Upaya penalaran · xhigh

Tarif standar Saat upaya penalaran bernilai xhigh

#### Tarif Ailoot

#### Harga menurut konfigurasi

Cocokkan setiap biaya dengan kondisi yang ditampilkan. Gunakan satu tarif untuk setiap kelompok konfigurasi alternatif.

| Konfigurasi | Jadwal tarif | Token konteks, lebih dari | Token konteks, hingga dan termasuk | Biaya |
| --- | --- | --- | --- | --- |
| KonfigurasiTarif dasar token | Jadwal tarifTarif dasar | Token konteks, lebih dari— | Token konteks, hingga dan termasukTanpa batas atas | Biaya Masukan · Token masukan **$0.02** / 1K token Keluaran · Token keluaran **$0.1** / 1K token Masukan · Pembacaan cache **$0.0005** / 1K token Masukan · Penulisan cache **$0.025** / 1K token Masukan · Penulisan cache, 1 jam **$0.04** / 1K token |
| KonfigurasiPanjang permintaan · tingkat 1 | Jadwal tarif— | Token konteks, lebih dari0 | Token konteks, hingga dan termasukTanpa batas atas | Biaya Masukan · Token masukan **$0.02** / 1K token Keluaran · Token keluaran **$0.1** / 1K token Masukan · Pembacaan cache **$0.0005** / 1K token Masukan · Penulisan cache **$0.025** / 1K token Masukan · Penulisan cache, 1 jam **$0.04** / 1K token |

Ailoot mencadangkan perkiraan dana sebelum permintaan. Setelah hasil diterima, tagihan akhir diselesaikan berdasarkan penggunaan yang terukur. Penyelesaian tagihan streaming menggunakan catatan penggunaan akhir. [Cara kerja cadangan dan penyelesaian tagihan →](https://ailoot.ai/docs/id/billing/reserve/)

### Contoh permintaan

#### Ailoot Ultra · OpenAI Chat

curlPython SDKAliran Python

```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": "~anthropic/claude-fable-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='~anthropic/claude-fable-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='~anthropic/claude-fable-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")
```

### Terima dan simpan hasil

#### Ailoot Ultra · OpenAI Chat

json atau SSE

##### Simpan semua hasil yang selesai

Simpan setiap respons lengkap, berkas, dan bagian konten yang dikembalikan.

Simpan setiap alternatif jawaban beserta konten, panggilan alat, dan penalarannya. Dalam SSE, gabungkan delta menurut indeks alternatif jawaban/alat, lalu pertahankan alasan penghentian akhir dan data penggunaan.

##### Jika respons asli perlu diperiksa

Simpan ID permintaan/respons dan header. URL umum untuk pengambilan tugas teks tidak disediakan.

Kolom respons

| Kolom | Jenis |
| --- | --- |
| Kolom`choices[].index` | Jenisinteger |
| Kolom`choices[].message.content` | Jenisstring\|null |
| Kolom`choices[].message.tool_calls` | Jenistool\_call\[\] |
| Kolom`choices[].message.reasoning_content` | Jenisstring |
| Kolom`choices[].message.reasoning_details` | Jenisobject\|array |
| Kolom`choices[].finish_reason` | Jenisstring\|null |
| Kolom`usage` | Jenisobject |

Kesalahan dan langkah berikutnya

| Respons | Kondisi | Langkah berikutnya |
| --- | --- | --- |
| Respons400 · `invalid_request_error` | KondisiBidang wajib, representasi materi, atau nilai parameter tidak valid | Langkah berikutnyaPerbaiki bidang yang ditunjukkan sebelum permintaan pembuatan baru. |

### Alias

#### Alias model

<strong>Ailoot</strong> [`claude-fable-5-1`](https://ailoot.ai/models/id/#m=anthropic%2Fclaude-fable-5.1&route=Core&caller=claude-fable-5-1&fmt=chat), [`claude`](https://ailoot.ai/models/id/#m=anthropic%2Fclaude-fable-5.1&route=Core&caller=claude&fmt=chat), [`claude-fable`](https://ailoot.ai/models/id/#m=anthropic%2Fclaude-fable-5.1&route=Core&caller=claude-fable), [`claude-fable-latest`](https://ailoot.ai/models/id/#m=anthropic%2Fclaude-fable-5.1&route=Core&caller=claude-fable-latest), [`claude-latest`](https://ailoot.ai/models/id/#m=anthropic%2Fclaude-fable-5.1&route=Core&caller=claude-latest&fmt=chat)
**Ailoot Ultra** [`anthropic/claude-fable-5.1`](https://ailoot.ai/models/id/#m=anthropic%2Fclaude-fable-5.1&route=Ultra&caller=anthropic%2Fclaude-fable-5.1&fmt=chat), [`~anthropic/claude-fable-latest`](https://ailoot.ai/models/id/#m=anthropic%2Fclaude-fable-5.1&route=Ultra&caller=~anthropic%2Fclaude-fable-latest&fmt=chat)

#### Alias jalur metode

Gunakan jalur metode yang ditampilkan di atas.

#### ID pemanggil terkait

[`anthropic/claude-fable-5.1`](https://ailoot.ai/models/id/#m=anthropic%2Fclaude-fable-5.1&route=Ultra&caller=anthropic%2Fclaude-fable-5.1&fmt=chat), [`claude`](https://ailoot.ai/models/id/#m=anthropic%2Fclaude-fable-5.1&route=Core&caller=claude&fmt=chat), [`claude-fable`](https://ailoot.ai/models/id/#m=anthropic%2Fclaude-fable-5.1&route=Core&caller=claude-fable), [`claude-fable-latest`](https://ailoot.ai/models/id/#m=anthropic%2Fclaude-fable-5.1&route=Core&caller=claude-fable-latest), [`claude-latest`](https://ailoot.ai/models/id/#m=anthropic%2Fclaude-fable-5.1&route=Core&caller=claude-latest&fmt=chat), [`~anthropic/claude-fable-latest`](https://ailoot.ai/models/id/#m=anthropic%2Fclaude-fable-5.1&route=Ultra&caller=~anthropic%2Fclaude-fable-latest&fmt=chat), [`claude-fable-5-1`](https://ailoot.ai/models/id/#m=anthropic%2Fclaude-fable-5.1&route=Core&caller=claude-fable-5-1&fmt=chat)

**Ailoot Ultra · Anthropic Messages** `POST /v1/messages` `~anthropic/claude-fable-latest`

[`~anthropic/claude-fable-latest`](https://ailoot.ai/models/id/#m=anthropic%2Fclaude-fable-5.1&route=Ultra&caller=~anthropic%2Fclaude-fable-latest&fmt=messages)

Anthropic /`~anthropic/claude-fable-latest`

ID model

- `anthropic/claude-fable-5.1`
- `~anthropic/claude-fable-latest`

### Mulai

Claude Fable 5.1 ditujukan untuk penelitian kompleks, perubahan kode berskala besar, dan analisis profesional yang panjang. Menghubungkan informasi dalam konteks besar serta bekerja dengan teks dan gambar terperinci.

Masukan yang diterima

Teks

Hasil

json · sse

### Tersedia di Ailoot · masukan & metode

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

Masukan

`text`

Keluaran

`json`, `sse`

Format keluaran

JSON atau SSE

| Kolom | Jenis | Persyaratan | Nilai & batasan | Bawaan |
| --- | --- | --- | --- | --- |
| Kolom`model` | Jenis`string` | PersyaratanWajib | Nilai & batasan ~anthropic/claude-fable-latest | Bawaan— |
| Kolom`messages` | Jenis`message[]` | PersyaratanWajib | Nilai & batasan | Bawaan— |
| Kolom`messages[].role` | Jenis`string` | PersyaratanWajib | Nilai & batasan user, assistant | Bawaan— |
| Kolom`messages[].content` | Jenis`string` | PersyaratanWajib | Nilai & batasan | Bawaan— |
| Kolom`max_tokens` | Jenis`integer` | PersyaratanWajib | Nilai & batasan | Bawaan— |
| Kolom`stream` | Jenis`boolean` | PersyaratanOpsional | Nilai & batasan | Bawaanfalse |

Kombinasi bahan masukan

**Teks** · Teks UTF-8

`string messages[].content`

Parameter metode dan siklus hidup

| Parameter | Kontrak |
| --- | --- |
| Parameter`content_type` | Kontrakapplication/json |
| Parameter`required` | Kontrakmodel, messages, max\_tokens |
| Parameter`optional_controls` | Kontrakstream |
| Parameter`material_types` | Kontraktext |
| Parameter`text_file_material` | KontrakBaca dokumen UTF-8 yang sebenarnya dan masukkan teksnya ke string masukan atau konten pesan yang ditunjukkan. |

Siklus hidup: `synchronous_or_streamed`

### Paket

Referensi tarif tidak menambah opsi permintaan. Parameter yang didukung tercantum pada metode yang dipilih.

Mode Fast

Tarif standar Saat mode fast dipilih

Mode Flex

Tarif standar Saat mode flex dipilih

Upaya penalaran maksimum

Tarif standar Saat upaya penalaran maksimum menggunakan penyesuaian default

Upaya penalaran · high

Tarif standar Saat upaya penalaran bernilai high

Upaya penalaran · low

Tarif standar Saat upaya penalaran bernilai low

Upaya penalaran · max

Tarif standar Saat upaya penalaran bernilai max

Upaya penalaran · medium

Tarif standar Saat upaya penalaran bernilai medium

Upaya penalaran · xhigh

Tarif standar Saat upaya penalaran bernilai xhigh

#### Tarif Ailoot

#### Harga menurut konfigurasi

Cocokkan setiap biaya dengan kondisi yang ditampilkan. Gunakan satu tarif untuk setiap kelompok konfigurasi alternatif.

| Konfigurasi | Jadwal tarif | Token konteks, lebih dari | Token konteks, hingga dan termasuk | Biaya |
| --- | --- | --- | --- | --- |
| KonfigurasiTarif dasar token | Jadwal tarifTarif dasar | Token konteks, lebih dari— | Token konteks, hingga dan termasukTanpa batas atas | Biaya Masukan · Token masukan **$0.02** / 1K token Keluaran · Token keluaran **$0.1** / 1K token Masukan · Pembacaan cache **$0.0005** / 1K token Masukan · Penulisan cache **$0.025** / 1K token Masukan · Penulisan cache, 1 jam **$0.04** / 1K token |
| KonfigurasiPanjang permintaan · tingkat 1 | Jadwal tarif— | Token konteks, lebih dari0 | Token konteks, hingga dan termasukTanpa batas atas | Biaya Masukan · Token masukan **$0.02** / 1K token Keluaran · Token keluaran **$0.1** / 1K token Masukan · Pembacaan cache **$0.0005** / 1K token Masukan · Penulisan cache **$0.025** / 1K token Masukan · Penulisan cache, 1 jam **$0.04** / 1K token |

Ailoot mencadangkan perkiraan dana sebelum permintaan. Setelah hasil diterima, tagihan akhir diselesaikan berdasarkan penggunaan yang terukur. Penyelesaian tagihan streaming menggunakan catatan penggunaan akhir. [Cara kerja cadangan dan penyelesaian tagihan →](https://ailoot.ai/docs/id/billing/reserve/)

### Contoh permintaan

#### Ailoot Ultra · Anthropic Messages

Isi permintaan JSON minimal yang lengkapcurl · gunakan dokumen UTF-8 AndaPython · simpan hasil secara lengkap

```json
{
  "model": "~anthropic/claude-fable-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': '~anthropic/claude-fable-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': '~anthropic/claude-fable-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))
```

### Terima dan simpan hasil

#### Ailoot Ultra · Anthropic Messages

JSON atau SSE

##### Simpan semua hasil yang selesai

Simpan setiap respons lengkap, berkas, dan bagian konten yang dikembalikan.

Simpan semua blok konten, tanda tangan penalaran, dan ID penggunaan alat yang sebenarnya. Gabungkan semua delta blok SSE; blok teks pertama bukan keseluruhan keluaran.

##### Jika respons asli perlu diperiksa

Simpan ID permintaan/respons dan header. URL umum untuk pengambilan tugas teks tidak disediakan.

Kolom respons

| Kolom | Jenis |
| --- | --- |
| Kolom`id` | Jenisstring |
| Kolom`model` | Jenisstring |
| Kolom`content[]` | Jenistext\|thinking\|tool\_use\|other content block |
| Kolom`stop_reason` | Jenisstring\|null |
| Kolom`usage` | Jenisobject |

Kesalahan dan langkah berikutnya

| Respons | Kondisi | Langkah berikutnya |
| --- | --- | --- |
| Respons400 · `invalid_request_error` | KondisiBidang wajib, representasi materi, atau nilai parameter tidak valid | Langkah berikutnyaPerbaiki bidang yang ditunjukkan sebelum permintaan pembuatan baru. |

### Alias

#### Alias model

<strong>Ailoot</strong> [`claude-fable-5-1`](https://ailoot.ai/models/id/#m=anthropic%2Fclaude-fable-5.1&route=Core&caller=claude-fable-5-1&fmt=messages), [`claude`](https://ailoot.ai/models/id/#m=anthropic%2Fclaude-fable-5.1&route=Core&caller=claude&fmt=messages), [`claude-fable`](https://ailoot.ai/models/id/#m=anthropic%2Fclaude-fable-5.1&route=Core&caller=claude-fable&fmt=messages), [`claude-fable-latest`](https://ailoot.ai/models/id/#m=anthropic%2Fclaude-fable-5.1&route=Core&caller=claude-fable-latest&fmt=messages), [`claude-latest`](https://ailoot.ai/models/id/#m=anthropic%2Fclaude-fable-5.1&route=Core&caller=claude-latest&fmt=messages)
**Ailoot Ultra** [`anthropic/claude-fable-5.1`](https://ailoot.ai/models/id/#m=anthropic%2Fclaude-fable-5.1&route=Ultra&caller=anthropic%2Fclaude-fable-5.1&fmt=messages), [`~anthropic/claude-fable-latest`](https://ailoot.ai/models/id/#m=anthropic%2Fclaude-fable-5.1&route=Ultra&caller=~anthropic%2Fclaude-fable-latest&fmt=messages)

#### Alias jalur metode

Gunakan jalur metode yang ditampilkan di atas.

#### ID pemanggil terkait

[`anthropic/claude-fable-5.1`](https://ailoot.ai/models/id/#m=anthropic%2Fclaude-fable-5.1&route=Ultra&caller=anthropic%2Fclaude-fable-5.1&fmt=messages), [`claude`](https://ailoot.ai/models/id/#m=anthropic%2Fclaude-fable-5.1&route=Core&caller=claude&fmt=messages), [`claude-fable`](https://ailoot.ai/models/id/#m=anthropic%2Fclaude-fable-5.1&route=Core&caller=claude-fable&fmt=messages), [`claude-fable-latest`](https://ailoot.ai/models/id/#m=anthropic%2Fclaude-fable-5.1&route=Core&caller=claude-fable-latest&fmt=messages), [`claude-latest`](https://ailoot.ai/models/id/#m=anthropic%2Fclaude-fable-5.1&route=Core&caller=claude-latest&fmt=messages), [`~anthropic/claude-fable-latest`](https://ailoot.ai/models/id/#m=anthropic%2Fclaude-fable-5.1&route=Ultra&caller=~anthropic%2Fclaude-fable-latest&fmt=messages), [`claude-fable-5-1`](https://ailoot.ai/models/id/#m=anthropic%2Fclaude-fable-5.1&route=Core&caller=claude-fable-5-1&fmt=messages)

FAQ · Anthropic: Claude Fable 5.1

Input dan hasil apa yang tersedia?

`POST /v1/messages` · `claude-fable-5-1`: `text`, `image` → `text` `POST /v1/responses` · `claude-fable-5-1`: `text`, `image` → `text` `POST /v1/chat/completions` · `claude-fable-5-1`: `text`, `image` → `text` `POST /v1/messages` · `claude`: `text`, `image` → `text` `POST /v1/responses` · `claude`: `text`, `image` → `text` `POST /v1/chat/completions` · `claude`: `text`, `image` → `text` `POST /v1/messages` · `claude-fable`: `text`, `image` → `text` `POST /v1/messages` · `claude-fable-latest`: `text`, `image` → `text` `POST /v1/messages` · `claude-latest`: `text`, `image` → `text` `POST /v1/responses` · `claude-latest`: `text`, `image` → `text` `POST /v1/chat/completions` · `claude-latest`: `text`, `image` → `text` `POST /v1/chat/completions` · `anthropic/claude-fable-5.1`: `text` → `text` `POST /v1/messages` · `anthropic/claude-fable-5.1`: `text` → `json`, `sse` `POST /v1/chat/completions` · `~anthropic/claude-fable-latest`: `text` → `text` `POST /v1/messages` · `~anthropic/claude-fable-latest`: `text` → `json`, `sse`

Kolom apa yang digunakan permintaan?

`POST /v1/messages` · `claude-fable-5-1`: `model`, `messages`, `system`, `max_tokens`, `stream`, `metadata` `POST /v1/responses` · `claude-fable-5-1`: `model`, `input`, `instructions`, `stream` `POST /v1/chat/completions` · `claude-fable-5-1`: `model`, `messages`, `stream` `POST /v1/messages` · `claude`: `model`, `messages`, `system`, `max_tokens`, `stream`, `metadata` `POST /v1/responses` · `claude`: `model`, `input`, `instructions`, `stream` `POST /v1/chat/completions` · `claude`: `model`, `messages`, `stream` `POST /v1/messages` · `claude-fable`: `model`, `messages`, `system`, `max_tokens`, `stream`, `metadata` `POST /v1/messages` · `claude-fable-latest`: `model`, `messages`, `system`, `max_tokens`, `stream`, `metadata` `POST /v1/messages` · `claude-latest`: `model`, `messages`, `system`, `max_tokens`, `stream`, `metadata` `POST /v1/responses` · `claude-latest`: `model`, `input`, `instructions`, `stream` `POST /v1/chat/completions` · `claude-latest`: `model`, `messages`, `stream` `POST /v1/chat/completions` · `anthropic/claude-fable-5.1`: `model`, `messages`, `stream`, `modalities`, `provider` `POST /v1/messages` · `anthropic/claude-fable-5.1`: `model`, `messages`, `max_tokens`, `stream` `POST /v1/chat/completions` · `~anthropic/claude-fable-latest`: `model`, `messages`, `stream`, `modalities`, `provider` `POST /v1/messages` · `~anthropic/claude-fable-latest`: `model`, `messages`, `max_tokens`, `stream`

Batasan apa yang berlaku?

`POST /v1/messages` · `claude-fable-5-1`: `ctx`: `1000000`; `max_out`: `131072`; `messages.min_items`: `1`; `max_tokens.minimum`: `1` `POST /v1/responses` · `claude-fable-5-1`: `ctx`: `1000000`; `max_out`: `131072` `POST /v1/chat/completions` · `claude-fable-5-1`: `ctx`: `1000000`; `max_out`: `131072`; `messages.min_items`: `1` `POST /v1/messages` · `claude`: `ctx`: `1000000`; `max_out`: `131072`; `messages.min_items`: `1`; `max_tokens.minimum`: `1` `POST /v1/responses` · `claude`: `ctx`: `1000000`; `max_out`: `131072` `POST /v1/chat/completions` · `claude`: `ctx`: `1000000`; `max_out`: `131072`; `messages.min_items`: `1` `POST /v1/messages` · `claude-fable`: `ctx`: `1000000`; `max_out`: `131072`; `messages.min_items`: `1`; `max_tokens.minimum`: `1` `POST /v1/messages` · `claude-fable-latest`: `ctx`: `1000000`; `max_out`: `131072`; `messages.min_items`: `1`; `max_tokens.minimum`: `1` `POST /v1/messages` · `claude-latest`: `ctx`: `1000000`; `max_out`: `131072`; `messages.min_items`: `1`; `max_tokens.minimum`: `1` `POST /v1/responses` · `claude-latest`: `ctx`: `1000000`; `max_out`: `131072` `POST /v1/chat/completions` · `claude-latest`: `ctx`: `1000000`; `max_out`: `131072`; `messages.min_items`: `1` `POST /v1/chat/completions` · `anthropic/claude-fable-5.1`: `messages.min_items`: `1` `POST /v1/chat/completions` · `~anthropic/claude-fable-latest`: `messages.min_items`: `1`

Hubungkan Ailoot ke Claude Code, OpenCode, Hermes, atau aplikasi Anda.

## Perusahaan dan portofolio proyeknya

Perusahaan dan portofolio proyeknya: jutaan pelanggan; penjualan miliaran setiap bulan.

## Beli token dengan diskon.

Diskon langganan untuk pekerjaan rutin. Kode promo — hingga 50% untuk pembelian token.

Langganan

Pilih paket dengan diskon untuk permintaan rutin Anda.

Kode promo hingga 50%

Masukkan kode saat membeli. Harga dihitung ulang sesuai promosi aktif.

Biaya dalam riwayat

Model, token, dan jumlah tagihan disimpan untuk setiap permintaan.

[Pilih langganan](https://ailoot.ai/docs/id/billing/subscriptions/) · [Lihat harga model](https://ailoot.ai/models/id/)

## Hubungkan API ke produk yang Anda jual.

SaaS, aplikasi, dan bot — sesuai penawaran dan perjanjian lisensi Ailoot. Untuk penjualan kembali, mintalah lisensi reseller.

Aplikasi komersial

Integrasikan pembuatan teks, gambar, video, dan suara dalam fitur berbayar layanan Anda.

Lisensi reseller

Kirim deskripsi proyek dan skema akses. Mintalah ketentuan penggunaan dan penjualan kembali secara tertulis.

Dokumen di situs

Penawaran, perjanjian lisensi, dan kebijakan pemrosesan data tersedia sebelum koneksi.

[Minta lisensi reseller](mailto:support@ailoot.ai) · [Penawaran dan perjanjian lisensi](https://ailoot.ai/legal/offer?lang=id)

## Ailoot · Perusahaan dan portofolio proyeknya





Ailoot bertumpu pada pengalaman operasional yang teruji, basis pelanggan yang besar, layanan yang stabil, dan pemantauan KPI berkelanjutan.





Perusahaan dan portofolio proyeknya: jutaan pelanggan; penjualan miliaran setiap bulan.





Ailoot memanfaatkan pengalaman operasional ini untuk akses API ke fitur AI dalam produk pelanggan, agen, aplikasi, dan otomatisasi.
