{"openapi":"3.1.0","info":{"title":"Antara API","version":"1.0.0","description":"OpenAI- and Anthropic-compatible inference plus organization management."},"servers":[{"url":"https://api.antarah.dev"}],"components":{"securitySchemes":{"session":{"type":"http","scheme":"bearer","bearerFormat":"JWT","description":"Supabase access token + `Antara-Organization` (management) or `Antara-Project` (inference)"},"adminKey":{"type":"http","scheme":"bearer","description":"`ak_admin_…` Admin API key"},"projectKey":{"type":"http","scheme":"bearer","description":"`ak_…` project API key (or `x-api-key`)"}},"schemas":{"Problem":{"type":"object","properties":{"type":{"type":"string"},"title":{"type":"string"},"status":{"type":"integer"},"detail":{"type":["string","null"]},"instance":{"type":"string"},"code":{"type":"string"},"request_id":{"type":"string"},"param":{"type":["string","null"]},"errors":{"type":"array","items":{"type":"object","properties":{"pointer":{"type":"string"},"detail":{"type":"string"}},"required":["pointer","detail"]}}},"required":["type","title","status","detail","instance","code","request_id","param"]},"Organization":{"type":"object","properties":{"id":{"type":"string","pattern":"^org_[0-9a-f]{32}$","example":"org_0193a6c2e7b47c3d9f1e2a4b5c6d7e8f"},"object":{"type":"string","enum":["organization"]},"name":{"type":"string"},"created_at":{"type":"integer","description":"Unix seconds","example":1793750400},"personal":{"type":"boolean"},"require_mfa":{"type":"boolean"}},"required":["id","object","name","created_at","personal","require_mfa"]},"ProjectList":{"type":"object","properties":{"object":{"type":"string","enum":["list"]},"data":{"type":"array","items":{"$ref":"#/components/schemas/Project"}},"has_more":{"type":"boolean"},"first_id":{"type":["string","null"]},"last_id":{"type":["string","null"]}},"required":["object","data","has_more","first_id","last_id"]},"Project":{"type":"object","properties":{"id":{"type":"string","pattern":"^proj_[0-9a-f]{32}$","example":"proj_0193a6c2e7b47c3d9f1e2a4b5c6d7e8f"},"object":{"type":"string","enum":["organization.project"]},"name":{"type":"string"},"status":{"type":"string","enum":["active","archived","suspended"]},"is_default":{"type":"boolean"},"created_at":{"type":"integer","description":"Unix seconds","example":1793750400},"archived_at":{"type":["integer","null"],"description":"Unix seconds","example":1793750400}},"required":["id","object","name","status","is_default","created_at","archived_at"]},"AdminApiKeyList":{"type":"object","properties":{"object":{"type":"string","enum":["list"]},"data":{"type":"array","items":{"$ref":"#/components/schemas/AdminApiKey"}},"has_more":{"type":"boolean"},"first_id":{"type":["string","null"]},"last_id":{"type":["string","null"]}},"required":["object","data","has_more","first_id","last_id"]},"AdminApiKey":{"type":"object","properties":{"id":{"type":"string","pattern":"^key_[0-9a-f]{32}$","example":"key_0193a6c2e7b47c3d9f1e2a4b5c6d7e8f"},"object":{"type":"string","enum":["organization.admin_api_key"]},"name":{"type":"string"},"redacted_value":{"type":"string","description":"Prefix + `…` + last 4","example":"ak_admin_…x9Qe"},"owner":{"type":"object","properties":{"type":{"type":"string","enum":["organization"]},"id":{"type":"string","pattern":"^org_[0-9a-f]{32}$","example":"org_0193a6c2e7b47c3d9f1e2a4b5c6d7e8f"}},"required":["type","id"]},"status":{"type":"string","enum":["active","revoked","expired","suspended"]},"permissions":{"type":"array","items":{"type":"string","enum":["organization:read","projects:read","projects:create","project_api_keys:read","project_api_keys:create","project_api_keys:revoke","admin_api_keys:read","admin_api_keys:create","admin_api_keys:revoke","billing:read","spend_limits:read","spend_limits:write","policies:read","policies:write"]}},"created_at":{"type":"integer","description":"Unix seconds","example":1793750400},"last_used_at":{"type":["integer","null"],"description":"Unix seconds","example":1793750400},"expires_at":{"type":["integer","null"],"description":"Unix seconds","example":1793750400}},"required":["id","object","name","redacted_value","owner","status","permissions","created_at","last_used_at","expires_at"]},"AdminApiKeyWithValue":{"allOf":[{"$ref":"#/components/schemas/AdminApiKey"},{"type":"object","properties":{"value":{"type":"string","description":"`ak_admin_` + 43 base64url chars. Returned only by create","example":"ak_admin_Jd3…x9Qe"}},"required":["value"]}]},"CreateAdminApiKey":{"type":"object","properties":{"name":{"type":"string","maxLength":120,"description":"1–120 Unicode code points, trimmed"},"permissions":{"type":"array","items":{"type":"string","enum":["organization:read","projects:read","projects:create","project_api_keys:read","project_api_keys:create","project_api_keys:revoke","admin_api_keys:read","admin_api_keys:create","admin_api_keys:revoke","billing:read","spend_limits:read","spend_limits:write","policies:read","policies:write"]},"minItems":1,"maxItems":20,"description":"A subset of the caller's own permissions (02 §6)"},"expires_at":{"type":"string","format":"date-time","description":"RFC 3339, in the future. Omit for a key that never expires"}},"required":["name","permissions"],"additionalProperties":false},"AdminApiKeyDeleted":{"type":"object","properties":{"id":{"type":"string","pattern":"^key_[0-9a-f]{32}$","example":"key_0193a6c2e7b47c3d9f1e2a4b5c6d7e8f"},"object":{"type":"string","enum":["organization.admin_api_key.deleted"]},"deleted":{"type":"boolean","enum":[true]}},"required":["id","object","deleted"]},"ProjectName":{"type":"object","properties":{"name":{"type":"string","maxLength":120,"description":"1–120 Unicode code points, trimmed"}},"required":["name"],"additionalProperties":false},"ProjectDeleted":{"type":"object","properties":{"id":{"type":"string","pattern":"^proj_[0-9a-f]{32}$","example":"proj_0193a6c2e7b47c3d9f1e2a4b5c6d7e8f"},"object":{"type":"string","enum":["organization.project.deleted"]},"deleted":{"type":"boolean","enum":[true]}},"required":["id","object","deleted"]},"SpendLimit":{"type":["object","null"],"properties":{"id":{"type":"string","pattern":"^sl_[0-9a-f]{32}$","example":"sl_0193a6c2e7b47c3d9f1e2a4b5c6d7e8f"},"object":{"type":"string","enum":["organization.spend_limit"]},"scope":{"type":"string","enum":["organization","project"]},"project_id":{"type":["string","null"],"pattern":"^proj_[0-9a-f]{32}$","example":"proj_0193a6c2e7b47c3d9f1e2a4b5c6d7e8f"},"amount_usd":{"type":"string","pattern":"^\\d+\\.\\d{2}(\\d{0,3}[1-9])?$","example":"12.50"},"period":{"type":"string","enum":["monthly"]},"status":{"type":"string","enum":["active"]},"alert_threshold_basis_points":{"type":["integer","null"],"minimum":0,"maximum":10000},"created_at":{"type":"integer","description":"Unix seconds","example":1793750400},"updated_at":{"type":"integer","description":"Unix seconds","example":1793750400}},"required":["id","object","scope","project_id","amount_usd","period","status","alert_threshold_basis_points","created_at","updated_at"]},"ProjectApiKeyList":{"type":"object","properties":{"object":{"type":"string","enum":["list"]},"data":{"type":"array","items":{"$ref":"#/components/schemas/ProjectApiKey"}},"has_more":{"type":"boolean"},"first_id":{"type":["string","null"]},"last_id":{"type":["string","null"]}},"required":["object","data","has_more","first_id","last_id"]},"ProjectApiKey":{"type":"object","properties":{"id":{"type":"string","pattern":"^key_[0-9a-f]{32}$","example":"key_0193a6c2e7b47c3d9f1e2a4b5c6d7e8f"},"object":{"type":"string","enum":["organization.project.api_key"]},"name":{"type":"string"},"redacted_value":{"type":"string","description":"Prefix + `…` + last 4","example":"ak_…x9Qe"},"owner":{"type":"object","properties":{"type":{"type":"string","enum":["project"]},"id":{"type":"string","pattern":"^proj_[0-9a-f]{32}$","example":"proj_0193a6c2e7b47c3d9f1e2a4b5c6d7e8f"},"name":{"type":"string"}},"required":["type","id","name"]},"status":{"type":"string","enum":["active","revoked","expired","suspended"]},"permissions":{"type":"array","items":{"type":"string","enum":["inference","models:read","credits:read"]}},"created_at":{"type":"integer","description":"Unix seconds","example":1793750400},"last_used_at":{"type":["integer","null"],"description":"Unix seconds","example":1793750400},"expires_at":{"type":["integer","null"],"description":"Unix seconds","example":1793750400}},"required":["id","object","name","redacted_value","owner","status","permissions","created_at","last_used_at","expires_at"]},"ProjectApiKeyWithValue":{"allOf":[{"$ref":"#/components/schemas/ProjectApiKey"},{"type":"object","properties":{"value":{"type":"string","description":"`ak_` + 43 base64url chars. Returned only by create and rotate","example":"ak_Jd3…x9Qe"}},"required":["value"]}]},"CreateProjectApiKey":{"type":"object","properties":{"name":{"type":"string","maxLength":120,"description":"1–120 Unicode code points, trimmed"},"permissions":{"type":"array","items":{"type":"string","enum":["inference","models:read","credits:read"]},"minItems":1,"maxItems":20,"default":["inference","models:read","credits:read"]},"expires_at":{"type":"string","format":"date-time","description":"RFC 3339, in the future. Omit for a key that never expires"}},"required":["name"],"additionalProperties":false},"ProjectApiKeyDeleted":{"type":"object","properties":{"id":{"type":"string","pattern":"^key_[0-9a-f]{32}$","example":"key_0193a6c2e7b47c3d9f1e2a4b5c6d7e8f"},"object":{"type":"string","enum":["organization.project.api_key.deleted"]},"deleted":{"type":"boolean","enum":[true]}},"required":["id","object","deleted"]},"ChatCompletion":{"type":"object","properties":{"id":{"type":"string","pattern":"^chatcmpl_[0-9a-f]{32}$","example":"chatcmpl_0193a6c2e7b47c3d9f1e2a4b5c6d7e8f"},"object":{"type":"string","enum":["chat.completion"]},"created":{"type":"integer","description":"Unix seconds","example":1793750400},"model":{"type":"string","example":"a1"},"choices":{"type":"array","items":{"type":"object","properties":{"index":{"type":"integer"},"message":{"type":"object","properties":{"role":{"type":"string","enum":["assistant"]},"content":{"type":["string","null"],"description":"On a policy refusal, the refusal text (also in `refusal`) (02 §9.7)"},"refusal":{"type":["string","null"]},"reasoning_content":{"type":["string","null"],"description":"Reasoning text; omitted when `include_reasoning: false`"},"tool_calls":{"type":["array","null"],"items":{"type":"object","properties":{"id":{"type":"string"},"type":{"type":"string","enum":["function"]},"function":{"type":"object","properties":{"name":{"type":"string"},"arguments":{"type":"string"}},"required":["name","arguments"]}},"required":["id","type","function"]}}},"required":["role","content","refusal","tool_calls"]},"finish_reason":{"type":"string","enum":["stop","length","tool_calls","content_filter"]},"logprobs":{"type":["object","null"],"properties":{"content":{"type":["array","null"],"items":{"type":"object","properties":{"token":{"type":"string"},"logprob":{"type":"number"},"bytes":{"type":["array","null"],"items":{"type":"integer"}},"top_logprobs":{"type":"array","items":{"type":"object","properties":{"token":{"type":"string"},"logprob":{"type":"number"},"bytes":{"type":["array","null"],"items":{"type":"integer"}}},"required":["token","logprob","bytes"]}}},"required":["token","logprob","bytes","top_logprobs"]}},"refusal":{"type":["array","null"],"items":{"type":"object","properties":{"token":{"type":"string"},"logprob":{"type":"number"},"bytes":{"type":["array","null"],"items":{"type":"integer"}},"top_logprobs":{"type":"array","items":{"type":"object","properties":{"token":{"type":"string"},"logprob":{"type":"number"},"bytes":{"type":["array","null"],"items":{"type":"integer"}}},"required":["token","logprob","bytes"]}}},"required":["token","logprob","bytes","top_logprobs"]}}},"required":["content","refusal"]}},"required":["index","message","finish_reason","logprobs"]}},"usage":{"$ref":"#/components/schemas/ChatCompletionUsage"},"system_fingerprint":{"type":"null"}},"required":["id","object","created","model","choices","usage","system_fingerprint"]},"ChatCompletionUsage":{"type":"object","properties":{"prompt_tokens":{"type":"integer"},"completion_tokens":{"type":"integer"},"total_tokens":{"type":"integer"},"prompt_tokens_details":{"type":"object","properties":{"cached_tokens":{"type":"integer"}},"required":["cached_tokens"]},"completion_tokens_details":{"type":"object","properties":{"reasoning_tokens":{"type":"integer"}},"required":["reasoning_tokens"]}},"required":["prompt_tokens","completion_tokens","total_tokens","prompt_tokens_details","completion_tokens_details"]},"ChatCompletionStreamEvent":{"anyOf":[{"$ref":"#/components/schemas/ChatCompletionChunk"},{"$ref":"#/components/schemas/OpenAIError"}]},"ChatCompletionChunk":{"type":"object","properties":{"id":{"type":"string","pattern":"^chatcmpl_[0-9a-f]{32}$","example":"chatcmpl_0193a6c2e7b47c3d9f1e2a4b5c6d7e8f"},"object":{"type":"string","enum":["chat.completion.chunk"]},"created":{"type":"integer","description":"Unix seconds","example":1793750400},"model":{"type":"string","example":"a1"},"choices":{"type":"array","items":{"type":"object","properties":{"index":{"type":"integer"},"delta":{"type":"object","properties":{"role":{"type":"string","enum":["assistant"]},"content":{"type":["string","null"]},"reasoning_content":{"type":"string"},"refusal":{"type":["string","null"]},"tool_calls":{"type":"array","items":{"type":"object","properties":{"index":{"type":"integer"},"id":{"type":"string"},"type":{"type":"string","enum":["function"]},"function":{"type":"object","properties":{"name":{"type":"string"},"arguments":{"type":"string"}}}},"required":["index"]}}}},"finish_reason":{"type":["string","null"],"enum":["stop","length","tool_calls","content_filter",null]},"logprobs":{"type":["object","null"],"properties":{"content":{"type":["array","null"],"items":{"type":"object","properties":{"token":{"type":"string"},"logprob":{"type":"number"},"bytes":{"type":["array","null"],"items":{"type":"integer"}},"top_logprobs":{"type":"array","items":{"type":"object","properties":{"token":{"type":"string"},"logprob":{"type":"number"},"bytes":{"type":["array","null"],"items":{"type":"integer"}}},"required":["token","logprob","bytes"]}}},"required":["token","logprob","bytes","top_logprobs"]}},"refusal":{"type":["array","null"],"items":{"type":"object","properties":{"token":{"type":"string"},"logprob":{"type":"number"},"bytes":{"type":["array","null"],"items":{"type":"integer"}},"top_logprobs":{"type":"array","items":{"type":"object","properties":{"token":{"type":"string"},"logprob":{"type":"number"},"bytes":{"type":["array","null"],"items":{"type":"integer"}}},"required":["token","logprob","bytes"]}}},"required":["token","logprob","bytes","top_logprobs"]}}},"required":["content","refusal"]}},"required":["index","delta","finish_reason","logprobs"]}},"usage":{"allOf":[{"$ref":"#/components/schemas/ChatCompletionUsage"},{"type":["object","null"],"description":"Set only on the final chunk (`choices: []`), which is sent only with `stream_options.include_usage: true`"}]},"system_fingerprint":{"type":"null"}},"required":["id","object","created","model","choices","usage","system_fingerprint"]},"OpenAIError":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string"},"type":{"type":"string","example":"invalid_request_error"},"param":{"type":["string","null"]},"code":{"type":"string","example":"invalid_api_key"},"request_id":{"type":"string"}},"required":["message","type","param","code","request_id"]}},"required":["error"]},"ChatCompletionRequest":{"type":"object","properties":{"model":{"type":"string","minLength":1,"description":"Public model ID, e.g. `a1` (A-05)","example":"a1"},"messages":{"type":"array","items":{"oneOf":[{"type":"object","properties":{"role":{"type":"string","enum":["system"]},"content":{"anyOf":[{"type":"string"},{"type":"array","items":{"type":"object","properties":{"type":{"type":"string","enum":["text"]},"text":{"type":"string"}},"required":["type","text"]},"minItems":1}]},"name":{"type":"string"}},"required":["role","content"]},{"type":"object","properties":{"role":{"type":"string","enum":["developer"]},"content":{"anyOf":[{"type":"string"},{"type":"array","items":{"type":"object","properties":{"type":{"type":"string","enum":["text"]},"text":{"type":"string"}},"required":["type","text"]},"minItems":1}]},"name":{"type":"string"}},"required":["role","content"]},{"type":"object","properties":{"role":{"type":"string","enum":["user"]},"content":{"anyOf":[{"type":"string"},{"type":"array","items":{"oneOf":[{"type":"object","properties":{"type":{"type":"string","enum":["text"]},"text":{"type":"string"}},"required":["type","text"]},{"type":"object","properties":{"type":{"type":"string","enum":["image_url"]},"image_url":{"type":"object","properties":{"url":{"type":"string"},"detail":{"type":"string","enum":["auto","low","high"]}},"required":["url"]}},"required":["type","image_url"]},{"type":"object","properties":{"type":{"type":"string","enum":["input_audio"]}},"required":["type"],"description":"Rejected: `400 unsupported_modality`"},{"type":"object","properties":{"type":{"type":"string","enum":["file"]}},"required":["type"],"description":"Rejected: `400 unsupported_modality`"},{"type":"object","properties":{"type":{"type":"string","enum":["video_url"]}},"required":["type"],"description":"Rejected: `400 unsupported_modality`"}]},"minItems":1}]},"name":{"type":"string"}},"required":["role","content"]},{"type":"object","properties":{"role":{"type":"string","enum":["assistant"]},"content":{"anyOf":[{"type":"string"},{"type":"array","items":{"oneOf":[{"type":"object","properties":{"type":{"type":"string","enum":["text"]},"text":{"type":"string"}},"required":["type","text"]},{"type":"object","properties":{"type":{"type":"string","enum":["refusal"]},"refusal":{"type":"string"}},"required":["type","refusal"]}]}},{"type":"null"}]},"refusal":{"type":["string","null"]},"name":{"type":"string"},"tool_calls":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"type":{"type":"string","enum":["function"]},"function":{"type":"object","properties":{"name":{"type":"string"},"arguments":{"type":"string"}},"required":["name","arguments"]}},"required":["id","type","function"]}},"reasoning_content":{"type":["string","null"]}},"required":["role"]},{"type":"object","properties":{"role":{"type":"string","enum":["tool"]},"content":{"anyOf":[{"type":"string"},{"type":"array","items":{"type":"object","properties":{"type":{"type":"string","enum":["text"]},"text":{"type":"string"}},"required":["type","text"]},"minItems":1}]},"tool_call_id":{"type":"string"}},"required":["role","content","tool_call_id"]}]},"minItems":1,"maxItems":10000},"max_tokens":{"type":["integer","null"],"minimum":1,"description":"1…the model's `max_output_tokens`"},"max_completion_tokens":{"type":["integer","null"],"minimum":1,"description":"1…the model's `max_output_tokens`"},"temperature":{"type":["number","null"],"minimum":0,"maximum":2},"top_p":{"type":["number","null"],"minimum":0,"maximum":1},"frequency_penalty":{"type":["number","null"],"minimum":-2,"maximum":2},"presence_penalty":{"type":["number","null"],"minimum":-2,"maximum":2},"stop":{"anyOf":[{"type":"string"},{"type":"array","items":{"type":"string"},"maxItems":4},{"type":"null"}]},"seed":{"type":["integer","null"]},"logit_bias":{"type":["object","null"],"additionalProperties":{"type":"number","minimum":-100,"maximum":100}},"tools":{"type":["array","null"],"items":{"type":"object","properties":{"type":{"type":"string","enum":["function"]},"function":{"type":"object","properties":{"name":{"type":"string","minLength":1},"description":{"type":"string"},"parameters":{"type":"object","additionalProperties":{}},"strict":{"type":["boolean","null"]}},"required":["name"]}},"required":["type","function"]},"maxItems":128},"tool_choice":{"anyOf":[{"type":"string","enum":["none","auto","required"]},{"type":"object","properties":{"type":{"type":"string","enum":["function"]},"function":{"type":"object","properties":{"name":{"type":"string"}},"required":["name"]}},"required":["type","function"]},{"type":"null"}]},"parallel_tool_calls":{"type":["boolean","null"]},"response_format":{"oneOf":[{"type":"object","properties":{"type":{"type":"string","enum":["text"]}},"required":["type"]},{"type":"object","properties":{"type":{"type":"string","enum":["json_object"]}},"required":["type"]},{"type":"object","properties":{"type":{"type":"string","enum":["json_schema"]},"json_schema":{"type":"object","properties":{"name":{"type":"string","minLength":1},"description":{"type":"string"},"schema":{"type":"object","additionalProperties":{}},"strict":{"type":["boolean","null"]}},"required":["name"]}},"required":["type","json_schema"]},{"type":"null"}]},"reasoning_effort":{"type":["string","null"],"enum":["none","minimal","low","medium","high","xhigh","max",null],"description":"Must be one of the model's `reasoning_efforts`"},"prompt_cache_key":{"type":["string","null"],"minLength":0,"maxLength":512},"logprobs":{"type":["boolean","null"]},"top_logprobs":{"type":["integer","null"],"minimum":0,"maximum":20},"n":{"type":["integer","null"],"description":"Only `1`"},"modalities":{"type":["array","null"],"items":{"type":"string"},"description":"Only `[\"text\"]`"},"stream":{"type":["boolean","null"],"description":"Default `false`"},"stream_options":{"type":["object","null"],"properties":{"include_usage":{"type":"boolean"}},"description":"Usage is always metered; the final usage chunk is sent only when `include_usage` is true"},"reasoning":{"type":["object","null"],"properties":{"effort":{"type":"string","enum":["none","minimal","low","medium","high","xhigh","max"]},"max_tokens":{"type":"integer","minimum":0},"exclude":{"type":"boolean"},"enabled":{"type":"boolean"}},"description":"OpenRouter-style; mapped to `reasoning_effort`"},"thinking":{"anyOf":[{"type":"boolean"},{"type":"object","properties":{"type":{"type":"string","enum":["enabled","disabled"]}},"required":["type"]},{"type":"null"}],"description":"Mapped to `reasoning_effort`"},"include_reasoning":{"type":["boolean","null"],"description":"`false` strips `reasoning_content` from the output"},"policy_ids":{"type":["array","null"],"items":{"type":"string","minLength":1,"maxLength":120},"maxItems":20,"description":"Antara extension: published policies to add for this request"},"user":{"type":["string","null"],"minLength":0,"maxLength":512},"safety_identifier":{"type":["string","null"],"minLength":0,"maxLength":64},"store":{"type":["boolean","null"]},"metadata":{"type":["object","null"],"additionalProperties":{"type":"string"}},"service_tier":{"type":["string","null"]},"structuredOutputs":{"type":["boolean","null"]},"prompt_cache_retention":{"type":["string","null"]}},"required":["model","messages"],"additionalProperties":false,"description":"Rejected with `400 unsupported_parameter`: `n` ≠ 1, `audio`, `modalities` other than `[\"text\"]`, `prediction`, `web_search_options`, `functions`, `function_call`, `prompt_logprobs`, `cache_salt`, and any field not listed here."},"Response":{"type":"object","properties":{"id":{"type":"string","pattern":"^resp_[0-9a-f]{32}$","example":"resp_0193a6c2e7b47c3d9f1e2a4b5c6d7e8f"},"object":{"type":"string","enum":["response"]},"created_at":{"type":"integer","description":"Unix seconds","example":1793750400},"status":{"type":"string","enum":["in_progress","completed","incomplete","failed"]},"error":{"type":["object","null"],"properties":{"code":{"type":"string"},"message":{"type":"string"}},"required":["code","message"]},"incomplete_details":{"type":["object","null"],"properties":{"reason":{"type":"string"}},"required":["reason"]},"instructions":{"type":["string","null"]},"max_output_tokens":{"type":["integer","null"]},"max_tool_calls":{"type":["integer","null"]},"model":{"type":"string","example":"a1"},"output":{"type":"array","items":{"$ref":"#/components/schemas/ResponseOutputItem"}},"parallel_tool_calls":{"type":"boolean"},"previous_response_id":{"type":"null"},"reasoning":{"type":"object","properties":{"effort":{"type":["string","null"],"enum":["none","minimal","low","medium","high","xhigh","max",null]},"summary":{"type":"null"}},"required":["effort","summary"]},"store":{"type":"boolean","enum":[false]},"temperature":{"type":["number","null"]},"text":{"type":"object","properties":{"format":{"oneOf":[{"type":"object","properties":{"type":{"type":"string","enum":["text"]}},"required":["type"]},{"type":"object","properties":{"type":{"type":"string","enum":["json_object"]}},"required":["type"]},{"type":"object","properties":{"type":{"type":"string","enum":["json_schema"]},"name":{"type":"string","minLength":1},"description":{"type":["string","null"]},"schema":{"type":"object","additionalProperties":{}},"strict":{"type":["boolean","null"]}},"required":["type","name","schema"]}]}},"required":["format"]},"tool_choice":{"anyOf":[{"type":"string","enum":["none","auto","required"]},{"type":"object","properties":{"type":{"type":"string","enum":["function"]},"name":{"type":"string"}},"required":["type","name"]}]},"tools":{"type":"array","items":{"type":"object","properties":{"type":{"type":"string","enum":["function"]},"name":{"type":"string","minLength":1},"description":{"type":["string","null"]},"parameters":{"type":["object","null"],"additionalProperties":{}},"strict":{"type":["boolean","null"]}},"required":["type","name"]}},"top_p":{"type":["number","null"]},"truncation":{"type":"string","enum":["auto","disabled"]},"usage":{"$ref":"#/components/schemas/ResponseUsage"},"metadata":{"type":"object","additionalProperties":{"type":"string"}},"user":{"type":["string","null"]}},"required":["id","object","created_at","status","error","incomplete_details","instructions","max_output_tokens","max_tool_calls","model","output","parallel_tool_calls","previous_response_id","reasoning","store","temperature","text","tool_choice","tools","top_p","truncation","usage","metadata","user"]},"ResponseOutputItem":{"oneOf":[{"type":"object","properties":{"type":{"type":"string","enum":["message"]},"id":{"type":"string"},"status":{"type":"string","enum":["in_progress","completed","incomplete"]},"role":{"type":"string","enum":["assistant"]},"content":{"type":"array","items":{"oneOf":[{"type":"object","properties":{"type":{"type":"string","enum":["output_text"]},"text":{"type":"string"},"annotations":{"type":"array","items":{},"maxItems":0,"description":"Always empty (no built-in tools)"},"logprobs":{"type":"array","items":{"type":"object","properties":{"token":{"type":"string"},"logprob":{"type":"number"},"bytes":{"type":["array","null"],"items":{"type":"integer"}},"top_logprobs":{"type":"array","items":{"type":"object","properties":{"token":{"type":"string"},"logprob":{"type":"number"},"bytes":{"type":["array","null"],"items":{"type":"integer"}}},"required":["token","logprob","bytes"]}}},"required":["token","logprob","bytes","top_logprobs"]}}},"required":["type","text","annotations"]},{"type":"object","properties":{"type":{"type":"string","enum":["refusal"]},"refusal":{"type":"string"}},"required":["type","refusal"]}]}}},"required":["type","id","status","role","content"]},{"type":"object","properties":{"type":{"type":"string","enum":["reasoning"]},"id":{"type":"string"},"summary":{"type":"array","items":{"type":"object","properties":{"type":{"type":"string","enum":["summary_text"]},"text":{"type":"string"}},"required":["type","text"]}},"content":{"type":"array","items":{"type":"object","properties":{"type":{"type":"string","enum":["reasoning_text"]},"text":{"type":"string"}},"required":["type","text"]}},"encrypted_content":{"type":["string","null"]},"status":{"type":"string","enum":["in_progress","completed","incomplete"]}},"required":["type","id","summary"]},{"type":"object","properties":{"type":{"type":"string","enum":["function_call"]},"id":{"type":"string"},"call_id":{"type":"string"},"name":{"type":"string"},"arguments":{"type":"string"},"status":{"type":"string","enum":["in_progress","completed","incomplete"]}},"required":["type","id","call_id","name","arguments","status"]}]},"ResponseUsage":{"type":["object","null"],"properties":{"input_tokens":{"type":"integer"},"input_tokens_details":{"type":"object","properties":{"cached_tokens":{"type":"integer"}},"required":["cached_tokens"]},"output_tokens":{"type":"integer"},"output_tokens_details":{"type":"object","properties":{"reasoning_tokens":{"type":"integer"}},"required":["reasoning_tokens"]},"total_tokens":{"type":"integer"}},"required":["input_tokens","input_tokens_details","output_tokens","output_tokens_details","total_tokens"]},"ResponseStreamEvent":{"oneOf":[{"type":"object","properties":{"type":{"type":"string","enum":["response.output_text.delta"]},"sequence_number":{"type":"integer"},"item_id":{"type":"string"},"output_index":{"type":"integer"},"content_index":{"type":"integer"},"delta":{"type":"string"},"logprobs":{"type":"array","items":{"type":"object","properties":{"token":{"type":"string"},"logprob":{"type":"number"},"bytes":{"type":["array","null"],"items":{"type":"integer"}},"top_logprobs":{"type":"array","items":{"type":"object","properties":{"token":{"type":"string"},"logprob":{"type":"number"},"bytes":{"type":["array","null"],"items":{"type":"integer"}}},"required":["token","logprob","bytes"]}}},"required":["token","logprob","bytes","top_logprobs"]}}},"required":["type","sequence_number","item_id","output_index","content_index","delta","logprobs"]},{"type":"object","properties":{"type":{"type":"string","enum":["response.created"]},"sequence_number":{"type":"integer"},"response":{"$ref":"#/components/schemas/Response"}},"required":["type","sequence_number","response"]},{"type":"object","properties":{"type":{"type":"string","enum":["response.in_progress"]},"sequence_number":{"type":"integer"},"response":{"$ref":"#/components/schemas/Response"}},"required":["type","sequence_number","response"]},{"type":"object","properties":{"type":{"type":"string","enum":["response.completed"]},"sequence_number":{"type":"integer"},"response":{"$ref":"#/components/schemas/Response"}},"required":["type","sequence_number","response"]},{"type":"object","properties":{"type":{"type":"string","enum":["response.incomplete"]},"sequence_number":{"type":"integer"},"response":{"$ref":"#/components/schemas/Response"}},"required":["type","sequence_number","response"]},{"type":"object","properties":{"type":{"type":"string","enum":["response.failed"]},"sequence_number":{"type":"integer"},"response":{"$ref":"#/components/schemas/Response"}},"required":["type","sequence_number","response"]},{"type":"object","properties":{"type":{"type":"string","enum":["response.output_item.added"]},"sequence_number":{"type":"integer"},"output_index":{"type":"integer"},"item":{"$ref":"#/components/schemas/ResponseOutputItem"}},"required":["type","sequence_number","output_index","item"]},{"type":"object","properties":{"type":{"type":"string","enum":["response.output_item.done"]},"sequence_number":{"type":"integer"},"output_index":{"type":"integer"},"item":{"$ref":"#/components/schemas/ResponseOutputItem"}},"required":["type","sequence_number","output_index","item"]},{"type":"object","properties":{"type":{"type":"string","enum":["response.content_part.added"]},"sequence_number":{"type":"integer"},"item_id":{"type":"string"},"output_index":{"type":"integer"},"content_index":{"type":"integer"},"part":{"anyOf":[{"type":"object","properties":{"type":{"type":"string","enum":["output_text"]},"text":{"type":"string"},"annotations":{"type":"array","items":{},"maxItems":0,"description":"Always empty (no built-in tools)"},"logprobs":{"type":"array","items":{"type":"object","properties":{"token":{"type":"string"},"logprob":{"type":"number"},"bytes":{"type":["array","null"],"items":{"type":"integer"}},"top_logprobs":{"type":"array","items":{"type":"object","properties":{"token":{"type":"string"},"logprob":{"type":"number"},"bytes":{"type":["array","null"],"items":{"type":"integer"}}},"required":["token","logprob","bytes"]}}},"required":["token","logprob","bytes","top_logprobs"]}}},"required":["type","text","annotations"]},{"type":"object","properties":{"type":{"type":"string","enum":["refusal"]},"refusal":{"type":"string"}},"required":["type","refusal"]},{"type":"object","properties":{"type":{"type":"string","enum":["reasoning_text"]},"text":{"type":"string"}},"required":["type","text"]}]}},"required":["type","sequence_number","item_id","output_index","content_index","part"]},{"type":"object","properties":{"type":{"type":"string","enum":["response.content_part.done"]},"sequence_number":{"type":"integer"},"item_id":{"type":"string"},"output_index":{"type":"integer"},"content_index":{"type":"integer"},"part":{"anyOf":[{"type":"object","properties":{"type":{"type":"string","enum":["output_text"]},"text":{"type":"string"},"annotations":{"type":"array","items":{},"maxItems":0,"description":"Always empty (no built-in tools)"},"logprobs":{"type":"array","items":{"type":"object","properties":{"token":{"type":"string"},"logprob":{"type":"number"},"bytes":{"type":["array","null"],"items":{"type":"integer"}},"top_logprobs":{"type":"array","items":{"type":"object","properties":{"token":{"type":"string"},"logprob":{"type":"number"},"bytes":{"type":["array","null"],"items":{"type":"integer"}}},"required":["token","logprob","bytes"]}}},"required":["token","logprob","bytes","top_logprobs"]}}},"required":["type","text","annotations"]},{"type":"object","properties":{"type":{"type":"string","enum":["refusal"]},"refusal":{"type":"string"}},"required":["type","refusal"]},{"type":"object","properties":{"type":{"type":"string","enum":["reasoning_text"]},"text":{"type":"string"}},"required":["type","text"]}]}},"required":["type","sequence_number","item_id","output_index","content_index","part"]},{"type":"object","properties":{"type":{"type":"string","enum":["response.output_text.done"]},"sequence_number":{"type":"integer"},"item_id":{"type":"string"},"output_index":{"type":"integer"},"content_index":{"type":"integer"},"text":{"type":"string"},"logprobs":{"type":"array","items":{"type":"object","properties":{"token":{"type":"string"},"logprob":{"type":"number"},"bytes":{"type":["array","null"],"items":{"type":"integer"}},"top_logprobs":{"type":"array","items":{"type":"object","properties":{"token":{"type":"string"},"logprob":{"type":"number"},"bytes":{"type":["array","null"],"items":{"type":"integer"}}},"required":["token","logprob","bytes"]}}},"required":["token","logprob","bytes","top_logprobs"]}}},"required":["type","sequence_number","item_id","output_index","content_index","text","logprobs"]},{"type":"object","properties":{"type":{"type":"string","enum":["response.refusal.delta"]},"sequence_number":{"type":"integer"},"item_id":{"type":"string"},"output_index":{"type":"integer"},"content_index":{"type":"integer"},"delta":{"type":"string"}},"required":["type","sequence_number","item_id","output_index","content_index","delta"]},{"type":"object","properties":{"type":{"type":"string","enum":["response.refusal.done"]},"sequence_number":{"type":"integer"},"item_id":{"type":"string"},"output_index":{"type":"integer"},"content_index":{"type":"integer"},"refusal":{"type":"string"}},"required":["type","sequence_number","item_id","output_index","content_index","refusal"]},{"type":"object","properties":{"type":{"type":"string","enum":["response.function_call_arguments.delta"]},"sequence_number":{"type":"integer"},"item_id":{"type":"string"},"output_index":{"type":"integer"},"delta":{"type":"string"}},"required":["type","sequence_number","item_id","output_index","delta"]},{"type":"object","properties":{"type":{"type":"string","enum":["response.function_call_arguments.done"]},"sequence_number":{"type":"integer"},"item_id":{"type":"string"},"output_index":{"type":"integer"},"arguments":{"type":"string"}},"required":["type","sequence_number","item_id","output_index","arguments"]},{"type":"object","properties":{"type":{"type":"string","enum":["response.reasoning_summary_part.added"]},"sequence_number":{"type":"integer"},"item_id":{"type":"string"},"output_index":{"type":"integer"},"summary_index":{"type":"integer"},"part":{"type":"object","properties":{"type":{"type":"string","enum":["summary_text"]},"text":{"type":"string"}},"required":["type","text"]}},"required":["type","sequence_number","item_id","output_index","summary_index","part"]},{"type":"object","properties":{"type":{"type":"string","enum":["response.reasoning_summary_part.done"]},"sequence_number":{"type":"integer"},"item_id":{"type":"string"},"output_index":{"type":"integer"},"summary_index":{"type":"integer"},"part":{"type":"object","properties":{"type":{"type":"string","enum":["summary_text"]},"text":{"type":"string"}},"required":["type","text"]}},"required":["type","sequence_number","item_id","output_index","summary_index","part"]},{"type":"object","properties":{"type":{"type":"string","enum":["response.reasoning_summary_text.delta"]},"sequence_number":{"type":"integer"},"item_id":{"type":"string"},"output_index":{"type":"integer"},"summary_index":{"type":"integer"},"delta":{"type":"string"}},"required":["type","sequence_number","item_id","output_index","summary_index","delta"]},{"type":"object","properties":{"type":{"type":"string","enum":["response.reasoning_summary_text.done"]},"sequence_number":{"type":"integer"},"item_id":{"type":"string"},"output_index":{"type":"integer"},"summary_index":{"type":"integer"},"text":{"type":"string"}},"required":["type","sequence_number","item_id","output_index","summary_index","text"]},{"type":"object","properties":{"type":{"type":"string","enum":["response.reasoning_text.delta"]},"sequence_number":{"type":"integer"},"item_id":{"type":"string"},"output_index":{"type":"integer"},"content_index":{"type":"integer"},"delta":{"type":"string"}},"required":["type","sequence_number","item_id","output_index","content_index","delta"]},{"type":"object","properties":{"type":{"type":"string","enum":["response.reasoning_text.done"]},"sequence_number":{"type":"integer"},"item_id":{"type":"string"},"output_index":{"type":"integer"},"content_index":{"type":"integer"},"text":{"type":"string"}},"required":["type","sequence_number","item_id","output_index","content_index","text"]}]},"ResponseRequest":{"type":"object","properties":{"model":{"type":"string","minLength":1,"description":"Public model ID, e.g. `a1` (A-05)","example":"a1"},"input":{"anyOf":[{"type":"string"},{"type":"array","items":{"anyOf":[{"type":"object","properties":{"type":{"type":"string","enum":["message"]},"role":{"type":"string","enum":["user","system","developer"]},"content":{"anyOf":[{"type":"string"},{"type":"array","items":{"oneOf":[{"type":"object","properties":{"type":{"type":"string","enum":["input_text"]},"text":{"type":"string"}},"required":["type","text"]},{"type":"object","properties":{"type":{"type":"string","enum":["input_image"]},"image_url":{"type":"string"},"detail":{"type":["string","null"],"enum":["auto","low","high",null]}},"required":["type","image_url"]},{"type":"object","properties":{"type":{"type":"string","enum":["input_file"]}},"required":["type"],"description":"Rejected: `400 unsupported_modality`"},{"type":"object","properties":{"type":{"type":"string","enum":["input_audio"]}},"required":["type"],"description":"Rejected: `400 unsupported_modality`"}]},"minItems":1}]}},"required":["role","content"]},{"type":"object","properties":{"type":{"type":"string","enum":["message"]},"role":{"type":"string","enum":["assistant"]},"content":{"anyOf":[{"type":"string"},{"type":"array","items":{"oneOf":[{"type":"object","properties":{"type":{"type":"string","enum":["output_text"]},"text":{"type":"string"}},"required":["type","text"]},{"type":"object","properties":{"type":{"type":"string","enum":["refusal"]},"refusal":{"type":"string"}},"required":["type","refusal"]},{"type":"object","properties":{"type":{"type":"string","enum":["input_text"]},"text":{"type":"string"}},"required":["type","text"]}]}}]}},"required":["role","content"]},{"type":"object","properties":{"type":{"type":"string","enum":["function_call"]},"call_id":{"type":"string","minLength":1},"name":{"type":"string","minLength":1},"arguments":{"type":"string"}},"required":["type","call_id","name","arguments"]},{"type":"object","properties":{"type":{"type":"string","enum":["function_call_output"]},"call_id":{"type":"string","minLength":1},"output":{"anyOf":[{"type":"string"},{"type":"array","items":{"oneOf":[{"type":"object","properties":{"type":{"type":"string","enum":["input_text"]},"text":{"type":"string"}},"required":["type","text"]},{"type":"object","properties":{"type":{"type":"string","enum":["input_image"]},"image_url":{"type":"string"},"detail":{"type":["string","null"],"enum":["auto","low","high",null]}},"required":["type","image_url"]}]}}]}},"required":["type","call_id","output"]},{"type":"object","properties":{"type":{"type":"string","enum":["reasoning"]},"id":{"type":"string"},"summary":{"type":"array","items":{"type":"object","properties":{"type":{"type":"string","enum":["summary_text"]},"text":{"type":"string"}},"required":["type","text"]}},"encrypted_content":{"type":["string","null"]}},"required":["type","summary"]},{"type":"object","properties":{"type":{"type":"string","enum":["item_reference"]}},"required":["type"]}]},"minItems":1,"maxItems":10000}]},"instructions":{"type":["string","null"]},"max_output_tokens":{"type":["integer","null"],"minimum":1,"description":"1…the model's `max_output_tokens`"},"temperature":{"type":["number","null"],"minimum":0,"maximum":2},"top_p":{"type":["number","null"],"minimum":0,"maximum":1},"tools":{"type":["array","null"],"items":{"oneOf":[{"type":"object","properties":{"type":{"type":"string","enum":["function"]},"name":{"type":"string","minLength":1},"description":{"type":["string","null"]},"parameters":{"type":["object","null"],"additionalProperties":{}},"strict":{"type":["boolean","null"]}},"required":["type","name"]},{"type":"object","properties":{"type":{"type":"string","enum":["web_search"]}},"required":["type"]},{"type":"object","properties":{"type":{"type":"string","enum":["web_search_preview"]}},"required":["type"]},{"type":"object","properties":{"type":{"type":"string","enum":["file_search"]}},"required":["type"]},{"type":"object","properties":{"type":{"type":"string","enum":["code_interpreter"]}},"required":["type"]},{"type":"object","properties":{"type":{"type":"string","enum":["computer_use_preview"]}},"required":["type"]},{"type":"object","properties":{"type":{"type":"string","enum":["image_generation"]}},"required":["type"]},{"type":"object","properties":{"type":{"type":"string","enum":["mcp"]}},"required":["type"]},{"type":"object","properties":{"type":{"type":"string","enum":["local_shell"]}},"required":["type"]}]},"maxItems":128},"tool_choice":{"anyOf":[{"type":"string","enum":["none","auto","required"]},{"type":"object","properties":{"type":{"type":"string","enum":["function"]},"name":{"type":"string","minLength":1}},"required":["type","name"]},{"type":"null"}]},"parallel_tool_calls":{"type":["boolean","null"]},"max_tool_calls":{"type":["integer","null"],"minimum":1},"reasoning":{"type":["object","null"],"properties":{"effort":{"type":["string","null"],"enum":["none","minimal","low","medium","high","xhigh","max",null]}},"description":"`effort` must be one of the model's `reasoning_efforts`"},"text":{"type":["object","null"],"properties":{"format":{"oneOf":[{"type":"object","properties":{"type":{"type":"string","enum":["text"]}},"required":["type"]},{"type":"object","properties":{"type":{"type":"string","enum":["json_object"]}},"required":["type"]},{"type":"object","properties":{"type":{"type":"string","enum":["json_schema"]},"name":{"type":"string","minLength":1},"description":{"type":["string","null"]},"schema":{"type":"object","additionalProperties":{}},"strict":{"type":["boolean","null"]}},"required":["type","name","schema"]}]}}},"truncation":{"type":["string","null"],"enum":["auto","disabled",null]},"prompt_cache_key":{"type":["string","null"],"minLength":0,"maxLength":512},"include":{"type":["array","null"],"items":{"type":"string"}},"stream":{"type":["boolean","null"],"description":"Default `false`"},"include_reasoning":{"type":["boolean","null"],"description":"`false` strips reasoning items from the output"},"policy_ids":{"type":["array","null"],"items":{"type":"string","minLength":1,"maxLength":120},"maxItems":20,"description":"Antara extension: published policies to add for this request"},"background":{"type":["boolean","null"],"description":"Only `false`"},"store":{"type":["boolean","null"],"description":"Always treated as `false`; the response echoes `store: false`"},"metadata":{"type":["object","null"],"additionalProperties":{"type":"string"}},"user":{"type":["string","null"],"minLength":0,"maxLength":512},"safety_identifier":{"type":["string","null"],"minLength":0,"maxLength":64},"service_tier":{"type":["string","null"]},"client_metadata":{"type":["object","null"],"additionalProperties":{}}},"required":["model","input"],"additionalProperties":false,"description":"Rejected with `400 unsupported_parameter`: `previous_response_id`, `conversation`, `background: true`, built-in tools, `include` values other than the two listed, item references, and any field not listed here."},"Message":{"type":"object","properties":{"id":{"type":"string","pattern":"^msg_[0-9a-f]{32}$","example":"msg_0193a6c2e7b47c3d9f1e2a4b5c6d7e8f"},"type":{"type":"string","enum":["message"]},"role":{"type":"string","enum":["assistant"]},"model":{"type":"string","example":"a1"},"content":{"type":"array","items":{"oneOf":[{"type":"object","properties":{"type":{"type":"string","enum":["thinking"]},"thinking":{"type":"string"},"signature":{"type":"string","enum":[""]}},"required":["type","thinking","signature"]},{"type":"object","properties":{"type":{"type":"string","enum":["text"]},"text":{"type":"string"}},"required":["type","text"]},{"type":"object","properties":{"type":{"type":"string","enum":["tool_use"]},"id":{"type":"string"},"name":{"type":"string"},"input":{"type":"object","additionalProperties":{}}},"required":["type","id","name","input"]}]}},"stop_reason":{"type":["string","null"],"enum":["end_turn","max_tokens","stop_sequence","tool_use","refusal",null]},"stop_sequence":{"type":["string","null"]},"usage":{"$ref":"#/components/schemas/MessageUsage"}},"required":["id","type","role","model","content","stop_reason","stop_sequence","usage"]},"MessageUsage":{"type":"object","properties":{"input_tokens":{"type":"integer","description":"Excludes cache reads (Anthropic's convention)"},"output_tokens":{"type":"integer"},"cache_read_input_tokens":{"type":"integer"}},"required":["input_tokens","output_tokens","cache_read_input_tokens"]},"MessageStreamEvent":{"oneOf":[{"type":"object","properties":{"type":{"type":"string","enum":["message_start"]},"message":{"allOf":[{"$ref":"#/components/schemas/Message"},{"type":"object","properties":{"content":{"type":"array","items":{},"maxItems":0},"stop_reason":{"type":"null"}}}]}},"required":["type","message"]},{"type":"object","properties":{"type":{"type":"string","enum":["content_block_start"]},"index":{"type":"integer"},"content_block":{"oneOf":[{"type":"object","properties":{"type":{"type":"string","enum":["thinking"]},"thinking":{"type":"string","enum":[""]},"signature":{"type":"string","enum":[""]}},"required":["type","thinking","signature"]},{"type":"object","properties":{"type":{"type":"string","enum":["text"]},"text":{"type":"string","enum":[""]}},"required":["type","text"]},{"type":"object","properties":{"type":{"type":"string","enum":["tool_use"]},"id":{"type":"string"},"name":{"type":"string"},"input":{"type":"object","properties":{}}},"required":["type","id","name","input"]}]}},"required":["type","index","content_block"]},{"type":"object","properties":{"type":{"type":"string","enum":["content_block_delta"]},"index":{"type":"integer"},"delta":{"oneOf":[{"type":"object","properties":{"type":{"type":"string","enum":["thinking_delta"]},"thinking":{"type":"string"}},"required":["type","thinking"]},{"type":"object","properties":{"type":{"type":"string","enum":["text_delta"]},"text":{"type":"string"}},"required":["type","text"]},{"type":"object","properties":{"type":{"type":"string","enum":["input_json_delta"]},"partial_json":{"type":"string"}},"required":["type","partial_json"]}]}},"required":["type","index","delta"]},{"type":"object","properties":{"type":{"type":"string","enum":["content_block_stop"]},"index":{"type":"integer"}},"required":["type","index"]},{"type":"object","properties":{"type":{"type":"string","enum":["message_delta"]},"delta":{"type":"object","properties":{"stop_reason":{"type":["string","null"],"enum":["end_turn","max_tokens","stop_sequence","tool_use","refusal",null]},"stop_sequence":{"type":["string","null"]}},"required":["stop_reason","stop_sequence"]},"usage":{"$ref":"#/components/schemas/MessageUsage"}},"required":["type","delta","usage"]},{"type":"object","properties":{"type":{"type":"string","enum":["message_stop"]}},"required":["type"]},{"type":"object","properties":{"type":{"type":"string","enum":["ping"]}},"required":["type"]},{"type":"object","properties":{"type":{"type":"string","enum":["error"]},"error":{"type":"object","properties":{"type":{"type":"string","example":"invalid_request_error"},"message":{"type":"string"},"code":{"type":"string"}},"required":["type","message","code"]},"request_id":{"type":"string"}},"required":["type","error"]}]},"AnthropicError":{"type":"object","properties":{"type":{"type":"string","enum":["error"]},"error":{"type":"object","properties":{"type":{"type":"string","example":"invalid_request_error"},"message":{"type":"string"},"code":{"type":"string"}},"required":["type","message","code"]},"request_id":{"type":"string"}},"required":["type","error","request_id"]},"MessageRequest":{"type":"object","properties":{"model":{"type":"string","minLength":1,"description":"Public model ID, e.g. `a1` (A-05)","example":"a1"},"messages":{"type":"array","items":{"oneOf":[{"type":"object","properties":{"role":{"type":"string","enum":["user"]},"content":{"anyOf":[{"type":"string"},{"type":"array","items":{"oneOf":[{"type":"object","properties":{"type":{"type":"string","enum":["text"]},"text":{"type":"string","minLength":1}},"required":["type","text"]},{"type":"object","properties":{"type":{"type":"string","enum":["image"]},"source":{"oneOf":[{"type":"object","properties":{"type":{"type":"string","enum":["base64"]},"media_type":{"type":"string","enum":["image/png","image/jpeg","image/webp","image/gif"]},"data":{"type":"string"}},"required":["type","media_type","data"]},{"type":"object","properties":{"type":{"type":"string","enum":["url"]},"url":{"type":"string"}},"required":["type","url"]}]}},"required":["type","source"]},{"type":"object","properties":{"type":{"type":"string","enum":["tool_result"]},"tool_use_id":{"type":"string","minLength":1},"content":{"anyOf":[{"type":"string"},{"type":"array","items":{"oneOf":[{"type":"object","properties":{"type":{"type":"string","enum":["text"]},"text":{"type":"string","minLength":1}},"required":["type","text"]},{"type":"object","properties":{"type":{"type":"string","enum":["image"]},"source":{"oneOf":[{"type":"object","properties":{"type":{"type":"string","enum":["base64"]},"media_type":{"type":"string","enum":["image/png","image/jpeg","image/webp","image/gif"]},"data":{"type":"string"}},"required":["type","media_type","data"]},{"type":"object","properties":{"type":{"type":"string","enum":["url"]},"url":{"type":"string"}},"required":["type","url"]}]}},"required":["type","source"]}]}}]},"is_error":{"type":"boolean"}},"required":["type","tool_use_id"]},{"type":"object","properties":{"type":{"type":"string","enum":["document"]}},"required":["type"]},{"type":"object","properties":{"type":{"type":"string","enum":["search_result"]}},"required":["type"]}]},"minItems":1}]}},"required":["role","content"]},{"type":"object","properties":{"role":{"type":"string","enum":["assistant"]},"content":{"anyOf":[{"type":"string"},{"type":"array","items":{"oneOf":[{"type":"object","properties":{"type":{"type":"string","enum":["text"]},"text":{"type":"string","minLength":1}},"required":["type","text"]},{"type":"object","properties":{"type":{"type":"string","enum":["tool_use"]},"id":{"type":"string","minLength":1},"name":{"type":"string","minLength":1},"input":{"type":"object","additionalProperties":{}}},"required":["type","id","name","input"]},{"type":"object","properties":{"type":{"type":"string","enum":["thinking"]},"thinking":{"type":"string"},"signature":{"type":"string"}},"required":["type","thinking"]},{"type":"object","properties":{"type":{"type":"string","enum":["redacted_thinking"]},"data":{"type":"string"}},"required":["type","data"]}]}}]}},"required":["role","content"]}]},"minItems":1,"maxItems":10000},"system":{"anyOf":[{"type":"string"},{"type":"array","items":{"type":"object","properties":{"type":{"type":"string","enum":["text"]},"text":{"type":"string","minLength":1}},"required":["type","text"]}}]},"tools":{"type":"array","items":{"type":"object","properties":{"type":{"type":"string"},"name":{"type":"string","minLength":1},"description":{"type":"string"},"input_schema":{"type":"object","additionalProperties":{}}},"required":["name"]},"maxItems":128},"max_tokens":{"type":"integer","minimum":1,"description":"Required. 1…the model's `max_output_tokens`"},"temperature":{"type":"number","minimum":0,"maximum":1,"description":"0–1 (Anthropic's range)"},"top_p":{"type":"number","minimum":0,"maximum":1},"stop_sequences":{"type":"array","items":{"type":"string"},"maxItems":4},"tool_choice":{"oneOf":[{"type":"object","properties":{"type":{"type":"string","enum":["auto"]},"disable_parallel_tool_use":{"type":"boolean"}},"required":["type"]},{"type":"object","properties":{"type":{"type":"string","enum":["any"]},"disable_parallel_tool_use":{"type":"boolean"}},"required":["type"]},{"type":"object","properties":{"type":{"type":"string","enum":["none"]}},"required":["type"]},{"type":"object","properties":{"type":{"type":"string","enum":["tool"]},"name":{"type":"string","minLength":1},"disable_parallel_tool_use":{"type":"boolean"}},"required":["type","name"]}]},"thinking":{"anyOf":[{"type":"boolean","enum":[false]},{"type":"object","properties":{"type":{"type":"string","enum":["enabled"]},"budget_tokens":{"type":"integer","minimum":1}},"required":["type","budget_tokens"]},{"type":"object","properties":{"type":{"type":"string","enum":["disabled"]}},"required":["type"]}],"description":"`budget_tokens` maps to a reasoning effort; `output_config.effort` wins"},"output_config":{"type":"object","properties":{"effort":{"type":"string","enum":["none","minimal","low","medium","high","xhigh","max"]},"format":{"type":"object","properties":{"type":{"type":"string","enum":["json_schema"]},"schema":{"type":"object","additionalProperties":{}}},"required":["type","schema"],"description":"Structured output → Chat `response_format: {type:\"json_schema\", json_schema:{name:\"output\", schema, strict:true}}`"}}},"top_k":{"type":"integer","description":"Rejected: `400 unsupported_parameter`"},"stream":{"type":"boolean","description":"Default `false`"},"include_reasoning":{"type":"boolean","description":"`false` drops `thinking` blocks from the output"},"policy_ids":{"type":["array","null"],"items":{"type":"string","minLength":1,"maxLength":120},"maxItems":20,"description":"Antara extension: published policies to add for this request"},"metadata":{"type":"object","properties":{"user_id":{"type":["string","null"]}}},"service_tier":{"type":"string"},"context_management":{}},"required":["model","messages","max_tokens"],"additionalProperties":false,"description":"Rejected with `400 unsupported_parameter`: `top_k`, server tools, `document` blocks, `container`, `mcp_servers`, and any field not listed here."},"CountTokens":{"type":"object","properties":{"input_tokens":{"type":"integer"}},"required":["input_tokens"]},"CountTokensRequest":{"type":"object","properties":{"model":{"type":"string","minLength":1,"description":"Public model ID, e.g. `a1` (A-05)","example":"a1"},"messages":{"type":"array","items":{"oneOf":[{"type":"object","properties":{"role":{"type":"string","enum":["user"]},"content":{"anyOf":[{"type":"string"},{"type":"array","items":{"oneOf":[{"type":"object","properties":{"type":{"type":"string","enum":["text"]},"text":{"type":"string","minLength":1}},"required":["type","text"]},{"type":"object","properties":{"type":{"type":"string","enum":["image"]},"source":{"oneOf":[{"type":"object","properties":{"type":{"type":"string","enum":["base64"]},"media_type":{"type":"string","enum":["image/png","image/jpeg","image/webp","image/gif"]},"data":{"type":"string"}},"required":["type","media_type","data"]},{"type":"object","properties":{"type":{"type":"string","enum":["url"]},"url":{"type":"string"}},"required":["type","url"]}]}},"required":["type","source"]},{"type":"object","properties":{"type":{"type":"string","enum":["tool_result"]},"tool_use_id":{"type":"string","minLength":1},"content":{"anyOf":[{"type":"string"},{"type":"array","items":{"oneOf":[{"type":"object","properties":{"type":{"type":"string","enum":["text"]},"text":{"type":"string","minLength":1}},"required":["type","text"]},{"type":"object","properties":{"type":{"type":"string","enum":["image"]},"source":{"oneOf":[{"type":"object","properties":{"type":{"type":"string","enum":["base64"]},"media_type":{"type":"string","enum":["image/png","image/jpeg","image/webp","image/gif"]},"data":{"type":"string"}},"required":["type","media_type","data"]},{"type":"object","properties":{"type":{"type":"string","enum":["url"]},"url":{"type":"string"}},"required":["type","url"]}]}},"required":["type","source"]}]}}]},"is_error":{"type":"boolean"}},"required":["type","tool_use_id"]},{"type":"object","properties":{"type":{"type":"string","enum":["document"]}},"required":["type"]},{"type":"object","properties":{"type":{"type":"string","enum":["search_result"]}},"required":["type"]}]},"minItems":1}]}},"required":["role","content"]},{"type":"object","properties":{"role":{"type":"string","enum":["assistant"]},"content":{"anyOf":[{"type":"string"},{"type":"array","items":{"oneOf":[{"type":"object","properties":{"type":{"type":"string","enum":["text"]},"text":{"type":"string","minLength":1}},"required":["type","text"]},{"type":"object","properties":{"type":{"type":"string","enum":["tool_use"]},"id":{"type":"string","minLength":1},"name":{"type":"string","minLength":1},"input":{"type":"object","additionalProperties":{}}},"required":["type","id","name","input"]},{"type":"object","properties":{"type":{"type":"string","enum":["thinking"]},"thinking":{"type":"string"},"signature":{"type":"string"}},"required":["type","thinking"]},{"type":"object","properties":{"type":{"type":"string","enum":["redacted_thinking"]},"data":{"type":"string"}},"required":["type","data"]}]}}]}},"required":["role","content"]}]},"minItems":1,"maxItems":10000},"system":{"anyOf":[{"type":"string"},{"type":"array","items":{"type":"object","properties":{"type":{"type":"string","enum":["text"]},"text":{"type":"string","minLength":1}},"required":["type","text"]}}]},"tools":{"type":"array","items":{"type":"object","properties":{"type":{"type":"string"},"name":{"type":"string","minLength":1},"description":{"type":"string"},"input_schema":{"type":"object","additionalProperties":{}}},"required":["name"]},"maxItems":128},"tool_choice":{"oneOf":[{"type":"object","properties":{"type":{"type":"string","enum":["auto"]},"disable_parallel_tool_use":{"type":"boolean"}},"required":["type"]},{"type":"object","properties":{"type":{"type":"string","enum":["any"]},"disable_parallel_tool_use":{"type":"boolean"}},"required":["type"]},{"type":"object","properties":{"type":{"type":"string","enum":["none"]}},"required":["type"]},{"type":"object","properties":{"type":{"type":"string","enum":["tool"]},"name":{"type":"string","minLength":1},"disable_parallel_tool_use":{"type":"boolean"}},"required":["type","name"]}]},"thinking":{"anyOf":[{"type":"boolean","enum":[false]},{"type":"object","properties":{"type":{"type":"string","enum":["enabled"]},"budget_tokens":{"type":"integer","minimum":1}},"required":["type","budget_tokens"]},{"type":"object","properties":{"type":{"type":"string","enum":["disabled"]}},"required":["type"]}]}},"required":["model","messages"],"additionalProperties":false},"ModelList":{"type":"object","properties":{"object":{"type":"string","enum":["list"]},"data":{"type":"array","items":{"$ref":"#/components/schemas/Model"}}},"required":["object","data"]},"Model":{"type":"object","properties":{"id":{"type":"string","example":"a1"},"object":{"type":"string","enum":["model"]},"created":{"type":"integer","description":"Unix seconds","example":1793750400},"owned_by":{"type":"string","enum":["antara"]},"display_name":{"type":"string","example":"Antara A1"},"context_window":{"type":"integer"},"max_output_tokens":{"type":"integer"},"input_modalities":{"type":"array","items":{"type":"string","enum":["text","image"]}},"output_modalities":{"type":"array","items":{"type":"string","enum":["text"]}},"supports_tools":{"type":"boolean"},"supports_reasoning":{"type":"boolean"},"reasoning_efforts":{"type":"array","items":{"type":"string","enum":["none","minimal","low","medium","high","xhigh","max"]}},"pricing":{"type":"object","properties":{"input_per_mtok":{"type":"string","pattern":"^\\d+\\.\\d{2}(\\d{0,3}[1-9])?$","example":"12.50"},"cached_input_per_mtok":{"type":"string","pattern":"^\\d+\\.\\d{2}(\\d{0,3}[1-9])?$","example":"12.50"},"output_per_mtok":{"type":"string","pattern":"^\\d+\\.\\d{2}(\\d{0,3}[1-9])?$","example":"12.50"}},"required":["input_per_mtok","cached_input_per_mtok","output_per_mtok"],"description":"USD per 1M tokens"},"deprecated":{"type":"boolean"},"sunset_at":{"type":["integer","null"],"description":"Unix seconds","example":1793750400},"access":{"type":"object","properties":{"available":{"type":"boolean"},"locked":{"type":"boolean"},"required_checks":{"type":"array","items":{"type":"string"}},"missing_requirements":{"type":"array","items":{"type":"string"}}},"required":["available","locked","required_checks","missing_requirements"]}},"required":["id","object","created","owned_by","display_name","context_window","max_output_tokens","input_modalities","output_modalities","supports_tools","supports_reasoning","reasoning_efforts","pricing","deprecated","sunset_at","access"]},"Credits":{"type":"object","properties":{"data":{"type":"object","properties":{"total_credits":{"type":"number","example":25},"total_usage":{"type":"number","example":3.4172}},"required":["total_credits","total_usage"]}},"required":["data"]},"PlanList":{"type":"array","items":{"$ref":"#/components/schemas/Plan"}},"Plan":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"description":{"type":"string"},"price_usd":{"type":["string","null"],"pattern":"^\\d+\\.\\d{2}(\\d{0,3}[1-9])?$","example":"12.50","description":"Monthly price; `null` = contract (Enterprise)"},"monthly_credit_usd":{"type":["string","null"],"pattern":"^\\d+\\.\\d{2}(\\d{0,3}[1-9])?$","example":"12.50"},"tier":{"type":["object","null"],"properties":{"id":{"type":"string"},"name":{"type":"string"}},"required":["id","name"]},"discount_basis_points":{"type":"integer"},"most_popular":{"type":"boolean"}},"required":["id","name","description","price_usd","monthly_credit_usd","tier","discount_basis_points","most_popular"]},"Balance":{"type":"object","properties":{"object":{"type":"string","enum":["organization.balance"]},"available_usd":{"type":"string","description":"Decimal USD; negative when owed","example":"12.50"},"reserved_usd":{"type":"string","pattern":"^\\d+\\.\\d{2}(\\d{0,3}[1-9])?$","example":"12.50"},"owed_usd":{"type":"string","pattern":"^\\d+\\.\\d{2}(\\d{0,3}[1-9])?$","example":"12.50"},"standing_status":{"type":"string","enum":["good","payment_required","past_due","blocked"]}},"required":["object","available_usd","reserved_usd","owed_usd","standing_status"]},"PutSpendLimit":{"type":"object","properties":{"amount_usd":{"type":"string","description":"USD 0–1000000 (number or decimal string, ≤ 6 decimals)","example":"20.00"},"alert_threshold_basis_points":{"type":["integer","null"],"minimum":0,"maximum":10000}},"required":["amount_usd"]},"SpendLimitDeleted":{"type":"object","properties":{"id":{"type":"string","pattern":"^sl_[0-9a-f]{32}$","example":"sl_0193a6c2e7b47c3d9f1e2a4b5c6d7e8f"},"object":{"type":"string","enum":["organization.spend_limit.deleted"]},"deleted":{"type":"boolean","enum":[true]}},"required":["id","object","deleted"]},"PolicyList":{"type":"object","properties":{"object":{"type":"string","enum":["list"]},"data":{"type":"array","items":{"$ref":"#/components/schemas/PolicySummary"}},"has_more":{"type":"boolean"},"first_id":{"type":["string","null"]},"last_id":{"type":["string","null"]}},"required":["object","data","has_more","first_id","last_id"]},"PolicySummary":{"type":"object","properties":{"id":{"type":"string","pattern":"^pol_[0-9a-f]{32}$","example":"pol_0193a6c2e7b47c3d9f1e2a4b5c6d7e8f"},"object":{"type":"string","enum":["organization.policy"]},"name":{"type":"string"},"description":{"type":"string"},"state":{"type":"string","enum":["draft","monitoring","enforcing","paused"]},"revision":{"type":"integer"},"has_unpublished_changes":{"type":"boolean"},"current_version":{"type":["integer","null"]},"created_at":{"type":"integer","description":"Unix seconds","example":1793750400},"updated_at":{"type":"integer","description":"Unix seconds","example":1793750400},"direction":{"type":"string","enum":["request","response","both"]},"scope":{"type":"string","enum":["organization","projects","unattached"]},"mode":{"type":"string","enum":["monitoring","enforcing"]},"project_count":{"type":"integer"}},"required":["id","object","name","description","state","revision","has_unpublished_changes","current_version","created_at","updated_at","direction","scope","mode","project_count"]},"Policy":{"type":"object","properties":{"id":{"type":"string","pattern":"^pol_[0-9a-f]{32}$","example":"pol_0193a6c2e7b47c3d9f1e2a4b5c6d7e8f"},"object":{"type":"string","enum":["organization.policy"]},"name":{"type":"string"},"description":{"type":"string"},"state":{"type":"string","enum":["draft","monitoring","enforcing","paused"]},"revision":{"type":"integer"},"has_unpublished_changes":{"type":"boolean"},"current_version":{"type":["integer","null"]},"created_at":{"type":"integer","description":"Unix seconds","example":1793750400},"updated_at":{"type":"integer","description":"Unix seconds","example":1793750400},"draft":{"$ref":"#/components/schemas/PolicySettings"},"published":{"$ref":"#/components/schemas/PolicyVersion"}},"required":["id","object","name","description","state","revision","has_unpublished_changes","current_version","created_at","updated_at","draft","published"]},"PolicySettings":{"type":"object","properties":{"rule":{"type":"string"},"direction":{"type":"string","enum":["request","response","both"]},"mode":{"type":"string","enum":["monitoring","enforcing"]},"scope":{"type":"string","enum":["organization","projects","unattached"]},"project_ids":{"type":"array","items":{"type":"string","pattern":"^proj_[0-9a-f]{32}$","example":"proj_0193a6c2e7b47c3d9f1e2a4b5c6d7e8f"}},"match_threshold_basis_points":{"type":["integer","null"]}},"required":["rule","direction","mode","scope","project_ids","match_threshold_basis_points"]},"PolicyVersion":{"allOf":[{"$ref":"#/components/schemas/PolicySettings"},{"type":["object","null"],"properties":{"id":{"type":"string","pattern":"^polv_[0-9a-f]{32}$","example":"polv_0193a6c2e7b47c3d9f1e2a4b5c6d7e8f"},"object":{"type":"string","enum":["organization.policy.version"]},"version":{"type":"integer"},"published_at":{"type":"integer","description":"Unix seconds","example":1793750400},"current":{"type":"boolean"}},"required":["id","object","version","published_at","current"]}]},"CreatePolicy":{"type":"object","properties":{"name":{"type":"string","maxLength":80,"description":"1–80 Unicode code points, trimmed"},"description":{"type":"string"},"rule":{"type":"string","description":"1–20000; a yes/no question ending with ?, ？ or ؟"},"direction":{"type":"string","enum":["request","response","both"]},"scope":{"type":"string","enum":["organization","projects","unattached"]},"mode":{"type":"string","enum":["monitoring","enforcing"]},"project_ids":{"type":"array","items":{"type":"string","pattern":"^proj_[0-9a-f]{32}$","example":"proj_0193a6c2e7b47c3d9f1e2a4b5c6d7e8f"},"maxItems":1000},"match_threshold_basis_points":{"type":["integer","null"],"minimum":1,"maximum":9999,"description":"1–9999, or null = platform default 7000"}},"required":["name","rule","direction","scope"],"additionalProperties":false},"PatchPolicy":{"type":"object","properties":{"revision":{"type":"integer","minimum":1},"name":{"type":"string","maxLength":80,"description":"1–80 Unicode code points, trimmed"},"description":{"type":"string"},"rule":{"type":"string","description":"1–20000; a yes/no question ending with ?, ？ or ؟"},"direction":{"type":"string","enum":["request","response","both"]},"mode":{"type":"string","enum":["monitoring","enforcing"]},"scope":{"type":"string","enum":["organization","projects","unattached"]},"project_ids":{"type":"array","items":{"type":"string","pattern":"^proj_[0-9a-f]{32}$","example":"proj_0193a6c2e7b47c3d9f1e2a4b5c6d7e8f"},"maxItems":1000},"match_threshold_basis_points":{"type":["integer","null"],"minimum":1,"maximum":9999,"description":"1–9999, or null = platform default 7000"}},"required":["revision"],"additionalProperties":false},"PolicyDeleted":{"type":"object","properties":{"id":{"type":"string","pattern":"^pol_[0-9a-f]{32}$","example":"pol_0193a6c2e7b47c3d9f1e2a4b5c6d7e8f"},"object":{"type":"string","enum":["organization.policy.deleted"]},"deleted":{"type":"boolean","enum":[true]}},"required":["id","object","deleted"]},"PolicyRevision":{"type":"object","properties":{"revision":{"type":"integer","minimum":1}},"required":["revision"],"additionalProperties":false},"PolicyVersionList":{"type":"object","properties":{"object":{"type":"string","enum":["list"]},"data":{"type":"array","items":{"$ref":"#/components/schemas/PolicyVersionSummary"}},"has_more":{"type":"boolean"},"first_id":{"type":["string","null"]},"last_id":{"type":["string","null"]}},"required":["object","data","has_more","first_id","last_id"]},"PolicyVersionSummary":{"type":"object","properties":{"direction":{"type":"string","enum":["request","response","both"]},"mode":{"type":"string","enum":["monitoring","enforcing"]},"scope":{"type":"string","enum":["organization","projects","unattached"]},"project_ids":{"type":"array","items":{"type":"string","pattern":"^proj_[0-9a-f]{32}$","example":"proj_0193a6c2e7b47c3d9f1e2a4b5c6d7e8f"}},"match_threshold_basis_points":{"type":["integer","null"]},"id":{"type":"string","pattern":"^polv_[0-9a-f]{32}$","example":"polv_0193a6c2e7b47c3d9f1e2a4b5c6d7e8f"},"object":{"type":"string","enum":["organization.policy.version"]},"version":{"type":"integer"},"published_at":{"type":"integer","description":"Unix seconds","example":1793750400},"current":{"type":"boolean"}},"required":["direction","mode","scope","project_ids","match_threshold_basis_points","id","object","version","published_at","current"]},"EffectivePolicyList":{"type":"object","properties":{"object":{"type":"string","enum":["list"]},"data":{"type":"array","items":{"$ref":"#/components/schemas/EffectivePolicy"}}},"required":["object","data"]},"EffectivePolicy":{"type":"object","properties":{"id":{"type":"string","pattern":"^pol_[0-9a-f]{32}$","example":"pol_0193a6c2e7b47c3d9f1e2a4b5c6d7e8f"},"object":{"type":"string","enum":["organization.effective_policy"]},"name":{"type":"string"},"version":{"type":"integer"},"direction":{"type":"string","enum":["request","response","both"]},"mode":{"type":"string","enum":["monitoring","enforcing"]},"scope":{"type":"string","enum":["organization","projects","unattached"]},"source":{"type":"string","enum":["organization","project"]}},"required":["id","object","name","version","direction","mode","scope","source"]},"UsagePage":{"type":"object","properties":{"object":{"type":"string","enum":["page"]},"data":{"type":"array","items":{"type":"object","properties":{"object":{"type":"string","enum":["bucket"]},"start_time":{"type":"integer","description":"Unix seconds","example":1793750400},"end_time":{"type":"integer","description":"Unix seconds","example":1793750400},"results":{"type":"array","items":{"$ref":"#/components/schemas/UsageResult"}}},"required":["object","start_time","end_time","results"]}},"has_more":{"type":"boolean"},"next_page":{"type":["string","null"]}},"required":["object","data","has_more","next_page"]},"UsageResult":{"type":"object","properties":{"object":{"type":"string","enum":["organization.usage.completions.result"]},"input_tokens":{"type":"integer"},"input_cached_tokens":{"type":"integer"},"input_uncached_tokens":{"type":"integer"},"output_tokens":{"type":"integer"},"num_model_requests":{"type":"integer"},"project_id":{"type":["string","null"]},"api_key_id":{"type":["string","null"],"description":"`null` when ungrouped, or for Playground requests"},"model":{"type":["string","null"]}},"required":["object","input_tokens","input_cached_tokens","input_uncached_tokens","output_tokens","num_model_requests","project_id","api_key_id","model"]},"CostPage":{"type":"object","properties":{"object":{"type":"string","enum":["page"]},"data":{"type":"array","items":{"type":"object","properties":{"object":{"type":"string","enum":["bucket"]},"start_time":{"type":"integer","description":"Unix seconds","example":1793750400},"end_time":{"type":"integer","description":"Unix seconds","example":1793750400},"results":{"type":"array","items":{"$ref":"#/components/schemas/CostResult"}}},"required":["object","start_time","end_time","results"]}},"has_more":{"type":"boolean"},"next_page":{"type":["string","null"]}},"required":["object","data","has_more","next_page"]},"CostResult":{"type":"object","properties":{"object":{"type":"string","enum":["organization.costs.result"]},"amount":{"type":"object","properties":{"value":{"type":"string","pattern":"^\\d+\\.\\d{2}(\\d{0,3}[1-9])?$","example":"12.50"},"currency":{"type":"string","enum":["usd"]}},"required":["value","currency"]},"line_item":{"type":["string","null"],"description":"`\"<model> · input\"`, `\"… · cached input\"`, `\"… · output\"`","example":"a1 · input"},"project_id":{"type":["string","null"]},"api_key_id":{"type":["string","null"],"description":"`null` when ungrouped, or for Playground requests"}},"required":["object","amount","line_item","project_id","api_key_id"]}},"parameters":{}},"paths":{"/v1/organization":{"get":{"summary":"Get the organization","security":[{"adminKey":[]},{"session":[]}],"x-id":"A-18","x-rate-limit-class":"admin_read","x-session-context":"organization","x-permission":"organization:read","responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Organization"}}}},"default":{"description":"RFC 9457 problem details","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/v1/organization/projects":{"get":{"summary":"List projects (oldest first, so the default project leads)","security":[{"adminKey":[]},{"session":[]}],"x-id":"A-19","x-rate-limit-class":"admin_read","x-session-context":"organization","x-permission":"projects:read","parameters":[{"schema":{"type":"string","minLength":1,"maxLength":200},"required":false,"name":"after","in":"query"},{"schema":{"type":"integer","minimum":1,"maximum":100,"default":20},"required":false,"name":"limit","in":"query"},{"schema":{"type":"string","enum":["true","false"],"default":"false"},"required":false,"name":"include_archived","in":"query"}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProjectList"}}}},"default":{"description":"RFC 9457 problem details","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}},"post":{"summary":"Create a project","security":[{"adminKey":[]},{"session":[]}],"x-rate-limit-class":"admin_write","x-session-context":"organization","x-id":"A-20","x-permission":"projects:create","x-idempotency":"required","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProjectName"}}}},"responses":{"201":{"description":"Created","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Project"}}}},"default":{"description":"RFC 9457 problem details","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/v1/organization/admin_api_keys":{"get":{"summary":"List Admin API keys (newest first, never with `value`)","security":[{"adminKey":[]},{"session":[]}],"x-rate-limit-class":"admin_read","x-session-context":"organization","x-id":"A-28","x-permission":"admin_api_keys:read","parameters":[{"schema":{"type":"string","minLength":1,"maxLength":200},"required":false,"name":"after","in":"query"},{"schema":{"type":"integer","minimum":1,"maximum":100,"default":20},"required":false,"name":"limit","in":"query"}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AdminApiKeyList"}}}},"default":{"description":"RFC 9457 problem details","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}},"post":{"summary":"Create an Admin API key with a subset of your permissions (`value` is returned once)","security":[{"adminKey":[]},{"session":[]}],"x-rate-limit-class":"admin_write","x-session-context":"organization","x-id":"A-29","x-permission":"admin_api_keys:create","x-idempotency":"required","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateAdminApiKey"}}}},"responses":{"201":{"description":"Created","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AdminApiKeyWithValue"}}}},"403":{"description":"`permission_denied`","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"default":{"description":"RFC 9457 problem details","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/v1/organization/admin_api_keys/{api_key_id}":{"get":{"summary":"Get an Admin API key","security":[{"adminKey":[]},{"session":[]}],"x-rate-limit-class":"admin_read","x-session-context":"organization","x-id":"A-30","x-permission":"admin_api_keys:read","parameters":[{"schema":{"type":"string","pattern":"^key_[0-9a-f]{32}$","example":"key_0193a6c2e7b47c3d9f1e2a4b5c6d7e8f"},"required":true,"name":"api_key_id","in":"path"}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AdminApiKey"}}}},"default":{"description":"RFC 9457 problem details","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}},"delete":{"summary":"Revoke an Admin API key (revoking twice → 200)","security":[{"adminKey":[]},{"session":[]}],"x-rate-limit-class":"admin_write","x-session-context":"organization","x-id":"A-31","x-permission":"admin_api_keys:revoke","x-idempotency":"optional","parameters":[{"schema":{"type":"string","pattern":"^key_[0-9a-f]{32}$","example":"key_0193a6c2e7b47c3d9f1e2a4b5c6d7e8f"},"required":true,"name":"api_key_id","in":"path"}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AdminApiKeyDeleted"}}}},"default":{"description":"RFC 9457 problem details","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/v1/organization/projects/{project_id}":{"get":{"summary":"Get a project","security":[{"adminKey":[]},{"session":[]}],"x-rate-limit-class":"admin_read","x-session-context":"organization","x-id":"A-21","x-permission":"projects:read","parameters":[{"schema":{"type":"string","pattern":"^proj_[0-9a-f]{32}$","example":"proj_0193a6c2e7b47c3d9f1e2a4b5c6d7e8f"},"required":true,"name":"project_id","in":"path"}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Project"}}}},"default":{"description":"RFC 9457 problem details","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}},"post":{"summary":"Rename a project (allowed in any status)","security":[{"adminKey":[]},{"session":[]}],"x-rate-limit-class":"admin_write","x-session-context":"organization","x-id":"A-22","x-permission":"projects:create","x-idempotency":"optional","parameters":[{"schema":{"type":"string","pattern":"^proj_[0-9a-f]{32}$","example":"proj_0193a6c2e7b47c3d9f1e2a4b5c6d7e8f"},"required":true,"name":"project_id","in":"path"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProjectName"}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Project"}}}},"default":{"description":"RFC 9457 problem details","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/v1/organization/projects/{project_id}/archive":{"post":{"summary":"Archive a project and revoke all of its API keys","security":[{"adminKey":[]},{"session":[]}],"x-rate-limit-class":"admin_write","x-session-context":"organization","x-id":"A-23","x-permission":"projects:create","x-idempotency":"optional","parameters":[{"schema":{"type":"string","pattern":"^proj_[0-9a-f]{32}$","example":"proj_0193a6c2e7b47c3d9f1e2a4b5c6d7e8f"},"required":true,"name":"project_id","in":"path"}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProjectDeleted"}}}},"409":{"description":"`cannot_archive_default_project`","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"default":{"description":"RFC 9457 problem details","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/v1/organization/projects/{project_id}/api_keys":{"get":{"summary":"List a project's API keys (newest first, never with `value`)","security":[{"adminKey":[]},{"session":[]}],"x-rate-limit-class":"admin_read","x-session-context":"organization","x-id":"A-24","x-permission":"project_api_keys:read","parameters":[{"schema":{"type":"string","pattern":"^proj_[0-9a-f]{32}$","example":"proj_0193a6c2e7b47c3d9f1e2a4b5c6d7e8f"},"required":true,"name":"project_id","in":"path"},{"schema":{"type":"string","minLength":1,"maxLength":200},"required":false,"name":"after","in":"query"},{"schema":{"type":"integer","minimum":1,"maximum":100,"default":20},"required":false,"name":"limit","in":"query"}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProjectApiKeyList"}}}},"default":{"description":"RFC 9457 problem details","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}},"post":{"summary":"Create a project API key (`value` is returned once)","security":[{"adminKey":[]},{"session":[]}],"x-rate-limit-class":"admin_write","x-session-context":"organization","x-id":"A-25","x-permission":"project_api_keys:create","x-idempotency":"required","parameters":[{"schema":{"type":"string","pattern":"^proj_[0-9a-f]{32}$","example":"proj_0193a6c2e7b47c3d9f1e2a4b5c6d7e8f"},"required":true,"name":"project_id","in":"path"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateProjectApiKey"}}}},"responses":{"201":{"description":"Created","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProjectApiKeyWithValue"}}}},"409":{"description":"`project_archived`","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"default":{"description":"RFC 9457 problem details","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/v1/organization/projects/{project_id}/api_keys/{api_key_id}":{"get":{"summary":"Get a project API key","security":[{"adminKey":[]},{"session":[]}],"x-rate-limit-class":"admin_read","x-session-context":"organization","x-id":"A-26","x-permission":"project_api_keys:read","parameters":[{"schema":{"type":"string","pattern":"^proj_[0-9a-f]{32}$","example":"proj_0193a6c2e7b47c3d9f1e2a4b5c6d7e8f"},"required":true,"name":"project_id","in":"path"},{"schema":{"type":"string","pattern":"^key_[0-9a-f]{32}$","example":"key_0193a6c2e7b47c3d9f1e2a4b5c6d7e8f"},"required":true,"name":"api_key_id","in":"path"}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProjectApiKey"}}}},"default":{"description":"RFC 9457 problem details","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}},"delete":{"summary":"Revoke a project API key (revoking twice → 200)","security":[{"adminKey":[]},{"session":[]}],"x-rate-limit-class":"admin_write","x-session-context":"organization","x-id":"A-27","x-permission":"project_api_keys:revoke","x-idempotency":"optional","parameters":[{"schema":{"type":"string","pattern":"^proj_[0-9a-f]{32}$","example":"proj_0193a6c2e7b47c3d9f1e2a4b5c6d7e8f"},"required":true,"name":"project_id","in":"path"},{"schema":{"type":"string","pattern":"^key_[0-9a-f]{32}$","example":"key_0193a6c2e7b47c3d9f1e2a4b5c6d7e8f"},"required":true,"name":"api_key_id","in":"path"}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProjectApiKeyDeleted"}}}},"default":{"description":"RFC 9457 problem details","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/v1/chat/completions":{"post":{"summary":"Create a chat completion (OpenAI Chat Completions); `stream: true` answers with server-sent events","security":[{"projectKey":[]},{"session":[]}],"x-session-context":"project","x-id":"A-01","x-rate-limit-class":"inference","x-permission":"inference","x-idempotency":"optional","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ChatCompletionRequest"}}}},"responses":{"200":{"description":"`application/json` when `stream` is false; otherwise `text/event-stream`: `data: <ChatCompletionChunk>` events, then `data: [DONE]`","headers":{"x-request-id":{"schema":{"type":"string","description":"Request ID (`req_…`); also sent as `request-id`"},"required":false,"description":"Request ID (`req_…`); also sent as `request-id`"},"ratelimit-policy":{"schema":{"type":"string","description":"e.g. `\"rpm\";q=60;w=60` (02 §8)"},"required":false,"description":"e.g. `\"rpm\";q=60;w=60` (02 §8)"},"ratelimit":{"schema":{"type":"string","description":"Scope closest to exhaustion, e.g. `\"rpm\";r=59;t=42`"},"required":false,"description":"Scope closest to exhaustion, e.g. `\"rpm\";r=59;t=42`"},"x-ratelimit-limit-requests":{"schema":{"type":"string","description":"RPM of the scope closest to exhaustion"},"required":false,"description":"RPM of the scope closest to exhaustion"},"x-ratelimit-remaining-requests":{"schema":{"type":"string","description":"Requests left in the window"},"required":false,"description":"Requests left in the window"},"x-ratelimit-reset-requests":{"schema":{"type":"string","description":"Duration, e.g. `\"1s\"`, `\"6m0s\"`"},"required":false,"description":"Duration, e.g. `\"1s\"`, `\"6m0s\"`"},"x-ratelimit-limit-tokens":{"schema":{"type":"string","description":"TPM of the scope closest to exhaustion"},"required":false,"description":"TPM of the scope closest to exhaustion"},"x-ratelimit-remaining-tokens":{"schema":{"type":"string","description":"Tokens left in the window"},"required":false,"description":"Tokens left in the window"},"x-ratelimit-reset-tokens":{"schema":{"type":"string","description":"Duration"},"required":false,"description":"Duration"},"x-antara-policy-action":{"schema":{"type":"string","description":"`blocked` when an enforcing policy refused before the headers were sent (02 §9.7)"},"required":false,"description":"`blocked` when an enforcing policy refused before the headers were sent (02 §9.7)"},"deprecation":{"schema":{"type":"string","description":"Deprecated model: `@<unix>` (RFC 9745)"},"required":false,"description":"Deprecated model: `@<unix>` (RFC 9745)"},"sunset":{"schema":{"type":"string","description":"Deprecated model: HTTP-date (RFC 8594)"},"required":false,"description":"Deprecated model: HTTP-date (RFC 8594)"},"link":{"schema":{"type":"string","description":"Deprecated model: `<docs>; rel=\"deprecation\"`"},"required":false,"description":"Deprecated model: `<docs>; rel=\"deprecation\"`"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ChatCompletion"}},"text/event-stream":{"schema":{"$ref":"#/components/schemas/ChatCompletionStreamEvent"}}}},"400":{"description":"`context_length_exceeded`, `unknown_policy`","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OpenAIError"}}}},"402":{"description":"`insufficient_credits`, `spend_limit_reached`","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OpenAIError"}}}},"502":{"description":"`upstream_error`","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OpenAIError"}}}},"503":{"description":"`upstream_unavailable`, `policy_evaluation_unavailable`","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OpenAIError"}}}},"504":{"description":"`upstream_timeout`","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OpenAIError"}}}},"default":{"description":"OpenAI-shaped error (02 §4.1)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OpenAIError"}}}}}}},"/v1/responses":{"post":{"summary":"Create a model response (OpenAI Responses, stateless); `stream: true` answers with `response.*` server-sent events","security":[{"projectKey":[]},{"session":[]}],"x-session-context":"project","x-id":"A-02","x-rate-limit-class":"inference","x-permission":"inference","x-idempotency":"optional","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseRequest"}}}},"responses":{"200":{"description":"`application/json` when `stream` is false; otherwise `text/event-stream`: `event: <type>` + `data: <ResponseStreamEvent>`, ending with `response.completed` or `response.incomplete` (`response.failed` on a failure after the headers)","headers":{"x-request-id":{"schema":{"type":"string","description":"Request ID (`req_…`); also sent as `request-id`"},"required":false,"description":"Request ID (`req_…`); also sent as `request-id`"},"ratelimit-policy":{"schema":{"type":"string","description":"e.g. `\"rpm\";q=60;w=60` (02 §8)"},"required":false,"description":"e.g. `\"rpm\";q=60;w=60` (02 §8)"},"ratelimit":{"schema":{"type":"string","description":"Scope closest to exhaustion, e.g. `\"rpm\";r=59;t=42`"},"required":false,"description":"Scope closest to exhaustion, e.g. `\"rpm\";r=59;t=42`"},"x-ratelimit-limit-requests":{"schema":{"type":"string","description":"RPM of the scope closest to exhaustion"},"required":false,"description":"RPM of the scope closest to exhaustion"},"x-ratelimit-remaining-requests":{"schema":{"type":"string","description":"Requests left in the window"},"required":false,"description":"Requests left in the window"},"x-ratelimit-reset-requests":{"schema":{"type":"string","description":"Duration, e.g. `\"1s\"`, `\"6m0s\"`"},"required":false,"description":"Duration, e.g. `\"1s\"`, `\"6m0s\"`"},"x-ratelimit-limit-tokens":{"schema":{"type":"string","description":"TPM of the scope closest to exhaustion"},"required":false,"description":"TPM of the scope closest to exhaustion"},"x-ratelimit-remaining-tokens":{"schema":{"type":"string","description":"Tokens left in the window"},"required":false,"description":"Tokens left in the window"},"x-ratelimit-reset-tokens":{"schema":{"type":"string","description":"Duration"},"required":false,"description":"Duration"},"x-antara-policy-action":{"schema":{"type":"string","description":"`blocked` when an enforcing policy refused before the headers were sent (02 §9.7)"},"required":false,"description":"`blocked` when an enforcing policy refused before the headers were sent (02 §9.7)"},"deprecation":{"schema":{"type":"string","description":"Deprecated model: `@<unix>` (RFC 9745)"},"required":false,"description":"Deprecated model: `@<unix>` (RFC 9745)"},"sunset":{"schema":{"type":"string","description":"Deprecated model: HTTP-date (RFC 8594)"},"required":false,"description":"Deprecated model: HTTP-date (RFC 8594)"},"link":{"schema":{"type":"string","description":"Deprecated model: `<docs>; rel=\"deprecation\"`"},"required":false,"description":"Deprecated model: `<docs>; rel=\"deprecation\"`"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Response"}},"text/event-stream":{"schema":{"$ref":"#/components/schemas/ResponseStreamEvent"}}}},"400":{"description":"`context_length_exceeded`, `unknown_policy`","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OpenAIError"}}}},"402":{"description":"`insufficient_credits`, `spend_limit_reached`","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OpenAIError"}}}},"502":{"description":"`upstream_error`","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OpenAIError"}}}},"503":{"description":"`upstream_unavailable`, `policy_evaluation_unavailable`","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OpenAIError"}}}},"504":{"description":"`upstream_timeout`","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OpenAIError"}}}},"default":{"description":"OpenAI-shaped error (02 §4.1)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OpenAIError"}}}}}}},"/v1/messages":{"post":{"summary":"Create a message (Anthropic Messages, translated to the upstream's Chat Completions); `stream: true` answers with server-sent events","security":[{"projectKey":[]},{"session":[]}],"x-session-context":"project","x-id":"A-03","x-rate-limit-class":"inference","x-permission":"inference","x-idempotency":"optional","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/MessageRequest"}}}},"responses":{"200":{"description":"`application/json` when `stream` is false; otherwise `text/event-stream`: `event: <type>` + `data: <MessageStreamEvent>`, ending with `message_stop`","headers":{"x-request-id":{"schema":{"type":"string","description":"Request ID (`req_…`); also sent as `request-id`"},"required":false,"description":"Request ID (`req_…`); also sent as `request-id`"},"ratelimit-policy":{"schema":{"type":"string","description":"e.g. `\"rpm\";q=60;w=60` (02 §8)"},"required":false,"description":"e.g. `\"rpm\";q=60;w=60` (02 §8)"},"ratelimit":{"schema":{"type":"string","description":"Scope closest to exhaustion, e.g. `\"rpm\";r=59;t=42`"},"required":false,"description":"Scope closest to exhaustion, e.g. `\"rpm\";r=59;t=42`"},"x-ratelimit-limit-requests":{"schema":{"type":"string","description":"RPM of the scope closest to exhaustion"},"required":false,"description":"RPM of the scope closest to exhaustion"},"x-ratelimit-remaining-requests":{"schema":{"type":"string","description":"Requests left in the window"},"required":false,"description":"Requests left in the window"},"x-ratelimit-reset-requests":{"schema":{"type":"string","description":"Duration, e.g. `\"1s\"`, `\"6m0s\"`"},"required":false,"description":"Duration, e.g. `\"1s\"`, `\"6m0s\"`"},"x-ratelimit-limit-tokens":{"schema":{"type":"string","description":"TPM of the scope closest to exhaustion"},"required":false,"description":"TPM of the scope closest to exhaustion"},"x-ratelimit-remaining-tokens":{"schema":{"type":"string","description":"Tokens left in the window"},"required":false,"description":"Tokens left in the window"},"x-ratelimit-reset-tokens":{"schema":{"type":"string","description":"Duration"},"required":false,"description":"Duration"},"x-antara-policy-action":{"schema":{"type":"string","description":"`blocked` when an enforcing policy refused before the headers were sent (02 §9.7)"},"required":false,"description":"`blocked` when an enforcing policy refused before the headers were sent (02 §9.7)"},"deprecation":{"schema":{"type":"string","description":"Deprecated model: `@<unix>` (RFC 9745)"},"required":false,"description":"Deprecated model: `@<unix>` (RFC 9745)"},"sunset":{"schema":{"type":"string","description":"Deprecated model: HTTP-date (RFC 8594)"},"required":false,"description":"Deprecated model: HTTP-date (RFC 8594)"},"link":{"schema":{"type":"string","description":"Deprecated model: `<docs>; rel=\"deprecation\"`"},"required":false,"description":"Deprecated model: `<docs>; rel=\"deprecation\"`"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Message"}},"text/event-stream":{"schema":{"$ref":"#/components/schemas/MessageStreamEvent"}}}},"400":{"description":"`context_length_exceeded`, `unknown_policy`","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AnthropicError"}}}},"402":{"description":"`insufficient_credits`, `spend_limit_reached`","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AnthropicError"}}}},"502":{"description":"`upstream_error`","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AnthropicError"}}}},"503":{"description":"`upstream_unavailable`, `policy_evaluation_unavailable`","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AnthropicError"}}}},"504":{"description":"`upstream_timeout`","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AnthropicError"}}}},"default":{"description":"Anthropic-shaped error (02 §4.1)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AnthropicError"}}}}}}},"/v1/messages/count_tokens":{"post":{"summary":"Count a Messages request's input tokens (cached 10 min by body; not billed; counts toward RPM only)","security":[{"projectKey":[]},{"session":[]}],"x-session-context":"project","x-id":"A-04","x-rate-limit-class":"count_tokens","x-permission":"inference","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CountTokensRequest"}}}},"responses":{"200":{"description":"OK","headers":{"x-request-id":{"schema":{"type":"string","description":"Request ID (`req_…`); also sent as `request-id`"},"required":false,"description":"Request ID (`req_…`); also sent as `request-id`"},"ratelimit-policy":{"schema":{"type":"string","description":"e.g. `\"rpm\";q=60;w=60` (02 §8)"},"required":false,"description":"e.g. `\"rpm\";q=60;w=60` (02 §8)"},"ratelimit":{"schema":{"type":"string","description":"Scope closest to exhaustion, e.g. `\"rpm\";r=59;t=42`"},"required":false,"description":"Scope closest to exhaustion, e.g. `\"rpm\";r=59;t=42`"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CountTokens"}}}},"404":{"description":"`model_not_found`","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AnthropicError"}}}},"502":{"description":"`upstream_error`","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AnthropicError"}}}},"503":{"description":"`upstream_unavailable`","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AnthropicError"}}}},"504":{"description":"`upstream_timeout`","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AnthropicError"}}}},"default":{"description":"Anthropic-shaped error (02 §4.1)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AnthropicError"}}}}}}},"/v1/models":{"get":{"summary":"List the models this project can call (catalog order)","security":[{"projectKey":[]},{"session":[]}],"x-session-context":"project","x-id":"A-05","x-rate-limit-class":"admin_read","x-permission":"models:read","responses":{"200":{"description":"OK","headers":{"x-request-id":{"schema":{"type":"string","description":"Request ID (`req_…`); also sent as `request-id`"},"required":false,"description":"Request ID (`req_…`); also sent as `request-id`"},"ratelimit-policy":{"schema":{"type":"string","description":"e.g. `\"rpm\";q=60;w=60` (02 §8)"},"required":false,"description":"e.g. `\"rpm\";q=60;w=60` (02 §8)"},"ratelimit":{"schema":{"type":"string","description":"Scope closest to exhaustion, e.g. `\"rpm\";r=59;t=42`"},"required":false,"description":"Scope closest to exhaustion, e.g. `\"rpm\";r=59;t=42`"},"etag":{"schema":{"type":"string","description":"Send back as `If-None-Match`"},"required":false,"description":"Send back as `If-None-Match`"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ModelList"}}}},"304":{"description":"Not modified (`If-None-Match` matched the `ETag`)"},"default":{"description":"OpenAI-shaped error (02 §4.1)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OpenAIError"}}}}}}},"/v1/credits":{"get":{"summary":"Lifetime credits granted and used by the organization, in USD (may lag ≤ 5 s)","security":[{"projectKey":[]},{"session":[]}],"x-session-context":"project","x-id":"A-06","x-rate-limit-class":"credits_read","x-permission":"credits:read","responses":{"200":{"description":"OK","headers":{"x-request-id":{"schema":{"type":"string","description":"Request ID (`req_…`); also sent as `request-id`"},"required":false,"description":"Request ID (`req_…`); also sent as `request-id`"},"ratelimit-policy":{"schema":{"type":"string","description":"e.g. `\"rpm\";q=60;w=60` (02 §8)"},"required":false,"description":"e.g. `\"rpm\";q=60;w=60` (02 §8)"},"ratelimit":{"schema":{"type":"string","description":"Scope closest to exhaustion, e.g. `\"rpm\";r=59;t=42`"},"required":false,"description":"Scope closest to exhaustion, e.g. `\"rpm\";r=59;t=42`"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Credits"}}}},"503":{"description":"`credit_balance_unavailable`","headers":{"retry-after":{"schema":{"type":"string","description":"Seconds (`2`)"},"required":false,"description":"Seconds (`2`)"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/OpenAIError"}}}},"default":{"description":"OpenAI-shaped error (02 §4.1)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OpenAIError"}}}}}}},"/v1/plans":{"get":{"summary":"Plans and their monthly price, credit, tier, and discount (public)","security":[],"x-id":"P-01","x-rate-limit-class":"public","x-session-context":"none","responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PlanList"}}}},"default":{"description":"RFC 9457 problem details","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/v1/organization/balance":{"get":{"summary":"Available, reserved, and owed USD, and standing","security":[{"adminKey":[]},{"session":[]}],"x-rate-limit-class":"admin_read","x-session-context":"organization","x-id":"A-38","x-permission":"billing:read","responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Balance"}}}},"default":{"description":"RFC 9457 problem details","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/v1/organization/spend_limit":{"get":{"summary":"The organization's monthly spend limit","security":[{"adminKey":[]},{"session":[]}],"x-rate-limit-class":"admin_read","x-session-context":"organization","x-id":"A-32","x-permission":"spend_limits:read","responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SpendLimit"}}}},"404":{"description":"`not_found`","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"default":{"description":"RFC 9457 problem details","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}},"post":{"summary":"Create or replace the organization's monthly spend limit","security":[{"adminKey":[]},{"session":[]}],"x-rate-limit-class":"admin_write","x-session-context":"organization","x-id":"A-33","x-permission":"spend_limits:write","x-idempotency":"optional","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PutSpendLimit"}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SpendLimit"}}}},"default":{"description":"RFC 9457 problem details","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}},"delete":{"summary":"Remove the organization's monthly spend limit","security":[{"adminKey":[]},{"session":[]}],"x-rate-limit-class":"admin_write","x-session-context":"organization","x-id":"A-34","x-permission":"spend_limits:write","x-idempotency":"optional","responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SpendLimitDeleted"}}}},"404":{"description":"`not_found`","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"default":{"description":"RFC 9457 problem details","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/v1/organization/projects/{project_id}/spend_limit":{"get":{"summary":"The project's monthly spend limit","security":[{"adminKey":[]},{"session":[]}],"x-rate-limit-class":"admin_read","x-session-context":"organization","x-id":"A-35","x-permission":"spend_limits:read","parameters":[{"schema":{"type":"string","pattern":"^proj_[0-9a-f]{32}$","example":"proj_0193a6c2e7b47c3d9f1e2a4b5c6d7e8f"},"required":true,"name":"project_id","in":"path"}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SpendLimit"}}}},"404":{"description":"`not_found`","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"default":{"description":"RFC 9457 problem details","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}},"post":{"summary":"Create or replace the project's monthly spend limit","security":[{"adminKey":[]},{"session":[]}],"x-rate-limit-class":"admin_write","x-session-context":"organization","x-id":"A-36","x-permission":"spend_limits:write","x-idempotency":"optional","parameters":[{"schema":{"type":"string","pattern":"^proj_[0-9a-f]{32}$","example":"proj_0193a6c2e7b47c3d9f1e2a4b5c6d7e8f"},"required":true,"name":"project_id","in":"path"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PutSpendLimit"}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SpendLimit"}}}},"default":{"description":"RFC 9457 problem details","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}},"delete":{"summary":"Remove the project's monthly spend limit","security":[{"adminKey":[]},{"session":[]}],"x-rate-limit-class":"admin_write","x-session-context":"organization","x-id":"A-37","x-permission":"spend_limits:write","x-idempotency":"optional","parameters":[{"schema":{"type":"string","pattern":"^proj_[0-9a-f]{32}$","example":"proj_0193a6c2e7b47c3d9f1e2a4b5c6d7e8f"},"required":true,"name":"project_id","in":"path"}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SpendLimitDeleted"}}}},"404":{"description":"`not_found`","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"default":{"description":"RFC 9457 problem details","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/v1/organization/policies":{"get":{"summary":"List policies (summaries)","security":[{"adminKey":[]},{"session":[]}],"x-rate-limit-class":"admin_read","x-session-context":"organization","x-id":"A-07","x-permission":"policies:read","parameters":[{"schema":{"type":"string","minLength":1,"maxLength":200},"required":false,"name":"after","in":"query"},{"schema":{"type":"integer","minimum":1,"maximum":100,"default":20},"required":false,"name":"limit","in":"query"},{"schema":{"type":"string","enum":["draft","monitoring","enforcing","paused"]},"required":false,"name":"state","in":"query"},{"schema":{"type":"string","minLength":1,"maxLength":200},"required":false,"name":"q","in":"query"}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PolicyList"}}}},"default":{"description":"RFC 9457 problem details","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}},"post":{"summary":"Create a draft policy","security":[{"adminKey":[]},{"session":[]}],"x-rate-limit-class":"admin_write","x-session-context":"organization","x-id":"A-08","x-permission":"policies:write","x-idempotency":"required","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreatePolicy"}}}},"responses":{"201":{"description":"Created","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Policy"}}}},"422":{"description":"`invalid_policy`, `invalid_policy_project`","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"default":{"description":"RFC 9457 problem details","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/v1/organization/policies/{policy_id}":{"get":{"summary":"A policy with its draft and published version","security":[{"adminKey":[]},{"session":[]}],"x-rate-limit-class":"admin_read","x-session-context":"organization","x-id":"A-09","x-permission":"policies:read","parameters":[{"schema":{"type":"string","pattern":"^pol_[0-9a-f]{32}$","example":"pol_0193a6c2e7b47c3d9f1e2a4b5c6d7e8f"},"required":true,"name":"policy_id","in":"path"}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Policy"}}}},"default":{"description":"RFC 9457 problem details","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}},"patch":{"summary":"Edit the draft (optimistic `revision`)","security":[{"adminKey":[]},{"session":[]}],"x-rate-limit-class":"admin_write","x-session-context":"organization","x-id":"A-10","x-permission":"policies:write","x-idempotency":"optional","parameters":[{"schema":{"type":"string","pattern":"^pol_[0-9a-f]{32}$","example":"pol_0193a6c2e7b47c3d9f1e2a4b5c6d7e8f"},"required":true,"name":"policy_id","in":"path"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PatchPolicy"}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Policy"}}}},"409":{"description":"`policy_revision_conflict`, `policy_state_conflict`","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"422":{"description":"`invalid_policy`, `invalid_policy_project`","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"default":{"description":"RFC 9457 problem details","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}},"delete":{"summary":"Delete a policy (decisions keep pointing at it)","security":[{"adminKey":[]},{"session":[]}],"x-rate-limit-class":"admin_write","x-session-context":"organization","x-id":"A-11","x-permission":"policies:write","x-idempotency":"optional","parameters":[{"schema":{"type":"string","pattern":"^pol_[0-9a-f]{32}$","example":"pol_0193a6c2e7b47c3d9f1e2a4b5c6d7e8f"},"required":true,"name":"policy_id","in":"path"},{"schema":{"type":"integer","minimum":1},"required":true,"name":"revision","in":"query"}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PolicyDeleted"}}}},"409":{"description":"`policy_revision_conflict`, `policy_state_conflict`","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"default":{"description":"RFC 9457 problem details","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/v1/organization/policies/{policy_id}/publish":{"post":{"summary":"Publish the draft as a new version","security":[{"adminKey":[]},{"session":[]}],"x-rate-limit-class":"admin_write","x-session-context":"organization","x-id":"A-12","x-permission":"policies:write","x-idempotency":"optional","parameters":[{"schema":{"type":"string","pattern":"^pol_[0-9a-f]{32}$","example":"pol_0193a6c2e7b47c3d9f1e2a4b5c6d7e8f"},"required":true,"name":"policy_id","in":"path"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PolicyRevision"}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Policy"}}}},"409":{"description":"`policy_revision_conflict`, `policy_state_conflict`","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"422":{"description":"`invalid_policy`, `invalid_policy_project`","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"default":{"description":"RFC 9457 problem details","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/v1/organization/policies/{policy_id}/pause":{"post":{"summary":"Pause a published policy","security":[{"adminKey":[]},{"session":[]}],"x-rate-limit-class":"admin_write","x-session-context":"organization","x-id":"A-13","x-permission":"policies:write","x-idempotency":"optional","parameters":[{"schema":{"type":"string","pattern":"^pol_[0-9a-f]{32}$","example":"pol_0193a6c2e7b47c3d9f1e2a4b5c6d7e8f"},"required":true,"name":"policy_id","in":"path"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PolicyRevision"}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Policy"}}}},"409":{"description":"`policy_revision_conflict`, `policy_state_conflict`","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"422":{"description":"`invalid_policy`, `invalid_policy_project`","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"default":{"description":"RFC 9457 problem details","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/v1/organization/policies/{policy_id}/resume":{"post":{"summary":"Resume a paused policy in its current version's mode","security":[{"adminKey":[]},{"session":[]}],"x-rate-limit-class":"admin_write","x-session-context":"organization","x-id":"A-14","x-permission":"policies:write","x-idempotency":"optional","parameters":[{"schema":{"type":"string","pattern":"^pol_[0-9a-f]{32}$","example":"pol_0193a6c2e7b47c3d9f1e2a4b5c6d7e8f"},"required":true,"name":"policy_id","in":"path"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PolicyRevision"}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Policy"}}}},"409":{"description":"`policy_revision_conflict`, `policy_state_conflict`","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"422":{"description":"`invalid_policy`, `invalid_policy_project`","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"default":{"description":"RFC 9457 problem details","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/v1/organization/policies/{policy_id}/versions":{"get":{"summary":"Published versions, newest first (no rule text)","security":[{"adminKey":[]},{"session":[]}],"x-rate-limit-class":"admin_read","x-session-context":"organization","x-id":"A-15","x-permission":"policies:read","parameters":[{"schema":{"type":"string","pattern":"^pol_[0-9a-f]{32}$","example":"pol_0193a6c2e7b47c3d9f1e2a4b5c6d7e8f"},"required":true,"name":"policy_id","in":"path"},{"schema":{"type":"string","minLength":1,"maxLength":200},"required":false,"name":"after","in":"query"},{"schema":{"type":"integer","minimum":1,"maximum":100,"default":20},"required":false,"name":"limit","in":"query"}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PolicyVersionList"}}}},"default":{"description":"RFC 9457 problem details","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/v1/organization/policies/{policy_id}/versions/{version}":{"get":{"summary":"One published version","security":[{"adminKey":[]},{"session":[]}],"x-rate-limit-class":"admin_read","x-session-context":"organization","x-id":"A-16","x-permission":"policies:read","parameters":[{"schema":{"type":"string","pattern":"^pol_[0-9a-f]{32}$","example":"pol_0193a6c2e7b47c3d9f1e2a4b5c6d7e8f"},"required":true,"name":"policy_id","in":"path"},{"schema":{"type":"integer","minimum":1},"required":true,"name":"version","in":"path"}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PolicyVersion"}}}},"default":{"description":"RFC 9457 problem details","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/v1/organization/projects/{project_id}/effective_policies":{"get":{"summary":"Published policies that apply to this project","security":[{"adminKey":[]},{"session":[]}],"x-rate-limit-class":"admin_read","x-session-context":"organization","x-id":"A-17","x-permission":"policies:read","parameters":[{"schema":{"type":"string","pattern":"^proj_[0-9a-f]{32}$","example":"proj_0193a6c2e7b47c3d9f1e2a4b5c6d7e8f"},"required":true,"name":"project_id","in":"path"}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EffectivePolicyList"}}}},"default":{"description":"RFC 9457 problem details","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/v1/organization/usage/completions":{"get":{"summary":"Token and request usage in time buckets (ascending)","security":[{"adminKey":[]},{"session":[]}],"x-rate-limit-class":"admin_read","x-session-context":"organization","x-id":"A-39","x-permission":"billing:read","parameters":[{"schema":{"type":"integer","minimum":0,"maximum":253402300799,"description":"Unix seconds; the first bucket starts at or before it"},"required":true,"description":"Unix seconds; the first bucket starts at or before it","name":"start_time","in":"query"},{"schema":{"type":["integer","null"],"minimum":0,"maximum":253402300799,"description":"Unix seconds, exclusive. Default: now"},"required":false,"description":"Unix seconds, exclusive. Default: now","name":"end_time","in":"query"},{"schema":{"type":"array","items":{"type":"string"}},"required":false,"name":"project_ids","in":"query"},{"schema":{"type":"array","items":{"type":"string"}},"required":false,"name":"api_key_ids","in":"query"},{"schema":{"type":"string","minLength":1,"maxLength":200,"description":"`next_page` from the previous response"},"required":false,"description":"`next_page` from the previous response","name":"page","in":"query"},{"schema":{"type":"string","enum":["1m","1h","1d"],"default":"1d","description":"`1m` buckets: the range is at most 24 h"},"required":false,"description":"`1m` buckets: the range is at most 24 h","name":"bucket_width","in":"query"},{"schema":{"type":"array","items":{"type":"string"}},"required":false,"name":"models","in":"query"},{"schema":{"type":"array","items":{"type":"string"}},"required":false,"name":"group_by","in":"query"},{"schema":{"type":"integer","minimum":1,"maximum":1440,"default":7,"description":"Buckets per page"},"required":false,"description":"Buckets per page","name":"limit","in":"query"}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UsagePage"}}}},"422":{"description":"`invalid_time_range`","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"default":{"description":"RFC 9457 problem details","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/v1/organization/costs":{"get":{"summary":"Costs in daily UTC buckets (ascending)","security":[{"adminKey":[]},{"session":[]}],"x-rate-limit-class":"admin_read","x-session-context":"organization","x-id":"A-40","x-permission":"billing:read","parameters":[{"schema":{"type":"integer","minimum":0,"maximum":253402300799,"description":"Unix seconds; the first bucket starts at or before it"},"required":true,"description":"Unix seconds; the first bucket starts at or before it","name":"start_time","in":"query"},{"schema":{"type":["integer","null"],"minimum":0,"maximum":253402300799,"description":"Unix seconds, exclusive. Default: now"},"required":false,"description":"Unix seconds, exclusive. Default: now","name":"end_time","in":"query"},{"schema":{"type":"array","items":{"type":"string"}},"required":false,"name":"project_ids","in":"query"},{"schema":{"type":"array","items":{"type":"string"}},"required":false,"name":"api_key_ids","in":"query"},{"schema":{"type":"string","minLength":1,"maxLength":200,"description":"`next_page` from the previous response"},"required":false,"description":"`next_page` from the previous response","name":"page","in":"query"},{"schema":{"type":"array","items":{"type":"string"}},"required":false,"name":"group_by","in":"query"},{"schema":{"type":"integer","minimum":1,"maximum":180,"default":7,"description":"Daily buckets per page"},"required":false,"description":"Daily buckets per page","name":"limit","in":"query"}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CostPage"}}}},"422":{"description":"`invalid_time_range`","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"default":{"description":"RFC 9457 problem details","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}}},"webhooks":{}}