modellar

Anthropic: Claude Fable 5.1

Markdown · JSON

Anthropic: Claude Fable 5.1

Claude Fable 5.1 murakkab tadqiqotlar, koddagi yirik o‘zgarishlar va davomli professional tahlil uchun mo‘ljallangan. Katta kontekstdagi ma’lumotlarni bog‘laydi hamda matn va batafsil tasvirlar bilan ishlaydi.

Model haqida

Bu tavsif model imkoniyatlarini yoritadi. Ailoot da tanlangan usul uchun mavjud kirish, chiqish va parametrlar quyida keltirilgan.

Claude Fable 5.1 ochiq savoldan boshlanib, tekshiriladigan natijagacha davom etadigan ishga yo‘naltirilgan. Dasturlashda Anthropic ko‘plab fayllardagi o‘zgarishlar, yirik refaktoring, migratsiyalar, xatolarni tuzatish va kodni tekshirishni ta’kidlaydi. Tadqiqotlarda esa qidiruv qadamlarining ketma-ketligi, materiallarni solishtirish va yangi ma’lumotlar kelib tushganda yo‘nalishni saqlashni ajratib ko‘rsatadi.

Sababni o‘rganish va yakuniy natijani yig‘ish

Model murakkab dasturiy xatoning tub sababini aniqlash, tuzatishni rejalashtirish va taklif etilgan yechimni tekshirishga yordam berishi mumkin. Axborot bilan ishlashda katta materiallar to‘plamining bir-biridan uzoq qismlaridagi tafsilotlarni bog‘lash qobiliyati foydali. Topshiriq dastlabki xulosalardan keyin ham davom etishi mumkin: tahlil hujjat, formulali jadval yoki taqdimot mazmuniga aylanadi.

Bunday tayyor materiallar ilova vositalari orqali chiqariladi. Kod bajarish, fayllarni o‘qish, axborot qidirish va interfeysdagi amallar ham ulangan muhitni talab qiladi. Anthropic muvaffaqiyatsiz amaldan keyin davom etish va interfeyslarda ish yo‘lini tiklashni tavsiflaydi, lekin bu vositalar mavjudligi va ruxsat etilgan amallarni ilova belgilaydi.

Zich grafiklar va jadvallar

Kirishda matn va tasvirlar qabul qilinadi, modelning o‘z natijasi — matn. Vizual yo‘nalishlar zich grafiklar, moliyaviy materiallar va hujjatlardagi jadvallarni o‘z ichiga oladi. Boshlang‘ich sahifada ko‘plab mayda tafsilotlar bo‘lsa, vositalar orqali qo‘shimcha kattalashtirish yoki qirqish kerakli hududni ajratishga yordam berishi mumkin.

Ishlab chiqaruvchida oddiy vizual kirish formatlari: JPEG/PNG/GIF/WebP, animatsiyaning birinchi kadri. Nativ tahlilda: uzun tomon — 2576 piksel, 4784 vizual token; katta tasvirlar tahlildan oldin kichraytiriladi. Fayllar va parametrlarning qo‘llab-quvvatlanishi ilova metodiga bog‘liq.

Tadqiqot misollarida ishlab chiqaruvchi radar ma’lumotlari asosida Veneraning balandlik xaritasini tiklaydigan neyron tarmoqni o‘qitishda Fable 5.1’dan foydalanishni ko‘rsatadi. Bu modelning alohida media chiqish turi emas, ma’lumotlar bilan ishlash va dasturlash misolidir.

Davomli ish va tahlil chuqurligi

Fable 5.1’da adaptiv mulohaza yuritish doimo yoqilgan. effort parametri chuqurlikni belgilaydi: low, medium, high, xhigh va max mavjud, standart daraja — high. Kontekst 1 mln token, maksimal javob — 128 ming token. Ichki bilimlarning ishonchli chegarasi — 2026-yil iyun.

Ilova bu mexanizmlarni qo‘llab-quvvatlasa, ishlab chiqaruvchi suhbat davomida sa’y-harakat darajasini o‘zgartirish va ish borishi haqida xabar berishni ko‘zda tutadi. Ilova saqlangan mulohaza bloklarini yuborsa, ularning model va dastlabki tarix bilan bog‘lanishi muhim. Oldingi xabarlar, tizim ko‘rsatmasi yoki avvalgi vosita ta’riflarini tahrirlash keyingi bloklarni yaroqsiz qilishi mumkin: bog‘lanish tekshirilganda so‘rov rad etiladi yoki tegishli bloklar chiqarib tashlanadi. Fable 5.1 oldingi Claude modellarining saqlangan mulohazalarini o‘qiydi, lekin bu oldingi modellar uning bloklarini o‘qimaydi. Mos kelmaydigan blok keyingi navbatdan oldin chiqarib tashlanadi va ish usiz davom etadi. Fable 5.1 Fable 5 bilan bir xil tokenlarga ajratish usulidan foydalanadi; materiallar hajmini aynan tanlangan model uchun baholash kerak.

Natijaga ta’sir qiladigan xususiyatlar

Past sa’y-harakat darajasida Fable 5.1 qidiruvga murojaat qilishdan ko‘ra ichki bilimlar asosida javob berishni afzal ko‘rishi mumkin. Savol dolzarb tekshiruvni talab qilsa, buni aniq ko‘rsatish va kerakli vositalarni taqdim etish lozim. Model ba’zan zich matn yozadi, oraliq jarayon haqida kam xabar beradi yoki ayrim joylarni tuzatish kutilgan holatda faylni to‘liq almashtiradi; kerakli uslub va o‘zgartirish chegaralarini oldindan belgilash foydali.

Metod vositalarni boshqarishni taqdim etsa, ishlab chiqaruvchi modelida avtomatik tanlov auto va vositalarni o‘chirish none qo‘llab-quvvatlanadi. Majburiy chaqiruv hech bir vosita uchun (any) ham, nomi bo‘yicha aniq vosita uchun (tool) ham qo‘llab-quvvatlanmaydi. Himoya qoidalari manba koddagi xatolar va zaifliklarni o‘rganishga ruxsat beradi, lekin nozik mazmundagi ayrim vazifalarni, jumladan, eksploitlar ishlab chiqishni cheklaydi.

Sozlamalarni qo‘llab-quvvatlaydigan metodda oldindan berilgan javob boshlanishini davom ettirish hamda temperature, top_p va top_k’ning nostandart qiymatlari qabul qilinmaydi. Model yaratgan matn Anthropic’ning statistik belgisini o‘z ichiga oladi: u ma’no, sifat va o‘qilishga ta’sir qilmaydi hamda yashirin belgilar yoki tokenlar qo‘shmaydi.

Amaliy vazifa

Amaliy vazifa

Ingliz tilidagi texnik misol

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.

Kutiladigan natija

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

Natijani tekshirish

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

Anthropic /claude-fable-5-1
Model ID
  • claude-fable-5-1
  • claude
  • claude-fable
  • claude-fable-latest
  • claude-latest

Boshlash

Claude Fable 5.1 murakkab tadqiqotlar, koddagi yirik o‘zgarishlar va davomli professional tahlil uchun mo‘ljallangan. Katta kontekstdagi ma’lumotlarni bog‘laydi hamda matn va batafsil tasvirlar bilan ishlaydi.

Qabul qilinadigan kirish ma’lumotlari
Matn · Rasmlar
Natijalar
Matn

Ailoot da mavjud · kirish ma’lumotlari va usullar

Ailoot · Anthropic Messages POST /v1/messages
Kirish
text, image
Chiqish
text
Kontekst
1 000 000 tokens
Eng katta chiqish
131 072 tokens
Chiqish formati
json yoki SSE
MaydonTurTalabQiymatlar va cheklovlarStandart
MaydonmodelTurstringTalabMajburiyQiymatlar va cheklovlar
claude-fable-5-1
Standart—
MaydonmessagesTurmessage[]TalabMajburiyQiymatlar va cheklovlar
Elementlarning eng kam soni: 1
Standart—
Maydonmessages[].roleTurstringTalabMajburiyQiymatlar va cheklovlar
user, assistant
Standart—
Maydonmessages[].contentTurstring|content_block[]TalabMajburiyQiymatlar va cheklovlarStandart—
MaydonsystemTurstring|content_block[]TalabIxtiyoriyQiymatlar va cheklovlarStandart—
Maydonmax_tokensTurintegerTalabMajburiyQiymatlar va cheklovlar
Eng kam: 1
Cheklov qo‘llanadigan obyekt: Tanlangan model yoki kartaning aniq yuqori chegarasi
Standart—
MaydonstreamTurbooleanTalabIxtiyoriyQiymatlar va cheklovlarStandartfalse
MaydontemperatureTurnumberTalabIxtiyoriyQiymatlar va cheklovlar
Modelga bogʻliq
Standart—
Maydontop_pTurnumberTalabIxtiyoriyQiymatlar va cheklovlar
Modelga bogʻliq
Standart—
Maydonstop_sequencesTurstring[]TalabIxtiyoriyQiymatlar va cheklovlar
Modelga bogʻliq
Standart—
MaydontoolsTurtool[]TalabIxtiyoriyQiymatlar va cheklovlar
Modelga bogʻliq
Standart—
Maydontools[].nameTurstringTalabIxtiyoriyQiymatlar va cheklovlar
Quyidagi holatda qo‘llanadi: Vosita taqdim etilgan
Standart—
Maydontools[].descriptionTurstringTalabIxtiyoriyQiymatlar va cheklovlarStandart—
Maydontools[].input_schemaTurJSON_schemaTalabIxtiyoriyQiymatlar va cheklovlarStandart—
Maydontool_choiceTurobjectTalabIxtiyoriyQiymatlar va cheklovlar
Modelga bogʻliq
Standart—
Maydonthinking.typeTurstringTalabIxtiyoriyQiymatlar va cheklovlar
Modelga bogʻliq
Standart—
Maydonthinking.budget_tokensTurintegerTalabIxtiyoriyQiymatlar va cheklovlar
Modelga bogʻliq
Standart—
Maydonoutput_config.effortTurstringTalabIxtiyoriyQiymatlar va cheklovlar
Modelga bogʻliq
Standart—
MaydonmetadataTurobjectTalabIxtiyoriyQiymatlar va cheklovlarStandart—
Maydoncache_controlTurobjectTalabIxtiyoriyQiymatlar va cheklovlar
Modelga bogʻliq
Standart—
Kirish materiallari birikmalari

Matn · UTF8 matni

messages[].content yoki type=text bloki

Matn + rasm

{type:image,source:{type:base64,media_type,data}} yoki type=url turidagi manba

Usul parametrlari va hayot sikli
ParametrParametr talablari
Parametrmaterial_typesParametr talablaritext, image
ParametrrequiredParametr talablarimodel, messages, max_tokens
Parametroptional_controlsParametr talablarinull
Parametrcontent_typeParametr talablariapplication/json
Parametrtext_file_materialParametr talablariHaqiqiy UTF-8 kontenti matn sifatida kiritiladi; fayl IDlari/URLs uchun alohida aniq qo‘llab-quvvatlash kerak

Hayot sikli: exact retained published method

Metod tuzilishlari va IDlari aniq; yetkazib beruvchining imkoniyati so‘rovni qabul qilishga ruxsatdan alohida.

Tariflar

Ailoot usullari tariflari

Ailoot Anthropic MessagesPOST /v1/messages
Kirish
0,01 US$ / 1K
Chiqish
0,05 US$ / 1K
Keshdan o‘qish
0,00025 US$ / 1K
Keshga yozish
0,0125 US$ / 1K
Keshga yozish, 5 daqiqa
0,0125 US$ / 1K tokens
Keshga yozish, 1 soat
0,02 US$ / 1K tokens
web_search_call
0,01 US$ har chaqiruv uchun
Maks. chaqiruvlar web_search_call
8

Ailoot so‘rovdan oldin taxminiy summani band qiladi. Natijadan keyin o‘lchangan sarf asosidagi yakuniy to‘lovni yechadi. Oqimli javob bo‘yicha yakuniy hisob-kitob yakuniy sarf yozuviga asoslanadi. Summani band qilish va to‘lovni hisoblash tartibi →

Ma’lumot uchun tarif tafsilotlari

Modelning ma’lumot jadvallari usul tanlash, narx hisobi yoki to‘lovlarni o‘zgartirmaydi. Amaldagi to‘lovlar tanlangan Ailoot usuli tariflari bo‘yicha hisoblanadi.

Modelning ma’lumot jadvallari

Sozlamalar bo‘yicha narxlar

Har bir to‘lovni ko‘rsatilgan shartlarga moslang. Har bir muqobil sozlamalar to‘plami uchun bitta tarifdan foydalaning.

SozlamaTariflar jadvaliKontekst tokenlari soni bundan ko‘pKontekst tokenlari soni bundan oshmaydi, chegara kiradiTo‘lov
SozlamaOpenAI Chat · Tokenlar uchun asosiy tariflarTariflar jadvaliAsosiy tarifKontekst tokenlari soni bundan ko‘p—Kontekst tokenlari soni bundan oshmaydi, chegara kiradiYuqori chegara yo‘qTo‘lov
Kirish · Kirish tokenlari $0.02 / 1K token
Chiqish · Chiqish tokenlari $0.1 / 1K token
Kirish · Keshdan o‘qish $0.0005 / 1K token
Kirish · Keshga yozish $0.025 / 1K token
Kirish · Keshga yozish, 1 soat $0.04 / 1K token
SozlamaOpenAI Chat · So‘rov uzunligi bo‘yicha 1-darajaTariflar jadvali—Kontekst tokenlari soni bundan ko‘p0Kontekst tokenlari soni bundan oshmaydi, chegara kiradiYuqori chegara yo‘qTo‘lov
Kirish · Kirish tokenlari $0.02 / 1K token
Chiqish · Chiqish tokenlari $0.1 / 1K token
Kirish · Keshdan o‘qish $0.0005 / 1K token
Kirish · Keshga yozish $0.025 / 1K token
Kirish · Keshga yozish, 1 soat $0.04 / 1K token
SozlamaAnthropic Messages · Tokenlar uchun asosiy tariflarTariflar jadvaliAsosiy tarifKontekst tokenlari soni bundan ko‘p—Kontekst tokenlari soni bundan oshmaydi, chegara kiradiYuqori chegara yo‘qTo‘lov
Kirish · Kirish tokenlari $0.02 / 1K token
Chiqish · Chiqish tokenlari $0.1 / 1K token
Kirish · Keshdan o‘qish $0.0005 / 1K token
Kirish · Keshga yozish $0.025 / 1K token
Kirish · Keshga yozish, 1 soat $0.04 / 1K token
SozlamaAnthropic Messages · So‘rov uzunligi bo‘yicha 1-darajaTariflar jadvali—Kontekst tokenlari soni bundan ko‘p0Kontekst tokenlari soni bundan oshmaydi, chegara kiradiYuqori chegara yo‘qTo‘lov
Kirish · Kirish tokenlari $0.02 / 1K token
Chiqish · Chiqish tokenlari $0.1 / 1K token
Kirish · Keshdan o‘qish $0.0005 / 1K token
Kirish · Keshga yozish $0.025 / 1K token
Kirish · Keshga yozish, 1 soat $0.04 / 1K token

So‘rov namunalari

Ailoot · Anthropic Messages

Matn namunasiKirish, rasmPython SDKNode.js SDKPython oqimi
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
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
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"))
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);
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")

Natijalarni olish va saqlash

Ailoot · Anthropic Messages

json yoki SSE

Barcha tayyor natijalarni saqlash

Qaytarilgan har bir to‘liq javob, fayl va kontent qismini saqlang.

Barcha kontent bloklari, fikrlash imzolari va haqiqiy vosita ishlatish IDlarini saqlang. SSE bloklarining barcha o‘zgarish qismlarini yig‘ing; birinchi matn bloki to‘liq chiqish emas.

Asl javobni tekshirish kerak bo‘lsa

So‘rov va javob IDlari hamda sarlavhalarini saqlang. Matn vazifasini olish uchun umumiy URL taqdim etilmagan.

Javob maydonlari
MaydonTur
MaydonidTurstring
MaydonmodelTurstring
Maydoncontent[]Turtext|thinking|tool_use|other content block
Maydonstop_reasonTurstring|null
MaydonusageTurobject
Xatolar va keyingi qadamlar
JavobShartKeyingi qadam
Javob400 · invalid_request_errorShartMajburiy maydonlar, material ifodasi yoki parametr qiymati noto‘g‘riKeyingi qadamYangi yaratish so‘rovidan oldin ko‘rsatilgan maydonlarni tuzating.

Taxalluslar

Model taxalluslari

Ailoot claude-fable-5-1, claude, claude-fable, claude-fable-latest, claude-latest
Ailoot Ultra anthropic/claude-fable-5.1, ~anthropic/claude-fable-latest

Usul yo‘llari taxalluslari

Yuqorida ko‘rsatilgan usul yo‘llaridan foydalaning.

Chaqirish uchun tegishli ID lar

anthropic/claude-fable-5.1, claude, claude-fable, claude-fable-latest, claude-latest, ~anthropic/claude-fable-latest, claude-fable-5-1

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

claude-fable-5-1

Anthropic /claude-fable-5-1
Model ID
  • claude-fable-5-1
  • claude
  • claude-latest

Boshlash

Claude Fable 5.1 murakkab tadqiqotlar, koddagi yirik o‘zgarishlar va davomli professional tahlil uchun mo‘ljallangan. Katta kontekstdagi ma’lumotlarni bog‘laydi hamda matn va batafsil tasvirlar bilan ishlaydi.

Qabul qilinadigan kirish ma’lumotlari
Matn · Rasmlar
Natijalar
Matn

Ailoot da mavjud · kirish ma’lumotlari va usullar

Ailoot · OpenAI Responses POST /v1/responses
Kirish
text, image
Chiqish
text
Kontekst
1 000 000 tokens
Eng katta chiqish
131 072 tokens
Chiqish formati
json yoki SSE
MaydonTurTalabQiymatlar va cheklovlarStandart
MaydonmodelTurstringTalabMajburiyQiymatlar va cheklovlar
claude-fable-5-1
Standart—
MaydoninputTurstring|input_item[]TalabMajburiyQiymatlar va cheklovlarStandart—
MaydoninstructionsTurstringTalabIxtiyoriyQiymatlar va cheklovlarStandart—
Maydoninput[].typeTurstringTalabIxtiyoriyQiymatlar va cheklovlar
message, reasoning, function_call, function_call_output
Standart—
Maydoninput[].contentTurstring|content_part[]TalabIxtiyoriyQiymatlar va cheklovlarStandart—
Maydoninput[].call_idTurstringTalabIxtiyoriyQiymatlar va cheklovlar
Quyidagi holatda qo‘llanadi: function_call_output; haqiqatan qaytarilgan call_id qiymatini saqlang
Standart—
Maydoninput[].outputTurstring|content_part[]TalabIxtiyoriyQiymatlar va cheklovlar
Quyidagi holatda qo‘llanadi: function_call_output
Standart—
Maydonmax_output_tokensTurintegerTalabIxtiyoriyQiymatlar va cheklovlar
Eng kam: 1
Modelga bogʻliq
Standart—
MaydonstreamTurbooleanTalabIxtiyoriyQiymatlar va cheklovlarStandartfalse
MaydontemperatureTurnumberTalabIxtiyoriyQiymatlar va cheklovlar
Modelga bogʻliq
Standart—
Maydontop_pTurnumberTalabIxtiyoriyQiymatlar va cheklovlar
Modelga bogʻliq
Standart—
MaydontoolsTurtool[]TalabIxtiyoriyQiymatlar va cheklovlar
Modelga bogʻliq
Standart—
Maydontool_choiceTurstring|objectTalabIxtiyoriyQiymatlar va cheklovlar
Modelga bogʻliq
Standart—
Maydonparallel_tool_callsTurbooleanTalabIxtiyoriyQiymatlar va cheklovlar
Modelga bogʻliq
Standart—
Maydonreasoning.effortTurstringTalabIxtiyoriyQiymatlar va cheklovlar
Modelga bogʻliq
Standart—
Maydonreasoning.summaryTurstringTalabIxtiyoriyQiymatlar va cheklovlar
Modelga bogʻliq
Standart—
Maydontext.formatTurobjectTalabIxtiyoriyQiymatlar va cheklovlar
Modelga bogʻliq
Standart—
Maydontext.verbosityTurstringTalabIxtiyoriyQiymatlar va cheklovlar
Modelga bogʻliq
Standart—
MaydonincludeTurstring[]TalabIxtiyoriyQiymatlar va cheklovlar
Modelga bogʻliq
Standart—
MaydonstoreTurbooleanTalabIxtiyoriyQiymatlar va cheklovlar
Modelga bogʻliq
Standart—
Maydonprevious_response_idTurstringTalabIxtiyoriyQiymatlar va cheklovlar
ID talabi: Faqat qo‘llab-quvvatlanadigan davom ettirishdan olingan haqiqiy javob IDsi
Modelga bogʻliq
Standart—
Maydonservice_tierTurstringTalabIxtiyoriyQiymatlar va cheklovlar
Modelga bogʻliq
Standart—
Maydonprompt_cache_keyTurstringTalabIxtiyoriyQiymatlar va cheklovlar
Modelga bogʻliq
Standart—
Maydonprompt_cache_optionsTurobjectTalabIxtiyoriyQiymatlar va cheklovlar
Modelga bogʻliq
Standart—
Kirish materiallari birikmalari

