Hakila Docs
Responses

列出 Response 的 input items

對齊 OpenAI `GET /v1/responses/{response_id}/input_items`, query 參數(`after`、`include`、`limit`、`order`)原樣轉發。不計費。

GET/v1/responses/{response_id}/input_items

對齊 OpenAI GET /v1/responses/{response_id}/input_items, query 參數(after、include、limit、order)原樣轉發。不計費。

Authorization

bearerAuth
AuthorizationBearer <token>

在 Authorization 標頭帶入 Workspace API Key: Authorization: Bearer sk-hakila-...

In: header

Path Parameters

response_id*string

由 POST /v1/responses 產生的回應 id

Query Parameters

limit?integer
Range1 <= value <= 100
Default20
order?string

Value in

  • "asc"
  • "desc"
after?string

Response Body

application/json

application/json

application/json

application/json

application/json

curl -X GET "https://example.com/v1/responses/resp_68a1b2c3/input_items"
{  "object": "string",  "data": [    {}  ],  "has_more": true,  "first_id": "string",  "last_id": "string"}

取消 background Response POST

對齊 OpenAI `POST /v1/responses/{response_id}/cancel`,只有以 `background: true` 建立的回應可取消。 不計費,且**跳過預算檢查**——止住正在燒錢的背景任務不該被欠款卡住。

建立 Message POST

對齊 Anthropic Messages 規格(`POST https://api.anthropic.com/v1/messages`),給 Claude Code、 Anthropic SDK 等原生客戶端使用,可呼叫平台上所有 chat 模型。 - **Claude 模型**:除了模型路由、金鑰、允許清單與記帳,請求、回應與 SSE 事件都原樣透傳 - **其他模型**(GPT、Gemini、Grok…):轉成各家協定後再轉回 Messages 格式(無狀態); `thinking`/`output_config.effort` 換成各家推理等級,需要回傳的推理資料加密放在 `thinking` block 的 `signature` 或 `redacted_thinking` 的 `data`;Anthropic 伺服器端工具(例如 `web_search_20250305`) 會移除並列在回應 header `X-Hakila-Dropped-Tools`。詳見 [Messages 指南](/docs/guides/messages#非-claude-模型) - 沒有前綴的 `model`(例如 `claude-sonnet-5`)在目錄中只有一個同名模型時補上開發商前綴(`anthropic/claude-sonnet-5`);多個同名模型時回 `400`,沒有時回 `404` - `hakila/auto` 的候選可落在任何供應商;裸名稱 `claude-auto` 視同 `hakila/auto`(給只接受 Claude 名稱的 Claude Desktop 用) - 認證可用 `x-api-key`(Anthropic SDK 預設)或 `Authorization: Bearer` - Claude 模型的 `anthropic-version` 與 `anthropic-beta` header 會轉發給上游 - 錯誤形狀與 Anthropic 一致(`{"type":"error","error":{"type","message"}}`) - 支援 Response Cache header;不支援 Preset(回 `400`) - 上游首字元逾時(預設 30 秒)回傳 `504`