{"openapi":"3.1.0","info":{"title":"Utmost API","version":"1.0.0","summary":"Open models, including refusal-free variants, for verified research teams.","description":"OpenAI-compatible chat completions and Responses, an Anthropic-compatible Messages endpoint, an auto-router, a batch tier, workflows and bring-your-own models. Every response carries `x-request-id`. Inference responses also carry the served model, route and cost as headers."},"servers":[{"url":"https://api.utmost.site/v1","description":"API base URL, including /v1"}],"security":[{"bearerAuth":[]},{"apiKeyHeader":[]}],"tags":[{"name":"Inference"},{"name":"Models"},{"name":"Account"},{"name":"Batches"},{"name":"Workflows"},{"name":"Bring your own model"}],"paths":{"/chat/completions":{"post":{"operationId":"createChatCompletion","tags":["Inference"],"summary":"Create a chat completion","description":"OpenAI-compatible. With an auto alias the router picks the model; with a model id the request is pinned and never substituted. Non-streaming routed requests that a standard model refuses are retried once on the abliterated variant of the same tier (Verified tier and above); the refused attempt is not billed.","parameters":[{"name":"x-utmost-variant","in":"header","required":false,"description":"Force the variant for auto aliases. `abliterated` needs a Verified organization and disables the refusal retry. Ignored for pinned models.","schema":{"type":"string","enum":["standard","abliterated"]}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ChatCompletionRequest"}}}},"responses":{"200":{"description":"A completion, or an SSE stream of chunks when `stream` is true. Streams carry only the headers known before the first token.","headers":{"x-request-id":{"$ref":"#/components/headers/x-request-id"},"x-utmost-model":{"$ref":"#/components/headers/x-utmost-model"},"x-utmost-route":{"$ref":"#/components/headers/x-utmost-route"},"x-utmost-fallback":{"$ref":"#/components/headers/x-utmost-fallback"},"x-utmost-input-tokens":{"$ref":"#/components/headers/x-utmost-input-tokens"},"x-utmost-cached-tokens":{"$ref":"#/components/headers/x-utmost-cached-tokens"},"x-utmost-output-tokens":{"$ref":"#/components/headers/x-utmost-output-tokens"},"x-utmost-cost-usd":{"$ref":"#/components/headers/x-utmost-cost-usd"},"x-utmost-usage-estimated":{"$ref":"#/components/headers/x-utmost-usage-estimated"},"x-ratelimit-limit-requests":{"$ref":"#/components/headers/x-ratelimit-limit-requests"},"x-ratelimit-remaining-requests":{"$ref":"#/components/headers/x-ratelimit-remaining-requests"},"x-ratelimit-reset-requests":{"$ref":"#/components/headers/x-ratelimit-reset-requests"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ChatCompletion"}},"text/event-stream":{"schema":{"type":"string","description":"`data: <ChatCompletionChunk>` lines, then `data: [DONE]`."}}}},"400":{"description":"`invalid_request`, `context_length_exceeded`, `storage_disabled`, `content_blocked`","headers":{"x-request-id":{"$ref":"#/components/headers/x-request-id"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"`missing_api_key`, `invalid_api_key`, `key_revoked`","headers":{"x-request-id":{"$ref":"#/components/headers/x-request-id"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"`insufficient_credits`, `spend_cap_reached`","headers":{"x-request-id":{"$ref":"#/components/headers/x-request-id"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"`key_suspended`, `org_suspended`, `ip_not_allowed`, `model_not_allowed`, `tier_required`, `feature_not_available`","headers":{"x-request-id":{"$ref":"#/components/headers/x-request-id"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"`model_not_found`, `not_found`","headers":{"x-request-id":{"$ref":"#/components/headers/x-request-id"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"`rate_limit_exceeded`","headers":{"x-request-id":{"$ref":"#/components/headers/x-request-id"},"retry-after":{"$ref":"#/components/headers/retry-after"},"x-ratelimit-limit-requests":{"$ref":"#/components/headers/x-ratelimit-limit-requests"},"x-ratelimit-remaining-requests":{"$ref":"#/components/headers/x-ratelimit-remaining-requests"},"x-ratelimit-reset-requests":{"$ref":"#/components/headers/x-ratelimit-reset-requests"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"`internal_error`","headers":{"x-request-id":{"$ref":"#/components/headers/x-request-id"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"502":{"description":"`upstream_error`","headers":{"x-request-id":{"$ref":"#/components/headers/x-request-id"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"`model_unavailable`, `safety_unavailable`","headers":{"x-request-id":{"$ref":"#/components/headers/x-request-id"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"504":{"description":"`upstream_timeout`","headers":{"x-request-id":{"$ref":"#/components/headers/x-request-id"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/responses":{"post":{"operationId":"createResponse","tags":["Inference"],"summary":"Create a response (Responses API)","parameters":[{"name":"x-utmost-variant","in":"header","required":false,"description":"Force the variant for auto aliases. `abliterated` needs a Verified organization and disables the refusal retry. Ignored for pinned models.","schema":{"type":"string","enum":["standard","abliterated"]}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseRequest"}}}},"responses":{"200":{"description":"A response, or an SSE stream of events when `stream` is true.","headers":{"x-request-id":{"$ref":"#/components/headers/x-request-id"},"x-utmost-model":{"$ref":"#/components/headers/x-utmost-model"},"x-utmost-route":{"$ref":"#/components/headers/x-utmost-route"},"x-utmost-fallback":{"$ref":"#/components/headers/x-utmost-fallback"},"x-utmost-input-tokens":{"$ref":"#/components/headers/x-utmost-input-tokens"},"x-utmost-cached-tokens":{"$ref":"#/components/headers/x-utmost-cached-tokens"},"x-utmost-output-tokens":{"$ref":"#/components/headers/x-utmost-output-tokens"},"x-utmost-cost-usd":{"$ref":"#/components/headers/x-utmost-cost-usd"},"x-utmost-usage-estimated":{"$ref":"#/components/headers/x-utmost-usage-estimated"},"x-ratelimit-limit-requests":{"$ref":"#/components/headers/x-ratelimit-limit-requests"},"x-ratelimit-remaining-requests":{"$ref":"#/components/headers/x-ratelimit-remaining-requests"},"x-ratelimit-reset-requests":{"$ref":"#/components/headers/x-ratelimit-reset-requests"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Response"}},"text/event-stream":{"schema":{"type":"string","description":"`event:` + `data: <ResponseStreamEvent>` pairs."}}}},"400":{"description":"`invalid_request`, `context_length_exceeded`, `storage_disabled`, `content_blocked`","headers":{"x-request-id":{"$ref":"#/components/headers/x-request-id"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"`missing_api_key`, `invalid_api_key`, `key_revoked`","headers":{"x-request-id":{"$ref":"#/components/headers/x-request-id"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"`insufficient_credits`, `spend_cap_reached`","headers":{"x-request-id":{"$ref":"#/components/headers/x-request-id"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"`key_suspended`, `org_suspended`, `ip_not_allowed`, `model_not_allowed`, `tier_required`, `feature_not_available`","headers":{"x-request-id":{"$ref":"#/components/headers/x-request-id"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"`model_not_found`, `not_found`","headers":{"x-request-id":{"$ref":"#/components/headers/x-request-id"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"`rate_limit_exceeded`","headers":{"x-request-id":{"$ref":"#/components/headers/x-request-id"},"retry-after":{"$ref":"#/components/headers/retry-after"},"x-ratelimit-limit-requests":{"$ref":"#/components/headers/x-ratelimit-limit-requests"},"x-ratelimit-remaining-requests":{"$ref":"#/components/headers/x-ratelimit-remaining-requests"},"x-ratelimit-reset-requests":{"$ref":"#/components/headers/x-ratelimit-reset-requests"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"`internal_error`","headers":{"x-request-id":{"$ref":"#/components/headers/x-request-id"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"502":{"description":"`upstream_error`","headers":{"x-request-id":{"$ref":"#/components/headers/x-request-id"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"`model_unavailable`, `safety_unavailable`","headers":{"x-request-id":{"$ref":"#/components/headers/x-request-id"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"504":{"description":"`upstream_timeout`","headers":{"x-request-id":{"$ref":"#/components/headers/x-request-id"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/responses/{response_id}":{"parameters":[{"name":"response_id","in":"path","required":true,"description":"A stored response id (`resp_...`).","schema":{"type":"string"}}],"get":{"operationId":"getResponse","tags":["Inference"],"summary":"Retrieve a stored response","description":"Only responses created with `store: true`, for 30 days.","responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Response"}}}},"400":{"description":"`invalid_request`, `context_length_exceeded`, `storage_disabled`, `content_blocked`","headers":{"x-request-id":{"$ref":"#/components/headers/x-request-id"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"`missing_api_key`, `invalid_api_key`, `key_revoked`","headers":{"x-request-id":{"$ref":"#/components/headers/x-request-id"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"`key_suspended`, `org_suspended`, `ip_not_allowed`, `model_not_allowed`, `tier_required`, `feature_not_available`","headers":{"x-request-id":{"$ref":"#/components/headers/x-request-id"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"`model_not_found`, `not_found`","headers":{"x-request-id":{"$ref":"#/components/headers/x-request-id"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"`internal_error`","headers":{"x-request-id":{"$ref":"#/components/headers/x-request-id"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"delete":{"operationId":"deleteResponse","tags":["Inference"],"summary":"Delete a stored response","responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DeletedResponse"}}}},"400":{"description":"`invalid_request`, `context_length_exceeded`, `storage_disabled`, `content_blocked`","headers":{"x-request-id":{"$ref":"#/components/headers/x-request-id"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"`missing_api_key`, `invalid_api_key`, `key_revoked`","headers":{"x-request-id":{"$ref":"#/components/headers/x-request-id"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"`key_suspended`, `org_suspended`, `ip_not_allowed`, `model_not_allowed`, `tier_required`, `feature_not_available`","headers":{"x-request-id":{"$ref":"#/components/headers/x-request-id"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"`model_not_found`, `not_found`","headers":{"x-request-id":{"$ref":"#/components/headers/x-request-id"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"`internal_error`","headers":{"x-request-id":{"$ref":"#/components/headers/x-request-id"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/messages":{"post":{"operationId":"createMessage","tags":["Inference"],"summary":"Create a message (Anthropic-compatible)","description":"Accepts `x-api-key` or `Authorization: Bearer`. Errors use the Anthropic envelope.","parameters":[{"name":"x-utmost-variant","in":"header","required":false,"description":"Force the variant for auto aliases. `abliterated` needs a Verified organization and disables the refusal retry. Ignored for pinned models.","schema":{"type":"string","enum":["standard","abliterated"]}},{"name":"anthropic-version","in":"header","required":false,"description":"Accepted and ignored.","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/MessagesRequest"}}}},"responses":{"200":{"description":"A message, or an SSE stream (message_start, ping, content_block_start/delta/stop, message_delta, message_stop).","headers":{"x-request-id":{"$ref":"#/components/headers/x-request-id"},"x-utmost-model":{"$ref":"#/components/headers/x-utmost-model"},"x-utmost-route":{"$ref":"#/components/headers/x-utmost-route"},"x-utmost-fallback":{"$ref":"#/components/headers/x-utmost-fallback"},"x-utmost-input-tokens":{"$ref":"#/components/headers/x-utmost-input-tokens"},"x-utmost-cached-tokens":{"$ref":"#/components/headers/x-utmost-cached-tokens"},"x-utmost-output-tokens":{"$ref":"#/components/headers/x-utmost-output-tokens"},"x-utmost-cost-usd":{"$ref":"#/components/headers/x-utmost-cost-usd"},"x-utmost-usage-estimated":{"$ref":"#/components/headers/x-utmost-usage-estimated"},"x-ratelimit-limit-requests":{"$ref":"#/components/headers/x-ratelimit-limit-requests"},"x-ratelimit-remaining-requests":{"$ref":"#/components/headers/x-ratelimit-remaining-requests"},"x-ratelimit-reset-requests":{"$ref":"#/components/headers/x-ratelimit-reset-requests"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Message"}},"text/event-stream":{"schema":{"type":"string","description":"Anthropic stream events."}}}},"400":{"description":"`invalid_request`, `context_length_exceeded`, `storage_disabled`, `content_blocked`","headers":{"x-request-id":{"$ref":"#/components/headers/x-request-id"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AnthropicError"}}}},"401":{"description":"`missing_api_key`, `invalid_api_key`, `key_revoked`","headers":{"x-request-id":{"$ref":"#/components/headers/x-request-id"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AnthropicError"}}}},"402":{"description":"`insufficient_credits`, `spend_cap_reached`","headers":{"x-request-id":{"$ref":"#/components/headers/x-request-id"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AnthropicError"}}}},"403":{"description":"`key_suspended`, `org_suspended`, `ip_not_allowed`, `model_not_allowed`, `tier_required`, `feature_not_available`","headers":{"x-request-id":{"$ref":"#/components/headers/x-request-id"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AnthropicError"}}}},"404":{"description":"`model_not_found`, `not_found`","headers":{"x-request-id":{"$ref":"#/components/headers/x-request-id"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AnthropicError"}}}},"429":{"description":"`rate_limit_exceeded`","headers":{"x-request-id":{"$ref":"#/components/headers/x-request-id"},"retry-after":{"$ref":"#/components/headers/retry-after"},"x-ratelimit-limit-requests":{"$ref":"#/components/headers/x-ratelimit-limit-requests"},"x-ratelimit-remaining-requests":{"$ref":"#/components/headers/x-ratelimit-remaining-requests"},"x-ratelimit-reset-requests":{"$ref":"#/components/headers/x-ratelimit-reset-requests"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AnthropicError"}}}},"500":{"description":"`internal_error`","headers":{"x-request-id":{"$ref":"#/components/headers/x-request-id"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AnthropicError"}}}},"502":{"description":"`upstream_error`","headers":{"x-request-id":{"$ref":"#/components/headers/x-request-id"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AnthropicError"}}}},"503":{"description":"`model_unavailable`, `safety_unavailable`","headers":{"x-request-id":{"$ref":"#/components/headers/x-request-id"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AnthropicError"}}}},"504":{"description":"`upstream_timeout`","headers":{"x-request-id":{"$ref":"#/components/headers/x-request-id"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AnthropicError"}}}}}}},"/messages/count_tokens":{"post":{"operationId":"countMessageTokens","tags":["Inference"],"summary":"Estimate input tokens for a Messages request","description":"Does not call a model and does not count against the rate limit. `max_tokens` is optional here.","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CountTokensRequest"}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CountTokensResponse"}}}},"400":{"description":"`invalid_request`, `context_length_exceeded`, `storage_disabled`, `content_blocked`","headers":{"x-request-id":{"$ref":"#/components/headers/x-request-id"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AnthropicError"}}}},"401":{"description":"`missing_api_key`, `invalid_api_key`, `key_revoked`","headers":{"x-request-id":{"$ref":"#/components/headers/x-request-id"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AnthropicError"}}}},"403":{"description":"`key_suspended`, `org_suspended`, `ip_not_allowed`, `model_not_allowed`, `tier_required`, `feature_not_available`","headers":{"x-request-id":{"$ref":"#/components/headers/x-request-id"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AnthropicError"}}}},"500":{"description":"`internal_error`","headers":{"x-request-id":{"$ref":"#/components/headers/x-request-id"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AnthropicError"}}}}}}},"/models":{"get":{"operationId":"listModels","tags":["Models"],"summary":"List models","description":"Public: no key needed. With a key, adds your private models and sets `available` and `rate_limit` for your tier. Only models with a published eval card are listed.","security":[{},{"bearerAuth":[]},{"apiKeyHeader":[]}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ModelList"}}}},"401":{"description":"`missing_api_key`, `invalid_api_key`, `key_revoked`","headers":{"x-request-id":{"$ref":"#/components/headers/x-request-id"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"`key_suspended`, `org_suspended`, `ip_not_allowed`, `model_not_allowed`, `tier_required`, `feature_not_available`","headers":{"x-request-id":{"$ref":"#/components/headers/x-request-id"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"`internal_error`","headers":{"x-request-id":{"$ref":"#/components/headers/x-request-id"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/models/{model}":{"get":{"operationId":"getModel","tags":["Models"],"summary":"Retrieve a model or alias","description":"Model ids contain a slash (`utmost/qwen3-30b-a3b`); send it unencoded in the path.","security":[{},{"bearerAuth":[]},{"apiKeyHeader":[]}],"parameters":[{"name":"model","in":"path","required":true,"schema":{"type":"string"},"description":"Model id or alias."}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/Model"},{"$ref":"#/components/schemas/RouterAlias"}]}}}},"401":{"description":"`missing_api_key`, `invalid_api_key`, `key_revoked`","headers":{"x-request-id":{"$ref":"#/components/headers/x-request-id"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"`key_suspended`, `org_suspended`, `ip_not_allowed`, `model_not_allowed`, `tier_required`, `feature_not_available`","headers":{"x-request-id":{"$ref":"#/components/headers/x-request-id"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"`model_not_found`, `not_found`","headers":{"x-request-id":{"$ref":"#/components/headers/x-request-id"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"`internal_error`","headers":{"x-request-id":{"$ref":"#/components/headers/x-request-id"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/credits":{"get":{"operationId":"getCredits","tags":["Account"],"summary":"Balance, spend and caps for the calling key","responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Credits"}}}},"401":{"description":"`missing_api_key`, `invalid_api_key`, `key_revoked`","headers":{"x-request-id":{"$ref":"#/components/headers/x-request-id"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"`key_suspended`, `org_suspended`, `ip_not_allowed`, `model_not_allowed`, `tier_required`, `feature_not_available`","headers":{"x-request-id":{"$ref":"#/components/headers/x-request-id"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"`internal_error`","headers":{"x-request-id":{"$ref":"#/components/headers/x-request-id"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/feedback":{"post":{"operationId":"createFeedback","tags":["Account"],"summary":"Rate a past request","description":"Stores the rating on the request log. Never stores content.","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/FeedbackRequest"}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Feedback"}}}},"400":{"description":"`invalid_request`, `context_length_exceeded`, `storage_disabled`, `content_blocked`","headers":{"x-request-id":{"$ref":"#/components/headers/x-request-id"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"`missing_api_key`, `invalid_api_key`, `key_revoked`","headers":{"x-request-id":{"$ref":"#/components/headers/x-request-id"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"`key_suspended`, `org_suspended`, `ip_not_allowed`, `model_not_allowed`, `tier_required`, `feature_not_available`","headers":{"x-request-id":{"$ref":"#/components/headers/x-request-id"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"`model_not_found`, `not_found`","headers":{"x-request-id":{"$ref":"#/components/headers/x-request-id"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"`internal_error`","headers":{"x-request-id":{"$ref":"#/components/headers/x-request-id"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/batches":{"post":{"operationId":"createBatch","tags":["Batches"],"summary":"Create a batch","description":"Chat completions at 50% of the list price, finished within 24 hours. Counts as one request against the rate limit.","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/BatchCreateRequest"}}}},"responses":{"201":{"description":"Created","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Batch"}}}},"400":{"description":"`invalid_request`, `context_length_exceeded`, `storage_disabled`, `content_blocked`","headers":{"x-request-id":{"$ref":"#/components/headers/x-request-id"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"`missing_api_key`, `invalid_api_key`, `key_revoked`","headers":{"x-request-id":{"$ref":"#/components/headers/x-request-id"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"`insufficient_credits`, `spend_cap_reached`","headers":{"x-request-id":{"$ref":"#/components/headers/x-request-id"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"`key_suspended`, `org_suspended`, `ip_not_allowed`, `model_not_allowed`, `tier_required`, `feature_not_available`","headers":{"x-request-id":{"$ref":"#/components/headers/x-request-id"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"`rate_limit_exceeded`","headers":{"x-request-id":{"$ref":"#/components/headers/x-request-id"},"retry-after":{"$ref":"#/components/headers/retry-after"},"x-ratelimit-limit-requests":{"$ref":"#/components/headers/x-ratelimit-limit-requests"},"x-ratelimit-remaining-requests":{"$ref":"#/components/headers/x-ratelimit-remaining-requests"},"x-ratelimit-reset-requests":{"$ref":"#/components/headers/x-ratelimit-reset-requests"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"`internal_error`","headers":{"x-request-id":{"$ref":"#/components/headers/x-request-id"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"get":{"operationId":"listBatches","tags":["Batches"],"summary":"List recent batches","responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BatchList"}}}},"401":{"description":"`missing_api_key`, `invalid_api_key`, `key_revoked`","headers":{"x-request-id":{"$ref":"#/components/headers/x-request-id"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"`key_suspended`, `org_suspended`, `ip_not_allowed`, `model_not_allowed`, `tier_required`, `feature_not_available`","headers":{"x-request-id":{"$ref":"#/components/headers/x-request-id"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"`internal_error`","headers":{"x-request-id":{"$ref":"#/components/headers/x-request-id"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/batches/{batch_id}":{"parameters":[{"name":"batch_id","in":"path","required":true,"description":"Batch id.","schema":{"type":"string"}}],"get":{"operationId":"getBatch","tags":["Batches"],"summary":"Retrieve a batch","responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Batch"}}}},"400":{"description":"`invalid_request`, `context_length_exceeded`, `storage_disabled`, `content_blocked`","headers":{"x-request-id":{"$ref":"#/components/headers/x-request-id"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"`missing_api_key`, `invalid_api_key`, `key_revoked`","headers":{"x-request-id":{"$ref":"#/components/headers/x-request-id"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"`key_suspended`, `org_suspended`, `ip_not_allowed`, `model_not_allowed`, `tier_required`, `feature_not_available`","headers":{"x-request-id":{"$ref":"#/components/headers/x-request-id"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"`model_not_found`, `not_found`","headers":{"x-request-id":{"$ref":"#/components/headers/x-request-id"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"`internal_error`","headers":{"x-request-id":{"$ref":"#/components/headers/x-request-id"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/batches/{batch_id}/cancel":{"parameters":[{"name":"batch_id","in":"path","required":true,"description":"Batch id.","schema":{"type":"string"}}],"post":{"operationId":"cancelBatch","tags":["Batches"],"summary":"Cancel a batch","description":"Pending requests fail with `cancelled`. Finished requests keep their results. A batch that is not in progress is returned unchanged.","responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Batch"}}}},"400":{"description":"`invalid_request`, `context_length_exceeded`, `storage_disabled`, `content_blocked`","headers":{"x-request-id":{"$ref":"#/components/headers/x-request-id"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"`missing_api_key`, `invalid_api_key`, `key_revoked`","headers":{"x-request-id":{"$ref":"#/components/headers/x-request-id"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"`key_suspended`, `org_suspended`, `ip_not_allowed`, `model_not_allowed`, `tier_required`, `feature_not_available`","headers":{"x-request-id":{"$ref":"#/components/headers/x-request-id"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"`model_not_found`, `not_found`","headers":{"x-request-id":{"$ref":"#/components/headers/x-request-id"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"`internal_error`","headers":{"x-request-id":{"$ref":"#/components/headers/x-request-id"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/batches/{batch_id}/results":{"parameters":[{"name":"batch_id","in":"path","required":true,"description":"Batch id.","schema":{"type":"string"}}],"get":{"operationId":"getBatchResults","tags":["Batches"],"summary":"Download batch results","description":"JSON Lines, one `BatchResultLine` per request, in submission order. `invalid_request` while the batch is running; `not_found` after results expire (7 days after the batch finished).","responses":{"200":{"description":"JSON Lines.","content":{"application/jsonl":{"schema":{"$ref":"#/components/schemas/BatchResultLine"}}}},"400":{"description":"`invalid_request`, `context_length_exceeded`, `storage_disabled`, `content_blocked`","headers":{"x-request-id":{"$ref":"#/components/headers/x-request-id"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"`missing_api_key`, `invalid_api_key`, `key_revoked`","headers":{"x-request-id":{"$ref":"#/components/headers/x-request-id"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"`key_suspended`, `org_suspended`, `ip_not_allowed`, `model_not_allowed`, `tier_required`, `feature_not_available`","headers":{"x-request-id":{"$ref":"#/components/headers/x-request-id"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"`model_not_found`, `not_found`","headers":{"x-request-id":{"$ref":"#/components/headers/x-request-id"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"`internal_error`","headers":{"x-request-id":{"$ref":"#/components/headers/x-request-id"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/workflows/security-review":{"post":{"operationId":"runSecurityReview","tags":["Workflows"],"summary":"Run a security review","description":"intake → reviewers in parallel → de-duplication → aggregation. Each pass is a metered request; the response breaks cost down per pass. Counts as one request against the rate limit.","parameters":[{"name":"x-utmost-variant","in":"header","required":false,"description":"Force the variant for auto aliases. `abliterated` needs a Verified organization and disables the refusal retry. Ignored for pinned models.","schema":{"type":"string","enum":["standard","abliterated"]}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SecurityReviewRequest"}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WorkflowRun"}}}},"400":{"description":"`invalid_request`, `context_length_exceeded`, `storage_disabled`, `content_blocked`","headers":{"x-request-id":{"$ref":"#/components/headers/x-request-id"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"`missing_api_key`, `invalid_api_key`, `key_revoked`","headers":{"x-request-id":{"$ref":"#/components/headers/x-request-id"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"`insufficient_credits`, `spend_cap_reached`","headers":{"x-request-id":{"$ref":"#/components/headers/x-request-id"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"`key_suspended`, `org_suspended`, `ip_not_allowed`, `model_not_allowed`, `tier_required`, `feature_not_available`","headers":{"x-request-id":{"$ref":"#/components/headers/x-request-id"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"`model_not_found`, `not_found`","headers":{"x-request-id":{"$ref":"#/components/headers/x-request-id"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"`rate_limit_exceeded`","headers":{"x-request-id":{"$ref":"#/components/headers/x-request-id"},"retry-after":{"$ref":"#/components/headers/retry-after"},"x-ratelimit-limit-requests":{"$ref":"#/components/headers/x-ratelimit-limit-requests"},"x-ratelimit-remaining-requests":{"$ref":"#/components/headers/x-ratelimit-remaining-requests"},"x-ratelimit-reset-requests":{"$ref":"#/components/headers/x-ratelimit-reset-requests"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"`internal_error`","headers":{"x-request-id":{"$ref":"#/components/headers/x-request-id"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/workflows/templates":{"get":{"operationId":"listWorkflowTemplates","tags":["Workflows"],"summary":"Built-in security-review templates as YAML","security":[{}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WorkflowTemplateList"}}}}}}},"/byo/models":{"post":{"operationId":"createByoModel","tags":["Bring your own model"],"summary":"Submit a model","description":"Research tier only.","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ByoCreateRequest"}}}},"responses":{"201":{"description":"Created","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ByoJob"}}}},"400":{"description":"`invalid_request`, `context_length_exceeded`, `storage_disabled`, `content_blocked`","headers":{"x-request-id":{"$ref":"#/components/headers/x-request-id"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"`missing_api_key`, `invalid_api_key`, `key_revoked`","headers":{"x-request-id":{"$ref":"#/components/headers/x-request-id"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"`key_suspended`, `org_suspended`, `ip_not_allowed`, `model_not_allowed`, `tier_required`, `feature_not_available`","headers":{"x-request-id":{"$ref":"#/components/headers/x-request-id"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"`model_not_found`, `not_found`","headers":{"x-request-id":{"$ref":"#/components/headers/x-request-id"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"`internal_error`","headers":{"x-request-id":{"$ref":"#/components/headers/x-request-id"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"get":{"operationId":"listByoModels","tags":["Bring your own model"],"summary":"List your BYO jobs","responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ByoJobList"}}}},"401":{"description":"`missing_api_key`, `invalid_api_key`, `key_revoked`","headers":{"x-request-id":{"$ref":"#/components/headers/x-request-id"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"`key_suspended`, `org_suspended`, `ip_not_allowed`, `model_not_allowed`, `tier_required`, `feature_not_available`","headers":{"x-request-id":{"$ref":"#/components/headers/x-request-id"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"`internal_error`","headers":{"x-request-id":{"$ref":"#/components/headers/x-request-id"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/byo/models/{job_id}":{"parameters":[{"name":"job_id","in":"path","required":true,"description":"BYO job id (`byo_...`).","schema":{"type":"string"}}],"get":{"operationId":"getByoModel","tags":["Bring your own model"],"summary":"Retrieve a BYO job","responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ByoJob"}}}},"400":{"description":"`invalid_request`, `context_length_exceeded`, `storage_disabled`, `content_blocked`","headers":{"x-request-id":{"$ref":"#/components/headers/x-request-id"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"`missing_api_key`, `invalid_api_key`, `key_revoked`","headers":{"x-request-id":{"$ref":"#/components/headers/x-request-id"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"`key_suspended`, `org_suspended`, `ip_not_allowed`, `model_not_allowed`, `tier_required`, `feature_not_available`","headers":{"x-request-id":{"$ref":"#/components/headers/x-request-id"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"`model_not_found`, `not_found`","headers":{"x-request-id":{"$ref":"#/components/headers/x-request-id"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"`internal_error`","headers":{"x-request-id":{"$ref":"#/components/headers/x-request-id"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/byo/models/{job_id}/approve":{"parameters":[{"name":"job_id","in":"path","required":true,"description":"BYO job id.","schema":{"type":"string"}}],"post":{"operationId":"approveByoModel","tags":["Bring your own model"],"summary":"Accept the eval report and deploy","description":"Only for jobs in `awaiting_approval`.","responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ByoJob"}}}},"400":{"description":"`invalid_request`, `context_length_exceeded`, `storage_disabled`, `content_blocked`","headers":{"x-request-id":{"$ref":"#/components/headers/x-request-id"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"`missing_api_key`, `invalid_api_key`, `key_revoked`","headers":{"x-request-id":{"$ref":"#/components/headers/x-request-id"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"`key_suspended`, `org_suspended`, `ip_not_allowed`, `model_not_allowed`, `tier_required`, `feature_not_available`","headers":{"x-request-id":{"$ref":"#/components/headers/x-request-id"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"`model_not_found`, `not_found`","headers":{"x-request-id":{"$ref":"#/components/headers/x-request-id"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"`internal_error`","headers":{"x-request-id":{"$ref":"#/components/headers/x-request-id"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/byo/models/{job_id}/reject":{"parameters":[{"name":"job_id","in":"path","required":true,"description":"BYO job id.","schema":{"type":"string"}}],"post":{"operationId":"rejectByoModel","tags":["Bring your own model"],"summary":"Reject the eval report","description":"Only for jobs in `awaiting_approval`. Nothing is deployed.","responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ByoJob"}}}},"400":{"description":"`invalid_request`, `context_length_exceeded`, `storage_disabled`, `content_blocked`","headers":{"x-request-id":{"$ref":"#/components/headers/x-request-id"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"`missing_api_key`, `invalid_api_key`, `key_revoked`","headers":{"x-request-id":{"$ref":"#/components/headers/x-request-id"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"`key_suspended`, `org_suspended`, `ip_not_allowed`, `model_not_allowed`, `tier_required`, `feature_not_available`","headers":{"x-request-id":{"$ref":"#/components/headers/x-request-id"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"`model_not_found`, `not_found`","headers":{"x-request-id":{"$ref":"#/components/headers/x-request-id"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"`internal_error`","headers":{"x-request-id":{"$ref":"#/components/headers/x-request-id"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}}},"components":{"securitySchemes":{"bearerAuth":{"type":"http","scheme":"bearer","description":"`Authorization: Bearer ut_live_...`"},"apiKeyHeader":{"type":"apiKey","in":"header","name":"x-api-key","description":"`x-api-key: ut_live_...` (used by Anthropic clients)."}},"headers":{"x-request-id":{"description":"Request id. Quote it to support and pass it to POST /v1/feedback.","schema":{"type":"string"}},"x-utmost-model":{"description":"The model that served the request.","schema":{"type":"string"}},"x-utmost-route":{"description":"Routing decision for auto aliases, e.g. `auto->small/standard` or `auto->small/abliterated (refusal-retry)`. Absent for pinned models.","schema":{"type":"string"}},"x-utmost-fallback":{"description":"Present only when a fallback happened: the model that was tried first.","schema":{"type":"string"}},"x-utmost-input-tokens":{"description":"Input tokens billed, including cached tokens. Not sent on streamed responses.","schema":{"type":"integer"}},"x-utmost-cached-tokens":{"description":"Input tokens served from the prefix cache. Not sent on streamed responses.","schema":{"type":"integer"}},"x-utmost-output-tokens":{"description":"Output tokens billed (includes reasoning tokens). Not sent on streamed responses.","schema":{"type":"integer"}},"x-utmost-cost-usd":{"description":"Cost of the request in USD, six decimal places. Not sent on streamed responses; read the final usage event instead.","schema":{"type":"string","pattern":"^\\d+\\.\\d{6}$"}},"x-utmost-usage-estimated":{"description":"`true` when the backend reported no usage and tokens were estimated (about 4 characters per token).","schema":{"type":"string","enum":["true"]}},"x-ratelimit-limit-requests":{"description":"Requests per minute allowed for this key.","schema":{"type":"integer"}},"x-ratelimit-remaining-requests":{"description":"Requests left in the current one-minute window.","schema":{"type":"integer"}},"x-ratelimit-reset-requests":{"description":"Time until the window resets, e.g. `15s`.","schema":{"type":"string"}},"retry-after":{"description":"Seconds to wait before retrying (429 only).","schema":{"type":"integer"}}},"schemas":{"Error":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string","description":"Human-readable explanation. May be more specific than the default message for the code."},"type":{"type":"string","enum":["authentication_error","permission_error","not_found_error","invalid_request_error","content_policy_error","billing_error","rate_limit_error","api_error","overloaded_error"]},"code":{"type":"string","enum":["missing_api_key","invalid_api_key","key_revoked","key_suspended","org_suspended","ip_not_allowed","model_not_allowed","tier_required","feature_not_available","model_not_found","not_found","invalid_request","context_length_exceeded","storage_disabled","content_blocked","insufficient_credits","spend_cap_reached","rate_limit_exceeded","upstream_error","model_unavailable","safety_unavailable","upstream_timeout","internal_error"],"description":"- `missing_api_key` (401): No API key. Send it as `Authorization: Bearer <key>` (or `x-api-key`).\n- `invalid_api_key` (401): The API key is not valid.\n- `key_revoked` (401): This API key has been revoked.\n- `key_suspended` (403): This API key is suspended. Contact support.\n- `org_suspended` (403): This organization is suspended. Contact support.\n- `ip_not_allowed` (403): Requests from this IP address are not allowed for this key.\n- `model_not_allowed` (403): This key may not call this model.\n- `tier_required` (403): Abliterated checkpoints need a Verified organization. Apply in the dashboard.\n- `feature_not_available` (403): This feature is not enabled for your organization's tier.\n- `model_not_found` (404): No such model.\n- `not_found` (404): Not found.\n- `invalid_request` (400): The request is not valid.\n- `context_length_exceeded` (400): The request exceeds this model's context window.\n- `storage_disabled` (400): Response storage is off for this organization (zero retention). Turn it on in Settings, or send store: false.\n- `content_blocked` (400): This request falls under a hard limit (child sexual abuse material, or serious uplift for CBRN weapons). It was blocked.\n- `insufficient_credits` (402): Your credit balance is exhausted. Top up in the dashboard.\n- `spend_cap_reached` (402): This key or project has reached its monthly spend cap.\n- `rate_limit_exceeded` (429): Rate limit reached for this key. Retry after the time in the `retry-after` header.\n- `upstream_error` (502): The model backend returned an error.\n- `model_unavailable` (503): No healthy capacity for this model right now. Pinned requests are not substituted; retry, or use an auto alias.\n- `safety_unavailable` (503): The safety classifier is unavailable, so refusal-free models are paused. Standard models are unaffected.\n- `upstream_timeout` (504): The model backend timed out.\n- `internal_error` (500): Something went wrong on our side."},"param":{"anyOf":[{"type":"string","description":"The request field at fault, when there is one."},{"type":"null"}]},"request_id":{"type":"string"}},"required":["message","type","code","param","request_id"]}},"required":["error"],"description":"Error envelope used by every endpoint except /v1/messages and /v1/messages/count_tokens."},"AnthropicError":{"type":"object","properties":{"type":{"type":"string","enum":["error"]},"error":{"type":"object","properties":{"type":{"type":"string","enum":["authentication_error","permission_error","not_found_error","invalid_request_error","content_policy_error","billing_error","rate_limit_error","api_error","overloaded_error"]},"message":{"type":"string"},"code":{"type":"string","enum":["missing_api_key","invalid_api_key","key_revoked","key_suspended","org_suspended","ip_not_allowed","model_not_allowed","tier_required","feature_not_available","model_not_found","not_found","invalid_request","context_length_exceeded","storage_disabled","content_blocked","insufficient_credits","spend_cap_reached","rate_limit_exceeded","upstream_error","model_unavailable","safety_unavailable","upstream_timeout","internal_error"]}},"required":["type","message","code"]},"request_id":{"type":"string"}},"required":["type","error","request_id"],"description":"Error envelope used by /v1/messages and /v1/messages/count_tokens."},"ChatMessage":{"type":"object","properties":{"role":{"type":"string","enum":["system","developer","user","assistant","tool"]},"content":{"anyOf":[{"type":"string"},{"type":"array","items":{"type":"object","properties":{"type":{"type":"string","description":"`text` or `image_url`."}},"required":["type"],"additionalProperties":true}},{"type":"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","description":"JSON-encoded arguments."}},"required":["name","arguments"]}},"required":["id","type","function"]}},"tool_call_id":{"type":"string","description":"Required on `tool` messages."}},"required":["role"],"additionalProperties":true},"FunctionTool":{"type":"object","properties":{"type":{"type":"string","enum":["function"]},"function":{"type":"object","properties":{"name":{"type":"string","description":"1–64 letters, digits, `_` or `-`.","pattern":"^[a-zA-Z0-9_-]{1,64}$"},"description":{"type":"string"},"parameters":{"type":"object","description":"JSON Schema for the arguments.","additionalProperties":true},"strict":{"anyOf":[{"type":"boolean"},{"type":"null"}]}},"required":["name"]}},"required":["type","function"]},"ChatCompletionRequest":{"type":"object","properties":{"model":{"type":"string","description":"A model id (pinned) or an auto alias: `auto`, `auto-fast`, `auto-best`."},"messages":{"type":"array","items":{"$ref":"#/components/schemas/ChatMessage"},"minItems":1},"stream":{"type":"boolean"},"stream_options":{"anyOf":[{"type":"object","properties":{"include_usage":{"type":"boolean","description":"Send a final chunk with `usage` (including `cost_usd`) and empty `choices`."}}},{"type":"null"}]},"tools":{"type":"array","items":{"$ref":"#/components/schemas/FunctionTool"},"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"]}]},"parallel_tool_calls":{"type":"boolean"},"response_format":{"anyOf":[{"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"},"schema":{"type":"object","additionalProperties":true},"strict":{"anyOf":[{"type":"boolean"},{"type":"null"}]},"description":{"type":"string"}},"required":["name"]}},"required":["type","json_schema"]}]},"max_tokens":{"anyOf":[{"type":"integer","description":"Clamped to the model's max_output_tokens.","minimum":1},{"type":"null"}]},"max_completion_tokens":{"anyOf":[{"type":"integer","description":"Clamped to the model's max_output_tokens.","minimum":1},{"type":"null"}]},"temperature":{"anyOf":[{"type":"number","minimum":0,"maximum":2},{"type":"null"}]},"top_p":{"anyOf":[{"type":"number","minimum":0,"maximum":1},{"type":"null"}]},"stop":{"anyOf":[{"anyOf":[{"type":"string"},{"type":"array","items":{"type":"string"},"maxItems":4}]},{"type":"null"}]},"seed":{"anyOf":[{"type":"integer"},{"type":"null"}]},"n":{"anyOf":[{"type":"integer","minimum":1,"maximum":8},{"type":"null"}]},"presence_penalty":{"anyOf":[{"type":"number","minimum":-2,"maximum":2},{"type":"null"}]},"frequency_penalty":{"anyOf":[{"type":"number","minimum":-2,"maximum":2},{"type":"null"}]},"logprobs":{"anyOf":[{"type":"boolean"},{"type":"null"}]},"top_logprobs":{"anyOf":[{"type":"integer","minimum":0,"maximum":20},{"type":"null"}]},"reasoning_effort":{"anyOf":[{"type":"string","enum":["none","minimal","low","medium","high"],"description":"Dropped for models without reasoning support."},{"type":"null"}]},"user":{"type":"string","maxLength":256}},"required":["model","messages"],"description":"Unknown fields are ignored. `null` values are treated as unset."},"Usage":{"type":"object","properties":{"prompt_tokens":{"type":"integer","description":"Input tokens, including cached tokens."},"completion_tokens":{"type":"integer","description":"Output tokens, including reasoning tokens."},"total_tokens":{"type":"integer"},"prompt_tokens_details":{"type":"object","properties":{"cached_tokens":{"type":"integer"}}},"completion_tokens_details":{"type":"object","properties":{"reasoning_tokens":{"type":"integer"}}},"cost_usd":{"type":"number","description":"Cost of the request in USD."}},"required":["prompt_tokens","completion_tokens","total_tokens","cost_usd"]},"ChatCompletion":{"type":"object","properties":{"id":{"type":"string","description":"`chatcmpl-` followed by the request id."},"object":{"type":"string","enum":["chat.completion"]},"created":{"type":"integer"},"model":{"type":"string","description":"The model that served the request."},"choices":{"type":"array","items":{"type":"object","properties":{"index":{"type":"integer"},"message":{"type":"object","properties":{"role":{"type":"string","enum":["assistant"]},"content":{"anyOf":[{"type":"string"},{"type":"null"}]},"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","description":"JSON-encoded arguments."}},"required":["name","arguments"]}},"required":["id","type","function"]}},"reasoning_content":{"type":"string","description":"Reasoning text, for models that return it."}},"required":["role","content"]},"finish_reason":{"anyOf":[{"type":"string","description":"`stop`, `length`, `tool_calls` or `content_filter`."},{"type":"null"}]},"logprobs":{}},"required":["index","message","finish_reason"]}},"usage":{"$ref":"#/components/schemas/Usage"}},"required":["id","object","created","model","choices","usage"]},"ChatCompletionChunk":{"type":"object","properties":{"id":{"type":"string"},"object":{"type":"string","enum":["chat.completion.chunk"]},"created":{"type":"integer"},"model":{"type":"string"},"choices":{"type":"array","items":{"type":"object","properties":{"index":{"type":"integer"},"delta":{"type":"object","properties":{"role":{"type":"string","enum":["assistant"]},"content":{"anyOf":[{"type":"string"},{"type":"null"}]},"reasoning_content":{"type":"string"},"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":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["index","delta","finish_reason"]}},"usage":{"anyOf":[{"$ref":"#/components/schemas/Usage"},{"type":"null"}]}},"required":["id","object","created","model","choices"],"description":"One SSE `data:` line. The stream ends with `data: [DONE]`. An error mid-stream is sent as `data: {\"error\":{...}}` and the stream closes without `[DONE]`."},"ResponseRequest":{"type":"object","properties":{"model":{"type":"string"},"input":{"anyOf":[{"type":"string"},{"type":"array","items":{"type":"object","description":"`message` (role + content), `function_call`, `function_call_output` or `reasoning` (accepted and dropped).","additionalProperties":true}}]},"instructions":{"anyOf":[{"type":"string","description":"Sent as a system message. Not carried over by previous_response_id."},{"type":"null"}]},"tools":{"type":"array","items":{"type":"object","properties":{"type":{"type":"string","enum":["function"]},"name":{"type":"string"},"description":{"anyOf":[{"type":"string"},{"type":"null"}]},"parameters":{"anyOf":[{"type":"object","additionalProperties":true},{"type":"null"}]},"strict":{"anyOf":[{"type":"boolean"},{"type":"null"}]}},"required":["type","name"]},"description":"Function tools only."},"tool_choice":{"anyOf":[{"type":"string","enum":["none","auto","required"]},{"type":"object","properties":{"type":{"type":"string","enum":["function"]},"name":{"type":"string"}},"required":["type","name"]}]},"parallel_tool_calls":{"anyOf":[{"type":"boolean"},{"type":"null"}]},"max_output_tokens":{"anyOf":[{"type":"integer","minimum":1},{"type":"null"}]},"temperature":{"anyOf":[{"type":"number","minimum":0,"maximum":2},{"type":"null"}]},"top_p":{"anyOf":[{"type":"number","minimum":0,"maximum":1},{"type":"null"}]},"seed":{"anyOf":[{"type":"integer"},{"type":"null"}]},"stream":{"anyOf":[{"type":"boolean"},{"type":"null"}]},"store":{"anyOf":[{"type":"boolean","description":"Defaults to the organization's response-storage setting (off under zero retention). `true` when storage is off returns `storage_disabled`."},{"type":"null"}]},"previous_response_id":{"anyOf":[{"type":"string","description":"Needs response storage on. Stored responses expire after 30 days."},{"type":"null"}]},"reasoning":{"anyOf":[{"type":"object","properties":{"effort":{"anyOf":[{"type":"string","enum":["none","minimal","low","medium","high"]},{"type":"null"}]}}},{"type":"null"}]},"text":{"anyOf":[{"type":"object","properties":{"format":{"anyOf":[{"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"},"schema":{"type":"object","additionalProperties":true},"strict":{"anyOf":[{"type":"boolean"},{"type":"null"}]},"description":{"type":"string"}},"required":["type","name","schema"]}]}}},{"type":"null"}]},"metadata":{"anyOf":[{"type":"object","additionalProperties":{"type":"string"}},{"type":"null"}]},"user":{"type":"string"}},"required":["model","input"]},"ResponseOutputItem":{"oneOf":[{"type":"object","properties":{"type":{"type":"string","enum":["message"]},"id":{"type":"string"},"status":{"type":"string"},"role":{"type":"string","enum":["assistant"]},"content":{"type":"array","items":{"type":"object","properties":{"type":{"type":"string","enum":["output_text"]},"text":{"type":"string"},"annotations":{"type":"array","items":{}}}}}},"required":["type","id","role","content"]},{"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"}},"required":["type","id","call_id","name","arguments"]},{"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","id","summary"]}]},"Response":{"type":"object","properties":{"id":{"type":"string","description":"`resp_` id. Retrievable only when `store` is true."},"object":{"type":"string","enum":["response"]},"created_at":{"type":"integer"},"status":{"type":"string","enum":["completed","incomplete","in_progress"]},"error":{"type":"null"},"incomplete_details":{"anyOf":[{"type":"object","properties":{"reason":{"type":"string","enum":["max_output_tokens"]}}},{"type":"null"}]},"instructions":{"anyOf":[{"type":"string"},{"type":"null"}]},"max_output_tokens":{"anyOf":[{"type":"integer"},{"type":"null"}]},"model":{"type":"string"},"output":{"type":"array","items":{"$ref":"#/components/schemas/ResponseOutputItem"}},"output_text":{"type":"string"},"parallel_tool_calls":{"type":"boolean"},"previous_response_id":{"anyOf":[{"type":"string"},{"type":"null"}]},"reasoning":{"type":"object","properties":{"effort":{"anyOf":[{"type":"string"},{"type":"null"}]}}},"store":{"type":"boolean"},"temperature":{"anyOf":[{"type":"number"},{"type":"null"}]},"text":{"type":"object","properties":{"format":{"type":"object","additionalProperties":true}}},"tool_choice":{},"tools":{"type":"array","items":{"type":"object","additionalProperties":true}},"top_p":{"anyOf":[{"type":"number"},{"type":"null"}]},"metadata":{"type":"object","additionalProperties":{"type":"string"}},"usage":{"anyOf":[{"type":"object","properties":{"input_tokens":{"type":"integer"},"input_tokens_details":{"type":"object","properties":{"cached_tokens":{"type":"integer"}}},"output_tokens":{"type":"integer"},"output_tokens_details":{"type":"object","properties":{"reasoning_tokens":{"type":"integer"}}},"total_tokens":{"type":"integer"},"cost_usd":{"type":"number"}},"required":["input_tokens","output_tokens","total_tokens","cost_usd"]},{"type":"null"}]}},"required":["id","object","created_at","status","model","output","output_text","store","usage"]},"ResponseStreamEvent":{"type":"object","properties":{"type":{"type":"string","enum":["response.created","response.in_progress","response.output_item.added","response.content_part.added","response.output_text.delta","response.output_text.done","response.content_part.done","response.output_item.done","response.function_call_arguments.delta","response.function_call_arguments.done","response.completed","response.incomplete","error"]},"sequence_number":{"type":"integer"}},"required":["type","sequence_number"],"additionalProperties":true,"description":"Sent as `event: <type>` plus `data: <json>`. No `[DONE]` sentinel."},"DeletedResponse":{"type":"object","properties":{"id":{"type":"string"},"object":{"type":"string","enum":["response"]},"deleted":{"const":true}},"required":["id","object","deleted"]},"MessagesRequest":{"type":"object","properties":{"model":{"type":"string","description":"An Utmost model id or auto alias. Anthropic model names are not mapped."},"max_tokens":{"type":"integer","minimum":1},"messages":{"type":"array","items":{"type":"object","properties":{"role":{"type":"string","enum":["user","assistant"]},"content":{"anyOf":[{"type":"string"},{"type":"array","items":{"type":"object","description":"`text`, `image` (base64 or url source), `tool_use`, `tool_result`. Other block types are dropped.","additionalProperties":true}}]}},"required":["role","content"]},"minItems":1},"system":{"anyOf":[{"type":"string"},{"type":"array","items":{"type":"object","additionalProperties":true}}]},"stop_sequences":{"type":"array","items":{"type":"string"},"maxItems":4},"stream":{"type":"boolean"},"temperature":{"type":"number","minimum":0,"maximum":1},"top_p":{"type":"number"},"top_k":{"type":"number","description":"Accepted and ignored."},"tools":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string"},"description":{"type":"string"},"input_schema":{"type":"object","additionalProperties":true}},"required":["name"],"additionalProperties":true}},"tool_choice":{"type":"object","properties":{"type":{"type":"string","enum":["auto","any","tool","none"]},"name":{"type":"string"}},"required":["type"]},"thinking":{"type":"object","properties":{"type":{"type":"string","description":"`enabled` maps to reasoning_effort `high` on reasoning models."},"budget_tokens":{"type":"number","description":"Ignored."}},"required":["type"],"additionalProperties":true},"metadata":{"type":"object","additionalProperties":true,"description":"Accepted and ignored."}},"required":["model","max_tokens","messages"]},"Message":{"type":"object","properties":{"id":{"type":"string"},"type":{"type":"string","enum":["message"]},"role":{"type":"string","enum":["assistant"]},"model":{"type":"string"},"content":{"type":"array","items":{"type":"object","description":"`thinking`, `text` or `tool_use` blocks.","additionalProperties":true}},"stop_reason":{"type":"string","enum":["end_turn","max_tokens","tool_use","refusal"]},"stop_sequence":{"type":"null"},"usage":{"type":"object","properties":{"input_tokens":{"type":"integer","description":"Uncached input tokens."},"cache_read_input_tokens":{"type":"integer"},"cache_creation_input_tokens":{"type":"integer","description":"Always 0."},"output_tokens":{"type":"integer"}},"required":["input_tokens","output_tokens"]}},"required":["id","type","role","model","content","stop_reason","usage"]},"CountTokensRequest":{"type":"object","properties":{"model":{"type":"string"},"messages":{"type":"array","items":{"type":"object","additionalProperties":true},"minItems":1},"system":{"anyOf":[{"type":"string"},{"type":"array","items":{"type":"object","additionalProperties":true}}]},"tools":{"type":"array","items":{"type":"object","additionalProperties":true}}},"required":["model","messages"]},"CountTokensResponse":{"type":"object","properties":{"input_tokens":{"type":"integer","description":"An estimate (about 4 characters per token); backend tokenizers differ."}},"required":["input_tokens"]},"Model":{"type":"object","properties":{"id":{"type":"string"},"object":{"type":"string","enum":["model"]},"created":{"type":"integer"},"owned_by":{"type":"string","enum":["utmost","you"]},"display_name":{"type":"string"},"family":{"type":"string"},"tier":{"type":"string","enum":["small","medium","large"]},"variant":{"type":"string","enum":["standard","abliterated"]},"base_model":{"anyOf":[{"type":"string","description":"For abliterated models: the standard sibling."},{"type":"null"}]},"context_window":{"type":"integer"},"max_output_tokens":{"type":"integer"},"pricing":{"type":"object","properties":{"currency":{"type":"string","enum":["USD"]},"unit":{"type":"string","enum":["1M tokens"]},"input":{"type":"number"},"cached_input":{"type":"number"},"output":{"type":"number"},"batch_discount":{"type":"number","description":"Multiplier for batch requests (0.5)."}}},"rate_limit":{"type":"object","properties":{"requests_per_minute":{"type":"integer","description":"Your tier's default (Developer's without a key)."},"note":{"type":"string"}}},"capabilities":{"type":"object","properties":{"tools":{"type":"boolean"},"reasoning":{"type":"boolean"},"json_mode":{"type":"boolean"},"streaming":{"type":"boolean"}}},"license":{"type":"string"},"eval_card_url":{"type":"string","format":"uri"},"eval_card_sample":{"type":"boolean","description":"True when the eval card holds sample numbers rather than measured ones."},"available":{"type":"boolean","description":"Whether your organization can call it. Without a key, true only for standard models."}},"required":["id","object","created","owned_by","tier","variant","pricing","available"]},"RouterAlias":{"type":"object","properties":{"id":{"type":"string","enum":["auto","auto-fast","auto-best"]},"object":{"type":"string","enum":["model"]},"created":{"const":0},"owned_by":{"type":"string","enum":["utmost"]},"router":{"const":true},"description":{"type":"string"}},"required":["id","object","router"]},"ModelList":{"type":"object","properties":{"object":{"type":"string","enum":["list"]},"data":{"type":"array","items":{"anyOf":[{"$ref":"#/components/schemas/RouterAlias"},{"$ref":"#/components/schemas/Model"}]}}},"required":["object","data"]},"Credits":{"type":"object","properties":{"object":{"type":"string","enum":["credits"]},"currency":{"type":"string","enum":["USD"]},"balance":{"type":"number","description":"Prepaid balance in USD. Can be negative in invoice mode."},"billing_mode":{"type":"string","enum":["prepaid","invoice"]},"credit_limit":{"anyOf":[{"type":"number","description":"Invoice mode only."},{"type":"null"}]},"organization":{"type":"object","properties":{"id":{"type":"string"},"tier":{"type":"string","enum":["developer","verified","research"]},"month_to_date_spend":{"type":"number"}}},"project":{"type":"object","properties":{"id":{"type":"string"},"month_to_date_spend":{"type":"number"},"spend_cap":{"anyOf":[{"type":"number"},{"type":"null"}]}}},"key":{"type":"object","properties":{"id":{"type":"string"},"month_to_date_spend":{"type":"number"},"spend_cap":{"anyOf":[{"type":"number"},{"type":"null"}]}}},"period":{"type":"string","description":"Billing month, UTC, `YYYY-MM`."}},"required":["object","balance","billing_mode","organization","project","key","period"]},"FeedbackRequest":{"type":"object","properties":{"request_id":{"type":"string","description":"The `x-request-id` of a request in your organization."},"rating":{"type":"string","enum":["good","bad"]},"reason":{"type":"string","enum":["wrong_answer","refused","too_slow","wrong_model","other"]}},"required":["request_id","rating"]},"Feedback":{"type":"object","properties":{"object":{"type":"string","enum":["feedback"]},"request_id":{"type":"string"},"rating":{"type":"string","enum":["good","bad"]},"reason":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["object","request_id","rating","reason"]},"BatchCreateRequest":{"type":"object","properties":{"requests":{"type":"array","items":{"type":"object","properties":{"custom_id":{"type":"string","minLength":1,"maxLength":128},"body":{"allOf":[{"$ref":"#/components/schemas/ChatCompletionRequest"}],"description":"A chat completion request. `stream` must be absent or false; `stream_options` is ignored."}},"required":["custom_id","body"]},"minItems":1,"maxItems":50000,"description":"custom_id must be unique within the batch. The whole request body is limited to 8 MB."},"completion_window":{"type":"string","enum":["24h"]},"metadata":{"type":"object","additionalProperties":{"type":"string","maxLength":512}}},"required":["requests"]},"Batch":{"type":"object","properties":{"id":{"type":"string"},"object":{"type":"string","enum":["batch"]},"endpoint":{"type":"string","enum":["/v1/chat/completions"]},"status":{"type":"string","enum":["in_progress","completed","failed","cancelled","expired"]},"created_at":{"type":"integer"},"completed_at":{"anyOf":[{"type":"integer"},{"type":"null"}]},"expires_at":{"type":"integer","description":"Deadline: 24 hours after creation."},"results_expire_at":{"anyOf":[{"type":"integer","description":"7 days after the batch finished."},{"type":"null"}]},"request_counts":{"type":"object","properties":{"total":{"type":"integer"},"completed":{"type":"integer"},"failed":{"type":"integer"}}},"cost_usd":{"type":"number","description":"Billed so far, at 50% of the list price."},"metadata":{"type":"object","additionalProperties":{"type":"string"}},"results_url":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["id","object","status","created_at","expires_at","request_counts","cost_usd"]},"BatchList":{"type":"object","properties":{"object":{"type":"string","enum":["list"]},"data":{"type":"array","items":{"$ref":"#/components/schemas/Batch"},"description":"The 20 most recent batches."}},"required":["object","data"]},"BatchResultLine":{"type":"object","properties":{"custom_id":{"type":"string"},"response":{"anyOf":[{"type":"object","properties":{"status_code":{"const":200},"body":{"$ref":"#/components/schemas/ChatCompletion"}}},{"type":"null"}]},"error":{"anyOf":[{"type":"object","properties":{"code":{"type":"string","description":"An API error code, or `cancelled`, `expired`, `not_processed`."},"message":{"type":"string"}}},{"type":"null"}]}},"required":["custom_id","response","error"]},"WorkflowConfig":{"type":"object","properties":{"name":{"type":"string","maxLength":64},"intake":{"type":"object","properties":{"model":{"type":"string","default":"auto"},"instructions":{"type":"string","maxLength":8000}}},"reviewers":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string","maxLength":64},"persona":{"type":"string","maxLength":8000},"model":{"type":"string","default":"auto"}},"required":["name","persona"]},"minItems":1,"maxItems":12},"aggregate":{"type":"object","properties":{"model":{"type":"string","default":"auto-best"},"instructions":{"type":"string","maxLength":8000}}},"min_confidence":{"type":"number","minimum":0,"maximum":1,"default":0},"max_findings":{"type":"integer","minimum":1,"maximum":500,"default":100}},"required":["reviewers"]},"SecurityReviewRequest":{"type":"object","properties":{"template":{"type":"string","enum":["code-review","threat-model","dependency-audit"]},"config":{"anyOf":[{"type":"string","description":"YAML, up to 64,000 characters.","maxLength":64000},{"$ref":"#/components/schemas/WorkflowConfig"}],"description":"When sent with `template`, its top-level keys replace the template's."},"input":{"anyOf":[{"type":"string","minLength":1,"maxLength":600000},{"type":"object","properties":{"content":{"type":"string","minLength":1,"maxLength":600000},"filename":{"type":"string","maxLength":512},"language":{"type":"string","maxLength":64},"context":{"type":"string","maxLength":20000}},"required":["content"]}]}},"required":["input"],"description":"Send `template`, `config`, or both."},"Finding":{"type":"object","properties":{"id":{"type":"string"},"title":{"type":"string"},"severity":{"type":"string","enum":["critical","high","medium","low","info"]},"location":{"type":"string"},"description":{"type":"string"},"recommendation":{"type":"string"},"confidence":{"type":"number","minimum":0,"maximum":1},"found_by":{"type":"array","items":{"type":"string"}},"duplicates_merged":{"type":"integer"},"aggregate_rationale":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["id","title","severity","location","description","recommendation","confidence","found_by","duplicates_merged","aggregate_rationale"]},"WorkflowPass":{"type":"object","properties":{"name":{"type":"string"},"kind":{"type":"string","enum":["intake","reviewer","aggregate"]},"model":{"type":"string"},"route":{"anyOf":[{"type":"string"},{"type":"null"}]},"request_id":{"type":"string"},"usage":{"type":"object","properties":{"input_tokens":{"type":"integer"},"cached_tokens":{"type":"integer"},"output_tokens":{"type":"integer"}}},"cost_usd":{"type":"number"},"findings":{"type":"integer"},"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"}}}},"required":["name","kind","model","route","request_id","usage","cost_usd"]},"WorkflowRun":{"type":"object","properties":{"id":{"type":"string"},"object":{"type":"string","enum":["workflow.run"]},"workflow":{"type":"string","enum":["security-review"]},"template":{"anyOf":[{"type":"string"},{"type":"null"}]},"config_name":{"anyOf":[{"type":"string"},{"type":"null"}]},"status":{"type":"string","enum":["completed","completed_with_errors"]},"duration_ms":{"type":"integer"},"intake":{"anyOf":[{"type":"object","properties":{"summary":{"type":"string"},"language":{"type":"string"},"scope":{"type":"array","items":{"type":"string"}}}},{"type":"null"}]},"findings":{"type":"array","items":{"$ref":"#/components/schemas/Finding"}},"summary":{"type":"object","properties":{"critical":{"type":"integer"},"high":{"type":"integer"},"medium":{"type":"integer"},"low":{"type":"integer"},"info":{"type":"integer"}}},"passes":{"type":"array","items":{"$ref":"#/components/schemas/WorkflowPass"}},"cost":{"type":"object","properties":{"total_usd":{"type":"number"},"per_pass":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string"},"model":{"type":"string"},"cost_usd":{"type":"number"}}}}}}},"required":["id","object","workflow","status","findings","summary","passes","cost"]},"WorkflowTemplateList":{"type":"object","properties":{"object":{"type":"string","enum":["list"]},"data":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string"},"workflow":{"type":"string","enum":["security-review"]},"yaml":{"type":"string"}},"required":["name","workflow","yaml"]}}},"required":["object","data"]},"ByoCreateRequest":{"type":"object","properties":{"source":{"oneOf":[{"type":"object","properties":{"type":{"type":"string","enum":["huggingface"]},"repo":{"type":"string","description":"`owner/model`.","minLength":3,"maxLength":200},"revision":{"type":"string","maxLength":100}},"required":["type","repo"]},{"type":"object","properties":{"type":{"type":"string","enum":["url"]},"url":{"type":"string","description":"Always goes to manual license review.","format":"uri","maxLength":2000}},"required":["type","url"]}]},"name":{"type":"string","description":"2–48 lowercase letters, digits, dots or dashes, starting with a letter or digit.","pattern":"^[a-z0-9][a-z0-9.-]{1,47}$"},"strength":{"type":"string","enum":["low","medium","full"],"default":"medium"}},"required":["source","name"]},"ByoJob":{"type":"object","properties":{"id":{"type":"string"},"object":{"type":"string","enum":["byo.model_job"]},"name":{"type":"string"},"source":{"type":"object","properties":{"type":{"type":"string","enum":["huggingface","url"]},"ref":{"type":"string"},"revision":{"anyOf":[{"type":"string"},{"type":"null"}]}}},"license":{"anyOf":[{"type":"string"},{"type":"null"}]},"license_verdict":{"anyOf":[{"type":"string","enum":["allowed","review","blocked"]},{"type":"null"}]},"strength":{"type":"string","enum":["low","medium","full"]},"status":{"type":"string","enum":["license_check","license_review","blocked","queued","abliterating","evaluating","awaiting_approval","deploying","serving","rejected","failed"]},"status_label":{"type":"string"},"status_detail":{"type":"string"},"footprint":{"anyOf":[{"type":"string","description":"GPU footprint, e.g. `1× H100 80GB`."},{"type":"null"}]},"parameters":{"anyOf":[{"type":"integer"},{"type":"null"}]},"monthly_fee_usd":{"anyOf":[{"type":"number"},{"type":"null"}]},"eval_report":{"anyOf":[{"type":"object","additionalProperties":true},{"type":"null"}]},"model":{"anyOf":[{"type":"string","description":"Private model id once serving: `<org-slug>-<4 chars>/<name>`."},{"type":"null"}]},"eval_card_url":{"anyOf":[{"type":"string"},{"type":"null"}]},"events":{"type":"array","items":{"type":"object","properties":{"at":{"type":"string","format":"date-time"},"status":{"type":"string","enum":["license_check","license_review","blocked","queued","abliterating","evaluating","awaiting_approval","deploying","serving","rejected","failed"]},"detail":{"type":"string"}}}},"created_at":{"type":"integer"},"updated_at":{"type":"integer"}},"required":["id","object","name","status","events"]},"ByoJobList":{"type":"object","properties":{"object":{"type":"string","enum":["list"]},"data":{"type":"array","items":{"$ref":"#/components/schemas/ByoJob"}}},"required":["object","data"]}}}}