Matn · UTF8 matni

Kirish matni yoki input_text qismi

Matn + rasm

{type:input_image,image_url}

Usul parametrlari va hayot sikli
ParametrParametr talablari
Parametrmaterial_typesParametr talablaritext, image
ParametrrequiredParametr talablarimodel, input
Parametroptional_controlsParametr talablarinull
Parametrcontent_typeParametr talablariapplication/json
Parametrtext_file_materialParametr talablariHaqiqiy UTF-8 kontenti matn sifatida kiritiladi; fayl IDlari/URLs uchun alohida aniq qo‘llab-quvvatlash kerak

Hayot sikli: exact retained published method

Metod tuzilishlari va IDlari aniq; yetkazib beruvchining imkoniyati so‘rovni qabul qilishga ruxsatdan alohida.

Tariflar

Ailoot usullari tariflari

Ailoot OpenAI ResponsesPOST /v1/responses
Kirish
0,01 US$ / 1K
Chiqish
0,05 US$ / 1K
Keshdan o‘qish
0,00025 US$ / 1K
Keshga yozish
0,0125 US$ / 1K
Keshga yozish, 5 daqiqa
0,0125 US$ / 1K tokens
Keshga yozish, 1 soat
0,02 US$ / 1K tokens
web_search_call
0,01 US$ har chaqiruv uchun
Maks. chaqiruvlar web_search_call
8

Ailoot so‘rovdan oldin taxminiy summani band qiladi. Natijadan keyin o‘lchangan sarf asosidagi yakuniy to‘lovni yechadi. Oqimli javob bo‘yicha yakuniy hisob-kitob yakuniy sarf yozuviga asoslanadi. Summani band qilish va to‘lovni hisoblash tartibi →

Ma’lumot uchun tarif tafsilotlari

Modelning ma’lumot jadvallari usul tanlash, narx hisobi yoki to‘lovlarni o‘zgartirmaydi. Amaldagi to‘lovlar tanlangan Ailoot usuli tariflari bo‘yicha hisoblanadi.

Modelning ma’lumot jadvallari

Sozlamalar bo‘yicha narxlar

Har bir to‘lovni ko‘rsatilgan shartlarga moslang. Har bir muqobil sozlamalar to‘plami uchun bitta tarifdan foydalaning.

SozlamaTariflar jadvaliKontekst tokenlari soni bundan ko‘pKontekst tokenlari soni bundan oshmaydi, chegara kiradiTo‘lov
SozlamaOpenAI Chat · Tokenlar uchun asosiy tariflarTariflar jadvaliAsosiy tarifKontekst tokenlari soni bundan ko‘p—Kontekst tokenlari soni bundan oshmaydi, chegara kiradiYuqori chegara yo‘qTo‘lov
Kirish · Kirish tokenlari $0.02 / 1K token
Chiqish · Chiqish tokenlari $0.1 / 1K token
Kirish · Keshdan o‘qish $0.0005 / 1K token
Kirish · Keshga yozish $0.025 / 1K token
Kirish · Keshga yozish, 1 soat $0.04 / 1K token
SozlamaOpenAI Chat · So‘rov uzunligi bo‘yicha 1-darajaTariflar jadvali—Kontekst tokenlari soni bundan ko‘p0Kontekst tokenlari soni bundan oshmaydi, chegara kiradiYuqori chegara yo‘qTo‘lov
Kirish · Kirish tokenlari $0.02 / 1K token
Chiqish · Chiqish tokenlari $0.1 / 1K token
Kirish · Keshdan o‘qish $0.0005 / 1K token
Kirish · Keshga yozish $0.025 / 1K token
Kirish · Keshga yozish, 1 soat $0.04 / 1K token
SozlamaAnthropic Messages · Tokenlar uchun asosiy tariflarTariflar jadvaliAsosiy tarifKontekst tokenlari soni bundan ko‘p—Kontekst tokenlari soni bundan oshmaydi, chegara kiradiYuqori chegara yo‘qTo‘lov
Kirish · Kirish tokenlari $0.02 / 1K token
Chiqish · Chiqish tokenlari $0.1 / 1K token
Kirish · Keshdan o‘qish $0.0005 / 1K token
Kirish · Keshga yozish $0.025 / 1K token
Kirish · Keshga yozish, 1 soat $0.04 / 1K token
SozlamaAnthropic Messages · So‘rov uzunligi bo‘yicha 1-darajaTariflar jadvali—Kontekst tokenlari soni bundan ko‘p0Kontekst tokenlari soni bundan oshmaydi, chegara kiradiYuqori chegara yo‘qTo‘lov
Kirish · Kirish tokenlari $0.02 / 1K token
Chiqish · Chiqish tokenlari $0.1 / 1K token
Kirish · Keshdan o‘qish $0.0005 / 1K token
Kirish · Keshga yozish $0.025 / 1K token
Kirish · Keshga yozish, 1 soat $0.04 / 1K token

So‘rov namunalari

Ailoot · OpenAI Responses

Matn namunasiKirish, rasmPython SDKNode.js SDKPython oqimi
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
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
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"))
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);
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")

Natijalarni olish va saqlash

Ailoot · OpenAI Responses

json yoki SSE

Barcha tayyor natijalarni saqlash

Qaytarilgan har bir to‘liq javob, fayl va kontent qismini saqlang.

Har bir chiqish elementi va kontent qismini, funksiyaning haqiqiy call_id qiymatini, shifrlangan fikrlash ma’lumotlari va sarfni saqlang. Oqimli uzatishda hodisa va elementning to‘liq identifikatsiyasini saqlang.

Asl javobni tekshirish kerak bo‘lsa

So‘rov va javob IDlari hamda sarlavhalarini saqlang. Matn vazifasini olish uchun umumiy URL taqdim etilmagan.

Javob maydonlari
MaydonTur
MaydonidTurstring
MaydonstatusTurstring
Maydonoutput[]Turmessage|reasoning|function_call|other item
Maydonoutput[].content[]Turcontent part
MaydonusageTurobject
Xatolar va keyingi qadamlar
JavobShartKeyingi qadam
Javob400 · invalid_request_errorShartMajburiy maydonlar, material ifodasi yoki parametr qiymati noto‘g‘riKeyingi qadamYangi yaratish so‘rovidan oldin ko‘rsatilgan maydonlarni tuzating.

Taxalluslar

Model taxalluslari

Ailoot claude-fable-5-1, claude, claude-fable, claude-fable-latest, claude-latest
Ailoot Ultra anthropic/claude-fable-5.1, ~anthropic/claude-fable-latest

Usul yo‘llari taxalluslari

Yuqorida ko‘rsatilgan usul yo‘llaridan foydalaning.

Chaqirish uchun tegishli ID lar

anthropic/claude-fable-5.1, claude, claude-fable, claude-fable-latest, claude-latest, ~anthropic/claude-fable-latest, claude-fable-5-1

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

claude-fable-5-1

Anthropic /claude-fable-5-1
Model ID
  • claude-fable-5-1
  • claude
  • claude-latest

Boshlash

Claude Fable 5.1 murakkab tadqiqotlar, koddagi yirik o‘zgarishlar va davomli professional tahlil uchun mo‘ljallangan. Katta kontekstdagi ma’lumotlarni bog‘laydi hamda matn va batafsil tasvirlar bilan ishlaydi.

Qabul qilinadigan kirish ma’lumotlari
Matn · Rasmlar
Natijalar
Matn

Ailoot da mavjud · kirish ma’lumotlari va usullar

Ailoot · OpenAI Chat POST /v1/chat/completions
Kirish
text, image
Chiqish
text
Kontekst
1 000 000 tokens
Eng katta chiqish
131 072 tokens
Chiqish formati
json yoki SSE
MaydonTurTalabQiymatlar va cheklovlarStandart
MaydonmodelTurstringTalabMajburiyQiymatlar va cheklovlar
claude-fable-5-1
Standart—
MaydonmessagesTurmessage[]TalabMajburiyQiymatlar va cheklovlar
Elementlarning eng kam soni: 1
Standart—
Maydonmessages[].roleTurstringTalabMajburiyQiymatlar va cheklovlar
Namunalar: system, user, assistant, tool, function
Shartlar: Bu rollar manba kodining moslik turlarida ochiq ifodalangan; aniq rollar to‘plami har bir modelga xos bo‘lib qoladi.
Modelga bogʻliq
Standart—
Maydonmessages[].contentTurstring|content_part[]|nullTalabIxtiyoriyQiymatlar va cheklovlarStandart—
Maydonmessages[].tool_callsTurtool_call[]TalabIxtiyoriyQiymatlar va cheklovlarStandart—
Maydonmessages[].tool_call_idTurstringTalabIxtiyoriyQiymatlar va cheklovlar
Quyidagi holatda qo‘llanadi: role=tool; haqiqatan qaytarilgan IDdan foydalaning
Standart—
Maydonmessages[].nameTurstringTalabIxtiyoriyQiymatlar va cheklovlarStandart—
Maydonmessages[].reasoning_contentTurstringTalabIxtiyoriyQiymatlar va cheklovlar
Quyidagi holatda qo‘llanadi: Ushbu model foydalanganda, haqiqatan qaytarilgan fikrlash ma’lumotlarini keyingi so‘rovda qayta yuboring
Standart—
Maydonmessages[].reasoning_detailsTurobject|arrayTalabIxtiyoriyQiymatlar va cheklovlar
Modelga bogʻliq
Standart—
Maydonmax_tokensTurintegerTalabIxtiyoriyQiymatlar va cheklovlar
Eng kam: 1
Modelga bogʻliq
Standart—
Maydonmax_completion_tokensTurintegerTalabIxtiyoriyQiymatlar va cheklovlar
Eng kam: 1
Modelga bogʻliq
Standart—
MaydonstreamTurbooleanTalabIxtiyoriyQiymatlar va cheklovlarStandartfalse
Maydonstream_options.include_usageTurbooleanTalabIxtiyoriyQiymatlar va cheklovlar
Modelga bogʻliq
Standart—
MaydontemperatureTurnumberTalabIxtiyoriyQiymatlar va cheklovlar
Modelga bogʻliq
Standart—
Maydontop_pTurnumberTalabIxtiyoriyQiymatlar va cheklovlar
Modelga bogʻliq
Standart—
MaydonstopTurstring|string[]TalabIxtiyoriyQiymatlar va cheklovlar
Modelga bogʻliq
Standart—
MaydontoolsTurfunction_tool[]TalabIxtiyoriyQiymatlar va cheklovlar
Modelga bogʻliq
Standart—
Maydontools[].typeTurstringTalabIxtiyoriyQiymatlar va cheklovlar
Modelga bogʻliq
Standart—
Maydontools[].function.nameTurstringTalabMajburiyQiymatlar va cheklovlar
Quyidagi holatda qo‘llanadi: Funksiya vositasi taqdim etilgan
Standart—
Maydontools[].function.descriptionTurstringTalabIxtiyoriyQiymatlar va cheklovlarStandart—
Maydontools[].function.parametersTurJSON_schemaTalabIxtiyoriyQiymatlar va cheklovlarStandart—
Maydontool_choiceTurstring|objectTalabIxtiyoriyQiymatlar va cheklovlar
Modelga bogʻliq
Standart—
Maydonparallel_tool_callsTurbooleanTalabIxtiyoriyQiymatlar va cheklovlar
Modelga bogʻliq
Standart—
Maydonresponse_formatTurobjectTalabIxtiyoriyQiymatlar va cheklovlar
Modelga bogʻliq
Standart—
Maydonreasoning_effortTurstringTalabIxtiyoriyQiymatlar va cheklovlar
Modelga bogʻliq
Standart—
MaydonreasoningTurobjectTalabIxtiyoriyQiymatlar va cheklovlar
Modelga bogʻliq
Standart—
Maydonservice_tierTurstringTalabIxtiyoriyQiymatlar va cheklovlar
Modelga bogʻliq
Standart—
MaydoninstructionsTurstringTalabIxtiyoriyQiymatlar va cheklovlar
Moslik maydoni
Standart—
MaydonfunctionsTurfunction[]TalabIxtiyoriyQiymatlar va cheklovlar
Modelga bogʻliq
Standart—
Maydonfunction_callTurstring|objectTalabIxtiyoriyQiymatlar va cheklovlar
Modelga bogʻliq
Standart—
Maydonprompt_cache_optionsTurobjectTalabIxtiyoriyQiymatlar va cheklovlar
Modelga bogʻliq
Standart—
Kirish materiallari birikmalari

Matn · UTF8 matni

messages[].content

Matn + rasm

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

Usul parametrlari va hayot sikli
ParametrParametr talablari
Parametrmaterial_typesParametr talablaritext, image
ParametrrequiredParametr talablarimodel, messages
Parametroptional_controlsParametr talablarinull
Parametrcontent_typeParametr talablariapplication/json
Parametrtext_file_materialParametr talablariHaqiqiy UTF-8 kontenti matn sifatida kiritiladi; fayl IDlari/URLs uchun alohida aniq qo‘llab-quvvatlash kerak

Hayot sikli: exact retained published method

Metod tuzilishlari va IDlari aniq; yetkazib beruvchining imkoniyati so‘rovni qabul qilishga ruxsatdan alohida.

Tariflar

Ailoot usullari tariflari

Ailoot OpenAI ChatPOST /v1/chat/completions
Kirish
0,01 US$ / 1K
Chiqish
0,05 US$ / 1K
Keshdan o‘qish
0,00025 US$ / 1K
Keshga yozish
0,0125 US$ / 1K
Keshga yozish, 5 daqiqa
0,0125 US$ / 1K tokens
Keshga yozish, 1 soat
0,02 US$ / 1K tokens
web_search_call
0,01 US$ har chaqiruv uchun
Maks. chaqiruvlar web_search_call
8

Ailoot so‘rovdan oldin taxminiy summani band qiladi. Natijadan keyin o‘lchangan sarf asosidagi yakuniy to‘lovni yechadi. Oqimli javob bo‘yicha yakuniy hisob-kitob yakuniy sarf yozuviga asoslanadi. Summani band qilish va to‘lovni hisoblash tartibi →

Ma’lumot uchun tarif tafsilotlari

Modelning ma’lumot jadvallari usul tanlash, narx hisobi yoki to‘lovlarni o‘zgartirmaydi. Amaldagi to‘lovlar tanlangan Ailoot usuli tariflari bo‘yicha hisoblanadi.

Modelning ma’lumot jadvallari

Sozlamalar bo‘yicha narxlar

Har bir to‘lovni ko‘rsatilgan shartlarga moslang. Har bir muqobil sozlamalar to‘plami uchun bitta tarifdan foydalaning.

SozlamaTariflar jadvaliKontekst tokenlari soni bundan ko‘pKontekst tokenlari soni bundan oshmaydi, chegara kiradiTo‘lov
SozlamaOpenAI Chat · Tokenlar uchun asosiy tariflarTariflar jadvaliAsosiy tarifKontekst tokenlari soni bundan ko‘p—Kontekst tokenlari soni bundan oshmaydi, chegara kiradiYuqori chegara yo‘qTo‘lov
Kirish · Kirish tokenlari $0.02 / 1K token
Chiqish · Chiqish tokenlari $0.1 / 1K token
Kirish · Keshdan o‘qish $0.0005 / 1K token
Kirish · Keshga yozish $0.025 / 1K token
Kirish · Keshga yozish, 1 soat $0.04 / 1K token
SozlamaOpenAI Chat · So‘rov uzunligi bo‘yicha 1-darajaTariflar jadvali—Kontekst tokenlari soni bundan ko‘p0Kontekst tokenlari soni bundan oshmaydi, chegara kiradiYuqori chegara yo‘qTo‘lov
Kirish · Kirish tokenlari $0.02 / 1K token
Chiqish · Chiqish tokenlari $0.1 / 1K token
Kirish · Keshdan o‘qish $0.0005 / 1K token
Kirish · Keshga yozish $0.025 / 1K token
Kirish · Keshga yozish, 1 soat $0.04 / 1K token
SozlamaAnthropic Messages · Tokenlar uchun asosiy tariflarTariflar jadvaliAsosiy tarifKontekst tokenlari soni bundan ko‘p—Kontekst tokenlari soni bundan oshmaydi, chegara kiradiYuqori chegara yo‘qTo‘lov
Kirish · Kirish tokenlari $0.02 / 1K token
Chiqish · Chiqish tokenlari $0.1 / 1K token
Kirish · Keshdan o‘qish $0.0005 / 1K token
Kirish · Keshga yozish $0.025 / 1K token
Kirish · Keshga yozish, 1 soat $0.04 / 1K token
SozlamaAnthropic Messages · So‘rov uzunligi bo‘yicha 1-darajaTariflar jadvali—Kontekst tokenlari soni bundan ko‘p0Kontekst tokenlari soni bundan oshmaydi, chegara kiradiYuqori chegara yo‘qTo‘lov
Kirish · Kirish tokenlari $0.02 / 1K token
Chiqish · Chiqish tokenlari $0.1 / 1K token
Kirish · Keshdan o‘qish $0.0005 / 1K token
Kirish · Keshga yozish $0.025 / 1K token
Kirish · Keshga yozish, 1 soat $0.04 / 1K token

So‘rov namunalari

Ailoot · OpenAI Chat

Matn namunasiKirish, rasmPython SDKNode.js SDKPython oqimi
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
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
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"))
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);
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")

Natijalarni olish va saqlash

Ailoot · OpenAI Chat

json yoki SSE

Barcha tayyor natijalarni saqlash

Qaytarilgan har bir to‘liq javob, fayl va kontent qismini saqlang.

Har bir javob variantini va uning kontenti, vosita chaqiruvlari hamda fikrlash ma’lumotlarini saqlang. SSEda o‘zgarish qismlarini variant va vosita indeksi bo‘yicha yig‘ing, yakuniy tugash sababi va sarf ma’lumotlarini saqlang.

Asl javobni tekshirish kerak bo‘lsa

So‘rov va javob IDlari hamda sarlavhalarini saqlang. Matn vazifasini olish uchun umumiy URL taqdim etilmagan.

Javob maydonlari
MaydonTur
Maydonchoices[].indexTurinteger
Maydonchoices[].message.contentTurstring|null
Maydonchoices[].message.tool_callsTurtool_call[]
Maydonchoices[].message.reasoning_contentTurstring
Maydonchoices[].message.reasoning_detailsTurobject|array
Maydonchoices[].finish_reasonTurstring|null
MaydonusageTurobject
Xatolar va keyingi qadamlar
JavobShartKeyingi qadam
Javob400 · invalid_request_errorShartMajburiy maydonlar, material ifodasi yoki parametr qiymati noto‘g‘riKeyingi qadamYangi yaratish so‘rovidan oldin ko‘rsatilgan maydonlarni tuzating.

Taxalluslar

Model taxalluslari

Ailoot claude-fable-5-1, claude, claude-fable, claude-fable-latest, claude-latest
Ailoot Ultra anthropic/claude-fable-5.1, ~anthropic/claude-fable-latest

Usul yo‘llari taxalluslari

Yuqorida ko‘rsatilgan usul yo‘llaridan foydalaning.

Chaqirish uchun tegishli ID lar

anthropic/claude-fable-5.1, claude, claude-fable, claude-fable-latest, claude-latest, ~anthropic/claude-fable-latest, claude-fable-5-1

Ailoot · Anthropic Messages POST /v1/messages claude

claude

Anthropic /claude
Model ID
  • claude-fable-5-1
  • claude
  • claude-fable
  • claude-fable-latest
  • claude-latest

Boshlash

Claude Fable 5.1 murakkab tadqiqotlar, koddagi yirik o‘zgarishlar va davomli professional tahlil uchun mo‘ljallangan. Katta kontekstdagi ma’lumotlarni bog‘laydi hamda matn va batafsil tasvirlar bilan ishlaydi.

Qabul qilinadigan kirish ma’lumotlari
Matn · Rasmlar
Natijalar
Matn

Ailoot da mavjud · kirish ma’lumotlari va usullar

