Source: https://ailoot.ai/models/zh-hant-tw/claude-haiku-4-5-20251001/
Canonical: https://ailoot.ai/models/zh-hant-tw/claude-haiku-4-5-20251001/
Language: zh-hant-tw

# claude-haiku-4-5-20251001

[Markdown](https://ailoot.ai/models/zh-hant-tw/claude-haiku-4-5-20251001/index.md) · [JSON](https://ailoot.ai/models/zh-hant-tw/claude-haiku-4-5-20251001/facts.json)

## [claude-haiku-4-5-20251001](https://ailoot.ai/models/zh-hant-tw/claude-haiku-4-5-20251001/)

Claude Haiku 4.5 用於互動式助理、使用者支援、日常資訊處理及程式碼工作。複雜問題可使用獨立的推理模式。

- [**Ailoot · Anthropic Messages** `POST /v1/messages` `claude-haiku-4-5-20251001`](https://ailoot.ai/models/zh-hant-tw/claude-haiku-4-5-20251001/#method-0)
- [**Ailoot · OpenAI Responses** `POST /v1/responses` `claude-haiku-4-5-20251001`](https://ailoot.ai/models/zh-hant-tw/claude-haiku-4-5-20251001/#method-1)
- [**Ailoot · OpenAI Chat** `POST /v1/chat/completions` `claude-haiku-4-5-20251001`](https://ailoot.ai/models/zh-hant-tw/claude-haiku-4-5-20251001/#method-2)
- [**Ailoot · Anthropic Messages** `POST /v1/messages` `claude-haiku`](https://ailoot.ai/models/zh-hant-tw/claude-haiku-4-5-20251001/#method-3)
- [**Ailoot · OpenAI Responses** `POST /v1/responses` `claude-haiku`](https://ailoot.ai/models/zh-hant-tw/claude-haiku-4-5-20251001/#method-4)
- [**Ailoot · OpenAI Chat** `POST /v1/chat/completions` `claude-haiku`](https://ailoot.ai/models/zh-hant-tw/claude-haiku-4-5-20251001/#method-5)
- [**Ailoot · Anthropic Messages** `POST /v1/messages` `claude-haiku-latest`](https://ailoot.ai/models/zh-hant-tw/claude-haiku-4-5-20251001/#method-6)
- [**Ailoot · OpenAI Responses** `POST /v1/responses` `claude-haiku-latest`](https://ailoot.ai/models/zh-hant-tw/claude-haiku-4-5-20251001/#method-7)
- [**Ailoot · OpenAI Chat** `POST /v1/chat/completions` `claude-haiku-latest`](https://ailoot.ai/models/zh-hant-tw/claude-haiku-4-5-20251001/#method-8)

關於模型

此說明介紹模型的能力。Ailoot 可用的輸入、輸出與選項，依所選方法列於下方。

#### 每一步的回應都重要時

Anthropic 為對話助理、使用者服務、協作程式碼工作及原型開發設計了 Claude Haiku 4.5。適合使用者提問、取得結果後，立即調整下一步的循環。Anthropic 表示，此版本的回應延遲較低；實際時間取決於任務與應用程式。

Haiku 4.5 也適用於大量獨立任務。代理流程可將特定子任務交給它，再把結果傳給系統其他部分。描述的用途包括程式設計、推理及介面操作。應用程式提供對應工具時，模型才可呼叫工具或控制電腦；單次文字請求不會讓它取得工作環境的存取權。

#### 一般回應與手動推理預算

包含多個邏輯步驟的任務可使用 **extended thinking**：應用程式明確啟用推理，並透過 `budget_tokens` 設定預算。方法支援這些設定時，手動 `budget_tokens` 預算須至少為 **1024 個 Token**，且小於 `max_tokens`，以保留最終回應空間。前者引導分析量，`max_tokens` 則限制所有輸出。Haiku 4.5 使用的是手動模式；此版本不支援自適應推理或透過 `effort` 控制深度，也不支援在連續工具呼叫之間進行推理。

選擇任務時，應考量這項差異。一般模式適合直接對話；啟用推理則讓模型有空間分析程式碼或複雜問題。任務內容仍決定須分析哪些資訊，以及以何種形式呈現結果。

#### 素材與版本限制

模型接受**文字與圖片**，以文字回傳結果。脈絡視窗為**200 千個 Token**，回應上限為**64 千個 Token**。圖片與問題共同作為分析素材：模型可說明可見內容，並將其連結到文字任務。支援圖片輸入不代表能建立或編輯圖片。

模型開發商的一般視覺輸入格式為 JPEG/PNG/GIF/WebP，動畫使用第一個影格。原生分析時，長邊為 1568 像素，使用 1568 個視覺 Token；較大圖片會在分析前縮小。檔案與參數支援取決於應用程式的方法。

Anthropic 將此版本的交談風格描述為精簡、直接。宜事先指定所需詳細程度、結果形式及任務限制。可靠的內建知識界線為**二月 2025 年**；較晚事件的資訊須包含在任務素材中，或透過應用程式可用的工具取得。部分請求可能遭到拒絕。

若方法提供取樣設定，不能同時設定 `temperature` 與 `top_p`：此版本只能選擇其中一項。

實用任務

### 實用任務

英文技術範例

```
Answer a delivery question

Write a concise support reply using only these notes: order R17 left the warehouse Tuesday; the carrier estimates Friday delivery; the customer asks if Thursday is guaranteed. Explain the current estimate, answer the guarantee question directly and offer to check a new carrier update if one becomes available. Keep the reply under 80 words.
```

#### 預期結果

```
A customer-ready reply under 80 words, preserving the order ID and delivery estimate.
```

#### 檢查結果

```
Check that the reply never guarantees Thursday or invents a tracking update.
```

**Ailoot · Anthropic Messages** `POST /v1/messages` `claude-haiku-4-5-20251001`

[`claude-haiku-4-5-20251001`](https://ailoot.ai/models/zh-hant-tw/#m=claude-haiku-4-5-20251001&route=Core&caller=claude-haiku-4-5-20251001&fmt=messages)

Anthropic /`claude-haiku-4-5-20251001`

模型 ID

- `claude-haiku-4-5-20251001`
- `claude-haiku`
- `claude-haiku-latest`

### 入門

Claude Haiku 4.5 用於互動式助理、使用者支援、日常資訊處理及程式碼工作。複雜問題可使用獨立的推理模式。

接受的輸入

文字 · 圖片

結果

文字

### Ailoot 可用 · 輸入與方法

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

輸入

`text`, `image`

輸出

`text`

上下文

200,000 tokens

輸出上限

65,536 tokens

輸出格式

json 或 SSE

| 欄位 | 類型 | 要求 | 值與限制 | 預設值 |
| --- | --- | --- | --- | --- |
| 欄位`model` | 類型`string` | 要求必填 | 值與限制 claude-haiku-4-5-20251001 | 預設值— |
| 欄位`messages` | 類型`message[]` | 要求必填 | 值與限制 項目數下限: 1 | 預設值— |
| 欄位`messages[].role` | 類型`string` | 要求必填 | 值與限制 user, assistant | 預設值— |
| 欄位`messages[].content` | 類型`string\|content_block[]` | 要求必填 | 值與限制 | 預設值— |
| 欄位`system` | 類型`string\|content_block[]` | 要求選填 | 值與限制 | 預設值— |
| 欄位`max_tokens` | 類型`integer` | 要求必填 | 值與限制 最小值: 1 限制適用對象: 所選模型／卡片的確切上限 | 預設值— |
| 欄位`stream` | 類型`boolean` | 要求選填 | 值與限制 | 預設值false |
| 欄位`temperature` | 類型`number` | 要求選填 | 值與限制 依模型而定 | 預設值— |
| 欄位`top_p` | 類型`number` | 要求選填 | 值與限制 依模型而定 | 預設值— |
| 欄位`stop_sequences` | 類型`string[]` | 要求選填 | 值與限制 依模型而定 | 預設值— |
| 欄位`tools` | 類型`tool[]` | 要求選填 | 值與限制 依模型而定 | 預設值— |
| 欄位`tools[].name` | 類型`string` | 要求選填 | 值與限制 適用條件: 已提供工具 | 預設值— |
| 欄位`tools[].description` | 類型`string` | 要求選填 | 值與限制 | 預設值— |
| 欄位`tools[].input_schema` | 類型`JSON_schema` | 要求選填 | 值與限制 | 預設值— |
| 欄位`tool_choice` | 類型`object` | 要求選填 | 值與限制 依模型而定 | 預設值— |
| 欄位`thinking.type` | 類型`string` | 要求選填 | 值與限制 依模型而定 | 預設值— |
| 欄位`thinking.budget_tokens` | 類型`integer` | 要求選填 | 值與限制 依模型而定 | 預設值— |
| 欄位`output_config.effort` | 類型`string` | 要求選填 | 值與限制 依模型而定 | 預設值— |
| 欄位`metadata` | 類型`object` | 要求選填 | 值與限制 | 預設值— |
| 欄位`cache_control` | 類型`object` | 要求選填 | 值與限制 依模型而定 | 預設值— |

輸入素材組合

**文字** · UTF8 文字

`messages[].content 或 type=text 區塊`

**文字 + 圖片**

`{type:image,source:{type:base64,media_type,data}} 或 type=url 的來源`

方法參數與生命週期

| 參數 | 規格 |
| --- | --- |
| 參數`material_types` | 規格text, image |
| 參數`required` | 規格model, messages, max\_tokens |
| 參數`optional_controls` | 規格null |
| 參數`content_type` | 規格application/json |
| 參數`text_file_material` | 規格實際 UTF-8 內容以文字插入；檔案 ID／URLs 需要另有精確支援 |

生命週期： `exact retained published method`

方法結構與 ID 均為精確值；供應商能力與准入狀態分開。

### 方案

#### Ailoot 方法費率

輸入

US$0.001 */ 1K*

輸出

US$0.005 */ 1K*

讀取快取

US$0.0001 */ 1K*

寫入快取

US$0.00125 */ 1K*

寫入快取，5 分鐘

US$0.00125 */ 1K tokens*

寫入快取，1 小時

US$0.002 */ 1K tokens*

web\_search\_call

US$0.01 *每次呼叫*

最大呼叫次數 web\_search\_call

8

Ailoot 會在請求前預留估算金額。取得結果後，依實測用量結算最終費用。串流結算採用最終用量紀錄。[預留金額與結算的運作方式 →](https://ailoot.ai/docs/zh-hant-tw/billing/reserve/)

#### 參考費率詳情

模型層級的參考費率表不會變更方法選擇、報價或費用。實際計費採用所選 Ailoot 方法的費率。

anthropic/claude-haiku-4.5

#### 各設定的價格

| 設定 | 計費條件 | 費用 |
| --- | --- | --- |
| 設定anthropic/claude-haiku-4.5 · 預設設定 | 計費條件預設設定 | 費用 輸入 · 輸入 **US$0.002** / 1K Token 輸出 · 輸出 **US$0.01** / 1K Token |

claude-haiku-4-5-20251001 · 公布價格

#### 各設定的價格

| 設定 | 費用 |
| --- | --- |
| 設定claude-haiku-4-5-20251001 · 公布價格 | 費用 輸入 · 寫入快取 **$0.0025** 每 1K Token 輸入 · 讀取快取 **$0.0002** 每 1K Token 輸入 · 輸入 Token **$0.002** 每 1K Token 輸出 · 輸出 Token **$0.010** 每 1K Token 每次請求 **$0.000** 每次請求 |

### 請求範例

#### Ailoot · Anthropic Messages

文字範例輸入，圖片Python SDKNode.js SDKPython 串流

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

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

```python
import anthropic
import os

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

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

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

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

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

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

saveResult(msg);
```

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

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

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

with client.messages.stream(model='claude-haiku-4-5-20251001',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")
```

### 接收並儲存結果

#### Ailoot · Anthropic Messages

json 或 SSE

##### 保留所有已完成的結果

請保留所有完整傳回的回應、檔案與內容區塊。

保留所有內容區塊、思考簽章與實際工具使用 ID。組合所有 SSE 區塊增量；第一個文字區塊不是完整輸出。

##### 需要檢查原始回應時

保留請求／回應 ID 與標頭。未提供通用的文字工作擷取 URL。

回應欄位

| 欄位 | 類型 |
| --- | --- |
| 欄位`id` | 類型string |
| 欄位`model` | 類型string |
| 欄位`content[]` | 類型text\|thinking\|tool\_use\|other content block |
| 欄位`stop_reason` | 類型string\|null |
| 欄位`usage` | 類型object |

錯誤與後續步驟

| 回應 | 條件 | 下一步 |
| --- | --- | --- |
| 回應400 · `invalid_request_error` | 條件必要欄位、素材表示方式或參數值無效 | 下一步提出新的建立請求前，先修正指定欄位。 |

### 別名

#### 模型別名

**Ailoot** [`claude-haiku-4-5-20251001`](https://ailoot.ai/models/zh-hant-tw/#m=claude-haiku-4-5-20251001&route=Core&caller=claude-haiku-4-5-20251001&fmt=messages), [`claude-haiku`](https://ailoot.ai/models/zh-hant-tw/#m=claude-haiku-4-5-20251001&route=Core&caller=claude-haiku&fmt=messages), [`claude-haiku-latest`](https://ailoot.ai/models/zh-hant-tw/#m=claude-haiku-4-5-20251001&route=Core&caller=claude-haiku-latest&fmt=messages)

#### 方法路徑別名

請使用上方列出的 API 方法路徑。

#### 相關呼叫用 ID

[`claude-haiku-4-5-20251001`](https://ailoot.ai/models/zh-hant-tw/#m=claude-haiku-4-5-20251001&route=Core&caller=claude-haiku-4-5-20251001&fmt=messages), [`claude-haiku`](https://ailoot.ai/models/zh-hant-tw/#m=claude-haiku-4-5-20251001&route=Core&caller=claude-haiku&fmt=messages), [`claude-haiku-latest`](https://ailoot.ai/models/zh-hant-tw/#m=claude-haiku-4-5-20251001&route=Core&caller=claude-haiku-latest&fmt=messages)

**Ailoot · OpenAI Responses** `POST /v1/responses` `claude-haiku-4-5-20251001`

[`claude-haiku-4-5-20251001`](https://ailoot.ai/models/zh-hant-tw/#m=claude-haiku-4-5-20251001&route=Core&caller=claude-haiku-4-5-20251001&fmt=responses)

Anthropic /`claude-haiku-4-5-20251001`

模型 ID

- `claude-haiku-4-5-20251001`
- `claude-haiku`
- `claude-haiku-latest`

### 入門

Claude Haiku 4.5 用於互動式助理、使用者支援、日常資訊處理及程式碼工作。複雜問題可使用獨立的推理模式。

接受的輸入

文字 · 圖片

結果

文字

### Ailoot 可用 · 輸入與方法

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

輸入

`text`, `image`

輸出

`text`

上下文

200,000 tokens

輸出上限

65,536 tokens

輸出格式

json 或 SSE

| 欄位 | 類型 | 要求 | 值與限制 | 預設值 |
| --- | --- | --- | --- | --- |
| 欄位`model` | 類型`string` | 要求必填 | 值與限制 claude-haiku-4-5-20251001 | 預設值— |
| 欄位`input` | 類型`string\|input_item[]` | 要求必填 | 值與限制 | 預設值— |
| 欄位`instructions` | 類型`string` | 要求選填 | 值與限制 | 預設值— |
| 欄位`input[].type` | 類型`string` | 要求選填 | 值與限制 message, reasoning, function\_call, function\_call\_output | 預設值— |
| 欄位`input[].content` | 類型`string\|content_part[]` | 要求選填 | 值與限制 | 預設值— |
| 欄位`input[].call_id` | 類型`string` | 要求選填 | 值與限制 適用條件: function\_call\_output；保留實際回傳的 call\_id | 預設值— |
| 欄位`input[].output` | 類型`string\|content_part[]` | 要求選填 | 值與限制 適用條件: function\_call\_output | 預設值— |
| 欄位`max_output_tokens` | 類型`integer` | 要求選填 | 值與限制 最小值: 1 依模型而定 | 預設值— |
| 欄位`stream` | 類型`boolean` | 要求選填 | 值與限制 | 預設值false |
| 欄位`temperature` | 類型`number` | 要求選填 | 值與限制 依模型而定 | 預設值— |
| 欄位`top_p` | 類型`number` | 要求選填 | 值與限制 依模型而定 | 預設值— |
| 欄位`tools` | 類型`tool[]` | 要求選填 | 值與限制 依模型而定 | 預設值— |
| 欄位`tool_choice` | 類型`string\|object` | 要求選填 | 值與限制 依模型而定 | 預設值— |
| 欄位`parallel_tool_calls` | 類型`boolean` | 要求選填 | 值與限制 依模型而定 | 預設值— |
| 欄位`reasoning.effort` | 類型`string` | 要求選填 | 值與限制 依模型而定 | 預設值— |
| 欄位`reasoning.summary` | 類型`string` | 要求選填 | 值與限制 依模型而定 | 預設值— |
| 欄位`text.format` | 類型`object` | 要求選填 | 值與限制 依模型而定 | 預設值— |
| 欄位`text.verbosity` | 類型`string` | 要求選填 | 值與限制 依模型而定 | 預設值— |
| 欄位`include` | 類型`string[]` | 要求選填 | 值與限制 依模型而定 | 預設值— |
| 欄位`store` | 類型`boolean` | 要求選填 | 值與限制 依模型而定 | 預設值— |
| 欄位`previous_response_id` | 類型`string` | 要求選填 | 值與限制 ID 要求: 僅限支援的延續流程實際回傳的回應 ID 依模型而定 | 預設值— |
| 欄位`service_tier` | 類型`string` | 要求選填 | 值與限制 依模型而定 | 預設值— |
| 欄位`prompt_cache_key` | 類型`string` | 要求選填 | 值與限制 依模型而定 | 預設值— |
| 欄位`prompt_cache_options` | 類型`object` | 要求選填 | 值與限制 依模型而定 | 預設值— |

輸入素材組合

**文字** · UTF8 文字

`輸入文字或 input_text 部分`

**文字 + 圖片**

`{type:input_image,image_url}`

方法參數與生命週期

| 參數 | 規格 |
| --- | --- |
| 參數`material_types` | 規格text, image |
| 參數`required` | 規格model, input |
| 參數`optional_controls` | 規格null |
| 參數`content_type` | 規格application/json |
| 參數`text_file_material` | 規格實際 UTF-8 內容以文字插入；檔案 ID／URLs 需要另有精確支援 |

生命週期： `exact retained published method`

方法結構與 ID 均為精確值；供應商能力與准入狀態分開。

### 方案

#### Ailoot 方法費率

輸入

US$0.001 */ 1K*

輸出

US$0.005 */ 1K*

讀取快取

US$0.0001 */ 1K*

寫入快取

US$0.00125 */ 1K*

寫入快取，5 分鐘

US$0.00125 */ 1K tokens*

寫入快取，1 小時

US$0.002 */ 1K tokens*

web\_search\_call

US$0.01 *每次呼叫*

最大呼叫次數 web\_search\_call

8

Ailoot 會在請求前預留估算金額。取得結果後，依實測用量結算最終費用。串流結算採用最終用量紀錄。[預留金額與結算的運作方式 →](https://ailoot.ai/docs/zh-hant-tw/billing/reserve/)

#### 參考費率詳情

模型層級的參考費率表不會變更方法選擇、報價或費用。實際計費採用所選 Ailoot 方法的費率。

anthropic/claude-haiku-4.5

#### 各設定的價格

| 設定 | 計費條件 | 費用 |
| --- | --- | --- |
| 設定anthropic/claude-haiku-4.5 · 預設設定 | 計費條件預設設定 | 費用 輸入 · 輸入 **US$0.002** / 1K Token 輸出 · 輸出 **US$0.01** / 1K Token |

claude-haiku-4-5-20251001 · 公布價格

#### 各設定的價格

| 設定 | 費用 |
| --- | --- |
| 設定claude-haiku-4-5-20251001 · 公布價格 | 費用 輸入 · 寫入快取 **$0.0025** 每 1K Token 輸入 · 讀取快取 **$0.0002** 每 1K Token 輸入 · 輸入 Token **$0.002** 每 1K Token 輸出 · 輸出 Token **$0.010** 每 1K Token 每次請求 **$0.000** 每次請求 |

### 請求範例

#### Ailoot · OpenAI Responses

文字範例輸入，圖片Python SDKNode.js SDKPython 串流

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

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

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

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

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

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

```python
from openai import OpenAI
import os

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

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

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

```js
import OpenAI from "openai";

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

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

saveResult(resp);
```

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

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

if not os.environ.get("AILOOT_API_KEY", "").strip(): raise SystemExit("Set AILOOT_API_KEY before making a request")
client=OpenAI(base_url="https://api.ailoot.ai/v1",api_key=os.environ["AILOOT_API_KEY"],max_retries=0)
with client.responses.stream(model="claude-haiku-4-5-20251001", 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")
```

### 接收並儲存結果

#### Ailoot · OpenAI Responses

json 或 SSE

##### 保留所有已完成的結果

請保留所有完整傳回的回應、檔案與內容區塊。

保留每個輸出項目與內容部分、實際函式 call\_id、加密推理與用量。串流時保留完整事件／項目身分。

##### 需要檢查原始回應時

保留請求／回應 ID 與標頭。未提供通用的文字工作擷取 URL。

回應欄位

| 欄位 | 類型 |
| --- | --- |
| 欄位`id` | 類型string |
| 欄位`status` | 類型string |
| 欄位`output[]` | 類型message\|reasoning\|function\_call\|other item |
| 欄位`output[].content[]` | 類型content part |
| 欄位`usage` | 類型object |

錯誤與後續步驟

| 回應 | 條件 | 下一步 |
| --- | --- | --- |
| 回應400 · `invalid_request_error` | 條件必要欄位、素材表示方式或參數值無效 | 下一步提出新的建立請求前，先修正指定欄位。 |

### 別名

#### 模型別名

**Ailoot** [`claude-haiku-4-5-20251001`](https://ailoot.ai/models/zh-hant-tw/#m=claude-haiku-4-5-20251001&route=Core&caller=claude-haiku-4-5-20251001&fmt=responses), [`claude-haiku`](https://ailoot.ai/models/zh-hant-tw/#m=claude-haiku-4-5-20251001&route=Core&caller=claude-haiku&fmt=responses), [`claude-haiku-latest`](https://ailoot.ai/models/zh-hant-tw/#m=claude-haiku-4-5-20251001&route=Core&caller=claude-haiku-latest&fmt=responses)

#### 方法路徑別名

請使用上方列出的 API 方法路徑。

#### 相關呼叫用 ID

[`claude-haiku-4-5-20251001`](https://ailoot.ai/models/zh-hant-tw/#m=claude-haiku-4-5-20251001&route=Core&caller=claude-haiku-4-5-20251001&fmt=responses), [`claude-haiku`](https://ailoot.ai/models/zh-hant-tw/#m=claude-haiku-4-5-20251001&route=Core&caller=claude-haiku&fmt=responses), [`claude-haiku-latest`](https://ailoot.ai/models/zh-hant-tw/#m=claude-haiku-4-5-20251001&route=Core&caller=claude-haiku-latest&fmt=responses)

**Ailoot · OpenAI Chat** `POST /v1/chat/completions` `claude-haiku-4-5-20251001`

[`claude-haiku-4-5-20251001`](https://ailoot.ai/models/zh-hant-tw/#m=claude-haiku-4-5-20251001&route=Core&caller=claude-haiku-4-5-20251001&fmt=chat)

Anthropic /`claude-haiku-4-5-20251001`

模型 ID

- `claude-haiku-4-5-20251001`
- `claude-haiku`
- `claude-haiku-latest`

### 入門

Claude Haiku 4.5 用於互動式助理、使用者支援、日常資訊處理及程式碼工作。複雜問題可使用獨立的推理模式。

接受的輸入

文字 · 圖片

結果

文字

### Ailoot 可用 · 輸入與方法

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

輸入

`text`, `image`

輸出

`text`

上下文

200,000 tokens

輸出上限

65,536 tokens

輸出格式

json 或 SSE

| 欄位 | 類型 | 要求 | 值與限制 | 預設值 |
| --- | --- | --- | --- | --- |
| 欄位`model` | 類型`string` | 要求必填 | 值與限制 claude-haiku-4-5-20251001 | 預設值— |
| 欄位`messages` | 類型`message[]` | 要求必填 | 值與限制 項目數下限: 1 | 預設值— |
| 欄位`messages[].role` | 類型`string` | 要求必填 | 值與限制 範例：system, user, assistant, tool, function 條件: 這些角色由 原始碼中的相容型別明確表示；確切角色集合仍依模型而定。 依模型而定 | 預設值— |
| 欄位`messages[].content` | 類型`string\|content_part[]\|null` | 要求選填 | 值與限制 | 預設值— |
| 欄位`messages[].tool_calls` | 類型`tool_call[]` | 要求選填 | 值與限制 | 預設值— |
| 欄位`messages[].tool_call_id` | 類型`string` | 要求選填 | 值與限制 適用條件: role=tool；使用實際回傳的 ID | 預設值— |
| 欄位`messages[].name` | 類型`string` | 要求選填 | 值與限制 | 預設值— |
| 欄位`messages[].reasoning_content` | 類型`string` | 要求選填 | 值與限制 適用條件: 此模型使用推理內容時，將實際回傳的推理內容帶回後續請求 | 預設值— |
| 欄位`messages[].reasoning_details` | 類型`object\|array` | 要求選填 | 值與限制 依模型而定 | 預設值— |
| 欄位`max_tokens` | 類型`integer` | 要求選填 | 值與限制 最小值: 1 依模型而定 | 預設值— |
| 欄位`max_completion_tokens` | 類型`integer` | 要求選填 | 值與限制 最小值: 1 依模型而定 | 預設值— |
| 欄位`stream` | 類型`boolean` | 要求選填 | 值與限制 | 預設值false |
| 欄位`stream_options.include_usage` | 類型`boolean` | 要求選填 | 值與限制 依模型而定 | 預設值— |
| 欄位`temperature` | 類型`number` | 要求選填 | 值與限制 依模型而定 | 預設值— |
| 欄位`top_p` | 類型`number` | 要求選填 | 值與限制 依模型而定 | 預設值— |
| 欄位`stop` | 類型`string\|string[]` | 要求選填 | 值與限制 依模型而定 | 預設值— |
| 欄位`tools` | 類型`function_tool[]` | 要求選填 | 值與限制 依模型而定 | 預設值— |
| 欄位`tools[].type` | 類型`string` | 要求選填 | 值與限制 依模型而定 | 預設值— |
| 欄位`tools[].function.name` | 類型`string` | 要求必填 | 值與限制 適用條件: 已提供函式工具 | 預設值— |
| 欄位`tools[].function.description` | 類型`string` | 要求選填 | 值與限制 | 預設值— |
| 欄位`tools[].function.parameters` | 類型`JSON_schema` | 要求選填 | 值與限制 | 預設值— |
| 欄位`tool_choice` | 類型`string\|object` | 要求選填 | 值與限制 依模型而定 | 預設值— |
| 欄位`parallel_tool_calls` | 類型`boolean` | 要求選填 | 值與限制 依模型而定 | 預設值— |
| 欄位`response_format` | 類型`object` | 要求選填 | 值與限制 依模型而定 | 預設值— |
| 欄位`reasoning_effort` | 類型`string` | 要求選填 | 值與限制 依模型而定 | 預設值— |
| 欄位`reasoning` | 類型`object` | 要求選填 | 值與限制 依模型而定 | 預設值— |
| 欄位`service_tier` | 類型`string` | 要求選填 | 值與限制 依模型而定 | 預設值— |
| 欄位`instructions` | 類型`string` | 要求選填 | 值與限制 相容性欄位 | 預設值— |
| 欄位`functions` | 類型`function[]` | 要求選填 | 值與限制 依模型而定 | 預設值— |
| 欄位`function_call` | 類型`string\|object` | 要求選填 | 值與限制 依模型而定 | 預設值— |
| 欄位`prompt_cache_options` | 類型`object` | 要求選填 | 值與限制 依模型而定 | 預設值— |

輸入素材組合

**文字** · UTF8 文字

`messages[].content`

**文字 + 圖片**

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

方法參數與生命週期

| 參數 | 規格 |
| --- | --- |
| 參數`material_types` | 規格text, image |
| 參數`required` | 規格model, messages |
| 參數`optional_controls` | 規格null |
| 參數`content_type` | 規格application/json |
| 參數`text_file_material` | 規格實際 UTF-8 內容以文字插入；檔案 ID／URLs 需要另有精確支援 |

生命週期： `exact retained published method`

方法結構與 ID 均為精確值；供應商能力與准入狀態分開。

### 方案

#### Ailoot 方法費率

輸入

US$0.001 */ 1K*

輸出

US$0.005 */ 1K*

讀取快取

US$0.0001 */ 1K*

寫入快取

US$0.00125 */ 1K*

寫入快取，5 分鐘

US$0.00125 */ 1K tokens*

寫入快取，1 小時

US$0.002 */ 1K tokens*

web\_search\_call

US$0.01 *每次呼叫*

最大呼叫次數 web\_search\_call

8

Ailoot 會在請求前預留估算金額。取得結果後，依實測用量結算最終費用。串流結算採用最終用量紀錄。[預留金額與結算的運作方式 →](https://ailoot.ai/docs/zh-hant-tw/billing/reserve/)

#### 參考費率詳情

模型層級的參考費率表不會變更方法選擇、報價或費用。實際計費採用所選 Ailoot 方法的費率。

anthropic/claude-haiku-4.5

#### 各設定的價格

| 設定 | 計費條件 | 費用 |
| --- | --- | --- |
| 設定anthropic/claude-haiku-4.5 · 預設設定 | 計費條件預設設定 | 費用 輸入 · 輸入 **US$0.002** / 1K Token 輸出 · 輸出 **US$0.01** / 1K Token |

claude-haiku-4-5-20251001 · 公布價格

#### 各設定的價格

| 設定 | 費用 |
| --- | --- |
| 設定claude-haiku-4-5-20251001 · 公布價格 | 費用 輸入 · 寫入快取 **$0.0025** 每 1K Token 輸入 · 讀取快取 **$0.0002** 每 1K Token 輸入 · 輸入 Token **$0.002** 每 1K Token 輸出 · 輸出 Token **$0.010** 每 1K Token 每次請求 **$0.000** 每次請求 |

### 請求範例

#### Ailoot · OpenAI Chat

文字範例輸入，圖片Python SDKNode.js SDKPython 串流

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

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

```python
from openai import OpenAI
import os

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

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

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

```js
import OpenAI from "openai";

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

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

saveResult(resp);
```

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

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

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

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

### 接收並儲存結果

#### Ailoot · OpenAI Chat

json 或 SSE

##### 保留所有已完成的結果

請保留所有完整傳回的回應、檔案與內容區塊。

保留每個候選項及其內容／工具呼叫／推理。SSE 中依候選項／工具索引組合增量，保留最終完成原因與用量。

##### 需要檢查原始回應時

保留請求／回應 ID 與標頭。未提供通用的文字工作擷取 URL。

回應欄位

| 欄位 | 類型 |
| --- | --- |
| 欄位`choices[].index` | 類型integer |
| 欄位`choices[].message.content` | 類型string\|null |
| 欄位`choices[].message.tool_calls` | 類型tool\_call\[\] |
| 欄位`choices[].message.reasoning_content` | 類型string |
| 欄位`choices[].message.reasoning_details` | 類型object\|array |
| 欄位`choices[].finish_reason` | 類型string\|null |
| 欄位`usage` | 類型object |

錯誤與後續步驟

| 回應 | 條件 | 下一步 |
| --- | --- | --- |
| 回應400 · `invalid_request_error` | 條件必要欄位、素材表示方式或參數值無效 | 下一步提出新的建立請求前，先修正指定欄位。 |

### 別名

#### 模型別名

**Ailoot** [`claude-haiku-4-5-20251001`](https://ailoot.ai/models/zh-hant-tw/#m=claude-haiku-4-5-20251001&route=Core&caller=claude-haiku-4-5-20251001&fmt=chat), [`claude-haiku`](https://ailoot.ai/models/zh-hant-tw/#m=claude-haiku-4-5-20251001&route=Core&caller=claude-haiku&fmt=chat), [`claude-haiku-latest`](https://ailoot.ai/models/zh-hant-tw/#m=claude-haiku-4-5-20251001&route=Core&caller=claude-haiku-latest&fmt=chat)

#### 方法路徑別名

請使用上方列出的 API 方法路徑。

#### 相關呼叫用 ID

[`claude-haiku-4-5-20251001`](https://ailoot.ai/models/zh-hant-tw/#m=claude-haiku-4-5-20251001&route=Core&caller=claude-haiku-4-5-20251001&fmt=chat), [`claude-haiku`](https://ailoot.ai/models/zh-hant-tw/#m=claude-haiku-4-5-20251001&route=Core&caller=claude-haiku&fmt=chat), [`claude-haiku-latest`](https://ailoot.ai/models/zh-hant-tw/#m=claude-haiku-4-5-20251001&route=Core&caller=claude-haiku-latest&fmt=chat)

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

[`claude-haiku`](https://ailoot.ai/models/zh-hant-tw/#m=claude-haiku-4-5-20251001&route=Core&caller=claude-haiku&fmt=messages)

Anthropic /`claude-haiku`

模型 ID

- `claude-haiku-4-5-20251001`
- `claude-haiku`
- `claude-haiku-latest`

### 入門

Claude Haiku 4.5 用於互動式助理、使用者支援、日常資訊處理及程式碼工作。複雜問題可使用獨立的推理模式。

接受的輸入

文字 · 圖片

結果

文字

### Ailoot 可用 · 輸入與方法

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

輸入

`text`, `image`

輸出

`text`

上下文

200,000 tokens

輸出上限

65,536 tokens

輸出格式

json 或 SSE

| 欄位 | 類型 | 要求 | 值與限制 | 預設值 |
| --- | --- | --- | --- | --- |
| 欄位`model` | 類型`string` | 要求必填 | 值與限制 claude-haiku | 預設值— |
| 欄位`messages` | 類型`message[]` | 要求必填 | 值與限制 項目數下限: 1 | 預設值— |
| 欄位`messages[].role` | 類型`string` | 要求必填 | 值與限制 user, assistant | 預設值— |
| 欄位`messages[].content` | 類型`string\|content_block[]` | 要求必填 | 值與限制 | 預設值— |
| 欄位`system` | 類型`string\|content_block[]` | 要求選填 | 值與限制 | 預設值— |
| 欄位`max_tokens` | 類型`integer` | 要求必填 | 值與限制 最小值: 1 限制適用對象: 所選模型／卡片的確切上限 | 預設值— |
| 欄位`stream` | 類型`boolean` | 要求選填 | 值與限制 | 預設值false |
| 欄位`temperature` | 類型`number` | 要求選填 | 值與限制 依模型而定 | 預設值— |
| 欄位`top_p` | 類型`number` | 要求選填 | 值與限制 依模型而定 | 預設值— |
| 欄位`stop_sequences` | 類型`string[]` | 要求選填 | 值與限制 依模型而定 | 預設值— |
| 欄位`tools` | 類型`tool[]` | 要求選填 | 值與限制 依模型而定 | 預設值— |
| 欄位`tools[].name` | 類型`string` | 要求選填 | 值與限制 適用條件: 已提供工具 | 預設值— |
| 欄位`tools[].description` | 類型`string` | 要求選填 | 值與限制 | 預設值— |
| 欄位`tools[].input_schema` | 類型`JSON_schema` | 要求選填 | 值與限制 | 預設值— |
| 欄位`tool_choice` | 類型`object` | 要求選填 | 值與限制 依模型而定 | 預設值— |
| 欄位`thinking.type` | 類型`string` | 要求選填 | 值與限制 依模型而定 | 預設值— |
| 欄位`thinking.budget_tokens` | 類型`integer` | 要求選填 | 值與限制 依模型而定 | 預設值— |
| 欄位`output_config.effort` | 類型`string` | 要求選填 | 值與限制 依模型而定 | 預設值— |
| 欄位`metadata` | 類型`object` | 要求選填 | 值與限制 | 預設值— |
| 欄位`cache_control` | 類型`object` | 要求選填 | 值與限制 依模型而定 | 預設值— |

輸入素材組合

**文字** · UTF8 文字

`messages[].content 或 type=text 區塊`

**文字 + 圖片**

`{type:image,source:{type:base64,media_type,data}} 或 type=url 的來源`

方法參數與生命週期

| 參數 | 規格 |
| --- | --- |
| 參數`material_types` | 規格text, image |
| 參數`required` | 規格model, messages, max\_tokens |
| 參數`optional_controls` | 規格null |
| 參數`content_type` | 規格application/json |
| 參數`text_file_material` | 規格實際 UTF-8 內容以文字插入；檔案 ID／URLs 需要另有精確支援 |

生命週期： `exact retained published method`

方法結構與 ID 均為精確值；供應商能力與准入狀態分開。

### 方案

#### Ailoot 方法費率

輸入

US$0.001 */ 1K*

輸出

US$0.005 */ 1K*

讀取快取

US$0.0001 */ 1K*

寫入快取

US$0.00125 */ 1K*

寫入快取，5 分鐘

US$0.00125 */ 1K tokens*

寫入快取，1 小時

US$0.002 */ 1K tokens*

web\_search\_call

US$0.01 *每次呼叫*

最大呼叫次數 web\_search\_call

8

Ailoot 會在請求前預留估算金額。取得結果後，依實測用量結算最終費用。串流結算採用最終用量紀錄。[預留金額與結算的運作方式 →](https://ailoot.ai/docs/zh-hant-tw/billing/reserve/)

#### 參考費率詳情

模型層級的參考費率表不會變更方法選擇、報價或費用。實際計費採用所選 Ailoot 方法的費率。

anthropic/claude-haiku-4.5

#### 各設定的價格

| 設定 | 計費條件 | 費用 |
| --- | --- | --- |
| 設定anthropic/claude-haiku-4.5 · 預設設定 | 計費條件預設設定 | 費用 輸入 · 輸入 **US$0.002** / 1K Token 輸出 · 輸出 **US$0.01** / 1K Token |

claude-haiku-4-5-20251001 · 公布價格

#### 各設定的價格

| 設定 | 費用 |
| --- | --- |
| 設定claude-haiku-4-5-20251001 · 公布價格 | 費用 輸入 · 寫入快取 **$0.0025** 每 1K Token 輸入 · 讀取快取 **$0.0002** 每 1K Token 輸入 · 輸入 Token **$0.002** 每 1K Token 輸出 · 輸出 Token **$0.010** 每 1K Token 每次請求 **$0.000** 每次請求 |

### 請求範例

#### Ailoot · Anthropic Messages

文字範例輸入，圖片Python SDKNode.js SDKPython 串流

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

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

```python
import anthropic
import os

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

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

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

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

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

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

saveResult(msg);
```

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

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

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

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

### 接收並儲存結果

#### Ailoot · Anthropic Messages

json 或 SSE

##### 保留所有已完成的結果

請保留所有完整傳回的回應、檔案與內容區塊。

保留所有內容區塊、思考簽章與實際工具使用 ID。組合所有 SSE 區塊增量；第一個文字區塊不是完整輸出。

##### 需要檢查原始回應時

保留請求／回應 ID 與標頭。未提供通用的文字工作擷取 URL。

回應欄位

| 欄位 | 類型 |
| --- | --- |
| 欄位`id` | 類型string |
| 欄位`model` | 類型string |
| 欄位`content[]` | 類型text\|thinking\|tool\_use\|other content block |
| 欄位`stop_reason` | 類型string\|null |
| 欄位`usage` | 類型object |

錯誤與後續步驟

| 回應 | 條件 | 下一步 |
| --- | --- | --- |
| 回應400 · `invalid_request_error` | 條件必要欄位、素材表示方式或參數值無效 | 下一步提出新的建立請求前，先修正指定欄位。 |

### 別名

#### 模型別名

**Ailoot** [`claude-haiku-4-5-20251001`](https://ailoot.ai/models/zh-hant-tw/#m=claude-haiku-4-5-20251001&route=Core&caller=claude-haiku-4-5-20251001&fmt=messages), [`claude-haiku`](https://ailoot.ai/models/zh-hant-tw/#m=claude-haiku-4-5-20251001&route=Core&caller=claude-haiku&fmt=messages), [`claude-haiku-latest`](https://ailoot.ai/models/zh-hant-tw/#m=claude-haiku-4-5-20251001&route=Core&caller=claude-haiku-latest&fmt=messages)

#### 方法路徑別名

請使用上方列出的 API 方法路徑。

#### 相關呼叫用 ID

[`claude-haiku-4-5-20251001`](https://ailoot.ai/models/zh-hant-tw/#m=claude-haiku-4-5-20251001&route=Core&caller=claude-haiku-4-5-20251001&fmt=messages), [`claude-haiku`](https://ailoot.ai/models/zh-hant-tw/#m=claude-haiku-4-5-20251001&route=Core&caller=claude-haiku&fmt=messages), [`claude-haiku-latest`](https://ailoot.ai/models/zh-hant-tw/#m=claude-haiku-4-5-20251001&route=Core&caller=claude-haiku-latest&fmt=messages)

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

[`claude-haiku`](https://ailoot.ai/models/zh-hant-tw/#m=claude-haiku-4-5-20251001&route=Core&caller=claude-haiku&fmt=responses)

Anthropic /`claude-haiku`

模型 ID

- `claude-haiku-4-5-20251001`
- `claude-haiku`
- `claude-haiku-latest`

### 入門

Claude Haiku 4.5 用於互動式助理、使用者支援、日常資訊處理及程式碼工作。複雜問題可使用獨立的推理模式。

接受的輸入

文字 · 圖片

結果

文字

### Ailoot 可用 · 輸入與方法

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

輸入

`text`, `image`

輸出

`text`

上下文

200,000 tokens

輸出上限

65,536 tokens

輸出格式

json 或 SSE

| 欄位 | 類型 | 要求 | 值與限制 | 預設值 |
| --- | --- | --- | --- | --- |
| 欄位`model` | 類型`string` | 要求必填 | 值與限制 claude-haiku | 預設值— |
| 欄位`input` | 類型`string\|input_item[]` | 要求必填 | 值與限制 | 預設值— |
| 欄位`instructions` | 類型`string` | 要求選填 | 值與限制 | 預設值— |
| 欄位`input[].type` | 類型`string` | 要求選填 | 值與限制 message, reasoning, function\_call, function\_call\_output | 預設值— |
| 欄位`input[].content` | 類型`string\|content_part[]` | 要求選填 | 值與限制 | 預設值— |
| 欄位`input[].call_id` | 類型`string` | 要求選填 | 值與限制 適用條件: function\_call\_output；保留實際回傳的 call\_id | 預設值— |
| 欄位`input[].output` | 類型`string\|content_part[]` | 要求選填 | 值與限制 適用條件: function\_call\_output | 預設值— |
| 欄位`max_output_tokens` | 類型`integer` | 要求選填 | 值與限制 最小值: 1 依模型而定 | 預設值— |
| 欄位`stream` | 類型`boolean` | 要求選填 | 值與限制 | 預設值false |
| 欄位`temperature` | 類型`number` | 要求選填 | 值與限制 依模型而定 | 預設值— |
| 欄位`top_p` | 類型`number` | 要求選填 | 值與限制 依模型而定 | 預設值— |
| 欄位`tools` | 類型`tool[]` | 要求選填 | 值與限制 依模型而定 | 預設值— |
| 欄位`tool_choice` | 類型`string\|object` | 要求選填 | 值與限制 依模型而定 | 預設值— |
| 欄位`parallel_tool_calls` | 類型`boolean` | 要求選填 | 值與限制 依模型而定 | 預設值— |
| 欄位`reasoning.effort` | 類型`string` | 要求選填 | 值與限制 依模型而定 | 預設值— |
| 欄位`reasoning.summary` | 類型`string` | 要求選填 | 值與限制 依模型而定 | 預設值— |
| 欄位`text.format` | 類型`object` | 要求選填 | 值與限制 依模型而定 | 預設值— |
| 欄位`text.verbosity` | 類型`string` | 要求選填 | 值與限制 依模型而定 | 預設值— |
| 欄位`include` | 類型`string[]` | 要求選填 | 值與限制 依模型而定 | 預設值— |
| 欄位`store` | 類型`boolean` | 要求選填 | 值與限制 依模型而定 | 預設值— |
| 欄位`previous_response_id` | 類型`string` | 要求選填 | 值與限制 ID 要求: 僅限支援的延續流程實際回傳的回應 ID 依模型而定 | 預設值— |
| 欄位`service_tier` | 類型`string` | 要求選填 | 值與限制 依模型而定 | 預設值— |
| 欄位`prompt_cache_key` | 類型`string` | 要求選填 | 值與限制 依模型而定 | 預設值— |
| 欄位`prompt_cache_options` | 類型`object` | 要求選填 | 值與限制 依模型而定 | 預設值— |

輸入素材組合

**文字** · UTF8 文字

`輸入文字或 input_text 部分`

**文字 + 圖片**

`{type:input_image,image_url}`

方法參數與生命週期

| 參數 | 規格 |
| --- | --- |
| 參數`material_types` | 規格text, image |
| 參數`required` | 規格model, input |
| 參數`optional_controls` | 規格null |
| 參數`content_type` | 規格application/json |
| 參數`text_file_material` | 規格實際 UTF-8 內容以文字插入；檔案 ID／URLs 需要另有精確支援 |

生命週期： `exact retained published method`

方法結構與 ID 均為精確值；供應商能力與准入狀態分開。

### 方案

#### Ailoot 方法費率

輸入

US$0.001 */ 1K*

輸出

US$0.005 */ 1K*

讀取快取

US$0.0001 */ 1K*

寫入快取

US$0.00125 */ 1K*

寫入快取，5 分鐘

US$0.00125 */ 1K tokens*

寫入快取，1 小時

US$0.002 */ 1K tokens*

web\_search\_call

US$0.01 *每次呼叫*

最大呼叫次數 web\_search\_call

8

Ailoot 會在請求前預留估算金額。取得結果後，依實測用量結算最終費用。串流結算採用最終用量紀錄。[預留金額與結算的運作方式 →](https://ailoot.ai/docs/zh-hant-tw/billing/reserve/)

#### 參考費率詳情

模型層級的參考費率表不會變更方法選擇、報價或費用。實際計費採用所選 Ailoot 方法的費率。

anthropic/claude-haiku-4.5

#### 各設定的價格

| 設定 | 計費條件 | 費用 |
| --- | --- | --- |
| 設定anthropic/claude-haiku-4.5 · 預設設定 | 計費條件預設設定 | 費用 輸入 · 輸入 **US$0.002** / 1K Token 輸出 · 輸出 **US$0.01** / 1K Token |

claude-haiku-4-5-20251001 · 公布價格

#### 各設定的價格

| 設定 | 費用 |
| --- | --- |
| 設定claude-haiku-4-5-20251001 · 公布價格 | 費用 輸入 · 寫入快取 **$0.0025** 每 1K Token 輸入 · 讀取快取 **$0.0002** 每 1K Token 輸入 · 輸入 Token **$0.002** 每 1K Token 輸出 · 輸出 Token **$0.010** 每 1K Token 每次請求 **$0.000** 每次請求 |

### 請求範例

#### Ailoot · OpenAI Responses

文字範例輸入，圖片Python SDKNode.js SDKPython 串流

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

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

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

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

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

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

```python
from openai import OpenAI
import os

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

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

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

```js
import OpenAI from "openai";

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

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

saveResult(resp);
```

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

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

if not os.environ.get("AILOOT_API_KEY", "").strip(): raise SystemExit("Set AILOOT_API_KEY before making a request")
client=OpenAI(base_url="https://api.ailoot.ai/v1",api_key=os.environ["AILOOT_API_KEY"],max_retries=0)
with client.responses.stream(model="claude-haiku", 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")
```

### 接收並儲存結果

#### Ailoot · OpenAI Responses

json 或 SSE

##### 保留所有已完成的結果

請保留所有完整傳回的回應、檔案與內容區塊。

保留每個輸出項目與內容部分、實際函式 call\_id、加密推理與用量。串流時保留完整事件／項目身分。

##### 需要檢查原始回應時

保留請求／回應 ID 與標頭。未提供通用的文字工作擷取 URL。

回應欄位

| 欄位 | 類型 |
| --- | --- |
| 欄位`id` | 類型string |
| 欄位`status` | 類型string |
| 欄位`output[]` | 類型message\|reasoning\|function\_call\|other item |
| 欄位`output[].content[]` | 類型content part |
| 欄位`usage` | 類型object |

錯誤與後續步驟

| 回應 | 條件 | 下一步 |
| --- | --- | --- |
| 回應400 · `invalid_request_error` | 條件必要欄位、素材表示方式或參數值無效 | 下一步提出新的建立請求前，先修正指定欄位。 |

### 別名

#### 模型別名

**Ailoot** [`claude-haiku-4-5-20251001`](https://ailoot.ai/models/zh-hant-tw/#m=claude-haiku-4-5-20251001&route=Core&caller=claude-haiku-4-5-20251001&fmt=responses), [`claude-haiku`](https://ailoot.ai/models/zh-hant-tw/#m=claude-haiku-4-5-20251001&route=Core&caller=claude-haiku&fmt=responses), [`claude-haiku-latest`](https://ailoot.ai/models/zh-hant-tw/#m=claude-haiku-4-5-20251001&route=Core&caller=claude-haiku-latest&fmt=responses)

#### 方法路徑別名

請使用上方列出的 API 方法路徑。

#### 相關呼叫用 ID

[`claude-haiku-4-5-20251001`](https://ailoot.ai/models/zh-hant-tw/#m=claude-haiku-4-5-20251001&route=Core&caller=claude-haiku-4-5-20251001&fmt=responses), [`claude-haiku`](https://ailoot.ai/models/zh-hant-tw/#m=claude-haiku-4-5-20251001&route=Core&caller=claude-haiku&fmt=responses), [`claude-haiku-latest`](https://ailoot.ai/models/zh-hant-tw/#m=claude-haiku-4-5-20251001&route=Core&caller=claude-haiku-latest&fmt=responses)

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

[`claude-haiku`](https://ailoot.ai/models/zh-hant-tw/#m=claude-haiku-4-5-20251001&route=Core&caller=claude-haiku&fmt=chat)

Anthropic /`claude-haiku`

模型 ID

- `claude-haiku-4-5-20251001`
- `claude-haiku`
- `claude-haiku-latest`

### 入門

Claude Haiku 4.5 用於互動式助理、使用者支援、日常資訊處理及程式碼工作。複雜問題可使用獨立的推理模式。

接受的輸入

文字 · 圖片

結果

文字

### Ailoot 可用 · 輸入與方法

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

輸入

`text`, `image`

輸出

`text`

上下文

200,000 tokens

輸出上限

65,536 tokens

輸出格式

json 或 SSE

| 欄位 | 類型 | 要求 | 值與限制 | 預設值 |
| --- | --- | --- | --- | --- |
| 欄位`model` | 類型`string` | 要求必填 | 值與限制 claude-haiku | 預設值— |
| 欄位`messages` | 類型`message[]` | 要求必填 | 值與限制 項目數下限: 1 | 預設值— |
| 欄位`messages[].role` | 類型`string` | 要求必填 | 值與限制 範例：system, user, assistant, tool, function 條件: 這些角色由 原始碼中的相容型別明確表示；確切角色集合仍依模型而定。 依模型而定 | 預設值— |
| 欄位`messages[].content` | 類型`string\|content_part[]\|null` | 要求選填 | 值與限制 | 預設值— |
| 欄位`messages[].tool_calls` | 類型`tool_call[]` | 要求選填 | 值與限制 | 預設值— |
| 欄位`messages[].tool_call_id` | 類型`string` | 要求選填 | 值與限制 適用條件: role=tool；使用實際回傳的 ID | 預設值— |
| 欄位`messages[].name` | 類型`string` | 要求選填 | 值與限制 | 預設值— |
| 欄位`messages[].reasoning_content` | 類型`string` | 要求選填 | 值與限制 適用條件: 此模型使用推理內容時，將實際回傳的推理內容帶回後續請求 | 預設值— |
| 欄位`messages[].reasoning_details` | 類型`object\|array` | 要求選填 | 值與限制 依模型而定 | 預設值— |
| 欄位`max_tokens` | 類型`integer` | 要求選填 | 值與限制 最小值: 1 依模型而定 | 預設值— |
| 欄位`max_completion_tokens` | 類型`integer` | 要求選填 | 值與限制 最小值: 1 依模型而定 | 預設值— |
| 欄位`stream` | 類型`boolean` | 要求選填 | 值與限制 | 預設值false |
| 欄位`stream_options.include_usage` | 類型`boolean` | 要求選填 | 值與限制 依模型而定 | 預設值— |
| 欄位`temperature` | 類型`number` | 要求選填 | 值與限制 依模型而定 | 預設值— |
| 欄位`top_p` | 類型`number` | 要求選填 | 值與限制 依模型而定 | 預設值— |
| 欄位`stop` | 類型`string\|string[]` | 要求選填 | 值與限制 依模型而定 | 預設值— |
| 欄位`tools` | 類型`function_tool[]` | 要求選填 | 值與限制 依模型而定 | 預設值— |
| 欄位`tools[].type` | 類型`string` | 要求選填 | 值與限制 依模型而定 | 預設值— |
| 欄位`tools[].function.name` | 類型`string` | 要求必填 | 值與限制 適用條件: 已提供函式工具 | 預設值— |
| 欄位`tools[].function.description` | 類型`string` | 要求選填 | 值與限制 | 預設值— |
| 欄位`tools[].function.parameters` | 類型`JSON_schema` | 要求選填 | 值與限制 | 預設值— |
| 欄位`tool_choice` | 類型`string\|object` | 要求選填 | 值與限制 依模型而定 | 預設值— |
| 欄位`parallel_tool_calls` | 類型`boolean` | 要求選填 | 值與限制 依模型而定 | 預設值— |
| 欄位`response_format` | 類型`object` | 要求選填 | 值與限制 依模型而定 | 預設值— |
| 欄位`reasoning_effort` | 類型`string` | 要求選填 | 值與限制 依模型而定 | 預設值— |
| 欄位`reasoning` | 類型`object` | 要求選填 | 值與限制 依模型而定 | 預設值— |
| 欄位`service_tier` | 類型`string` | 要求選填 | 值與限制 依模型而定 | 預設值— |
| 欄位`instructions` | 類型`string` | 要求選填 | 值與限制 相容性欄位 | 預設值— |
| 欄位`functions` | 類型`function[]` | 要求選填 | 值與限制 依模型而定 | 預設值— |
| 欄位`function_call` | 類型`string\|object` | 要求選填 | 值與限制 依模型而定 | 預設值— |
| 欄位`prompt_cache_options` | 類型`object` | 要求選填 | 值與限制 依模型而定 | 預設值— |

輸入素材組合

**文字** · UTF8 文字

`messages[].content`

**文字 + 圖片**

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

方法參數與生命週期

| 參數 | 規格 |
| --- | --- |
| 參數`material_types` | 規格text, image |
| 參數`required` | 規格model, messages |
| 參數`optional_controls` | 規格null |
| 參數`content_type` | 規格application/json |
| 參數`text_file_material` | 規格實際 UTF-8 內容以文字插入；檔案 ID／URLs 需要另有精確支援 |

生命週期： `exact retained published method`

方法結構與 ID 均為精確值；供應商能力與准入狀態分開。

### 方案

#### Ailoot 方法費率

輸入

US$0.001 */ 1K*

輸出

US$0.005 */ 1K*

讀取快取

US$0.0001 */ 1K*

寫入快取

US$0.00125 */ 1K*

寫入快取，5 分鐘

US$0.00125 */ 1K tokens*

寫入快取，1 小時

US$0.002 */ 1K tokens*

web\_search\_call

US$0.01 *每次呼叫*

最大呼叫次數 web\_search\_call

8

Ailoot 會在請求前預留估算金額。取得結果後，依實測用量結算最終費用。串流結算採用最終用量紀錄。[預留金額與結算的運作方式 →](https://ailoot.ai/docs/zh-hant-tw/billing/reserve/)

#### 參考費率詳情

模型層級的參考費率表不會變更方法選擇、報價或費用。實際計費採用所選 Ailoot 方法的費率。

anthropic/claude-haiku-4.5

#### 各設定的價格

| 設定 | 計費條件 | 費用 |
| --- | --- | --- |
| 設定anthropic/claude-haiku-4.5 · 預設設定 | 計費條件預設設定 | 費用 輸入 · 輸入 **US$0.002** / 1K Token 輸出 · 輸出 **US$0.01** / 1K Token |

claude-haiku-4-5-20251001 · 公布價格

#### 各設定的價格

| 設定 | 費用 |
| --- | --- |
| 設定claude-haiku-4-5-20251001 · 公布價格 | 費用 輸入 · 寫入快取 **$0.0025** 每 1K Token 輸入 · 讀取快取 **$0.0002** 每 1K Token 輸入 · 輸入 Token **$0.002** 每 1K Token 輸出 · 輸出 Token **$0.010** 每 1K Token 每次請求 **$0.000** 每次請求 |

### 請求範例

#### Ailoot · OpenAI Chat

文字範例輸入，圖片Python SDKNode.js SDKPython 串流

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

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

```python
from openai import OpenAI
import os

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

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

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

```js
import OpenAI from "openai";

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

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

saveResult(resp);
```

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

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

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

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

### 接收並儲存結果

#### Ailoot · OpenAI Chat

json 或 SSE

##### 保留所有已完成的結果

請保留所有完整傳回的回應、檔案與內容區塊。

保留每個候選項及其內容／工具呼叫／推理。SSE 中依候選項／工具索引組合增量，保留最終完成原因與用量。

##### 需要檢查原始回應時

保留請求／回應 ID 與標頭。未提供通用的文字工作擷取 URL。

回應欄位

| 欄位 | 類型 |
| --- | --- |
| 欄位`choices[].index` | 類型integer |
| 欄位`choices[].message.content` | 類型string\|null |
| 欄位`choices[].message.tool_calls` | 類型tool\_call\[\] |
| 欄位`choices[].message.reasoning_content` | 類型string |
| 欄位`choices[].message.reasoning_details` | 類型object\|array |
| 欄位`choices[].finish_reason` | 類型string\|null |
| 欄位`usage` | 類型object |

錯誤與後續步驟

| 回應 | 條件 | 下一步 |
| --- | --- | --- |
| 回應400 · `invalid_request_error` | 條件必要欄位、素材表示方式或參數值無效 | 下一步提出新的建立請求前，先修正指定欄位。 |

### 別名

#### 模型別名

**Ailoot** [`claude-haiku-4-5-20251001`](https://ailoot.ai/models/zh-hant-tw/#m=claude-haiku-4-5-20251001&route=Core&caller=claude-haiku-4-5-20251001&fmt=chat), [`claude-haiku`](https://ailoot.ai/models/zh-hant-tw/#m=claude-haiku-4-5-20251001&route=Core&caller=claude-haiku&fmt=chat), [`claude-haiku-latest`](https://ailoot.ai/models/zh-hant-tw/#m=claude-haiku-4-5-20251001&route=Core&caller=claude-haiku-latest&fmt=chat)

#### 方法路徑別名

請使用上方列出的 API 方法路徑。

#### 相關呼叫用 ID

[`claude-haiku-4-5-20251001`](https://ailoot.ai/models/zh-hant-tw/#m=claude-haiku-4-5-20251001&route=Core&caller=claude-haiku-4-5-20251001&fmt=chat), [`claude-haiku`](https://ailoot.ai/models/zh-hant-tw/#m=claude-haiku-4-5-20251001&route=Core&caller=claude-haiku&fmt=chat), [`claude-haiku-latest`](https://ailoot.ai/models/zh-hant-tw/#m=claude-haiku-4-5-20251001&route=Core&caller=claude-haiku-latest&fmt=chat)

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

[`claude-haiku-latest`](https://ailoot.ai/models/zh-hant-tw/#m=claude-haiku-4-5-20251001&route=Core&caller=claude-haiku-latest&fmt=messages)

Anthropic /`claude-haiku-latest`

模型 ID

- `claude-haiku-4-5-20251001`
- `claude-haiku`
- `claude-haiku-latest`

### 入門

Claude Haiku 4.5 用於互動式助理、使用者支援、日常資訊處理及程式碼工作。複雜問題可使用獨立的推理模式。

接受的輸入

文字 · 圖片

結果

文字

### Ailoot 可用 · 輸入與方法

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

輸入

`text`, `image`

輸出

`text`

上下文

200,000 tokens

輸出上限

65,536 tokens

輸出格式

json 或 SSE

| 欄位 | 類型 | 要求 | 值與限制 | 預設值 |
| --- | --- | --- | --- | --- |
| 欄位`model` | 類型`string` | 要求必填 | 值與限制 claude-haiku-latest | 預設值— |
| 欄位`messages` | 類型`message[]` | 要求必填 | 值與限制 項目數下限: 1 | 預設值— |
| 欄位`messages[].role` | 類型`string` | 要求必填 | 值與限制 user, assistant | 預設值— |
| 欄位`messages[].content` | 類型`string\|content_block[]` | 要求必填 | 值與限制 | 預設值— |
| 欄位`system` | 類型`string\|content_block[]` | 要求選填 | 值與限制 | 預設值— |
| 欄位`max_tokens` | 類型`integer` | 要求必填 | 值與限制 最小值: 1 限制適用對象: 所選模型／卡片的確切上限 | 預設值— |
| 欄位`stream` | 類型`boolean` | 要求選填 | 值與限制 | 預設值false |
| 欄位`temperature` | 類型`number` | 要求選填 | 值與限制 依模型而定 | 預設值— |
| 欄位`top_p` | 類型`number` | 要求選填 | 值與限制 依模型而定 | 預設值— |
| 欄位`stop_sequences` | 類型`string[]` | 要求選填 | 值與限制 依模型而定 | 預設值— |
| 欄位`tools` | 類型`tool[]` | 要求選填 | 值與限制 依模型而定 | 預設值— |
| 欄位`tools[].name` | 類型`string` | 要求選填 | 值與限制 適用條件: 已提供工具 | 預設值— |
| 欄位`tools[].description` | 類型`string` | 要求選填 | 值與限制 | 預設值— |
| 欄位`tools[].input_schema` | 類型`JSON_schema` | 要求選填 | 值與限制 | 預設值— |
| 欄位`tool_choice` | 類型`object` | 要求選填 | 值與限制 依模型而定 | 預設值— |
| 欄位`thinking.type` | 類型`string` | 要求選填 | 值與限制 依模型而定 | 預設值— |
| 欄位`thinking.budget_tokens` | 類型`integer` | 要求選填 | 值與限制 依模型而定 | 預設值— |
| 欄位`output_config.effort` | 類型`string` | 要求選填 | 值與限制 依模型而定 | 預設值— |
| 欄位`metadata` | 類型`object` | 要求選填 | 值與限制 | 預設值— |
| 欄位`cache_control` | 類型`object` | 要求選填 | 值與限制 依模型而定 | 預設值— |

輸入素材組合

**文字** · UTF8 文字

`messages[].content 或 type=text 區塊`

**文字 + 圖片**

`{type:image,source:{type:base64,media_type,data}} 或 type=url 的來源`

方法參數與生命週期

| 參數 | 規格 |
| --- | --- |
| 參數`material_types` | 規格text, image |
| 參數`required` | 規格model, messages, max\_tokens |
| 參數`optional_controls` | 規格null |
| 參數`content_type` | 規格application/json |
| 參數`text_file_material` | 規格實際 UTF-8 內容以文字插入；檔案 ID／URLs 需要另有精確支援 |

生命週期： `exact retained published method`

方法結構與 ID 均為精確值；供應商能力與准入狀態分開。

### 方案

#### Ailoot 方法費率

輸入

US$0.001 */ 1K*

輸出

US$0.005 */ 1K*

讀取快取

US$0.0001 */ 1K*

寫入快取

US$0.00125 */ 1K*

寫入快取，5 分鐘

US$0.00125 */ 1K tokens*

寫入快取，1 小時

US$0.002 */ 1K tokens*

web\_search\_call

US$0.01 *每次呼叫*

最大呼叫次數 web\_search\_call

8

Ailoot 會在請求前預留估算金額。取得結果後，依實測用量結算最終費用。串流結算採用最終用量紀錄。[預留金額與結算的運作方式 →](https://ailoot.ai/docs/zh-hant-tw/billing/reserve/)

#### 參考費率詳情

模型層級的參考費率表不會變更方法選擇、報價或費用。實際計費採用所選 Ailoot 方法的費率。

anthropic/claude-haiku-4.5

#### 各設定的價格

| 設定 | 計費條件 | 費用 |
| --- | --- | --- |
| 設定anthropic/claude-haiku-4.5 · 預設設定 | 計費條件預設設定 | 費用 輸入 · 輸入 **US$0.002** / 1K Token 輸出 · 輸出 **US$0.01** / 1K Token |

claude-haiku-4-5-20251001 · 公布價格

#### 各設定的價格

| 設定 | 費用 |
| --- | --- |
| 設定claude-haiku-4-5-20251001 · 公布價格 | 費用 輸入 · 寫入快取 **$0.0025** 每 1K Token 輸入 · 讀取快取 **$0.0002** 每 1K Token 輸入 · 輸入 Token **$0.002** 每 1K Token 輸出 · 輸出 Token **$0.010** 每 1K Token 每次請求 **$0.000** 每次請求 |

### 請求範例

#### Ailoot · Anthropic Messages

文字範例輸入，圖片Python SDKNode.js SDKPython 串流

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

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

```python
import anthropic
import os

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

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

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

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

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

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

saveResult(msg);
```

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

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

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

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

### 接收並儲存結果

#### Ailoot · Anthropic Messages

json 或 SSE

##### 保留所有已完成的結果

請保留所有完整傳回的回應、檔案與內容區塊。

保留所有內容區塊、思考簽章與實際工具使用 ID。組合所有 SSE 區塊增量；第一個文字區塊不是完整輸出。

##### 需要檢查原始回應時

保留請求／回應 ID 與標頭。未提供通用的文字工作擷取 URL。

回應欄位

| 欄位 | 類型 |
| --- | --- |
| 欄位`id` | 類型string |
| 欄位`model` | 類型string |
| 欄位`content[]` | 類型text\|thinking\|tool\_use\|other content block |
| 欄位`stop_reason` | 類型string\|null |
| 欄位`usage` | 類型object |

錯誤與後續步驟

| 回應 | 條件 | 下一步 |
| --- | --- | --- |
| 回應400 · `invalid_request_error` | 條件必要欄位、素材表示方式或參數值無效 | 下一步提出新的建立請求前，先修正指定欄位。 |

### 別名

#### 模型別名

**Ailoot** [`claude-haiku-4-5-20251001`](https://ailoot.ai/models/zh-hant-tw/#m=claude-haiku-4-5-20251001&route=Core&caller=claude-haiku-4-5-20251001&fmt=messages), [`claude-haiku`](https://ailoot.ai/models/zh-hant-tw/#m=claude-haiku-4-5-20251001&route=Core&caller=claude-haiku&fmt=messages), [`claude-haiku-latest`](https://ailoot.ai/models/zh-hant-tw/#m=claude-haiku-4-5-20251001&route=Core&caller=claude-haiku-latest&fmt=messages)

#### 方法路徑別名

請使用上方列出的 API 方法路徑。

#### 相關呼叫用 ID

[`claude-haiku-4-5-20251001`](https://ailoot.ai/models/zh-hant-tw/#m=claude-haiku-4-5-20251001&route=Core&caller=claude-haiku-4-5-20251001&fmt=messages), [`claude-haiku`](https://ailoot.ai/models/zh-hant-tw/#m=claude-haiku-4-5-20251001&route=Core&caller=claude-haiku&fmt=messages), [`claude-haiku-latest`](https://ailoot.ai/models/zh-hant-tw/#m=claude-haiku-4-5-20251001&route=Core&caller=claude-haiku-latest&fmt=messages)

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

[`claude-haiku-latest`](https://ailoot.ai/models/zh-hant-tw/#m=claude-haiku-4-5-20251001&route=Core&caller=claude-haiku-latest&fmt=responses)

Anthropic /`claude-haiku-latest`

模型 ID

- `claude-haiku-4-5-20251001`
- `claude-haiku`
- `claude-haiku-latest`

### 入門

Claude Haiku 4.5 用於互動式助理、使用者支援、日常資訊處理及程式碼工作。複雜問題可使用獨立的推理模式。

接受的輸入

文字 · 圖片

結果

文字

### Ailoot 可用 · 輸入與方法

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

輸入

`text`, `image`

輸出

`text`

上下文

200,000 tokens

輸出上限

65,536 tokens

輸出格式

json 或 SSE

| 欄位 | 類型 | 要求 | 值與限制 | 預設值 |
| --- | --- | --- | --- | --- |
| 欄位`model` | 類型`string` | 要求必填 | 值與限制 claude-haiku-latest | 預設值— |
| 欄位`input` | 類型`string\|input_item[]` | 要求必填 | 值與限制 | 預設值— |
| 欄位`instructions` | 類型`string` | 要求選填 | 值與限制 | 預設值— |
| 欄位`input[].type` | 類型`string` | 要求選填 | 值與限制 message, reasoning, function\_call, function\_call\_output | 預設值— |
| 欄位`input[].content` | 類型`string\|content_part[]` | 要求選填 | 值與限制 | 預設值— |
| 欄位`input[].call_id` | 類型`string` | 要求選填 | 值與限制 適用條件: function\_call\_output；保留實際回傳的 call\_id | 預設值— |
| 欄位`input[].output` | 類型`string\|content_part[]` | 要求選填 | 值與限制 適用條件: function\_call\_output | 預設值— |
| 欄位`max_output_tokens` | 類型`integer` | 要求選填 | 值與限制 最小值: 1 依模型而定 | 預設值— |
| 欄位`stream` | 類型`boolean` | 要求選填 | 值與限制 | 預設值false |
| 欄位`temperature` | 類型`number` | 要求選填 | 值與限制 依模型而定 | 預設值— |
| 欄位`top_p` | 類型`number` | 要求選填 | 值與限制 依模型而定 | 預設值— |
| 欄位`tools` | 類型`tool[]` | 要求選填 | 值與限制 依模型而定 | 預設值— |
| 欄位`tool_choice` | 類型`string\|object` | 要求選填 | 值與限制 依模型而定 | 預設值— |
| 欄位`parallel_tool_calls` | 類型`boolean` | 要求選填 | 值與限制 依模型而定 | 預設值— |
| 欄位`reasoning.effort` | 類型`string` | 要求選填 | 值與限制 依模型而定 | 預設值— |
| 欄位`reasoning.summary` | 類型`string` | 要求選填 | 值與限制 依模型而定 | 預設值— |
| 欄位`text.format` | 類型`object` | 要求選填 | 值與限制 依模型而定 | 預設值— |
| 欄位`text.verbosity` | 類型`string` | 要求選填 | 值與限制 依模型而定 | 預設值— |
| 欄位`include` | 類型`string[]` | 要求選填 | 值與限制 依模型而定 | 預設值— |
| 欄位`store` | 類型`boolean` | 要求選填 | 值與限制 依模型而定 | 預設值— |
| 欄位`previous_response_id` | 類型`string` | 要求選填 | 值與限制 ID 要求: 僅限支援的延續流程實際回傳的回應 ID 依模型而定 | 預設值— |
| 欄位`service_tier` | 類型`string` | 要求選填 | 值與限制 依模型而定 | 預設值— |
| 欄位`prompt_cache_key` | 類型`string` | 要求選填 | 值與限制 依模型而定 | 預設值— |
| 欄位`prompt_cache_options` | 類型`object` | 要求選填 | 值與限制 依模型而定 | 預設值— |

輸入素材組合

**文字** · UTF8 文字

`輸入文字或 input_text 部分`

**文字 + 圖片**

`{type:input_image,image_url}`

方法參數與生命週期

| 參數 | 規格 |
| --- | --- |
| 參數`material_types` | 規格text, image |
| 參數`required` | 規格model, input |
| 參數`optional_controls` | 規格null |
| 參數`content_type` | 規格application/json |
| 參數`text_file_material` | 規格實際 UTF-8 內容以文字插入；檔案 ID／URLs 需要另有精確支援 |

生命週期： `exact retained published method`

方法結構與 ID 均為精確值；供應商能力與准入狀態分開。

### 方案

#### Ailoot 方法費率

輸入

US$0.001 */ 1K*

輸出

US$0.005 */ 1K*

讀取快取

US$0.0001 */ 1K*

寫入快取

US$0.00125 */ 1K*

寫入快取，5 分鐘

US$0.00125 */ 1K tokens*

寫入快取，1 小時

US$0.002 */ 1K tokens*

web\_search\_call

US$0.01 *每次呼叫*

最大呼叫次數 web\_search\_call

8

Ailoot 會在請求前預留估算金額。取得結果後，依實測用量結算最終費用。串流結算採用最終用量紀錄。[預留金額與結算的運作方式 →](https://ailoot.ai/docs/zh-hant-tw/billing/reserve/)

#### 參考費率詳情

模型層級的參考費率表不會變更方法選擇、報價或費用。實際計費採用所選 Ailoot 方法的費率。

anthropic/claude-haiku-4.5

#### 各設定的價格

| 設定 | 計費條件 | 費用 |
| --- | --- | --- |
| 設定anthropic/claude-haiku-4.5 · 預設設定 | 計費條件預設設定 | 費用 輸入 · 輸入 **US$0.002** / 1K Token 輸出 · 輸出 **US$0.01** / 1K Token |

claude-haiku-4-5-20251001 · 公布價格

#### 各設定的價格

| 設定 | 費用 |
| --- | --- |
| 設定claude-haiku-4-5-20251001 · 公布價格 | 費用 輸入 · 寫入快取 **$0.0025** 每 1K Token 輸入 · 讀取快取 **$0.0002** 每 1K Token 輸入 · 輸入 Token **$0.002** 每 1K Token 輸出 · 輸出 Token **$0.010** 每 1K Token 每次請求 **$0.000** 每次請求 |

### 請求範例

#### Ailoot · OpenAI Responses

文字範例輸入，圖片Python SDKNode.js SDKPython 串流

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

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

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

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

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

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

```python
from openai import OpenAI
import os

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

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

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

```js
import OpenAI from "openai";

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

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

saveResult(resp);
```

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

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

if not os.environ.get("AILOOT_API_KEY", "").strip(): raise SystemExit("Set AILOOT_API_KEY before making a request")
client=OpenAI(base_url="https://api.ailoot.ai/v1",api_key=os.environ["AILOOT_API_KEY"],max_retries=0)
with client.responses.stream(model="claude-haiku-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")
```

### 接收並儲存結果

#### Ailoot · OpenAI Responses

json 或 SSE

##### 保留所有已完成的結果

請保留所有完整傳回的回應、檔案與內容區塊。

保留每個輸出項目與內容部分、實際函式 call\_id、加密推理與用量。串流時保留完整事件／項目身分。

##### 需要檢查原始回應時

保留請求／回應 ID 與標頭。未提供通用的文字工作擷取 URL。

回應欄位

| 欄位 | 類型 |
| --- | --- |
| 欄位`id` | 類型string |
| 欄位`status` | 類型string |
| 欄位`output[]` | 類型message\|reasoning\|function\_call\|other item |
| 欄位`output[].content[]` | 類型content part |
| 欄位`usage` | 類型object |

錯誤與後續步驟

| 回應 | 條件 | 下一步 |
| --- | --- | --- |
| 回應400 · `invalid_request_error` | 條件必要欄位、素材表示方式或參數值無效 | 下一步提出新的建立請求前，先修正指定欄位。 |

### 別名

#### 模型別名

**Ailoot** [`claude-haiku-4-5-20251001`](https://ailoot.ai/models/zh-hant-tw/#m=claude-haiku-4-5-20251001&route=Core&caller=claude-haiku-4-5-20251001&fmt=responses), [`claude-haiku`](https://ailoot.ai/models/zh-hant-tw/#m=claude-haiku-4-5-20251001&route=Core&caller=claude-haiku&fmt=responses), [`claude-haiku-latest`](https://ailoot.ai/models/zh-hant-tw/#m=claude-haiku-4-5-20251001&route=Core&caller=claude-haiku-latest&fmt=responses)

#### 方法路徑別名

請使用上方列出的 API 方法路徑。

#### 相關呼叫用 ID

[`claude-haiku-4-5-20251001`](https://ailoot.ai/models/zh-hant-tw/#m=claude-haiku-4-5-20251001&route=Core&caller=claude-haiku-4-5-20251001&fmt=responses), [`claude-haiku`](https://ailoot.ai/models/zh-hant-tw/#m=claude-haiku-4-5-20251001&route=Core&caller=claude-haiku&fmt=responses), [`claude-haiku-latest`](https://ailoot.ai/models/zh-hant-tw/#m=claude-haiku-4-5-20251001&route=Core&caller=claude-haiku-latest&fmt=responses)

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

[`claude-haiku-latest`](https://ailoot.ai/models/zh-hant-tw/#m=claude-haiku-4-5-20251001&route=Core&caller=claude-haiku-latest&fmt=chat)

Anthropic /`claude-haiku-latest`

模型 ID

- `claude-haiku-4-5-20251001`
- `claude-haiku`
- `claude-haiku-latest`

### 入門

Claude Haiku 4.5 用於互動式助理、使用者支援、日常資訊處理及程式碼工作。複雜問題可使用獨立的推理模式。

接受的輸入

文字 · 圖片

結果

文字

### Ailoot 可用 · 輸入與方法

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

輸入

`text`, `image`

輸出

`text`

上下文

200,000 tokens

輸出上限

65,536 tokens

輸出格式

json 或 SSE

| 欄位 | 類型 | 要求 | 值與限制 | 預設值 |
| --- | --- | --- | --- | --- |
| 欄位`model` | 類型`string` | 要求必填 | 值與限制 claude-haiku-latest | 預設值— |
| 欄位`messages` | 類型`message[]` | 要求必填 | 值與限制 項目數下限: 1 | 預設值— |
| 欄位`messages[].role` | 類型`string` | 要求必填 | 值與限制 範例：system, user, assistant, tool, function 條件: 這些角色由 原始碼中的相容型別明確表示；確切角色集合仍依模型而定。 依模型而定 | 預設值— |
| 欄位`messages[].content` | 類型`string\|content_part[]\|null` | 要求選填 | 值與限制 | 預設值— |
| 欄位`messages[].tool_calls` | 類型`tool_call[]` | 要求選填 | 值與限制 | 預設值— |
| 欄位`messages[].tool_call_id` | 類型`string` | 要求選填 | 值與限制 適用條件: role=tool；使用實際回傳的 ID | 預設值— |
| 欄位`messages[].name` | 類型`string` | 要求選填 | 值與限制 | 預設值— |
| 欄位`messages[].reasoning_content` | 類型`string` | 要求選填 | 值與限制 適用條件: 此模型使用推理內容時，將實際回傳的推理內容帶回後續請求 | 預設值— |
| 欄位`messages[].reasoning_details` | 類型`object\|array` | 要求選填 | 值與限制 依模型而定 | 預設值— |
| 欄位`max_tokens` | 類型`integer` | 要求選填 | 值與限制 最小值: 1 依模型而定 | 預設值— |
| 欄位`max_completion_tokens` | 類型`integer` | 要求選填 | 值與限制 最小值: 1 依模型而定 | 預設值— |
| 欄位`stream` | 類型`boolean` | 要求選填 | 值與限制 | 預設值false |
| 欄位`stream_options.include_usage` | 類型`boolean` | 要求選填 | 值與限制 依模型而定 | 預設值— |
| 欄位`temperature` | 類型`number` | 要求選填 | 值與限制 依模型而定 | 預設值— |
| 欄位`top_p` | 類型`number` | 要求選填 | 值與限制 依模型而定 | 預設值— |
| 欄位`stop` | 類型`string\|string[]` | 要求選填 | 值與限制 依模型而定 | 預設值— |
| 欄位`tools` | 類型`function_tool[]` | 要求選填 | 值與限制 依模型而定 | 預設值— |
| 欄位`tools[].type` | 類型`string` | 要求選填 | 值與限制 依模型而定 | 預設值— |
| 欄位`tools[].function.name` | 類型`string` | 要求必填 | 值與限制 適用條件: 已提供函式工具 | 預設值— |
| 欄位`tools[].function.description` | 類型`string` | 要求選填 | 值與限制 | 預設值— |
| 欄位`tools[].function.parameters` | 類型`JSON_schema` | 要求選填 | 值與限制 | 預設值— |
| 欄位`tool_choice` | 類型`string\|object` | 要求選填 | 值與限制 依模型而定 | 預設值— |
| 欄位`parallel_tool_calls` | 類型`boolean` | 要求選填 | 值與限制 依模型而定 | 預設值— |
| 欄位`response_format` | 類型`object` | 要求選填 | 值與限制 依模型而定 | 預設值— |
| 欄位`reasoning_effort` | 類型`string` | 要求選填 | 值與限制 依模型而定 | 預設值— |
| 欄位`reasoning` | 類型`object` | 要求選填 | 值與限制 依模型而定 | 預設值— |
| 欄位`service_tier` | 類型`string` | 要求選填 | 值與限制 依模型而定 | 預設值— |
| 欄位`instructions` | 類型`string` | 要求選填 | 值與限制 相容性欄位 | 預設值— |
| 欄位`functions` | 類型`function[]` | 要求選填 | 值與限制 依模型而定 | 預設值— |
| 欄位`function_call` | 類型`string\|object` | 要求選填 | 值與限制 依模型而定 | 預設值— |
| 欄位`prompt_cache_options` | 類型`object` | 要求選填 | 值與限制 依模型而定 | 預設值— |

輸入素材組合

**文字** · UTF8 文字

`messages[].content`

**文字 + 圖片**

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

方法參數與生命週期

| 參數 | 規格 |
| --- | --- |
| 參數`material_types` | 規格text, image |
| 參數`required` | 規格model, messages |
| 參數`optional_controls` | 規格null |
| 參數`content_type` | 規格application/json |
| 參數`text_file_material` | 規格實際 UTF-8 內容以文字插入；檔案 ID／URLs 需要另有精確支援 |

生命週期： `exact retained published method`

方法結構與 ID 均為精確值；供應商能力與准入狀態分開。

### 方案

#### Ailoot 方法費率

輸入

US$0.001 */ 1K*

輸出

US$0.005 */ 1K*

讀取快取

US$0.0001 */ 1K*

寫入快取

US$0.00125 */ 1K*

寫入快取，5 分鐘

US$0.00125 */ 1K tokens*

寫入快取，1 小時

US$0.002 */ 1K tokens*

web\_search\_call

US$0.01 *每次呼叫*

最大呼叫次數 web\_search\_call

8

Ailoot 會在請求前預留估算金額。取得結果後，依實測用量結算最終費用。串流結算採用最終用量紀錄。[預留金額與結算的運作方式 →](https://ailoot.ai/docs/zh-hant-tw/billing/reserve/)

#### 參考費率詳情

模型層級的參考費率表不會變更方法選擇、報價或費用。實際計費採用所選 Ailoot 方法的費率。

anthropic/claude-haiku-4.5

#### 各設定的價格

| 設定 | 計費條件 | 費用 |
| --- | --- | --- |
| 設定anthropic/claude-haiku-4.5 · 預設設定 | 計費條件預設設定 | 費用 輸入 · 輸入 **US$0.002** / 1K Token 輸出 · 輸出 **US$0.01** / 1K Token |

claude-haiku-4-5-20251001 · 公布價格

#### 各設定的價格

| 設定 | 費用 |
| --- | --- |
| 設定claude-haiku-4-5-20251001 · 公布價格 | 費用 輸入 · 寫入快取 **$0.0025** 每 1K Token 輸入 · 讀取快取 **$0.0002** 每 1K Token 輸入 · 輸入 Token **$0.002** 每 1K Token 輸出 · 輸出 Token **$0.010** 每 1K Token 每次請求 **$0.000** 每次請求 |

### 請求範例

#### Ailoot · OpenAI Chat

文字範例輸入，圖片Python SDKNode.js SDKPython 串流

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

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

```python
from openai import OpenAI
import os

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

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

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

```js
import OpenAI from "openai";

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

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

saveResult(resp);
```

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

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

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

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

### 接收並儲存結果

#### Ailoot · OpenAI Chat

json 或 SSE

##### 保留所有已完成的結果

請保留所有完整傳回的回應、檔案與內容區塊。

保留每個候選項及其內容／工具呼叫／推理。SSE 中依候選項／工具索引組合增量，保留最終完成原因與用量。

##### 需要檢查原始回應時

保留請求／回應 ID 與標頭。未提供通用的文字工作擷取 URL。

回應欄位

| 欄位 | 類型 |
| --- | --- |
| 欄位`choices[].index` | 類型integer |
| 欄位`choices[].message.content` | 類型string\|null |
| 欄位`choices[].message.tool_calls` | 類型tool\_call\[\] |
| 欄位`choices[].message.reasoning_content` | 類型string |
| 欄位`choices[].message.reasoning_details` | 類型object\|array |
| 欄位`choices[].finish_reason` | 類型string\|null |
| 欄位`usage` | 類型object |

錯誤與後續步驟

| 回應 | 條件 | 下一步 |
| --- | --- | --- |
| 回應400 · `invalid_request_error` | 條件必要欄位、素材表示方式或參數值無效 | 下一步提出新的建立請求前，先修正指定欄位。 |

### 別名

#### 模型別名

**Ailoot** [`claude-haiku-4-5-20251001`](https://ailoot.ai/models/zh-hant-tw/#m=claude-haiku-4-5-20251001&route=Core&caller=claude-haiku-4-5-20251001&fmt=chat), [`claude-haiku`](https://ailoot.ai/models/zh-hant-tw/#m=claude-haiku-4-5-20251001&route=Core&caller=claude-haiku&fmt=chat), [`claude-haiku-latest`](https://ailoot.ai/models/zh-hant-tw/#m=claude-haiku-4-5-20251001&route=Core&caller=claude-haiku-latest&fmt=chat)

#### 方法路徑別名

請使用上方列出的 API 方法路徑。

#### 相關呼叫用 ID

[`claude-haiku-4-5-20251001`](https://ailoot.ai/models/zh-hant-tw/#m=claude-haiku-4-5-20251001&route=Core&caller=claude-haiku-4-5-20251001&fmt=chat), [`claude-haiku`](https://ailoot.ai/models/zh-hant-tw/#m=claude-haiku-4-5-20251001&route=Core&caller=claude-haiku&fmt=chat), [`claude-haiku-latest`](https://ailoot.ai/models/zh-hant-tw/#m=claude-haiku-4-5-20251001&route=Core&caller=claude-haiku-latest&fmt=chat)

FAQ · claude-haiku-4-5-20251001

可以使用哪些輸入與結果？

`POST /v1/messages` · `claude-haiku-4-5-20251001`: `text`, `image` → `text` `POST /v1/responses` · `claude-haiku-4-5-20251001`: `text`, `image` → `text` `POST /v1/chat/completions` · `claude-haiku-4-5-20251001`: `text`, `image` → `text` `POST /v1/messages` · `claude-haiku`: `text`, `image` → `text` `POST /v1/responses` · `claude-haiku`: `text`, `image` → `text` `POST /v1/chat/completions` · `claude-haiku`: `text`, `image` → `text` `POST /v1/messages` · `claude-haiku-latest`: `text`, `image` → `text` `POST /v1/responses` · `claude-haiku-latest`: `text`, `image` → `text` `POST /v1/chat/completions` · `claude-haiku-latest`: `text`, `image` → `text`

請求使用哪些欄位？

`POST /v1/messages` · `claude-haiku-4-5-20251001`: `model`, `messages`, `system`, `max_tokens`, `stream`, `metadata` `POST /v1/responses` · `claude-haiku-4-5-20251001`: `model`, `input`, `instructions`, `stream` `POST /v1/chat/completions` · `claude-haiku-4-5-20251001`: `model`, `messages`, `stream` `POST /v1/messages` · `claude-haiku`: `model`, `messages`, `system`, `max_tokens`, `stream`, `metadata` `POST /v1/responses` · `claude-haiku`: `model`, `input`, `instructions`, `stream` `POST /v1/chat/completions` · `claude-haiku`: `model`, `messages`, `stream` `POST /v1/messages` · `claude-haiku-latest`: `model`, `messages`, `system`, `max_tokens`, `stream`, `metadata` `POST /v1/responses` · `claude-haiku-latest`: `model`, `input`, `instructions`, `stream` `POST /v1/chat/completions` · `claude-haiku-latest`: `model`, `messages`, `stream`

適用哪些限制？

`POST /v1/messages` · `claude-haiku-4-5-20251001`: `ctx`: `200000`; `max_out`: `65536`; `messages.min_items`: `1`; `max_tokens.minimum`: `1` `POST /v1/responses` · `claude-haiku-4-5-20251001`: `ctx`: `200000`; `max_out`: `65536` `POST /v1/chat/completions` · `claude-haiku-4-5-20251001`: `ctx`: `200000`; `max_out`: `65536`; `messages.min_items`: `1` `POST /v1/messages` · `claude-haiku`: `ctx`: `200000`; `max_out`: `65536`; `messages.min_items`: `1`; `max_tokens.minimum`: `1` `POST /v1/responses` · `claude-haiku`: `ctx`: `200000`; `max_out`: `65536` `POST /v1/chat/completions` · `claude-haiku`: `ctx`: `200000`; `max_out`: `65536`; `messages.min_items`: `1` `POST /v1/messages` · `claude-haiku-latest`: `ctx`: `200000`; `max_out`: `65536`; `messages.min_items`: `1`; `max_tokens.minimum`: `1` `POST /v1/responses` · `claude-haiku-latest`: `ctx`: `200000`; `max_out`: `65536` `POST /v1/chat/completions` · `claude-haiku-latest`: `ctx`: `200000`; `max_out`: `65536`; `messages.min_items`: `1`

將 Ailoot 串接 Claude Code、OpenCode、Hermes 或自己的應用程式。

## 公司及其專案組合

公司及其專案組合：數百萬客戶，每月銷售額達數十億。

## 優惠購買 token。

訂閱優惠適合持續工作，折扣碼購買 token 最高可折 50%。

訂閱

為定期請求選擇優惠方案。

最高 50% 折扣碼

購買時輸入代碼，價格依活動重算。

歷史中的費用

每次請求保存模型、token 與金額。

[選擇訂閱](https://ailoot.ai/docs/zh-hant-tw/billing/subscriptions/) · [查看模型價格](https://ailoot.ai/models/zh-hant-tw/)

## 將 API 加入 你銷售的產品。

依 Ailoot 正式服務條款與授權合約串接 SaaS、應用程式與機器人；轉售請申請經銷授權。

商用應用程式

在付費功能加入文字、圖片、影片與聲音生成。

經銷授權

提供專案說明與存取方式，要求書面使用和轉售條件。

網站文件

串接前可閱讀正式服務條款、授權合約與資料處理政策。

[申請經銷授權](mailto:support@ailoot.ai) · [正式服務條款與授權合約](https://ailoot.ai/legal/offer?lang=zh-hant-tw)

## Ailoot · 公司及其專案組合





Ailoot以累積的營運經驗、廣大的客戶群、穩定的服務及持續的KPI管理為基礎。





公司及其專案組合：數百萬客戶，每月銷售額達數十億。





Ailoot將這些營運經驗用於API存取，讓客戶的產品、代理、應用程式及自動化流程使用AI功能。