Ailoot · Anthropic Messages POST /v1/messages
Kirish
text, image
Chiqish
text
Kontekst
1 000 000 tokens
Eng katta chiqish
131 072 tokens
Chiqish formati
json or SSE
MaydonTurTalabQiymatlar va cheklovlarStandart
MaydonmodelTurstringTalabMajburiyQiymatlar va cheklovlar
claude
Standart—
MaydonmessagesTurmessage[]TalabMajburiyQiymatlar va cheklovlar
Elementlarning eng kam soni: 1
Standart—
Maydonmessages[].roleTurstringTalabMajburiyQiymatlar va cheklovlar
user, assistant
Standart—
Maydonmessages[].contentTurstring|content_block[]TalabMajburiyQiymatlar va cheklovlarStandart—
MaydonsystemTurstring|content_block[]TalabIxtiyoriyQiymatlar va cheklovlarStandart—
Maydonmax_tokensTurintegerTalabMajburiyQiymatlar va cheklovlar
Eng kam: 1
Cheklov qo‘llanadigan obyekt: Tanlangan model yoki kartaning aniq yuqori chegarasi
Standart—
MaydonstreamTurbooleanTalabIxtiyoriyQiymatlar va cheklovlarStandartfalse
MaydontemperatureTurnumberTalabIxtiyoriyQiymatlar va cheklovlar
Modelga bogʻliq
Standart—
Maydontop_pTurnumberTalabIxtiyoriyQiymatlar va cheklovlar
Modelga bogʻliq
Standart—
Maydonstop_sequencesTurstring[]TalabIxtiyoriyQiymatlar va cheklovlar
Modelga bogʻliq
Standart—
MaydontoolsTurtool[]TalabIxtiyoriyQiymatlar va cheklovlar
Modelga bogʻliq
Standart—
Maydontools[].nameTurstringTalabIxtiyoriyQiymatlar va cheklovlar
Quyidagi holatda qo‘llanadi: tool supplied
Standart—
Maydontools[].descriptionTurstringTalabIxtiyoriyQiymatlar va cheklovlarStandart—
Maydontools[].input_schemaTurJSON_schemaTalabIxtiyoriyQiymatlar va cheklovlarStandart—
Maydontool_choiceTurobjectTalabIxtiyoriyQiymatlar va cheklovlar
Modelga bogʻliq
Standart—
Maydonthinking.typeTurstringTalabIxtiyoriyQiymatlar va cheklovlar
Modelga bogʻliq
Standart—
Maydonthinking.budget_tokensTurintegerTalabIxtiyoriyQiymatlar va cheklovlar
Modelga bogʻliq
Standart—
Maydonoutput_config.effortTurstringTalabIxtiyoriyQiymatlar va cheklovlar
Modelga bogʻliq
Standart—
MaydonmetadataTurobjectTalabIxtiyoriyQiymatlar va cheklovlarStandart—
Maydoncache_controlTurobjectTalabIxtiyoriyQiymatlar va cheklovlar
Modelga bogʻliq
Standart—
Kirish materiallari birikmalari

Matn · UTF8 matni

messages[].content or type=text block

Matn + rasm

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

Usul parametrlari va hayot sikli
ParametrParametr talablari
Parametrmaterial_typesParametr talablaritext, image
ParametrrequiredParametr talablarimodel, messages, max_tokens
Parametroptional_controlsParametr talablarinull
Parametrcontent_typeParametr talablariapplication/json
Parametrtext_file_materialParametr talablariHaqiqiy UTF-8 kontenti matn sifatida kiritiladi; fayl IDlari/URLs uchun alohida aniq qo‘llab-quvvatlash kerak

Hayot sikli: exact retained published method

Metod tuzilishlari va IDlari aniq; yetkazib beruvchining imkoniyati so‘rovni qabul qilishga ruxsatdan alohida.

Tariflar

Ailoot usullari tariflari

Ailoot Anthropic MessagesPOST /v1/messages
Kirish
0,01 US$ / 1K
Chiqish
0,05 US$ / 1K
Keshdan o‘qish
0,00025 US$ / 1K
Keshga yozish
0,0125 US$ / 1K
Keshga yozish, 5 daqiqa
0,0125 US$ / 1K tokens
Keshga yozish, 1 soat
0,02 US$ / 1K tokens
web_search_call
0,01 US$ har chaqiruv uchun
Maks. chaqiruvlar web_search_call
8

Ailoot so‘rovdan oldin taxminiy summani band qiladi. Natijadan keyin o‘lchangan sarf asosidagi yakuniy to‘lovni yechadi. Oqimli javob bo‘yicha yakuniy hisob-kitob yakuniy sarf yozuviga asoslanadi. Summani band qilish va to‘lovni hisoblash tartibi →

Ma’lumot uchun tarif tafsilotlari

Modelning ma’lumot jadvallari usul tanlash, narx hisobi yoki to‘lovlarni o‘zgartirmaydi. Amaldagi to‘lovlar tanlangan Ailoot usuli tariflari bo‘yicha hisoblanadi.

Modelning ma’lumot jadvallari

Sozlamalar bo‘yicha narxlar

Har bir to‘lovni ko‘rsatilgan shartlarga moslang. Har bir muqobil sozlamalar to‘plami uchun bitta tarifdan foydalaning.

SozlamaTariflar jadvaliKontekst tokenlari soni bundan ko‘pKontekst tokenlari soni bundan oshmaydi, chegara kiradiTo‘lov
SozlamaOpenAI Chat · Tokenlar uchun asosiy tariflarTariflar jadvaliAsosiy tarifKontekst tokenlari soni bundan ko‘p—Kontekst tokenlari soni bundan oshmaydi, chegara kiradiYuqori chegara yo‘qTo‘lov
Kirish · Kirish tokenlari $0.02 / 1K token
Chiqish · Chiqish tokenlari $0.1 / 1K token
Kirish · Keshdan o‘qish $0.0005 / 1K token
Kirish · Keshga yozish $0.025 / 1K token
Kirish · Keshga yozish, 1 soat $0.04 / 1K token
SozlamaOpenAI Chat · So‘rov uzunligi bo‘yicha 1-darajaTariflar jadvali—Kontekst tokenlari soni bundan ko‘p0Kontekst tokenlari soni bundan oshmaydi, chegara kiradiYuqori chegara yo‘qTo‘lov
Kirish · Kirish tokenlari $0.02 / 1K token
Chiqish · Chiqish tokenlari $0.1 / 1K token
Kirish · Keshdan o‘qish $0.0005 / 1K token
Kirish · Keshga yozish $0.025 / 1K token
Kirish · Keshga yozish, 1 soat $0.04 / 1K token
SozlamaAnthropic Messages · Tokenlar uchun asosiy tariflarTariflar jadvaliAsosiy tarifKontekst tokenlari soni bundan ko‘p—Kontekst tokenlari soni bundan oshmaydi, chegara kiradiYuqori chegara yo‘qTo‘lov
Kirish · Kirish tokenlari $0.02 / 1K token
Chiqish · Chiqish tokenlari $0.1 / 1K token
Kirish · Keshdan o‘qish $0.0005 / 1K token
Kirish · Keshga yozish $0.025 / 1K token
Kirish · Keshga yozish, 1 soat $0.04 / 1K token
SozlamaAnthropic Messages · So‘rov uzunligi bo‘yicha 1-darajaTariflar jadvali—Kontekst tokenlari soni bundan ko‘p0Kontekst tokenlari soni bundan oshmaydi, chegara kiradiYuqori chegara yo‘qTo‘lov
Kirish · Kirish tokenlari $0.02 / 1K token
Chiqish · Chiqish tokenlari $0.1 / 1K token
Kirish · Keshdan o‘qish $0.0005 / 1K token
Kirish · Keshga yozish $0.025 / 1K token
Kirish · Keshga yozish, 1 soat $0.04 / 1K token

So‘rov namunalari

Ailoot · Anthropic Messages

Matn namunasiKirish, rasmPython SDKNode.js SDKPython oqimi
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
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
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"))
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);
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")

Natijalarni olish va saqlash

Ailoot · Anthropic Messages

json or SSE

Barcha tayyor natijalarni saqlash

Qaytarilgan har bir to‘liq javob, fayl va kontent qismini saqlang.

Barcha kontent bloklari, fikrlash imzolari va haqiqiy vosita ishlatish IDlarini saqlang. SSE bloklarining barcha o‘zgarish qismlarini yig‘ing; birinchi matn bloki to‘liq chiqish emas.

Asl javobni tekshirish kerak bo‘lsa

So‘rov va javob IDlari hamda sarlavhalarini saqlang. Matn vazifasini olish uchun umumiy URL taqdim etilmagan.

Javob maydonlari
MaydonTur
MaydonidTurstring
MaydonmodelTurstring
Maydoncontent[]Turtext|thinking|tool_use|other content block
Maydonstop_reasonTurstring|null
MaydonusageTurobject
Xatolar va keyingi qadamlar
JavobShartKeyingi qadam
Javob400 · invalid_request_errorShartMajburiy maydonlar, material ifodasi yoki parametr qiymati noto‘g‘riKeyingi qadamYangi yaratish so‘rovidan oldin ko‘rsatilgan maydonlarni tuzating.

Taxalluslar

Model taxalluslari

Ailoot claude-fable-5-1, claude, claude-fable, claude-fable-latest, claude-latest
Ailoot Ultra anthropic/claude-fable-5.1, ~anthropic/claude-fable-latest

Usul yo‘llari taxalluslari

Yuqorida ko‘rsatilgan usul yo‘llaridan foydalaning.

Chaqirish uchun tegishli ID lar

anthropic/claude-fable-5.1, claude, claude-fable, claude-fable-latest, claude-latest, ~anthropic/claude-fable-latest, claude-fable-5-1

Ailoot · OpenAI Responses POST /v1/responses claude

claude

Anthropic /claude
Model ID
  • claude-fable-5-1
  • claude
  • claude-latest

Boshlash

Claude Fable 5.1 murakkab tadqiqotlar, koddagi yirik o‘zgarishlar va davomli professional tahlil uchun mo‘ljallangan. Katta kontekstdagi ma’lumotlarni bog‘laydi hamda matn va batafsil tasvirlar bilan ishlaydi.

Qabul qilinadigan kirish ma’lumotlari
Matn · Rasmlar
Natijalar
Matn

Ailoot da mavjud · kirish ma’lumotlari va usullar

Ailoot · OpenAI Responses POST /v1/responses
Kirish
text, image
Chiqish
text
Kontekst
1 000 000 tokens
Eng katta chiqish
131 072 tokens
Chiqish formati
json or SSE
MaydonTurTalabQiymatlar va cheklovlarStandart
MaydonmodelTurstringTalabMajburiyQiymatlar va cheklovlar
claude
Standart—
MaydoninputTurstring|input_item[]TalabMajburiyQiymatlar va cheklovlarStandart—
MaydoninstructionsTurstringTalabIxtiyoriyQiymatlar va cheklovlarStandart—
Maydoninput[].typeTurstringTalabIxtiyoriyQiymatlar va cheklovlar
message, reasoning, function_call, function_call_output
Standart—
Maydoninput[].contentTurstring|content_part[]TalabIxtiyoriyQiymatlar va cheklovlarStandart—
Maydoninput[].call_idTurstringTalabIxtiyoriyQiymatlar va cheklovlar
Quyidagi holatda qo‘llanadi: function_call_output; haqiqatan qaytarilgan call_id qiymatini saqlang
Standart—
Maydoninput[].outputTurstring|content_part[]TalabIxtiyoriyQiymatlar va cheklovlar
Quyidagi holatda qo‘llanadi: function_call_output
Standart—
Maydonmax_output_tokensTurintegerTalabIxtiyoriyQiymatlar va cheklovlar
Eng kam: 1
Modelga bogʻliq
Standart—
MaydonstreamTurbooleanTalabIxtiyoriyQiymatlar va cheklovlarStandartfalse
MaydontemperatureTurnumberTalabIxtiyoriyQiymatlar va cheklovlar
Modelga bogʻliq
Standart—
Maydontop_pTurnumberTalabIxtiyoriyQiymatlar va cheklovlar
Modelga bogʻliq
Standart—
MaydontoolsTurtool[]TalabIxtiyoriyQiymatlar va cheklovlar
Modelga bogʻliq
Standart—
Maydontool_choiceTurstring|objectTalabIxtiyoriyQiymatlar va cheklovlar
Modelga bogʻliq
Standart—
Maydonparallel_tool_callsTurbooleanTalabIxtiyoriyQiymatlar va cheklovlar
Modelga bogʻliq
Standart—
Maydonreasoning.effortTurstringTalabIxtiyoriyQiymatlar va cheklovlar
Modelga bogʻliq
Standart—
Maydonreasoning.summaryTurstringTalabIxtiyoriyQiymatlar va cheklovlar
Modelga bogʻliq
Standart—
Maydontext.formatTurobjectTalabIxtiyoriyQiymatlar va cheklovlar
Modelga bogʻliq
Standart—
Maydontext.verbosityTurstringTalabIxtiyoriyQiymatlar va cheklovlar
Modelga bogʻliq
Standart—
MaydonincludeTurstring[]TalabIxtiyoriyQiymatlar va cheklovlar
Modelga bogʻliq
Standart—
MaydonstoreTurbooleanTalabIxtiyoriyQiymatlar va cheklovlar
Modelga bogʻliq
Standart—
Maydonprevious_response_idTurstringTalabIxtiyoriyQiymatlar va cheklovlar
ID talabi: Faqat qo‘llab-quvvatlanadigan davom ettirishdan olingan haqiqiy javob IDsi
Modelga bogʻliq
Standart—
Maydonservice_tierTurstringTalabIxtiyoriyQiymatlar va cheklovlar
Modelga bogʻliq
Standart—
Maydonprompt_cache_keyTurstringTalabIxtiyoriyQiymatlar va cheklovlar
Modelga bogʻliq
Standart—
Maydonprompt_cache_optionsTurobjectTalabIxtiyoriyQiymatlar va cheklovlar
Modelga bogʻliq
Standart—
Kirish materiallari birikmalari

Matn · UTF8 matni

input text or input_text part

Matn + rasm

{type:input_image,image_url}

Usul parametrlari va hayot sikli
ParametrParametr talablari
Parametrmaterial_typesParametr talablaritext, image
ParametrrequiredParametr talablarimodel, input
Parametroptional_controlsParametr talablarinull
Parametrcontent_typeParametr talablariapplication/json
Parametrtext_file_materialParametr talablariHaqiqiy UTF-8 kontenti matn sifatida kiritiladi; fayl IDlari/URLs uchun alohida aniq qo‘llab-quvvatlash kerak

Hayot sikli: exact retained published method

Metod tuzilishlari va IDlari aniq; yetkazib beruvchining imkoniyati so‘rovni qabul qilishga ruxsatdan alohida.

Tariflar

Ailoot usullari tariflari

Ailoot OpenAI ResponsesPOST /v1/responses
Kirish
0,01 US$ / 1K
Chiqish
0,05 US$ / 1K
Keshdan o‘qish
0,00025 US$ / 1K
Keshga yozish
0,0125 US$ / 1K
Keshga yozish, 5 daqiqa
0,0125 US$ / 1K tokens
Keshga yozish, 1 soat
0,02 US$ / 1K tokens
web_search_call
0,01 US$ har chaqiruv uchun
Maks. chaqiruvlar web_search_call
8

Ailoot so‘rovdan oldin taxminiy summani band qiladi. Natijadan keyin o‘lchangan sarf asosidagi yakuniy to‘lovni yechadi. Oqimli javob bo‘yicha yakuniy hisob-kitob yakuniy sarf yozuviga asoslanadi. Summani band qilish va to‘lovni hisoblash tartibi →

Ma’lumot uchun tarif tafsilotlari

Modelning ma’lumot jadvallari usul tanlash, narx hisobi yoki to‘lovlarni o‘zgartirmaydi. Amaldagi to‘lovlar tanlangan Ailoot usuli tariflari bo‘yicha hisoblanadi.

Modelning ma’lumot jadvallari

Sozlamalar bo‘yicha narxlar

Har bir to‘lovni ko‘rsatilgan shartlarga moslang. Har bir muqobil sozlamalar to‘plami uchun bitta tarifdan foydalaning.

SozlamaTariflar jadvaliKontekst tokenlari soni bundan ko‘pKontekst tokenlari soni bundan oshmaydi, chegara kiradiTo‘lov
SozlamaOpenAI Chat · Tokenlar uchun asosiy tariflarTariflar jadvaliAsosiy tarifKontekst tokenlari soni bundan ko‘p—Kontekst tokenlari soni bundan oshmaydi, chegara kiradiYuqori chegara yo‘qTo‘lov
Kirish · Kirish tokenlari $0.02 / 1K token
Chiqish · Chiqish tokenlari $0.1 / 1K token
Kirish · Keshdan o‘qish $0.0005 / 1K token
Kirish · Keshga yozish $0.025 / 1K token
Kirish · Keshga yozish, 1 soat $0.04 / 1K token
SozlamaOpenAI Chat · So‘rov uzunligi bo‘yicha 1-darajaTariflar jadvali—Kontekst tokenlari soni bundan ko‘p0Kontekst tokenlari soni bundan oshmaydi, chegara kiradiYuqori chegara yo‘qTo‘lov
Kirish · Kirish tokenlari $0.02 / 1K token
Chiqish · Chiqish tokenlari $0.1 / 1K token
Kirish · Keshdan o‘qish $0.0005 / 1K token
Kirish · Keshga yozish $0.025 / 1K token
Kirish · Keshga yozish, 1 soat $0.04 / 1K token
SozlamaAnthropic Messages · Tokenlar uchun asosiy tariflarTariflar jadvaliAsosiy tarifKontekst tokenlari soni bundan ko‘p—Kontekst tokenlari soni bundan oshmaydi, chegara kiradiYuqori chegara yo‘qTo‘lov
Kirish · Kirish tokenlari $0.02 / 1K token
Chiqish · Chiqish tokenlari $0.1 / 1K token
Kirish · Keshdan o‘qish $0.0005 / 1K token
Kirish · Keshga yozish $0.025 / 1K token
Kirish · Keshga yozish, 1 soat $0.04 / 1K token
SozlamaAnthropic Messages · So‘rov uzunligi bo‘yicha 1-darajaTariflar jadvali—Kontekst tokenlari soni bundan ko‘p0Kontekst tokenlari soni bundan oshmaydi, chegara kiradiYuqori chegara yo‘qTo‘lov
Kirish · Kirish tokenlari $0.02 / 1K token
Chiqish · Chiqish tokenlari $0.1 / 1K token
Kirish · Keshdan o‘qish $0.0005 / 1K token
Kirish · Keshga yozish $0.025 / 1K token
Kirish · Keshga yozish, 1 soat $0.04 / 1K token

So‘rov namunalari

Ailoot · OpenAI Responses

Matn namunasiKirish, rasmPython SDKNode.js SDKPython oqimi
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
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
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"))
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);
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")

Natijalarni olish va saqlash

Ailoot · OpenAI Responses

json or SSE

Barcha tayyor natijalarni saqlash

Qaytarilgan har bir to‘liq javob, fayl va kontent qismini saqlang.

Har bir chiqish elementi va kontent qismini, funksiyaning haqiqiy call_id qiymatini, shifrlangan fikrlash ma’lumotlari va sarfni saqlang. Oqimli uzatishda hodisa va elementning to‘liq identifikatsiyasini saqlang.

Asl javobni tekshirish kerak bo‘lsa

So‘rov va javob IDlari hamda sarlavhalarini saqlang. Matn vazifasini olish uchun umumiy URL taqdim etilmagan.

Javob maydonlari
MaydonTur
MaydonidTurstring
MaydonstatusTurstring
Maydonoutput[]Turmessage|reasoning|function_call|other item
Maydonoutput[].content[]Turcontent part
MaydonusageTurobject
Xatolar va keyingi qadamlar
JavobShartKeyingi qadam
Javob400 · invalid_request_errorShartMajburiy maydonlar, material ifodasi yoki parametr qiymati noto‘g‘riKeyingi qadamYangi yaratish so‘rovidan oldin ko‘rsatilgan maydonlarni tuzating.

Taxalluslar

Model taxalluslari

Ailoot claude-fable-5-1, claude, claude-fable, claude-fable-latest, claude-latest
Ailoot Ultra anthropic/claude-fable-5.1, ~anthropic/claude-fable-latest

Usul yo‘llari taxalluslari

Yuqorida ko‘rsatilgan usul yo‘llaridan foydalaning.

Chaqirish uchun tegishli ID lar

anthropic/claude-fable-5.1, claude, claude-fable, claude-fable-latest, claude-latest, ~anthropic/claude-fable-latest, claude-fable-5-1

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

claude

Anthropic /claude
Model ID
  • claude-fable-5-1
  • claude
  • claude-latest

Boshlash

Claude Fable 5.1 murakkab tadqiqotlar, koddagi yirik o‘zgarishlar va davomli professional tahlil uchun mo‘ljallangan. Katta kontekstdagi ma’lumotlarni bog‘laydi hamda matn va batafsil tasvirlar bilan ishlaydi.

Qabul qilinadigan kirish ma’lumotlari
Matn · Rasmlar
Natijalar
Matn

Ailoot da mavjud · kirish ma’lumotlari va usullar

Ailoot · OpenAI Chat POST /v1/chat/completions
Kirish
text, image
Chiqish
text
Kontekst
1 000 000 tokens
Eng katta chiqish
131 072 tokens
Chiqish formati
json or SSE
MaydonTurTalabQiymatlar va cheklovlarStandart
MaydonmodelTurstringTalabMajburiyQiymatlar va cheklovlar
claude
Standart—
MaydonmessagesTurmessage[]TalabMajburiyQiymatlar va cheklovlar
Elementlarning eng kam soni: 1
Standart—
Maydonmessages[].roleTurstringTalabMajburiyQiymatlar va cheklovlar
Namunalar: system, user, assistant, tool, function
Shartlar: Bu rollar manba kodining moslik turlarida ochiq ifodalangan; aniq rollar to‘plami har bir modelga xos bo‘lib qoladi.
Modelga bogʻliq
Standart—
Maydonmessages[].contentTurstring|content_part[]|nullTalabIxtiyoriyQiymatlar va cheklovlarStandart—
Maydonmessages[].tool_callsTurtool_call[]TalabIxtiyoriyQiymatlar va cheklovlarStandart—
Maydonmessages[].tool_call_idTurstringTalabIxtiyoriyQiymatlar va cheklovlar
Quyidagi holatda qo‘llanadi: role=tool; haqiqatan qaytarilgan IDdan foydalaning
Standart—
Maydonmessages[].nameTurstringTalabIxtiyoriyQiymatlar va cheklovlarStandart—
Maydonmessages[].reasoning_contentTurstringTalabIxtiyoriyQiymatlar va cheklovlar
Quyidagi holatda qo‘llanadi: Ushbu model foydalanganda, haqiqatan qaytarilgan fikrlash ma’lumotlarini keyingi so‘rovda qayta yuboring
Standart—
Maydonmessages[].reasoning_detailsTurobject|arrayTalabIxtiyoriyQiymatlar va cheklovlar
Modelga bogʻliq
Standart—
Maydonmax_tokensTurintegerTalabIxtiyoriyQiymatlar va cheklovlar
Eng kam: 1
Modelga bogʻliq
Standart—
Maydonmax_completion_tokensTurintegerTalabIxtiyoriyQiymatlar va cheklovlar
Eng kam: 1
Modelga bogʻliq
Standart—
MaydonstreamTurbooleanTalabIxtiyoriyQiymatlar va cheklovlarStandartfalse
Maydonstream_options.include_usageTurbooleanTalabIxtiyoriyQiymatlar va cheklovlar
Modelga bogʻliq
Standart—
MaydontemperatureTurnumberTalabIxtiyoriyQiymatlar va cheklovlar
Modelga bogʻliq
Standart—
Maydontop_pTurnumberTalabIxtiyoriyQiymatlar va cheklovlar
Modelga bogʻliq
Standart—
MaydonstopTurstring|string[]TalabIxtiyoriyQiymatlar va cheklovlar
Modelga bogʻliq
Standart—
MaydontoolsTurfunction_tool[]TalabIxtiyoriyQiymatlar va cheklovlar
Modelga bogʻliq
Standart—
Maydontools[].typeTurstringTalabIxtiyoriyQiymatlar va cheklovlar
Modelga bogʻliq
Standart—
Maydontools[].function.nameTurstringTalabMajburiyQiymatlar va cheklovlar
Quyidagi holatda qo‘llanadi: function tool supplied
Standart—
Maydontools[].function.descriptionTurstringTalabIxtiyoriyQiymatlar va cheklovlarStandart—
Maydontools[].function.parametersTurJSON_schemaTalabIxtiyoriyQiymatlar va cheklovlarStandart—
Maydontool_choiceTurstring|objectTalabIxtiyoriyQiymatlar va cheklovlar
Modelga bogʻliq
Standart—
Maydonparallel_tool_callsTurbooleanTalabIxtiyoriyQiymatlar va cheklovlar
Modelga bogʻliq
Standart—
Maydonresponse_formatTurobjectTalabIxtiyoriyQiymatlar va cheklovlar
Modelga bogʻliq
Standart—
Maydonreasoning_effortTurstringTalabIxtiyoriyQiymatlar va cheklovlar
Modelga bogʻliq
Standart—
MaydonreasoningTurobjectTalabIxtiyoriyQiymatlar va cheklovlar
Modelga bogʻliq
Standart—
Maydonservice_tierTurstringTalabIxtiyoriyQiymatlar va cheklovlar
Modelga bogʻliq
Standart—
MaydoninstructionsTurstringTalabIxtiyoriyQiymatlar va cheklovlar
Moslik maydoni
Standart—
MaydonfunctionsTurfunction[]TalabIxtiyoriyQiymatlar va cheklovlar
Modelga bogʻliq
Standart—
Maydonfunction_callTurstring|objectTalabIxtiyoriyQiymatlar va cheklovlar
Modelga bogʻliq
Standart—
Maydonprompt_cache_optionsTurobjectTalabIxtiyoriyQiymatlar va cheklovlar
Modelga bogʻliq
Standart—
Kirish materiallari birikmalari

Matn · UTF8 matni

messages[].content

Matn + rasm

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

Usul parametrlari va hayot sikli
ParametrParametr talablari
Parametrmaterial_typesParametr talablaritext, image
ParametrrequiredParametr talablarimodel, messages
Parametroptional_controlsParametr talablarinull
Parametrcontent_typeParametr talablariapplication/json
Parametrtext_file_materialParametr talablariHaqiqiy UTF-8 kontenti matn sifatida kiritiladi; fayl IDlari/URLs uchun alohida aniq qo‘llab-quvvatlash kerak

Hayot sikli: exact retained published method

Metod tuzilishlari va IDlari aniq; yetkazib beruvchining imkoniyati so‘rovni qabul qilishga ruxsatdan alohida.

Tariflar

Ailoot usullari tariflari

Ailoot OpenAI ChatPOST /v1/chat/completions
Kirish
0,01 US$ / 1K
Chiqish
0,05 US$ / 1K
Keshdan o‘qish
0,00025 US$ / 1K
Keshga yozish
0,0125 US$ / 1K
Keshga yozish, 5 daqiqa
0,0125 US$ / 1K tokens
Keshga yozish, 1 soat
0,02 US$ / 1K tokens
web_search_call
0,01 US$ har chaqiruv uchun
Maks. chaqiruvlar web_search_call
8

Ailoot so‘rovdan oldin taxminiy summani band qiladi. Natijadan keyin o‘lchangan sarf asosidagi yakuniy to‘lovni yechadi. Oqimli javob bo‘yicha yakuniy hisob-kitob yakuniy sarf yozuviga asoslanadi. Summani band qilish va to‘lovni hisoblash tartibi →

Ma’lumot uchun tarif tafsilotlari

Modelning ma’lumot jadvallari usul tanlash, narx hisobi yoki to‘lovlarni o‘zgartirmaydi. Amaldagi to‘lovlar tanlangan Ailoot usuli tariflari bo‘yicha hisoblanadi.

Modelning ma’lumot jadvallari

Sozlamalar bo‘yicha narxlar

Har bir to‘lovni ko‘rsatilgan shartlarga moslang. Har bir muqobil sozlamalar to‘plami uchun bitta tarifdan foydalaning.

SozlamaTariflar jadvaliKontekst tokenlari soni bundan ko‘pKontekst tokenlari soni bundan oshmaydi, chegara kiradiTo‘lov
SozlamaOpenAI Chat · Tokenlar uchun asosiy tariflarTariflar jadvaliAsosiy tarifKontekst tokenlari soni bundan ko‘p—Kontekst tokenlari soni bundan oshmaydi, chegara kiradiYuqori chegara yo‘qTo‘lov
Kirish · Kirish tokenlari $0.02 / 1K token
Chiqish · Chiqish tokenlari $0.1 / 1K token
Kirish · Keshdan o‘qish $0.0005 / 1K token
Kirish · Keshga yozish $0.025 / 1K token
Kirish · Keshga yozish, 1 soat $0.04 / 1K token
SozlamaOpenAI Chat · So‘rov uzunligi bo‘yicha 1-darajaTariflar jadvali—Kontekst tokenlari soni bundan ko‘p0Kontekst tokenlari soni bundan oshmaydi, chegara kiradiYuqori chegara yo‘qTo‘lov
Kirish · Kirish tokenlari $0.02 / 1K token
Chiqish · Chiqish tokenlari $0.1 / 1K token
Kirish · Keshdan o‘qish $0.0005 / 1K token
Kirish · Keshga yozish $0.025 / 1K token
Kirish · Keshga yozish, 1 soat $0.04 / 1K token
SozlamaAnthropic Messages · Tokenlar uchun asosiy tariflarTariflar jadvaliAsosiy tarifKontekst tokenlari soni bundan ko‘p—Kontekst tokenlari soni bundan oshmaydi, chegara kiradiYuqori chegara yo‘qTo‘lov
Kirish · Kirish tokenlari $0.02 / 1K token
Chiqish · Chiqish tokenlari $0.1 / 1K token
Kirish · Keshdan o‘qish $0.0005 / 1K token
Kirish · Keshga yozish $0.025 / 1K token
Kirish · Keshga yozish, 1 soat $0.04 / 1K token
SozlamaAnthropic Messages · So‘rov uzunligi bo‘yicha 1-darajaTariflar jadvali—Kontekst tokenlari soni bundan ko‘p0Kontekst tokenlari soni bundan oshmaydi, chegara kiradiYuqori chegara yo‘qTo‘lov
Kirish · Kirish tokenlari $0.02 / 1K token
Chiqish · Chiqish tokenlari $0.1 / 1K token
Kirish · Keshdan o‘qish $0.0005 / 1K token
Kirish · Keshga yozish $0.025 / 1K token
Kirish · Keshga yozish, 1 soat $0.04 / 1K token

So‘rov namunalari

Ailoot · OpenAI Chat

Matn namunasiKirish, rasmPython SDKNode.js SDKPython oqimi
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
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
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"))
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);
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")

Natijalarni olish va saqlash

Ailoot · OpenAI Chat

json or SSE

Barcha tayyor natijalarni saqlash

Qaytarilgan har bir to‘liq javob, fayl va kontent qismini saqlang.

Har bir javob variantini va uning kontenti, vosita chaqiruvlari hamda fikrlash ma’lumotlarini saqlang. SSEda o‘zgarish qismlarini variant va vosita indeksi bo‘yicha yig‘ing, yakuniy tugash sababi va sarf ma’lumotlarini saqlang.

Asl javobni tekshirish kerak bo‘lsa

So‘rov va javob IDlari hamda sarlavhalarini saqlang. Matn vazifasini olish uchun umumiy URL taqdim etilmagan.

Javob maydonlari
MaydonTur
Maydonchoices[].indexTurinteger
Maydonchoices[].message.contentTurstring|null
Maydonchoices[].message.tool_callsTurtool_call[]
Maydonchoices[].message.reasoning_contentTurstring
Maydonchoices[].message.reasoning_detailsTurobject|array
Maydonchoices[].finish_reasonTurstring|null
MaydonusageTurobject
Xatolar va keyingi qadamlar
JavobShartKeyingi qadam
Javob400 · invalid_request_errorShartMajburiy maydonlar, material ifodasi yoki parametr qiymati noto‘g‘riKeyingi qadamYangi yaratish so‘rovidan oldin ko‘rsatilgan maydonlarni tuzating.

Taxalluslar

Model taxalluslari

Ailoot claude-fable-5-1, claude, claude-fable, claude-fable-latest, claude-latest
Ailoot Ultra anthropic/claude-fable-5.1, ~anthropic/claude-fable-latest

Usul yo‘llari taxalluslari

Yuqorida ko‘rsatilgan usul yo‘llaridan foydalaning.

Chaqirish uchun tegishli ID lar

anthropic/claude-fable-5.1, claude, claude-fable, claude-fable-latest, claude-latest, ~anthropic/claude-fable-latest, claude-fable-5-1

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

claude-fable

Anthropic /claude-fable
Model ID
  • claude-fable-5-1
  • claude
  • claude-fable
  • claude-fable-latest
  • claude-latest

Boshlash

Claude Fable 5.1 murakkab tadqiqotlar, koddagi yirik o‘zgarishlar va davomli professional tahlil uchun mo‘ljallangan. Katta kontekstdagi ma’lumotlarni bog‘laydi hamda matn va batafsil tasvirlar bilan ishlaydi.

Qabul qilinadigan kirish ma’lumotlari
Matn · Rasmlar
Natijalar
Matn

Ailoot da mavjud · kirish ma’lumotlari va usullar

Ailoot · Anthropic Messages POST /v1/messages
Kirish
text, image
Chiqish
text
Kontekst
1 000 000 tokens
Eng katta chiqish
131 072 tokens
Chiqish formati
json or SSE
MaydonTurTalabQiymatlar va cheklovlarStandart
MaydonmodelTurstringTalabMajburiyQiymatlar va cheklovlar
claude-fable
Standart—
MaydonmessagesTurmessage[]TalabMajburiyQiymatlar va cheklovlar
Elementlarning eng kam soni: 1
Standart—
Maydonmessages[].roleTurstringTalabMajburiyQiymatlar va cheklovlar
user, assistant
Standart—
Maydonmessages[].contentTurstring|content_block[]TalabMajburiyQiymatlar va cheklovlarStandart—
MaydonsystemTurstring|content_block[]TalabIxtiyoriyQiymatlar va cheklovlarStandart—
Maydonmax_tokensTurintegerTalabMajburiyQiymatlar va cheklovlar
Eng kam: 1
Cheklov qo‘llanadigan obyekt: Tanlangan model yoki kartaning aniq yuqori chegarasi
Standart—
MaydonstreamTurbooleanTalabIxtiyoriyQiymatlar va cheklovlarStandartfalse
MaydontemperatureTurnumberTalabIxtiyoriyQiymatlar va cheklovlar
Modelga bogʻliq
Standart—
Maydontop_pTurnumberTalabIxtiyoriyQiymatlar va cheklovlar
Modelga bogʻliq
Standart—
Maydonstop_sequencesTurstring[]TalabIxtiyoriyQiymatlar va cheklovlar
Modelga bogʻliq
Standart—
MaydontoolsTurtool[]TalabIxtiyoriyQiymatlar va cheklovlar
Modelga bogʻliq
Standart—
Maydontools[].nameTurstringTalabIxtiyoriyQiymatlar va cheklovlar
Quyidagi holatda qo‘llanadi: tool supplied
Standart—
Maydontools[].descriptionTurstringTalabIxtiyoriyQiymatlar va cheklovlarStandart—
Maydontools[].input_schemaTurJSON_schemaTalabIxtiyoriyQiymatlar va cheklovlarStandart—
Maydontool_choiceTurobjectTalabIxtiyoriyQiymatlar va cheklovlar
Modelga bogʻliq
Standart—
Maydonthinking.typeTurstringTalabIxtiyoriyQiymatlar va cheklovlar
Modelga bogʻliq
Standart—
Maydonthinking.budget_tokensTurintegerTalabIxtiyoriyQiymatlar va cheklovlar
Modelga bogʻliq
Standart—
Maydonoutput_config.effortTurstringTalabIxtiyoriyQiymatlar va cheklovlar
Modelga bogʻliq
Standart—
MaydonmetadataTurobjectTalabIxtiyoriyQiymatlar va cheklovlarStandart—
Maydoncache_controlTurobjectTalabIxtiyoriyQiymatlar va cheklovlar
Modelga bogʻliq
Standart—
Kirish materiallari birikmalari

Matn · UTF8 matni

messages[].content or type=text block

Matn + rasm

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

Usul parametrlari va hayot sikli
ParametrParametr talablari
Parametrmaterial_typesParametr talablaritext, image
ParametrrequiredParametr talablarimodel, messages, max_tokens
Parametroptional_controlsParametr talablarinull
Parametrcontent_typeParametr talablariapplication/json
Parametrtext_file_materialParametr talablariHaqiqiy UTF-8 kontenti matn sifatida kiritiladi; fayl IDlari/URLs uchun alohida aniq qo‘llab-quvvatlash kerak

Hayot sikli: exact retained published method

Metod tuzilishlari va IDlari aniq; yetkazib beruvchining imkoniyati so‘rovni qabul qilishga ruxsatdan alohida.

Tariflar

Ailoot usullari tariflari

Ailoot Anthropic MessagesPOST /v1/messages
Kirish
0,01 US$ / 1K
Chiqish
0,05 US$ / 1K
Keshdan o‘qish
0,00025 US$ / 1K
Keshga yozish
0,0125 US$ / 1K
Keshga yozish, 5 daqiqa
0,0125 US$ / 1K tokens
Keshga yozish, 1 soat
0,02 US$ / 1K tokens
web_search_call
0,01 US$ har chaqiruv uchun
Maks. chaqiruvlar web_search_call
8

Ailoot so‘rovdan oldin taxminiy summani band qiladi. Natijadan keyin o‘lchangan sarf asosidagi yakuniy to‘lovni yechadi. Oqimli javob bo‘yicha yakuniy hisob-kitob yakuniy sarf yozuviga asoslanadi. Summani band qilish va to‘lovni hisoblash tartibi →

Ma’lumot uchun tarif tafsilotlari

Modelning ma’lumot jadvallari usul tanlash, narx hisobi yoki to‘lovlarni o‘zgartirmaydi. Amaldagi to‘lovlar tanlangan Ailoot usuli tariflari bo‘yicha hisoblanadi.

Modelning ma’lumot jadvallari

Sozlamalar bo‘yicha narxlar

Har bir to‘lovni ko‘rsatilgan shartlarga moslang. Har bir muqobil sozlamalar to‘plami uchun bitta tarifdan foydalaning.

SozlamaTariflar jadvaliKontekst tokenlari soni bundan ko‘pKontekst tokenlari soni bundan oshmaydi, chegara kiradiTo‘lov
SozlamaOpenAI Chat · Tokenlar uchun asosiy tariflarTariflar jadvaliAsosiy tarifKontekst tokenlari soni bundan ko‘p—Kontekst tokenlari soni bundan oshmaydi, chegara kiradiYuqori chegara yo‘qTo‘lov
Kirish · Kirish tokenlari $0.02 / 1K token
Chiqish · Chiqish tokenlari $0.1 / 1K token
Kirish · Keshdan o‘qish $0.0005 / 1K token
Kirish · Keshga yozish $0.025 / 1K token
Kirish · Keshga yozish, 1 soat $0.04 / 1K token
SozlamaOpenAI Chat · So‘rov uzunligi bo‘yicha 1-darajaTariflar jadvali—Kontekst tokenlari soni bundan ko‘p0Kontekst tokenlari soni bundan oshmaydi, chegara kiradiYuqori chegara yo‘qTo‘lov
Kirish · Kirish tokenlari $0.02 / 1K token
Chiqish · Chiqish tokenlari $0.1 / 1K token
Kirish · Keshdan o‘qish $0.0005 / 1K token
Kirish · Keshga yozish $0.025 / 1K token
Kirish · Keshga yozish, 1 soat $0.04 / 1K token
SozlamaAnthropic Messages · Tokenlar uchun asosiy tariflarTariflar jadvaliAsosiy tarifKontekst tokenlari soni bundan ko‘p—Kontekst tokenlari soni bundan oshmaydi, chegara kiradiYuqori chegara yo‘qTo‘lov
Kirish · Kirish tokenlari $0.02 / 1K token
Chiqish · Chiqish tokenlari $0.1 / 1K token
Kirish · Keshdan o‘qish $0.0005 / 1K token
Kirish · Keshga yozish $0.025 / 1K token
Kirish · Keshga yozish, 1 soat $0.04 / 1K token
SozlamaAnthropic Messages · So‘rov uzunligi bo‘yicha 1-darajaTariflar jadvali—Kontekst tokenlari soni bundan ko‘p0Kontekst tokenlari soni bundan oshmaydi, chegara kiradiYuqori chegara yo‘qTo‘lov
Kirish · Kirish tokenlari $0.02 / 1K token
Chiqish · Chiqish tokenlari $0.1 / 1K token
Kirish · Keshdan o‘qish $0.0005 / 1K token
Kirish · Keshga yozish $0.025 / 1K token
Kirish · Keshga yozish, 1 soat $0.04 / 1K token

So‘rov namunalari

Ailoot · Anthropic Messages

Matn namunasiKirish, rasmPython SDKNode.js SDKPython oqimi
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
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
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"))
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);
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")

Natijalarni olish va saqlash

Ailoot · Anthropic Messages

json or SSE

Barcha tayyor natijalarni saqlash

Qaytarilgan har bir to‘liq javob, fayl va kontent qismini saqlang.

Barcha kontent bloklari, fikrlash imzolari va haqiqiy vosita ishlatish IDlarini saqlang. SSE bloklarining barcha o‘zgarish qismlarini yig‘ing; birinchi matn bloki to‘liq chiqish emas.

Asl javobni tekshirish kerak bo‘lsa

So‘rov va javob IDlari hamda sarlavhalarini saqlang. Matn vazifasini olish uchun umumiy URL taqdim etilmagan.

Javob maydonlari
MaydonTur
MaydonidTurstring
MaydonmodelTurstring
Maydoncontent[]Turtext|thinking|tool_use|other content block
Maydonstop_reasonTurstring|null
MaydonusageTurobject
Xatolar va keyingi qadamlar
JavobShartKeyingi qadam
Javob400 · invalid_request_errorShartMajburiy maydonlar, material ifodasi yoki parametr qiymati noto‘g‘riKeyingi qadamYangi yaratish so‘rovidan oldin ko‘rsatilgan maydonlarni tuzating.

Taxalluslar

Model taxalluslari

Ailoot claude-fable-5-1, claude, claude-fable, claude-fable-latest, claude-latest
Ailoot Ultra anthropic/claude-fable-5.1, ~anthropic/claude-fable-latest

Usul yo‘llari taxalluslari

Yuqorida ko‘rsatilgan usul yo‘llaridan foydalaning.

Chaqirish uchun tegishli ID lar

anthropic/claude-fable-5.1, claude, claude-fable, claude-fable-latest, claude-latest, ~anthropic/claude-fable-latest, claude-fable-5-1

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

claude-fable-latest

Anthropic /claude-fable-latest
Model ID
  • claude-fable-5-1
  • claude
  • claude-fable
  • claude-fable-latest
  • claude-latest

Boshlash

Claude Fable 5.1 murakkab tadqiqotlar, koddagi yirik o‘zgarishlar va davomli professional tahlil uchun mo‘ljallangan. Katta kontekstdagi ma’lumotlarni bog‘laydi hamda matn va batafsil tasvirlar bilan ishlaydi.

Qabul qilinadigan kirish ma’lumotlari
Matn · Rasmlar
Natijalar
Matn

Ailoot da mavjud · kirish ma’lumotlari va usullar

Ailoot · Anthropic Messages POST /v1/messages
Kirish
text, image
Chiqish
text
Kontekst
1 000 000 tokens
Eng katta chiqish
131 072 tokens
Chiqish formati
json or SSE
MaydonTurTalabQiymatlar va cheklovlarStandart
MaydonmodelTurstringTalabMajburiyQiymatlar va cheklovlar
claude-fable-latest
Standart—
MaydonmessagesTurmessage[]TalabMajburiyQiymatlar va cheklovlar
Elementlarning eng kam soni: 1
Standart—
Maydonmessages[].roleTurstringTalabMajburiyQiymatlar va cheklovlar
user, assistant
Standart—
Maydonmessages[].contentTurstring|content_block[]TalabMajburiyQiymatlar va cheklovlarStandart—
MaydonsystemTurstring|content_block[]TalabIxtiyoriyQiymatlar va cheklovlarStandart—
Maydonmax_tokensTurintegerTalabMajburiyQiymatlar va cheklovlar
Eng kam: 1
Cheklov qo‘llanadigan obyekt: Tanlangan model yoki kartaning aniq yuqori chegarasi
Standart—
MaydonstreamTurbooleanTalabIxtiyoriyQiymatlar va cheklovlarStandartfalse
MaydontemperatureTurnumberTalabIxtiyoriyQiymatlar va cheklovlar
Modelga bogʻliq
Standart—
Maydontop_pTurnumberTalabIxtiyoriyQiymatlar va cheklovlar
Modelga bogʻliq
Standart—
Maydonstop_sequencesTurstring[]TalabIxtiyoriyQiymatlar va cheklovlar
Modelga bogʻliq
Standart—
MaydontoolsTurtool[]TalabIxtiyoriyQiymatlar va cheklovlar
Modelga bogʻliq
Standart—
Maydontools[].nameTurstringTalabIxtiyoriyQiymatlar va cheklovlar
Quyidagi holatda qo‘llanadi: tool supplied
Standart—
Maydontools[].descriptionTurstringTalabIxtiyoriyQiymatlar va cheklovlarStandart—
Maydontools[].input_schemaTurJSON_schemaTalabIxtiyoriyQiymatlar va cheklovlarStandart—
Maydontool_choiceTurobjectTalabIxtiyoriyQiymatlar va cheklovlar
Modelga bogʻliq
Standart—
Maydonthinking.typeTurstringTalabIxtiyoriyQiymatlar va cheklovlar
Modelga bogʻliq
Standart—
Maydonthinking.budget_tokensTurintegerTalabIxtiyoriyQiymatlar va cheklovlar
Modelga bogʻliq
Standart—
Maydonoutput_config.effortTurstringTalabIxtiyoriyQiymatlar va cheklovlar
Modelga bogʻliq
Standart—
MaydonmetadataTurobjectTalabIxtiyoriyQiymatlar va cheklovlarStandart—
Maydoncache_controlTurobjectTalabIxtiyoriyQiymatlar va cheklovlar
Modelga bogʻliq
Standart—
Kirish materiallari birikmalari

Matn · UTF8 matni

messages[].content or type=text block

Matn + rasm

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

Usul parametrlari va hayot sikli
ParametrParametr talablari
Parametrmaterial_typesParametr talablaritext, image
ParametrrequiredParametr talablarimodel, messages, max_tokens
Parametroptional_controlsParametr talablarinull
Parametrcontent_typeParametr talablariapplication/json
Parametrtext_file_materialParametr talablariHaqiqiy UTF-8 kontenti matn sifatida kiritiladi; fayl IDlari/URLs uchun alohida aniq qo‘llab-quvvatlash kerak

Hayot sikli: exact retained published method

Metod tuzilishlari va IDlari aniq; yetkazib beruvchining imkoniyati so‘rovni qabul qilishga ruxsatdan alohida.

Tariflar

Ailoot usullari tariflari

Ailoot Anthropic MessagesPOST /v1/messages
Kirish
0,01 US$ / 1K
Chiqish
0,05 US$ / 1K
Keshdan o‘qish
0,00025 US$ / 1K
Keshga yozish
0,0125 US$ / 1K
Keshga yozish, 5 daqiqa
0,0125 US$ / 1K tokens
Keshga yozish, 1 soat
0,02 US$ / 1K tokens
web_search_call
0,01 US$ har chaqiruv uchun
Maks. chaqiruvlar web_search_call
8

Ailoot so‘rovdan oldin taxminiy summani band qiladi. Natijadan keyin o‘lchangan sarf asosidagi yakuniy to‘lovni yechadi. Oqimli javob bo‘yicha yakuniy hisob-kitob yakuniy sarf yozuviga asoslanadi. Summani band qilish va to‘lovni hisoblash tartibi →

Ma’lumot uchun tarif tafsilotlari

Modelning ma’lumot jadvallari usul tanlash, narx hisobi yoki to‘lovlarni o‘zgartirmaydi. Amaldagi to‘lovlar tanlangan Ailoot usuli tariflari bo‘yicha hisoblanadi.

Modelning ma’lumot jadvallari

Sozlamalar bo‘yicha narxlar

Har bir to‘lovni ko‘rsatilgan shartlarga moslang. Har bir muqobil sozlamalar to‘plami uchun bitta tarifdan foydalaning.

SozlamaTariflar jadvaliKontekst tokenlari soni bundan ko‘pKontekst tokenlari soni bundan oshmaydi, chegara kiradiTo‘lov
SozlamaOpenAI Chat · Tokenlar uchun asosiy tariflarTariflar jadvaliAsosiy tarifKontekst tokenlari soni bundan ko‘p—Kontekst tokenlari soni bundan oshmaydi, chegara kiradiYuqori chegara yo‘qTo‘lov
Kirish · Kirish tokenlari $0.02 / 1K token
Chiqish · Chiqish tokenlari $0.1 / 1K token
Kirish · Keshdan o‘qish $0.0005 / 1K token
Kirish · Keshga yozish $0.025 / 1K token
Kirish · Keshga yozish, 1 soat $0.04 / 1K token
SozlamaOpenAI Chat · So‘rov uzunligi bo‘yicha 1-darajaTariflar jadvali—Kontekst tokenlari soni bundan ko‘p0Kontekst tokenlari soni bundan oshmaydi, chegara kiradiYuqori chegara yo‘qTo‘lov
Kirish · Kirish tokenlari $0.02 / 1K token
Chiqish · Chiqish tokenlari $0.1 / 1K token
Kirish · Keshdan o‘qish $0.0005 / 1K token
Kirish · Keshga yozish $0.025 / 1K token
Kirish · Keshga yozish, 1 soat $0.04 / 1K token
SozlamaAnthropic Messages · Tokenlar uchun asosiy tariflarTariflar jadvaliAsosiy tarifKontekst tokenlari soni bundan ko‘p—Kontekst tokenlari soni bundan oshmaydi, chegara kiradiYuqori chegara yo‘qTo‘lov
Kirish · Kirish tokenlari $0.02 / 1K token
Chiqish · Chiqish tokenlari $0.1 / 1K token
Kirish · Keshdan o‘qish $0.0005 / 1K token
Kirish · Keshga yozish $0.025 / 1K token
Kirish · Keshga yozish, 1 soat $0.04 / 1K token
SozlamaAnthropic Messages · So‘rov uzunligi bo‘yicha 1-darajaTariflar jadvali—Kontekst tokenlari soni bundan ko‘p0Kontekst tokenlari soni bundan oshmaydi, chegara kiradiYuqori chegara yo‘qTo‘lov
Kirish · Kirish tokenlari $0.02 / 1K token
Chiqish · Chiqish tokenlari $0.1 / 1K token
Kirish · Keshdan o‘qish $0.0005 / 1K token
Kirish · Keshga yozish $0.025 / 1K token
Kirish · Keshga yozish, 1 soat $0.04 / 1K token

So‘rov namunalari

Ailoot · Anthropic Messages

Matn namunasiKirish, rasmPython SDKNode.js SDKPython oqimi
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
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
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"))
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);
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")

Natijalarni olish va saqlash

Ailoot · Anthropic Messages

json or SSE

Barcha tayyor natijalarni saqlash

Qaytarilgan har bir to‘liq javob, fayl va kontent qismini saqlang.

Barcha kontent bloklari, fikrlash imzolari va haqiqiy vosita ishlatish IDlarini saqlang. SSE bloklarining barcha o‘zgarish qismlarini yig‘ing; birinchi matn bloki to‘liq chiqish emas.

Asl javobni tekshirish kerak bo‘lsa

So‘rov va javob IDlari hamda sarlavhalarini saqlang. Matn vazifasini olish uchun umumiy URL taqdim etilmagan.

Javob maydonlari
MaydonTur
MaydonidTurstring
MaydonmodelTurstring
Maydoncontent[]Turtext|thinking|tool_use|other content block
Maydonstop_reasonTurstring|null
MaydonusageTurobject
Xatolar va keyingi qadamlar
JavobShartKeyingi qadam
Javob400 · invalid_request_errorShartMajburiy maydonlar, material ifodasi yoki parametr qiymati noto‘g‘riKeyingi qadamYangi yaratish so‘rovidan oldin ko‘rsatilgan maydonlarni tuzating.

Taxalluslar

Model taxalluslari

Ailoot claude-fable-5-1, claude, claude-fable, claude-fable-latest, claude-latest
Ailoot Ultra anthropic/claude-fable-5.1, ~anthropic/claude-fable-latest

Usul yo‘llari taxalluslari

Yuqorida ko‘rsatilgan usul yo‘llaridan foydalaning.

Chaqirish uchun tegishli ID lar

anthropic/claude-fable-5.1, claude, claude-fable, claude-fable-latest, claude-latest, ~anthropic/claude-fable-latest, claude-fable-5-1

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

claude-latest

Anthropic /claude-latest
Model ID
  • claude-fable-5-1
  • claude
  • claude-fable
  • claude-fable-latest
  • claude-latest

Boshlash

Claude Fable 5.1 murakkab tadqiqotlar, koddagi yirik o‘zgarishlar va davomli professional tahlil uchun mo‘ljallangan. Katta kontekstdagi ma’lumotlarni bog‘laydi hamda matn va batafsil tasvirlar bilan ishlaydi.

Qabul qilinadigan kirish ma’lumotlari
Matn · Rasmlar
Natijalar
Matn

Ailoot da mavjud · kirish ma’lumotlari va usullar

Ailoot · Anthropic Messages POST /v1/messages
Kirish
text, image
Chiqish
text
Kontekst
1 000 000 tokens
Eng katta chiqish
131 072 tokens
Chiqish formati
json or SSE
MaydonTurTalabQiymatlar va cheklovlarStandart
MaydonmodelTurstringTalabMajburiyQiymatlar va cheklovlar
claude-latest
Standart—
MaydonmessagesTurmessage[]TalabMajburiyQiymatlar va cheklovlar
Elementlarning eng kam soni: 1
Standart—
Maydonmessages[].roleTurstringTalabMajburiyQiymatlar va cheklovlar
user, assistant
Standart—
Maydonmessages[].contentTurstring|content_block[]TalabMajburiyQiymatlar va cheklovlarStandart—
MaydonsystemTurstring|content_block[]TalabIxtiyoriyQiymatlar va cheklovlarStandart—
Maydonmax_tokensTurintegerTalabMajburiyQiymatlar va cheklovlar
Eng kam: 1
Cheklov qo‘llanadigan obyekt: Tanlangan model yoki kartaning aniq yuqori chegarasi
Standart—
MaydonstreamTurbooleanTalabIxtiyoriyQiymatlar va cheklovlarStandartfalse
MaydontemperatureTurnumberTalabIxtiyoriyQiymatlar va cheklovlar
Modelga bogʻliq
Standart—
Maydontop_pTurnumberTalabIxtiyoriyQiymatlar va cheklovlar
Modelga bogʻliq
Standart—
Maydonstop_sequencesTurstring[]TalabIxtiyoriyQiymatlar va cheklovlar
Modelga bogʻliq
Standart—
MaydontoolsTurtool[]TalabIxtiyoriyQiymatlar va cheklovlar
Modelga bogʻliq
Standart—
Maydontools[].nameTurstringTalabIxtiyoriyQiymatlar va cheklovlar
Quyidagi holatda qo‘llanadi: tool supplied
Standart—
Maydontools[].descriptionTurstringTalabIxtiyoriyQiymatlar va cheklovlarStandart—
Maydontools[].input_schemaTurJSON_schemaTalabIxtiyoriyQiymatlar va cheklovlarStandart—
Maydontool_choiceTurobjectTalabIxtiyoriyQiymatlar va cheklovlar
Modelga bogʻliq
Standart—
Maydonthinking.typeTurstringTalabIxtiyoriyQiymatlar va cheklovlar
Modelga bogʻliq
Standart—
Maydonthinking.budget_tokensTurintegerTalabIxtiyoriyQiymatlar va cheklovlar
Modelga bogʻliq
Standart—
Maydonoutput_config.effortTurstringTalabIxtiyoriyQiymatlar va cheklovlar
Modelga bogʻliq
Standart—
MaydonmetadataTurobjectTalabIxtiyoriyQiymatlar va cheklovlarStandart—
Maydoncache_controlTurobjectTalabIxtiyoriyQiymatlar va cheklovlar
Modelga bogʻliq
Standart—
Kirish materiallari birikmalari

Matn · UTF8 matni

messages[].content or type=text block

Matn + rasm

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

Usul parametrlari va hayot sikli
ParametrParametr talablari
Parametrmaterial_typesParametr talablaritext, image
ParametrrequiredParametr talablarimodel, messages, max_tokens
Parametroptional_controlsParametr talablarinull
Parametrcontent_typeParametr talablariapplication/json
Parametrtext_file_materialParametr talablariHaqiqiy UTF-8 kontenti matn sifatida kiritiladi; fayl IDlari/URLs uchun alohida aniq qo‘llab-quvvatlash kerak

Hayot sikli: exact retained published method

Metod tuzilishlari va IDlari aniq; yetkazib beruvchining imkoniyati so‘rovni qabul qilishga ruxsatdan alohida.

Tariflar

Ailoot usullari tariflari

Ailoot Anthropic MessagesPOST /v1/messages
Kirish
0,01 US$ / 1K
Chiqish
0,05 US$ / 1K
Keshdan o‘qish
0,00025 US$ / 1K
Keshga yozish
0,0125 US$ / 1K
Keshga yozish, 5 daqiqa
0,0125 US$ / 1K tokens
Keshga yozish, 1 soat
0,02 US$ / 1K tokens
web_search_call
0,01 US$ har chaqiruv uchun
Maks. chaqiruvlar web_search_call
8

Ailoot so‘rovdan oldin taxminiy summani band qiladi. Natijadan keyin o‘lchangan sarf asosidagi yakuniy to‘lovni yechadi. Oqimli javob bo‘yicha yakuniy hisob-kitob yakuniy sarf yozuviga asoslanadi. Summani band qilish va to‘lovni hisoblash tartibi →

Ma’lumot uchun tarif tafsilotlari

Modelning ma’lumot jadvallari usul tanlash, narx hisobi yoki to‘lovlarni o‘zgartirmaydi. Amaldagi to‘lovlar tanlangan Ailoot usuli tariflari bo‘yicha hisoblanadi.

Modelning ma’lumot jadvallari

Sozlamalar bo‘yicha narxlar

Har bir to‘lovni ko‘rsatilgan shartlarga moslang. Har bir muqobil sozlamalar to‘plami uchun bitta tarifdan foydalaning.

SozlamaTariflar jadvaliKontekst tokenlari soni bundan ko‘pKontekst tokenlari soni bundan oshmaydi, chegara kiradiTo‘lov
SozlamaOpenAI Chat · Tokenlar uchun asosiy tariflarTariflar jadvaliAsosiy tarifKontekst tokenlari soni bundan ko‘p—Kontekst tokenlari soni bundan oshmaydi, chegara kiradiYuqori chegara yo‘qTo‘lov
Kirish · Kirish tokenlari $0.02 / 1K token
Chiqish · Chiqish tokenlari $0.1 / 1K token
Kirish · Keshdan o‘qish $0.0005 / 1K token
Kirish · Keshga yozish $0.025 / 1K token
Kirish · Keshga yozish, 1 soat $0.04 / 1K token
SozlamaOpenAI Chat · So‘rov uzunligi bo‘yicha 1-darajaTariflar jadvali—Kontekst tokenlari soni bundan ko‘p0Kontekst tokenlari soni bundan oshmaydi, chegara kiradiYuqori chegara yo‘qTo‘lov
Kirish · Kirish tokenlari $0.02 / 1K token
Chiqish · Chiqish tokenlari $0.1 / 1K token
Kirish · Keshdan o‘qish $0.0005 / 1K token
Kirish · Keshga yozish $0.025 / 1K token
Kirish · Keshga yozish, 1 soat $0.04 / 1K token
SozlamaAnthropic Messages · Tokenlar uchun asosiy tariflarTariflar jadvaliAsosiy tarifKontekst tokenlari soni bundan ko‘p—Kontekst tokenlari soni bundan oshmaydi, chegara kiradiYuqori chegara yo‘qTo‘lov
Kirish · Kirish tokenlari $0.02 / 1K token
Chiqish · Chiqish tokenlari $0.1 / 1K token
Kirish · Keshdan o‘qish $0.0005 / 1K token
Kirish · Keshga yozish $0.025 / 1K token
Kirish · Keshga yozish, 1 soat $0.04 / 1K token
SozlamaAnthropic Messages · So‘rov uzunligi bo‘yicha 1-darajaTariflar jadvali—Kontekst tokenlari soni bundan ko‘p0Kontekst tokenlari soni bundan oshmaydi, chegara kiradiYuqori chegara yo‘qTo‘lov
Kirish · Kirish tokenlari $0.02 / 1K token
Chiqish · Chiqish tokenlari $0.1 / 1K token
Kirish · Keshdan o‘qish $0.0005 / 1K token
Kirish · Keshga yozish $0.025 / 1K token
Kirish · Keshga yozish, 1 soat $0.04 / 1K token

So‘rov namunalari

Ailoot · Anthropic Messages

Matn namunasiKirish, rasmPython SDKNode.js SDKPython oqimi
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
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
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"))
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);
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")

Natijalarni olish va saqlash

Ailoot · Anthropic Messages

json or SSE

Barcha tayyor natijalarni saqlash

Qaytarilgan har bir to‘liq javob, fayl va kontent qismini saqlang.

Barcha kontent bloklari, fikrlash imzolari va haqiqiy vosita ishlatish IDlarini saqlang. SSE bloklarining barcha o‘zgarish qismlarini yig‘ing; birinchi matn bloki to‘liq chiqish emas.

Asl javobni tekshirish kerak bo‘lsa

So‘rov va javob IDlari hamda sarlavhalarini saqlang. Matn vazifasini olish uchun umumiy URL taqdim etilmagan.

Javob maydonlari
MaydonTur
MaydonidTurstring
MaydonmodelTurstring
Maydoncontent[]Turtext|thinking|tool_use|other content block
Maydonstop_reasonTurstring|null
MaydonusageTurobject
Xatolar va keyingi qadamlar
JavobShartKeyingi qadam
Javob400 · invalid_request_errorShartMajburiy maydonlar, material ifodasi yoki parametr qiymati noto‘g‘riKeyingi qadamYangi yaratish so‘rovidan oldin ko‘rsatilgan maydonlarni tuzating.

Taxalluslar

Model taxalluslari

Ailoot claude-fable-5-1, claude, claude-fable, claude-fable-latest, claude-latest
Ailoot Ultra anthropic/claude-fable-5.1, ~anthropic/claude-fable-latest

Usul yo‘llari taxalluslari

Yuqorida ko‘rsatilgan usul yo‘llaridan foydalaning.

Chaqirish uchun tegishli ID lar

anthropic/claude-fable-5.1, claude, claude-fable, claude-fable-latest, claude-latest, ~anthropic/claude-fable-latest, claude-fable-5-1

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

claude-latest

Anthropic /claude-latest
Model ID
  • claude-fable-5-1
  • claude
  • claude-latest

Boshlash

Claude Fable 5.1 murakkab tadqiqotlar, koddagi yirik o‘zgarishlar va davomli professional tahlil uchun mo‘ljallangan. Katta kontekstdagi ma’lumotlarni bog‘laydi hamda matn va batafsil tasvirlar bilan ishlaydi.

Qabul qilinadigan kirish ma’lumotlari
Matn · Rasmlar
Natijalar
Matn

Ailoot da mavjud · kirish ma’lumotlari va usullar

Ailoot · OpenAI Responses POST /v1/responses
Kirish
text, image
Chiqish
text
Kontekst
1 000 000 tokens
Eng katta chiqish
131 072 tokens
Chiqish formati
json or SSE
MaydonTurTalabQiymatlar va cheklovlarStandart
MaydonmodelTurstringTalabMajburiyQiymatlar va cheklovlar
claude-latest
Standart—
MaydoninputTurstring|input_item[]TalabMajburiyQiymatlar va cheklovlarStandart—
MaydoninstructionsTurstringTalabIxtiyoriyQiymatlar va cheklovlarStandart—
Maydoninput[].typeTurstringTalabIxtiyoriyQiymatlar va cheklovlar
message, reasoning, function_call, function_call_output
Standart—
Maydoninput[].contentTurstring|content_part[]TalabIxtiyoriyQiymatlar va cheklovlarStandart—
Maydoninput[].call_idTurstringTalabIxtiyoriyQiymatlar va cheklovlar
Quyidagi holatda qo‘llanadi: function_call_output; haqiqatan qaytarilgan call_id qiymatini saqlang
Standart—
Maydoninput[].outputTurstring|content_part[]TalabIxtiyoriyQiymatlar va cheklovlar
Quyidagi holatda qo‘llanadi: function_call_output
Standart—
Maydonmax_output_tokensTurintegerTalabIxtiyoriyQiymatlar va cheklovlar
Eng kam: 1
Modelga bogʻliq
Standart—
MaydonstreamTurbooleanTalabIxtiyoriyQiymatlar va cheklovlarStandartfalse
MaydontemperatureTurnumberTalabIxtiyoriyQiymatlar va cheklovlar
Modelga bogʻliq
Standart—
Maydontop_pTurnumberTalabIxtiyoriyQiymatlar va cheklovlar
Modelga bogʻliq
Standart—
MaydontoolsTurtool[]TalabIxtiyoriyQiymatlar va cheklovlar
Modelga bogʻliq
Standart—
Maydontool_choiceTurstring|objectTalabIxtiyoriyQiymatlar va cheklovlar
Modelga bogʻliq
Standart—
Maydonparallel_tool_callsTurbooleanTalabIxtiyoriyQiymatlar va cheklovlar
Modelga bogʻliq
Standart—
Maydonreasoning.effortTurstringTalabIxtiyoriyQiymatlar va cheklovlar
Modelga bogʻliq
Standart—
Maydonreasoning.summaryTurstringTalabIxtiyoriyQiymatlar va cheklovlar
Modelga bogʻliq
Standart—
Maydontext.formatTurobjectTalabIxtiyoriyQiymatlar va cheklovlar
Modelga bogʻliq
Standart—
Maydontext.verbosityTurstringTalabIxtiyoriyQiymatlar va cheklovlar
Modelga bogʻliq
Standart—
MaydonincludeTurstring[]TalabIxtiyoriyQiymatlar va cheklovlar
Modelga bogʻliq
Standart—
MaydonstoreTurbooleanTalabIxtiyoriyQiymatlar va cheklovlar
Modelga bogʻliq
Standart—
Maydonprevious_response_idTurstringTalabIxtiyoriyQiymatlar va cheklovlar
ID talabi: Faqat qo‘llab-quvvatlanadigan davom ettirishdan olingan haqiqiy javob IDsi
Modelga bogʻliq
Standart—
Maydonservice_tierTurstringTalabIxtiyoriyQiymatlar va cheklovlar
Modelga bogʻliq
Standart—
Maydonprompt_cache_keyTurstringTalabIxtiyoriyQiymatlar va cheklovlar
Modelga bogʻliq
Standart—
Maydonprompt_cache_optionsTurobjectTalabIxtiyoriyQiymatlar va cheklovlar
Modelga bogʻliq
Standart—
Kirish materiallari birikmalari

Matn · UTF8 matni

input text or input_text part

Matn + rasm

{type:input_image,image_url}

Usul parametrlari va hayot sikli
ParametrParametr talablari
Parametrmaterial_typesParametr talablaritext, image
ParametrrequiredParametr talablarimodel, input
Parametroptional_controlsParametr talablarinull
Parametrcontent_typeParametr talablariapplication/json
Parametrtext_file_materialParametr talablariHaqiqiy UTF-8 kontenti matn sifatida kiritiladi; fayl IDlari/URLs uchun alohida aniq qo‘llab-quvvatlash kerak

Hayot sikli: exact retained published method

Metod tuzilishlari va IDlari aniq; yetkazib beruvchining imkoniyati so‘rovni qabul qilishga ruxsatdan alohida.

Tariflar

Ailoot usullari tariflari

Ailoot OpenAI ResponsesPOST /v1/responses
Kirish
0,01 US$ / 1K
Chiqish
0,05 US$ / 1K
Keshdan o‘qish
0,00025 US$ / 1K
Keshga yozish
0,0125 US$ / 1K
Keshga yozish, 5 daqiqa
0,0125 US$ / 1K tokens
Keshga yozish, 1 soat
0,02 US$ / 1K tokens
web_search_call
0,01 US$ har chaqiruv uchun
Maks. chaqiruvlar web_search_call
8

Ailoot so‘rovdan oldin taxminiy summani band qiladi. Natijadan keyin o‘lchangan sarf asosidagi yakuniy to‘lovni yechadi. Oqimli javob bo‘yicha yakuniy hisob-kitob yakuniy sarf yozuviga asoslanadi. Summani band qilish va to‘lovni hisoblash tartibi →

Ma’lumot uchun tarif tafsilotlari

Modelning ma’lumot jadvallari usul tanlash, narx hisobi yoki to‘lovlarni o‘zgartirmaydi. Amaldagi to‘lovlar tanlangan Ailoot usuli tariflari bo‘yicha hisoblanadi.

Modelning ma’lumot jadvallari

Sozlamalar bo‘yicha narxlar

Har bir to‘lovni ko‘rsatilgan shartlarga moslang. Har bir muqobil sozlamalar to‘plami uchun bitta tarifdan foydalaning.

SozlamaTariflar jadvaliKontekst tokenlari soni bundan ko‘pKontekst tokenlari soni bundan oshmaydi, chegara kiradiTo‘lov
SozlamaOpenAI Chat · Tokenlar uchun asosiy tariflarTariflar jadvaliAsosiy tarifKontekst tokenlari soni bundan ko‘p—Kontekst tokenlari soni bundan oshmaydi, chegara kiradiYuqori chegara yo‘qTo‘lov
Kirish · Kirish tokenlari $0.02 / 1K token
Chiqish · Chiqish tokenlari $0.1 / 1K token
Kirish · Keshdan o‘qish $0.0005 / 1K token
Kirish · Keshga yozish $0.025 / 1K token
Kirish · Keshga yozish, 1 soat $0.04 / 1K token
SozlamaOpenAI Chat · So‘rov uzunligi bo‘yicha 1-darajaTariflar jadvali—Kontekst tokenlari soni bundan ko‘p0Kontekst tokenlari soni bundan oshmaydi, chegara kiradiYuqori chegara yo‘qTo‘lov
Kirish · Kirish tokenlari $0.02 / 1K token
Chiqish · Chiqish tokenlari $0.1 / 1K token
Kirish · Keshdan o‘qish $0.0005 / 1K token
Kirish · Keshga yozish $0.025 / 1K token
Kirish · Keshga yozish, 1 soat $0.04 / 1K token
SozlamaAnthropic Messages · Tokenlar uchun asosiy tariflarTariflar jadvaliAsosiy tarifKontekst tokenlari soni bundan ko‘p—Kontekst tokenlari soni bundan oshmaydi, chegara kiradiYuqori chegara yo‘qTo‘lov
Kirish · Kirish tokenlari $0.02 / 1K token
Chiqish · Chiqish tokenlari $0.1 / 1K token
Kirish · Keshdan o‘qish $0.0005 / 1K token
Kirish · Keshga yozish $0.025 / 1K token
Kirish · Keshga yozish, 1 soat $0.04 / 1K token
SozlamaAnthropic Messages · So‘rov uzunligi bo‘yicha 1-darajaTariflar jadvali—Kontekst tokenlari soni bundan ko‘p0Kontekst tokenlari soni bundan oshmaydi, chegara kiradiYuqori chegara yo‘qTo‘lov
Kirish · Kirish tokenlari $0.02 / 1K token
Chiqish · Chiqish tokenlari $0.1 / 1K token
Kirish · Keshdan o‘qish $0.0005 / 1K token
Kirish · Keshga yozish $0.025 / 1K token
Kirish · Keshga yozish, 1 soat $0.04 / 1K token

So‘rov namunalari

Ailoot · OpenAI Responses

Matn namunasiKirish, rasmPython SDKNode.js SDKPython oqimi
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
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
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"))
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);
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")

Natijalarni olish va saqlash

Ailoot · OpenAI Responses

json or SSE

Barcha tayyor natijalarni saqlash

Qaytarilgan har bir to‘liq javob, fayl va kontent qismini saqlang.

Har bir chiqish elementi va kontent qismini, funksiyaning haqiqiy call_id qiymatini, shifrlangan fikrlash ma’lumotlari va sarfni saqlang. Oqimli uzatishda hodisa va elementning to‘liq identifikatsiyasini saqlang.

Asl javobni tekshirish kerak bo‘lsa

So‘rov va javob IDlari hamda sarlavhalarini saqlang. Matn vazifasini olish uchun umumiy URL taqdim etilmagan.

Javob maydonlari
MaydonTur
MaydonidTurstring
MaydonstatusTurstring
Maydonoutput[]Turmessage|reasoning|function_call|other item
Maydonoutput[].content[]Turcontent part
MaydonusageTurobject
Xatolar va keyingi qadamlar
JavobShartKeyingi qadam
Javob400 · invalid_request_errorShartMajburiy maydonlar, material ifodasi yoki parametr qiymati noto‘g‘riKeyingi qadamYangi yaratish so‘rovidan oldin ko‘rsatilgan maydonlarni tuzating.

Taxalluslar

Model taxalluslari

Ailoot claude-fable-5-1, claude, claude-fable, claude-fable-latest, claude-latest
Ailoot Ultra anthropic/claude-fable-5.1, ~anthropic/claude-fable-latest

Usul yo‘llari taxalluslari

Yuqorida ko‘rsatilgan usul yo‘llaridan foydalaning.

Chaqirish uchun tegishli ID lar

anthropic/claude-fable-5.1, claude, claude-fable, claude-fable-latest, claude-latest, ~anthropic/claude-fable-latest, claude-fable-5-1

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

claude-latest

Anthropic /claude-latest
Model ID
  • claude-fable-5-1
  • claude
  • claude-latest

Boshlash

Claude Fable 5.1 murakkab tadqiqotlar, koddagi yirik o‘zgarishlar va davomli professional tahlil uchun mo‘ljallangan. Katta kontekstdagi ma’lumotlarni bog‘laydi hamda matn va batafsil tasvirlar bilan ishlaydi.

Qabul qilinadigan kirish ma’lumotlari
Matn · Rasmlar
Natijalar
Matn

Ailoot da mavjud · kirish ma’lumotlari va usullar

Ailoot · OpenAI Chat POST /v1/chat/completions
Kirish
text, image
Chiqish
text
Kontekst
1 000 000 tokens
Eng katta chiqish
131 072 tokens
Chiqish formati
json or SSE
MaydonTurTalabQiymatlar va cheklovlarStandart
MaydonmodelTurstringTalabMajburiyQiymatlar va cheklovlar
claude-latest
Standart—
MaydonmessagesTurmessage[]TalabMajburiyQiymatlar va cheklovlar
Elementlarning eng kam soni: 1
Standart—
Maydonmessages[].roleTurstringTalabMajburiyQiymatlar va cheklovlar
Namunalar: system, user, assistant, tool, function
Shartlar: Bu rollar manba kodining moslik turlarida ochiq ifodalangan; aniq rollar to‘plami har bir modelga xos bo‘lib qoladi.
Modelga bogʻliq
Standart—
Maydonmessages[].contentTurstring|content_part[]|nullTalabIxtiyoriyQiymatlar va cheklovlarStandart—
Maydonmessages[].tool_callsTurtool_call[]TalabIxtiyoriyQiymatlar va cheklovlarStandart—
Maydonmessages[].tool_call_idTurstringTalabIxtiyoriyQiymatlar va cheklovlar
Quyidagi holatda qo‘llanadi: role=tool; haqiqatan qaytarilgan IDdan foydalaning
Standart—
Maydonmessages[].nameTurstringTalabIxtiyoriyQiymatlar va cheklovlarStandart—
Maydonmessages[].reasoning_contentTurstringTalabIxtiyoriyQiymatlar va cheklovlar
Quyidagi holatda qo‘llanadi: Ushbu model foydalanganda, haqiqatan qaytarilgan fikrlash ma’lumotlarini keyingi so‘rovda qayta yuboring
Standart—
Maydonmessages[].reasoning_detailsTurobject|arrayTalabIxtiyoriyQiymatlar va cheklovlar
Modelga bogʻliq
Standart—
Maydonmax_tokensTurintegerTalabIxtiyoriyQiymatlar va cheklovlar
Eng kam: 1
Modelga bogʻliq
Standart—
Maydonmax_completion_tokensTurintegerTalabIxtiyoriyQiymatlar va cheklovlar
Eng kam: 1
Modelga bogʻliq
Standart—
MaydonstreamTurbooleanTalabIxtiyoriyQiymatlar va cheklovlarStandartfalse
Maydonstream_options.include_usageTurbooleanTalabIxtiyoriyQiymatlar va cheklovlar
Modelga bogʻliq
Standart—
MaydontemperatureTurnumberTalabIxtiyoriyQiymatlar va cheklovlar
Modelga bogʻliq
Standart—
Maydontop_pTurnumberTalabIxtiyoriyQiymatlar va cheklovlar
Modelga bogʻliq
Standart—
MaydonstopTurstring|string[]TalabIxtiyoriyQiymatlar va cheklovlar
Modelga bogʻliq
Standart—
MaydontoolsTurfunction_tool[]TalabIxtiyoriyQiymatlar va cheklovlar
Modelga bogʻliq
Standart—
Maydontools[].typeTurstringTalabIxtiyoriyQiymatlar va cheklovlar
Modelga bogʻliq
Standart—
Maydontools[].function.nameTurstringTalabMajburiyQiymatlar va cheklovlar
Quyidagi holatda qo‘llanadi: function tool supplied
Standart—
Maydontools[].function.descriptionTurstringTalabIxtiyoriyQiymatlar va cheklovlarStandart—
Maydontools[].function.parametersTurJSON_schemaTalabIxtiyoriyQiymatlar va cheklovlarStandart—
Maydontool_choiceTurstring|objectTalabIxtiyoriyQiymatlar va cheklovlar
Modelga bogʻliq
Standart—
Maydonparallel_tool_callsTurbooleanTalabIxtiyoriyQiymatlar va cheklovlar
Modelga bogʻliq
Standart—
Maydonresponse_formatTurobjectTalabIxtiyoriyQiymatlar va cheklovlar
Modelga bogʻliq
Standart—
Maydonreasoning_effortTurstringTalabIxtiyoriyQiymatlar va cheklovlar
Modelga bogʻliq
Standart—
MaydonreasoningTurobjectTalabIxtiyoriyQiymatlar va cheklovlar
Modelga bogʻliq
Standart—
Maydonservice_tierTurstringTalabIxtiyoriyQiymatlar va cheklovlar
Modelga bogʻliq
Standart—
MaydoninstructionsTurstringTalabIxtiyoriyQiymatlar va cheklovlar
Moslik maydoni
Standart—
MaydonfunctionsTurfunction[]TalabIxtiyoriyQiymatlar va cheklovlar
Modelga bogʻliq
Standart—
Maydonfunction_callTurstring|objectTalabIxtiyoriyQiymatlar va cheklovlar
Modelga bogʻliq
Standart—
Maydonprompt_cache_optionsTurobjectTalabIxtiyoriyQiymatlar va cheklovlar
Modelga bogʻliq
Standart—
Kirish materiallari birikmalari

Matn · UTF8 matni

messages[].content

Matn + rasm

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

Usul parametrlari va hayot sikli
ParametrParametr talablari
Parametrmaterial_typesParametr talablaritext, image
ParametrrequiredParametr talablarimodel, messages
Parametroptional_controlsParametr talablarinull
Parametrcontent_typeParametr talablariapplication/json
Parametrtext_file_materialParametr talablariHaqiqiy UTF-8 kontenti matn sifatida kiritiladi; fayl IDlari/URLs uchun alohida aniq qo‘llab-quvvatlash kerak

Hayot sikli: exact retained published method

Metod tuzilishlari va IDlari aniq; yetkazib beruvchining imkoniyati so‘rovni qabul qilishga ruxsatdan alohida.

Tariflar

Ailoot usullari tariflari

Ailoot OpenAI ChatPOST /v1/chat/completions
Kirish
0,01 US$ / 1K
Chiqish
0,05 US$ / 1K
Keshdan o‘qish
0,00025 US$ / 1K
Keshga yozish
0,0125 US$ / 1K
Keshga yozish, 5 daqiqa
0,0125 US$ / 1K tokens
Keshga yozish, 1 soat
0,02 US$ / 1K tokens
web_search_call
0,01 US$ har chaqiruv uchun
Maks. chaqiruvlar web_search_call
8

Ailoot so‘rovdan oldin taxminiy summani band qiladi. Natijadan keyin o‘lchangan sarf asosidagi yakuniy to‘lovni yechadi. Oqimli javob bo‘yicha yakuniy hisob-kitob yakuniy sarf yozuviga asoslanadi. Summani band qilish va to‘lovni hisoblash tartibi →

Ma’lumot uchun tarif tafsilotlari

Modelning ma’lumot jadvallari usul tanlash, narx hisobi yoki to‘lovlarni o‘zgartirmaydi. Amaldagi to‘lovlar tanlangan Ailoot usuli tariflari bo‘yicha hisoblanadi.

Modelning ma’lumot jadvallari

Sozlamalar bo‘yicha narxlar

Har bir to‘lovni ko‘rsatilgan shartlarga moslang. Har bir muqobil sozlamalar to‘plami uchun bitta tarifdan foydalaning.

SozlamaTariflar jadvaliKontekst tokenlari soni bundan ko‘pKontekst tokenlari soni bundan oshmaydi, chegara kiradiTo‘lov
SozlamaOpenAI Chat · Tokenlar uchun asosiy tariflarTariflar jadvaliAsosiy tarifKontekst tokenlari soni bundan ko‘p—Kontekst tokenlari soni bundan oshmaydi, chegara kiradiYuqori chegara yo‘qTo‘lov
Kirish · Kirish tokenlari $0.02 / 1K token
Chiqish · Chiqish tokenlari $0.1 / 1K token
Kirish · Keshdan o‘qish $0.0005 / 1K token
Kirish · Keshga yozish $0.025 / 1K token
Kirish · Keshga yozish, 1 soat $0.04 / 1K token
SozlamaOpenAI Chat · So‘rov uzunligi bo‘yicha 1-darajaTariflar jadvali—Kontekst tokenlari soni bundan ko‘p0Kontekst tokenlari soni bundan oshmaydi, chegara kiradiYuqori chegara yo‘qTo‘lov
Kirish · Kirish tokenlari $0.02 / 1K token
Chiqish · Chiqish tokenlari $0.1 / 1K token
Kirish · Keshdan o‘qish $0.0005 / 1K token
Kirish · Keshga yozish $0.025 / 1K token
Kirish · Keshga yozish, 1 soat $0.04 / 1K token
SozlamaAnthropic Messages · Tokenlar uchun asosiy tariflarTariflar jadvaliAsosiy tarifKontekst tokenlari soni bundan ko‘p—Kontekst tokenlari soni bundan oshmaydi, chegara kiradiYuqori chegara yo‘qTo‘lov
Kirish · Kirish tokenlari $0.02 / 1K token
Chiqish · Chiqish tokenlari $0.1 / 1K token
Kirish · Keshdan o‘qish $0.0005 / 1K token
Kirish · Keshga yozish $0.025 / 1K token
Kirish · Keshga yozish, 1 soat $0.04 / 1K token
SozlamaAnthropic Messages · So‘rov uzunligi bo‘yicha 1-darajaTariflar jadvali—Kontekst tokenlari soni bundan ko‘p0Kontekst tokenlari soni bundan oshmaydi, chegara kiradiYuqori chegara yo‘qTo‘lov
Kirish · Kirish tokenlari $0.02 / 1K token
Chiqish · Chiqish tokenlari $0.1 / 1K token
Kirish · Keshdan o‘qish $0.0005 / 1K token
Kirish · Keshga yozish $0.025 / 1K token
Kirish · Keshga yozish, 1 soat $0.04 / 1K token

So‘rov namunalari

Ailoot · OpenAI Chat

Matn namunasiKirish, rasmPython SDKNode.js SDKPython oqimi
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
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
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"))
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);
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")

Natijalarni olish va saqlash

Ailoot · OpenAI Chat

json or SSE

Barcha tayyor natijalarni saqlash

Qaytarilgan har bir to‘liq javob, fayl va kontent qismini saqlang.

Har bir javob variantini va uning kontenti, vosita chaqiruvlari hamda fikrlash ma’lumotlarini saqlang. SSEda o‘zgarish qismlarini variant va vosita indeksi bo‘yicha yig‘ing, yakuniy tugash sababi va sarf ma’lumotlarini saqlang.

Asl javobni tekshirish kerak bo‘lsa

So‘rov va javob IDlari hamda sarlavhalarini saqlang. Matn vazifasini olish uchun umumiy URL taqdim etilmagan.

Javob maydonlari
MaydonTur
Maydonchoices[].indexTurinteger
Maydonchoices[].message.contentTurstring|null
Maydonchoices[].message.tool_callsTurtool_call[]
Maydonchoices[].message.reasoning_contentTurstring
Maydonchoices[].message.reasoning_detailsTurobject|array
Maydonchoices[].finish_reasonTurstring|null
MaydonusageTurobject
Xatolar va keyingi qadamlar
JavobShartKeyingi qadam
Javob400 · invalid_request_errorShartMajburiy maydonlar, material ifodasi yoki parametr qiymati noto‘g‘riKeyingi qadamYangi yaratish so‘rovidan oldin ko‘rsatilgan maydonlarni tuzating.

Taxalluslar

Model taxalluslari

Ailoot claude-fable-5-1, claude, claude-fable, claude-fable-latest, claude-latest
Ailoot Ultra anthropic/claude-fable-5.1, ~anthropic/claude-fable-latest

Usul yo‘llari taxalluslari

Yuqorida ko‘rsatilgan usul yo‘llaridan foydalaning.

Chaqirish uchun tegishli ID lar

anthropic/claude-fable-5.1, claude, claude-fable, claude-fable-latest, claude-latest, ~anthropic/claude-fable-latest, claude-fable-5-1

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

anthropic/claude-fable-5.1

Anthropic /anthropic/claude-fable-5.1
Model ID
  • anthropic/claude-fable-5.1
  • ~anthropic/claude-fable-latest

Boshlash

Claude Fable 5.1 murakkab tadqiqotlar, koddagi yirik o‘zgarishlar va davomli professional tahlil uchun mo‘ljallangan. Katta kontekstdagi ma’lumotlarni bog‘laydi hamda matn va batafsil tasvirlar bilan ishlaydi.

Qabul qilinadigan kirish ma’lumotlari
Matn
Natijalar
Matn

Ailoot da mavjud · kirish ma’lumotlari va usullar

Ailoot Ultra · OpenAI Chat POST /v1/chat/completions
Kirish
text
Chiqish
text
Chiqish formati
json yoki SSE
MaydonTurTalabQiymatlar va cheklovlarStandart
MaydonmodelTurstringTalabMajburiyQiymatlar va cheklovlar
anthropic/claude-fable-5.1
Standart—
MaydonmessagesTurmessage[]TalabMajburiyQiymatlar va cheklovlar
Elementlarning eng kam soni: 1
Standart—
Maydonmessages[].roleTurstringTalabMajburiyQiymatlar va cheklovlar
Namunalar: system, user, assistant, tool, function
Shartlar: Bu rollar manba kodining moslik turlarida ochiq ifodalangan; aniq rollar to‘plami har bir modelga xos bo‘lib qoladi.
Modelga bogʻliq
Standart—
Maydonmessages[].contentTurstring|content_part[]|nullTalabIxtiyoriyQiymatlar va cheklovlarStandart—
Maydonmessages[].tool_callsTurtool_call[]TalabIxtiyoriyQiymatlar va cheklovlarStandart—
Maydonmessages[].tool_call_idTurstringTalabIxtiyoriyQiymatlar va cheklovlar
Quyidagi holatda qo‘llanadi: role=tool; haqiqatan qaytarilgan IDdan foydalaning
Standart—
Maydonmessages[].nameTurstringTalabIxtiyoriyQiymatlar va cheklovlarStandart—
Maydonmessages[].reasoning_contentTurstringTalabIxtiyoriyQiymatlar va cheklovlar
Quyidagi holatda qo‘llanadi: Ushbu model foydalanganda, haqiqatan qaytarilgan fikrlash ma’lumotlarini keyingi so‘rovda qayta yuboring
Standart—
Maydonmessages[].reasoning_detailsTurobject|arrayTalabIxtiyoriyQiymatlar va cheklovlar
Modelga bogʻliq
Standart—
Maydonmax_tokensTurintegerTalabIxtiyoriyQiymatlar va cheklovlar
Eng kam: 1
Modelga bogʻliq
Standart—
Maydonmax_completion_tokensTurintegerTalabIxtiyoriyQiymatlar va cheklovlar
Eng kam: 1
Modelga bogʻliq
Standart—
MaydonstreamTurbooleanTalabIxtiyoriyQiymatlar va cheklovlarStandartfalse
Maydonstream_options.include_usageTurbooleanTalabIxtiyoriyQiymatlar va cheklovlar
Modelga bogʻliq
Standart—
MaydontemperatureTurnumberTalabIxtiyoriyQiymatlar va cheklovlar
Modelga bogʻliq
Standart—
Maydontop_pTurnumberTalabIxtiyoriyQiymatlar va cheklovlar
Modelga bogʻliq
Standart—
MaydonstopTurstring|string[]TalabIxtiyoriyQiymatlar va cheklovlar
Modelga bogʻliq
Standart—
MaydontoolsTurfunction_tool[]TalabIxtiyoriyQiymatlar va cheklovlar
Modelga bogʻliq
Standart—
Maydontools[].typeTurstringTalabIxtiyoriyQiymatlar va cheklovlar
function
Modelga bogʻliq
Standart—
Maydontools[].function.nameTurstringTalabMajburiyQiymatlar va cheklovlar
Quyidagi holatda qo‘llanadi: Funksiya vositasi taqdim etilgan
Standart—
Maydontools[].function.descriptionTurstringTalabIxtiyoriyQiymatlar va cheklovlarStandart—
Maydontools[].function.parametersTurJSON_schemaTalabIxtiyoriyQiymatlar va cheklovlarStandart—
Maydontool_choiceTurstring|objectTalabIxtiyoriyQiymatlar va cheklovlar
Modelga bogʻliq
Standart—
Maydonparallel_tool_callsTurbooleanTalabIxtiyoriyQiymatlar va cheklovlar
Modelga bogʻliq
Standart—
Maydonresponse_formatTurobjectTalabIxtiyoriyQiymatlar va cheklovlar
Modelga bogʻliq
Standart—
Maydonreasoning_effortTurstringTalabIxtiyoriyQiymatlar va cheklovlar
Modelga bogʻliq
Standart—
MaydonreasoningTurobjectTalabIxtiyoriyQiymatlar va cheklovlar
Modelga bogʻliq
Standart—
Maydonservice_tierTurstringTalabIxtiyoriyQiymatlar va cheklovlar
Modelga bogʻliq
Standart—
MaydoninstructionsTurstringTalabIxtiyoriyQiymatlar va cheklovlar
Moslik maydoni
Standart—
MaydonfunctionsTurfunction[]TalabIxtiyoriyQiymatlar va cheklovlar
Modelga bogʻliq
Standart—
Maydonfunction_callTurstring|objectTalabIxtiyoriyQiymatlar va cheklovlar
Modelga bogʻliq
Standart—
Maydonprompt_cache_optionsTurobjectTalabIxtiyoriyQiymatlar va cheklovlar
Modelga bogʻliq
Standart—
MaydonmodalitiesTurstring[]TalabIxtiyoriyQiymatlar va cheklovlar
text
Standart—
MaydonproviderTurobjectTalabIxtiyoriyQiymatlar va cheklovlar
Shartlar: Ushbu Ultra matn marshrutida provider.options rad etiladi
Standart—
Maydoncache_control.ttlTurstringTalabIxtiyoriyQiymatlar va cheklovlar
Shartlar: Haqiqiy prompt-kesh joylarida 1h rad etiladi
Standart—
Kirish materiallari birikmalari

Matn · UTF8 matni

messages[].content

Usul parametrlari va hayot sikli
ParametrParametr talablari
Parametrcontent_typeParametr talablariapplication/json
ParametrrequiredParametr talablarimodel, messages
Parametrmaterial_typesParametr talablaritext
ParametrmessagesParametr talablarirole/content tuzilishidagi xabarlar massivi
Parametrfile_materialParametr talablariHaqiqiy UTF-8 hujjati aynan matn sifatida kiritiladi; fayl IDsi faraz qilinmaydi
Parametroptional_controlsParametr talablaristream, temperature, top_p, stop, max_tokens, max_completion_tokens, reasoning, response_format, tools, tool_choice
Parametrcontrol_scopeParametr talablariModelga xos; foydalanuvchi funksiya vositalari hostingdagi vositalardan farq qiladi
Parametroutput_modalitiesParametr talablaritext
Parametrhosted_operationsParametr talablarifalse
Parametrmultimodal_input_bindingParametr talablarinull

Hayot sikli: synchronous_or_streamed

Aniq model IDsini messages bilan yuboring.

Kontekst uzunligi chiqishning yuqori chegarasi emas.

Matn fayli aynan matnni taqdim etishi mumkin; tasvir, audio va fayl obyekti kirishlari aniq bog‘lashni talab qiladi.

Tariflar

Tarif ma’lumotlari so‘rov imkoniyatlarini qo‘shmaydi. Qo‘llab-quvvatlanadigan parametrlar tanlangan usulda ko‘rsatilgan.

Tezkor rejim
Standart tarif Tezkor rejim tanlanganda
Flex rejimi
Standart tarif flex rejimi tanlanganda
Maksimal fikrlash darajasi
Standart tarif Maksimal fikrlash darajasi uchun standart (default) tuzatish qo‘llanganda
Fikrlash darajasi · yuqori
Standart tarif Fikrlash darajasi yuqori bo‘lganda
Fikrlash darajasi · past
Standart tarif Fikrlash darajasi past bo‘lganda
Fikrlash darajasi · maksimal
Standart tarif Fikrlash darajasi maksimal bo‘lganda
Fikrlash darajasi · o‘rtacha
Standart tarif Fikrlash darajasi o‘rtacha bo‘lganda
Fikrlash darajasi · xhigh
Standart tarif Fikrlash darajasi xhigh bo‘lganda

Ailoot tariflari

Sozlamalar bo‘yicha narxlar

Har bir to‘lovni ko‘rsatilgan shartlarga moslang. Har bir muqobil sozlamalar to‘plami uchun bitta tarifdan foydalaning.

SozlamaTariflar jadvaliKontekst tokenlari soni bundan ko‘pKontekst tokenlari soni bundan oshmaydi, chegara kiradiTo‘lov
SozlamaTokenlar uchun bazaviy tariflarTariflar jadvaliAsosiy tarifKontekst tokenlari soni bundan ko‘p—Kontekst tokenlari soni bundan oshmaydi, chegara kiradiYuqori chegara yo‘qTo‘lov
Kirish · Kirish tokenlari $0.02 / 1K token
Chiqish · Chiqish tokenlari $0.1 / 1K token
Kirish · Keshdan o‘qish $0.0005 / 1K token
Kirish · Keshga yozish $0.025 / 1K token
Kirish · Keshga yozish, 1 soat $0.04 / 1K token
SozlamaSo‘rov uzunligi bo‘yicha 1-darajaTariflar jadvali—Kontekst tokenlari soni bundan ko‘p0Kontekst tokenlari soni bundan oshmaydi, chegara kiradiYuqori chegara yo‘qTo‘lov
Kirish · Kirish tokenlari $0.02 / 1K token
Chiqish · Chiqish tokenlari $0.1 / 1K token
Kirish · Keshdan o‘qish $0.0005 / 1K token
Kirish · Keshga yozish $0.025 / 1K token
Kirish · Keshga yozish, 1 soat $0.04 / 1K token

Ailoot so‘rovdan oldin taxminiy summani band qiladi. Natijadan keyin o‘lchangan sarf asosidagi yakuniy to‘lovni yechadi. Oqimli javob bo‘yicha yakuniy hisob-kitob yakuniy sarf yozuviga asoslanadi. Summani band qilish va to‘lovni hisoblash tartibi →

So‘rov namunalari

Ailoot Ultra · OpenAI Chat

curlPython SDKPython oqimi
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
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"))
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")

Natijalarni olish va saqlash

Ailoot Ultra · OpenAI Chat

json yoki SSE

Barcha tayyor natijalarni saqlash

Qaytarilgan har bir to‘liq javob, fayl va kontent qismini saqlang.

Har bir javob variantini va uning kontenti, vosita chaqiruvlari hamda fikrlash ma’lumotlarini saqlang. SSEda o‘zgarish qismlarini variant va vosita indeksi bo‘yicha yig‘ing, yakuniy tugash sababi va sarf ma’lumotlarini saqlang.

Asl javobni tekshirish kerak bo‘lsa

So‘rov va javob IDlari hamda sarlavhalarini saqlang. Matn vazifasini olish uchun umumiy URL taqdim etilmagan.

Javob maydonlari
MaydonTur
Maydonchoices[].indexTurinteger
Maydonchoices[].message.contentTurstring|null
Maydonchoices[].message.tool_callsTurtool_call[]
Maydonchoices[].message.reasoning_contentTurstring
Maydonchoices[].message.reasoning_detailsTurobject|array
Maydonchoices[].finish_reasonTurstring|null
MaydonusageTurobject
Xatolar va keyingi qadamlar
JavobShartKeyingi qadam
Javob400 · invalid_request_errorShartMajburiy maydonlar, material ifodasi yoki parametr qiymati noto‘g‘riKeyingi qadamYangi yaratish so‘rovidan oldin ko‘rsatilgan maydonlarni tuzating.

Taxalluslar

Model taxalluslari

Ailoot claude-fable-5-1, claude, claude-fable, claude-fable-latest, claude-latest
Ailoot Ultra anthropic/claude-fable-5.1, ~anthropic/claude-fable-latest

Usul yo‘llari taxalluslari

Yuqorida ko‘rsatilgan usul yo‘llaridan foydalaning.

Chaqirish uchun tegishli ID lar

anthropic/claude-fable-5.1, claude, claude-fable, claude-fable-latest, claude-latest, ~anthropic/claude-fable-latest, claude-fable-5-1

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

anthropic/claude-fable-5.1

Anthropic /anthropic/claude-fable-5.1
Model ID
  • anthropic/claude-fable-5.1
  • ~anthropic/claude-fable-latest

Boshlash

Claude Fable 5.1 murakkab tadqiqotlar, koddagi yirik o‘zgarishlar va davomli professional tahlil uchun mo‘ljallangan. Katta kontekstdagi ma’lumotlarni bog‘laydi hamda matn va batafsil tasvirlar bilan ishlaydi.

Qabul qilinadigan kirish ma’lumotlari
Matn
Natijalar
json · sse

Ailoot da mavjud · kirish ma’lumotlari va usullar

Ailoot Ultra · Anthropic Messages POST /v1/messages
Kirish
text
Chiqish
json, sse
Chiqish formati
JSON yoki SSE
MaydonTurTalabQiymatlar va cheklovlarStandart
MaydonmodelTurstringTalabMajburiyQiymatlar va cheklovlar
anthropic/claude-fable-5.1
Standart—
MaydonmessagesTurmessage[]TalabMajburiyQiymatlar va cheklovlarStandart—
Maydonmessages[].roleTurstringTalabMajburiyQiymatlar va cheklovlar
user, assistant
Standart—
Maydonmessages[].contentTurstringTalabMajburiyQiymatlar va cheklovlarStandart—
Maydonmax_tokensTurintegerTalabMajburiyQiymatlar va cheklovlarStandart—
MaydonstreamTurbooleanTalabIxtiyoriyQiymatlar va cheklovlarStandartfalse
Kirish materiallari birikmalari

Matn · UTF-8 matni

messages[].content satri

Usul parametrlari va hayot sikli
ParametrParametr talablari
Parametrcontent_typeParametr talablariapplication/json
ParametrrequiredParametr talablarimodel, messages, max_tokens
Parametroptional_controlsParametr talablaristream
Parametrmaterial_typesParametr talablaritext
Parametrtext_file_materialParametr talablariHaqiqiy UTF-8 hujjatini o‘qing va uning matnini ko‘rsatilgan kirish yoki xabar kontenti satriga joylashtiring.

Hayot sikli: synchronous_or_streamed

Tariflar

Tarif ma’lumotlari so‘rov imkoniyatlarini qo‘shmaydi. Qo‘llab-quvvatlanadigan parametrlar tanlangan usulda ko‘rsatilgan.

Tezkor rejim
Standart tarif Tezkor rejim tanlanganda
Flex rejimi
Standart tarif flex rejimi tanlanganda
Maksimal fikrlash darajasi
Standart tarif Maksimal fikrlash darajasi uchun standart (default) tuzatish qo‘llanganda
Fikrlash darajasi · yuqori
Standart tarif Fikrlash darajasi yuqori bo‘lganda
Fikrlash darajasi · past
Standart tarif Fikrlash darajasi past bo‘lganda
Fikrlash darajasi · maksimal
Standart tarif Fikrlash darajasi maksimal bo‘lganda
Fikrlash darajasi · o‘rtacha
Standart tarif Fikrlash darajasi o‘rtacha bo‘lganda
Fikrlash darajasi · xhigh
Standart tarif Fikrlash darajasi xhigh bo‘lganda

Ailoot tariflari

Sozlamalar bo‘yicha narxlar

Har bir to‘lovni ko‘rsatilgan shartlarga moslang. Har bir muqobil sozlamalar to‘plami uchun bitta tarifdan foydalaning.

SozlamaTariflar jadvaliKontekst tokenlari soni bundan ko‘pKontekst tokenlari soni bundan oshmaydi, chegara kiradiTo‘lov
SozlamaTokenlar uchun bazaviy tariflarTariflar jadvaliAsosiy tarifKontekst tokenlari soni bundan ko‘p—Kontekst tokenlari soni bundan oshmaydi, chegara kiradiYuqori chegara yo‘qTo‘lov
Kirish · Kirish tokenlari $0.02 / 1K token
Chiqish · Chiqish tokenlari $0.1 / 1K token
Kirish · Keshdan o‘qish $0.0005 / 1K token
Kirish · Keshga yozish $0.025 / 1K token
Kirish · Keshga yozish, 1 soat $0.04 / 1K token
SozlamaSo‘rov uzunligi bo‘yicha 1-darajaTariflar jadvali—Kontekst tokenlari soni bundan ko‘p0Kontekst tokenlari soni bundan oshmaydi, chegara kiradiYuqori chegara yo‘qTo‘lov
Kirish · Kirish tokenlari $0.02 / 1K token
Chiqish · Chiqish tokenlari $0.1 / 1K token
Kirish · Keshdan o‘qish $0.0005 / 1K token
Kirish · Keshga yozish $0.025 / 1K token
Kirish · Keshga yozish, 1 soat $0.04 / 1K token

Ailoot so‘rovdan oldin taxminiy summani band qiladi. Natijadan keyin o‘lchangan sarf asosidagi yakuniy to‘lovni yechadi. Oqimli javob bo‘yicha yakuniy hisob-kitob yakuniy sarf yozuviga asoslanadi. Summani band qilish va to‘lovni hisoblash tartibi →

So‘rov namunalari

Ailoot Ultra · Anthropic Messages

To‘liq minimal JSON so‘rov tanasicurl · O‘zingizning UTF-8 hujjatingizdan foydalaningPython · Natijani to‘liq saqlang
{
  "model": "anthropic/claude-fable-5.1",
  "max_tokens": 128,
  "messages": [
    {
      "role": "user",
      "content": "Summarize the incident report."
    }
  ],
  "stream": false
}
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
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))

Natijalarni olish va saqlash

Ailoot Ultra · Anthropic Messages

JSON yoki SSE

Barcha tayyor natijalarni saqlash

Qaytarilgan har bir to‘liq javob, fayl va kontent qismini saqlang.

Barcha kontent bloklari, fikrlash imzolari va haqiqiy vosita ishlatish IDlarini saqlang. SSE bloklarining barcha o‘zgarish qismlarini yig‘ing; birinchi matn bloki to‘liq chiqish emas.

Asl javobni tekshirish kerak bo‘lsa

So‘rov va javob IDlari hamda sarlavhalarini saqlang. Matn vazifasini olish uchun umumiy URL taqdim etilmagan.

Javob maydonlari
MaydonTur
MaydonidTurstring
MaydonmodelTurstring
Maydoncontent[]Turtext|thinking|tool_use|other content block
Maydonstop_reasonTurstring|null
MaydonusageTurobject
Xatolar va keyingi qadamlar
JavobShartKeyingi qadam
Javob400 · invalid_request_errorShartMajburiy maydonlar, material ifodasi yoki parametr qiymati noto‘g‘riKeyingi qadamYangi yaratish so‘rovidan oldin ko‘rsatilgan maydonlarni tuzating.

Taxalluslar

Model taxalluslari

Ailoot claude-fable-5-1, claude, claude-fable, claude-fable-latest, claude-latest
Ailoot Ultra anthropic/claude-fable-5.1, ~anthropic/claude-fable-latest

Usul yo‘llari taxalluslari

Yuqorida ko‘rsatilgan usul yo‘llaridan foydalaning.

Chaqirish uchun tegishli ID lar

anthropic/claude-fable-5.1, claude, claude-fable, claude-fable-latest, claude-latest, ~anthropic/claude-fable-latest, claude-fable-5-1

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

~anthropic/claude-fable-latest

Anthropic /~anthropic/claude-fable-latest
Model ID
  • anthropic/claude-fable-5.1
  • ~anthropic/claude-fable-latest

Boshlash

Claude Fable 5.1 murakkab tadqiqotlar, koddagi yirik o‘zgarishlar va davomli professional tahlil uchun mo‘ljallangan. Katta kontekstdagi ma’lumotlarni bog‘laydi hamda matn va batafsil tasvirlar bilan ishlaydi.

Qabul qilinadigan kirish ma’lumotlari
Matn
Natijalar
Matn

Ailoot da mavjud · kirish ma’lumotlari va usullar

Ailoot Ultra · OpenAI Chat POST /v1/chat/completions
Kirish
text
Chiqish
text
Chiqish formati
json yoki SSE
MaydonTurTalabQiymatlar va cheklovlarStandart
MaydonmodelTurstringTalabMajburiyQiymatlar va cheklovlar
~anthropic/claude-fable-latest
Standart—
MaydonmessagesTurmessage[]TalabMajburiyQiymatlar va cheklovlar
Elementlarning eng kam soni: 1
Standart—
Maydonmessages[].roleTurstringTalabMajburiyQiymatlar va cheklovlar
Namunalar: system, user, assistant, tool, function
Shartlar: Bu rollar manba kodining moslik turlarida ochiq ifodalangan; aniq rollar to‘plami har bir modelga xos bo‘lib qoladi.
Modelga bogʻliq
Standart—
Maydonmessages[].contentTurstring|content_part[]|nullTalabIxtiyoriyQiymatlar va cheklovlarStandart—
Maydonmessages[].tool_callsTurtool_call[]TalabIxtiyoriyQiymatlar va cheklovlarStandart—
Maydonmessages[].tool_call_idTurstringTalabIxtiyoriyQiymatlar va cheklovlar
Quyidagi holatda qo‘llanadi: role=tool; haqiqatan qaytarilgan IDdan foydalaning
Standart—
Maydonmessages[].nameTurstringTalabIxtiyoriyQiymatlar va cheklovlarStandart—
Maydonmessages[].reasoning_contentTurstringTalabIxtiyoriyQiymatlar va cheklovlar
Quyidagi holatda qo‘llanadi: Ushbu model foydalanganda, haqiqatan qaytarilgan fikrlash ma’lumotlarini keyingi so‘rovda qayta yuboring
Standart—
Maydonmessages[].reasoning_detailsTurobject|arrayTalabIxtiyoriyQiymatlar va cheklovlar
Modelga bogʻliq
Standart—
Maydonmax_tokensTurintegerTalabIxtiyoriyQiymatlar va cheklovlar
Eng kam: 1
Modelga bogʻliq
Standart—
Maydonmax_completion_tokensTurintegerTalabIxtiyoriyQiymatlar va cheklovlar
Eng kam: 1
Modelga bogʻliq
Standart—
MaydonstreamTurbooleanTalabIxtiyoriyQiymatlar va cheklovlarStandartfalse
Maydonstream_options.include_usageTurbooleanTalabIxtiyoriyQiymatlar va cheklovlar
Modelga bogʻliq
Standart—
MaydontemperatureTurnumberTalabIxtiyoriyQiymatlar va cheklovlar
Modelga bogʻliq
Standart—
Maydontop_pTurnumberTalabIxtiyoriyQiymatlar va cheklovlar
Modelga bogʻliq
Standart—
MaydonstopTurstring|string[]TalabIxtiyoriyQiymatlar va cheklovlar
Modelga bogʻliq
Standart—
MaydontoolsTurfunction_tool[]TalabIxtiyoriyQiymatlar va cheklovlar
Modelga bogʻliq
Standart—
Maydontools[].typeTurstringTalabIxtiyoriyQiymatlar va cheklovlar
function
Modelga bogʻliq
Standart—
Maydontools[].function.nameTurstringTalabMajburiyQiymatlar va cheklovlar
Quyidagi holatda qo‘llanadi: Funksiya vositasi taqdim etilgan
Standart—
Maydontools[].function.descriptionTurstringTalabIxtiyoriyQiymatlar va cheklovlarStandart—
Maydontools[].function.parametersTurJSON_schemaTalabIxtiyoriyQiymatlar va cheklovlarStandart—
Maydontool_choiceTurstring|objectTalabIxtiyoriyQiymatlar va cheklovlar
Modelga bogʻliq
Standart—
Maydonparallel_tool_callsTurbooleanTalabIxtiyoriyQiymatlar va cheklovlar
Modelga bogʻliq
Standart—
Maydonresponse_formatTurobjectTalabIxtiyoriyQiymatlar va cheklovlar
Modelga bogʻliq
Standart—
Maydonreasoning_effortTurstringTalabIxtiyoriyQiymatlar va cheklovlar
Modelga bogʻliq
Standart—
MaydonreasoningTurobjectTalabIxtiyoriyQiymatlar va cheklovlar
Modelga bogʻliq
Standart—
Maydonservice_tierTurstringTalabIxtiyoriyQiymatlar va cheklovlar
Modelga bogʻliq
Standart—
MaydoninstructionsTurstringTalabIxtiyoriyQiymatlar va cheklovlar
Moslik maydoni
Standart—
MaydonfunctionsTurfunction[]TalabIxtiyoriyQiymatlar va cheklovlar
Modelga bogʻliq
Standart—
Maydonfunction_callTurstring|objectTalabIxtiyoriyQiymatlar va cheklovlar
Modelga bogʻliq
Standart—
Maydonprompt_cache_optionsTurobjectTalabIxtiyoriyQiymatlar va cheklovlar
Modelga bogʻliq
Standart—
MaydonmodalitiesTurstring[]TalabIxtiyoriyQiymatlar va cheklovlar
text
Standart—
MaydonproviderTurobjectTalabIxtiyoriyQiymatlar va cheklovlar
Shartlar: Ushbu Ultra matn marshrutida provider.options rad etiladi
Standart—
Maydoncache_control.ttlTurstringTalabIxtiyoriyQiymatlar va cheklovlar
Shartlar: Haqiqiy prompt-kesh joylarida 1h rad etiladi
Standart—
Kirish materiallari birikmalari

Matn · UTF8 matni

messages[].content

Usul parametrlari va hayot sikli
ParametrParametr talablari
Parametrcontent_typeParametr talablariapplication/json
ParametrrequiredParametr talablarimodel, messages
Parametrmaterial_typesParametr talablaritext
ParametrmessagesParametr talablarirole/content tuzilishidagi xabarlar massivi
Parametrfile_materialParametr talablariHaqiqiy UTF-8 hujjati aynan matn sifatida kiritiladi; fayl IDsi faraz qilinmaydi
Parametroptional_controlsParametr talablaristream, temperature, top_p, stop, max_tokens, max_completion_tokens, reasoning, response_format, tools, tool_choice
Parametrcontrol_scopeParametr talablariModelga xos; foydalanuvchi funksiya vositalari hostingdagi vositalardan farq qiladi
Parametroutput_modalitiesParametr talablaritext
Parametrhosted_operationsParametr talablarifalse
Parametrmultimodal_input_bindingParametr talablarinull

Hayot sikli: synchronous_or_streamed

Aniq model IDsini messages bilan yuboring.

Kontekst uzunligi chiqishning yuqori chegarasi emas.

Matn fayli aynan matnni taqdim etishi mumkin; tasvir, audio va fayl obyekti kirishlari aniq bog‘lashni talab qiladi.

Tariflar

Tarif ma’lumotlari so‘rov imkoniyatlarini qo‘shmaydi. Qo‘llab-quvvatlanadigan parametrlar tanlangan usulda ko‘rsatilgan.

Tezkor rejim
Standart tarif Tezkor rejim tanlanganda
Flex rejimi
Standart tarif flex rejimi tanlanganda
Maksimal fikrlash darajasi
Standart tarif Maksimal fikrlash darajasi uchun standart (default) tuzatish qo‘llanganda
Fikrlash darajasi · yuqori
Standart tarif Fikrlash darajasi yuqori bo‘lganda
Fikrlash darajasi · past
Standart tarif Fikrlash darajasi past bo‘lganda
Fikrlash darajasi · maksimal
Standart tarif Fikrlash darajasi maksimal bo‘lganda
Fikrlash darajasi · o‘rtacha
Standart tarif Fikrlash darajasi o‘rtacha bo‘lganda
Fikrlash darajasi · xhigh
Standart tarif Fikrlash darajasi xhigh bo‘lganda

Ailoot tariflari

Sozlamalar bo‘yicha narxlar

Har bir to‘lovni ko‘rsatilgan shartlarga moslang. Har bir muqobil sozlamalar to‘plami uchun bitta tarifdan foydalaning.

SozlamaTariflar jadvaliKontekst tokenlari soni bundan ko‘pKontekst tokenlari soni bundan oshmaydi, chegara kiradiTo‘lov
SozlamaTokenlar uchun bazaviy tariflarTariflar jadvaliAsosiy tarifKontekst tokenlari soni bundan ko‘p—Kontekst tokenlari soni bundan oshmaydi, chegara kiradiYuqori chegara yo‘qTo‘lov
Kirish · Kirish tokenlari $0.02 / 1K token
Chiqish · Chiqish tokenlari $0.1 / 1K token
Kirish · Keshdan o‘qish $0.0005 / 1K token
Kirish · Keshga yozish $0.025 / 1K token
Kirish · Keshga yozish, 1 soat $0.04 / 1K token
SozlamaSo‘rov uzunligi bo‘yicha 1-darajaTariflar jadvali—Kontekst tokenlari soni bundan ko‘p0Kontekst tokenlari soni bundan oshmaydi, chegara kiradiYuqori chegara yo‘qTo‘lov
Kirish · Kirish tokenlari $0.02 / 1K token
Chiqish · Chiqish tokenlari $0.1 / 1K token
Kirish · Keshdan o‘qish $0.0005 / 1K token
Kirish · Keshga yozish $0.025 / 1K token
Kirish · Keshga yozish, 1 soat $0.04 / 1K token

Ailoot so‘rovdan oldin taxminiy summani band qiladi. Natijadan keyin o‘lchangan sarf asosidagi yakuniy to‘lovni yechadi. Oqimli javob bo‘yicha yakuniy hisob-kitob yakuniy sarf yozuviga asoslanadi. Summani band qilish va to‘lovni hisoblash tartibi →

So‘rov namunalari

Ailoot Ultra · OpenAI Chat

curlPython SDKPython oqimi
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
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"))
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")

Natijalarni olish va saqlash

Ailoot Ultra · OpenAI Chat

json yoki SSE

Barcha tayyor natijalarni saqlash

Qaytarilgan har bir to‘liq javob, fayl va kontent qismini saqlang.

Har bir javob variantini va uning kontenti, vosita chaqiruvlari hamda fikrlash ma’lumotlarini saqlang. SSEda o‘zgarish qismlarini variant va vosita indeksi bo‘yicha yig‘ing, yakuniy tugash sababi va sarf ma’lumotlarini saqlang.

Asl javobni tekshirish kerak bo‘lsa

So‘rov va javob IDlari hamda sarlavhalarini saqlang. Matn vazifasini olish uchun umumiy URL taqdim etilmagan.

Javob maydonlari
MaydonTur
Maydonchoices[].indexTurinteger
Maydonchoices[].message.contentTurstring|null
Maydonchoices[].message.tool_callsTurtool_call[]
Maydonchoices[].message.reasoning_contentTurstring
Maydonchoices[].message.reasoning_detailsTurobject|array
Maydonchoices[].finish_reasonTurstring|null
MaydonusageTurobject
Xatolar va keyingi qadamlar
JavobShartKeyingi qadam
Javob400 · invalid_request_errorShartMajburiy maydonlar, material ifodasi yoki parametr qiymati noto‘g‘riKeyingi qadamYangi yaratish so‘rovidan oldin ko‘rsatilgan maydonlarni tuzating.

Taxalluslar

Model taxalluslari

Ailoot claude-fable-5-1, claude, claude-fable, claude-fable-latest, claude-latest
Ailoot Ultra anthropic/claude-fable-5.1, ~anthropic/claude-fable-latest

Usul yo‘llari taxalluslari

Yuqorida ko‘rsatilgan usul yo‘llaridan foydalaning.

Chaqirish uchun tegishli ID lar

anthropic/claude-fable-5.1, claude, claude-fable, claude-fable-latest, claude-latest, ~anthropic/claude-fable-latest, claude-fable-5-1

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

~anthropic/claude-fable-latest

Anthropic /~anthropic/claude-fable-latest
Model ID
  • anthropic/claude-fable-5.1
  • ~anthropic/claude-fable-latest

Boshlash

Claude Fable 5.1 murakkab tadqiqotlar, koddagi yirik o‘zgarishlar va davomli professional tahlil uchun mo‘ljallangan. Katta kontekstdagi ma’lumotlarni bog‘laydi hamda matn va batafsil tasvirlar bilan ishlaydi.

Qabul qilinadigan kirish ma’lumotlari
Matn
Natijalar
json · sse

Ailoot da mavjud · kirish ma’lumotlari va usullar

Ailoot Ultra · Anthropic Messages POST /v1/messages
Kirish
text
Chiqish
json, sse
Chiqish formati
JSON yoki SSE
MaydonTurTalabQiymatlar va cheklovlarStandart
MaydonmodelTurstringTalabMajburiyQiymatlar va cheklovlar
~anthropic/claude-fable-latest
Standart—
MaydonmessagesTurmessage[]TalabMajburiyQiymatlar va cheklovlarStandart—
Maydonmessages[].roleTurstringTalabMajburiyQiymatlar va cheklovlar
user, assistant
Standart—
Maydonmessages[].contentTurstringTalabMajburiyQiymatlar va cheklovlarStandart—
Maydonmax_tokensTurintegerTalabMajburiyQiymatlar va cheklovlarStandart—
MaydonstreamTurbooleanTalabIxtiyoriyQiymatlar va cheklovlarStandartfalse
Kirish materiallari birikmalari

Matn · UTF-8 matni

messages[].content satri

Usul parametrlari va hayot sikli
ParametrParametr talablari
Parametrcontent_typeParametr talablariapplication/json
ParametrrequiredParametr talablarimodel, messages, max_tokens
Parametroptional_controlsParametr talablaristream
Parametrmaterial_typesParametr talablaritext
Parametrtext_file_materialParametr talablariHaqiqiy UTF-8 hujjatini o‘qing va uning matnini ko‘rsatilgan kirish yoki xabar kontenti satriga joylashtiring.

Hayot sikli: synchronous_or_streamed

Tariflar

Tarif ma’lumotlari so‘rov imkoniyatlarini qo‘shmaydi. Qo‘llab-quvvatlanadigan parametrlar tanlangan usulda ko‘rsatilgan.

Tezkor rejim
Standart tarif Tezkor rejim tanlanganda
Flex rejimi
Standart tarif flex rejimi tanlanganda
Maksimal fikrlash darajasi
Standart tarif Maksimal fikrlash darajasi uchun standart (default) tuzatish qo‘llanganda
Fikrlash darajasi · yuqori
Standart tarif Fikrlash darajasi yuqori bo‘lganda
Fikrlash darajasi · past
Standart tarif Fikrlash darajasi past bo‘lganda
Fikrlash darajasi · maksimal
Standart tarif Fikrlash darajasi maksimal bo‘lganda
Fikrlash darajasi · o‘rtacha
Standart tarif Fikrlash darajasi o‘rtacha bo‘lganda
Fikrlash darajasi · xhigh
Standart tarif Fikrlash darajasi xhigh bo‘lganda

Ailoot tariflari

Sozlamalar bo‘yicha narxlar

Har bir to‘lovni ko‘rsatilgan shartlarga moslang. Har bir muqobil sozlamalar to‘plami uchun bitta tarifdan foydalaning.

SozlamaTariflar jadvaliKontekst tokenlari soni bundan ko‘pKontekst tokenlari soni bundan oshmaydi, chegara kiradiTo‘lov
SozlamaTokenlar uchun bazaviy tariflarTariflar jadvaliAsosiy tarifKontekst tokenlari soni bundan ko‘p—Kontekst tokenlari soni bundan oshmaydi, chegara kiradiYuqori chegara yo‘qTo‘lov
Kirish · Kirish tokenlari $0.02 / 1K token
Chiqish · Chiqish tokenlari $0.1 / 1K token
Kirish · Keshdan o‘qish $0.0005 / 1K token
Kirish · Keshga yozish $0.025 / 1K token
Kirish · Keshga yozish, 1 soat $0.04 / 1K token
SozlamaSo‘rov uzunligi bo‘yicha 1-darajaTariflar jadvali—Kontekst tokenlari soni bundan ko‘p0Kontekst tokenlari soni bundan oshmaydi, chegara kiradiYuqori chegara yo‘qTo‘lov
Kirish · Kirish tokenlari $0.02 / 1K token
Chiqish · Chiqish tokenlari $0.1 / 1K token
Kirish · Keshdan o‘qish $0.0005 / 1K token
Kirish · Keshga yozish $0.025 / 1K token
Kirish · Keshga yozish, 1 soat $0.04 / 1K token

Ailoot so‘rovdan oldin taxminiy summani band qiladi. Natijadan keyin o‘lchangan sarf asosidagi yakuniy to‘lovni yechadi. Oqimli javob bo‘yicha yakuniy hisob-kitob yakuniy sarf yozuviga asoslanadi. Summani band qilish va to‘lovni hisoblash tartibi →

So‘rov namunalari

Ailoot Ultra · Anthropic Messages

To‘liq minimal JSON so‘rov tanasicurl · O‘zingizning UTF-8 hujjatingizdan foydalaningPython · Natijani to‘liq saqlang
{
  "model": "~anthropic/claude-fable-latest",
  "max_tokens": 128,
  "messages": [
    {
      "role": "user",
      "content": "Summarize the incident report."
    }
  ],
  "stream": false
}
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
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))

Natijalarni olish va saqlash

Ailoot Ultra · Anthropic Messages

JSON yoki SSE

Barcha tayyor natijalarni saqlash

Qaytarilgan har bir to‘liq javob, fayl va kontent qismini saqlang.

Barcha kontent bloklari, fikrlash imzolari va haqiqiy vosita ishlatish IDlarini saqlang. SSE bloklarining barcha o‘zgarish qismlarini yig‘ing; birinchi matn bloki to‘liq chiqish emas.

Asl javobni tekshirish kerak bo‘lsa

So‘rov va javob IDlari hamda sarlavhalarini saqlang. Matn vazifasini olish uchun umumiy URL taqdim etilmagan.

Javob maydonlari
MaydonTur
MaydonidTurstring
MaydonmodelTurstring
Maydoncontent[]Turtext|thinking|tool_use|other content block
Maydonstop_reasonTurstring|null
MaydonusageTurobject
Xatolar va keyingi qadamlar
JavobShartKeyingi qadam
Javob400 · invalid_request_errorShartMajburiy maydonlar, material ifodasi yoki parametr qiymati noto‘g‘riKeyingi qadamYangi yaratish so‘rovidan oldin ko‘rsatilgan maydonlarni tuzating.

Taxalluslar

Model taxalluslari

Ailoot claude-fable-5-1, claude, claude-fable, claude-fable-latest, claude-latest
Ailoot Ultra anthropic/claude-fable-5.1, ~anthropic/claude-fable-latest

Usul yo‘llari taxalluslari

Yuqorida ko‘rsatilgan usul yo‘llaridan foydalaning.

Chaqirish uchun tegishli ID lar

anthropic/claude-fable-5.1, claude, claude-fable, claude-fable-latest, claude-latest, ~anthropic/claude-fable-latest, claude-fable-5-1

FAQ · Anthropic: Claude Fable 5.1
Qanday kirish ma’lumotlari va natijalar mavjud?

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

So‘rov qaysi maydonlardan foydalanadi?

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

Qanday cheklovlar amal qiladi?

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

Batafsil

Ailoot’ni Claude Code, OpenCode, Hermes yoki ilovangizga ulang.

Kompaniya va uning loyihalar portfeli

Kompaniya va uning loyihalar portfeli: millionlab mijozlar; oylik sotuvlar hajmi milliardlarda.

Tokenlarni chegirma bilan xarid qiling.

Muntazam ish uchun obuna chegirmasi. Token xaridiga promokodlar — 50% gacha.

Obuna
Muntazam so‘rovlaringiz uchun chegirmali tarif tanlang.
50% gacha promokod
Xaridda kod kiriting. Narx amaldagi aksiya bilan qayta hisoblanadi.
Tarixdagi xarajatlar
Har so‘rov uchun model, token va summa saqlanadi.

Obuna tanlash · Model narxlarini ko‘rish

API’ni sotadigan mahsulotingizga ulang.

SaaS, ilova va botlar Ailoot ofertasi hamda litsenziya shartnomasiga muvofiq. Qayta sotishga reseller litsenziyasi so‘rang.

Tijorat ilovasi
Xizmatingizning pullik funksiyalariga matn, rasm, video va ovoz yaratishni qo‘shing.
Reseller litsenziyasi
Loyiha tavsifi va kirish sxemasini yuboring. Foydalanish va qayta sotishga yozma shartlarni so‘rang.
Saytdagi hujjatlar
Oferta, litsenziya shartnomasi va ma’lumotlar siyosati ulashdan oldin ochiq.

Reseller litsenziyasini so‘rash · Oferta va litsenziya shartnomasi