openapi: 3.2.0 info: title: Tale Platform Model endpoints API version: 3.27.0 contact: name: Tale url: https://tale.dev description: 'REST access to a Tale deployment: knowledge resources, automations and their runs, chat threads, agents, and skills — plus an MCP endpoint exposing the same platform to MCP clients.' servers: - url: '{origin}' description: The deployment this document describes — `GET /openapi.json` on a running instance fills it in variables: origin: default: https://your-host.example.com description: Scheme and host of the Tale deployment security: - bearerAuth: [] tags: - name: Model endpoints description: The organization’s approved models over two vendor wires — OpenAI Chat Completions under `/api/v1/openai` and Anthropic Messages under `/api/v1/anthropic` — for the OpenAI and Anthropic SDKs, opencode and Claude Code. Off until an administrator turns them on; governed and metered like chat. Bodies, answers and refusals are the vendors’ own shapes (see “Compatible model endpoints” above). paths: /api/v1/openai/chat/completions: post: tags: - Model endpoints summary: Create a chat completion (OpenAI-compatible) description: 'OpenAI Chat Completions, relayed to the organization’s provider through the platform’s model gateway. An OpenAI SDK, opencode (`@ai-sdk/openai-compatible`) or any OpenAI-compatible client takes the base URL `https:///api/v1/openai` and appends this path. `model` is an id `GET /api/v1/openai/models` lists: `/`, the connector’s slug and the model’s id in its catalog (`openrouter/anthropic/claude-sonnet-4.6`). The body is OpenAI’s own and is relayed as sent, bar what the platform governs: `stream: true` answers `text/event-stream` chunks ending in `data: [DONE]` (the closing usage chunk only when `stream_options.include_usage` asks for it); `tools` are the caller’s own (`function`, `custom`) and come back as `tool_calls`; images ride `image_url` parts (`data:` or `https:`) for a model with vision; documents ride `file` parts (inline). The organization’s input guardrails judge every text the caller wrote first — every role, tool calls and results, tool definitions, a prediction, a response schema — a block refuses the request, a mask rewrites the text the model receives; the answer itself is not filtered. The request’s worst case (its prompt plus its output cap, once per answer; the catalog maximum is sent as `max_completion_tokens` when the request names no cap) is held whole against every budget that binds the key holder and the key before the call, and the spend is booked after it under the person and the key (usage shows it as Direct API). The answer is the vendor’s, `model` naming the id the request sent; a vendor refusal is relayed in this shape as `MODEL_API_UPSTREAM_ERROR`. Query parameters are ignored.' operationId: createOpenAiChatCompletion security: - bearerAuth: [] requestBody: required: true content: application/json: schema: type: object description: An OpenAI Chat Completions request — relayed as sent, bar the gateway’s own `fallbacks`, which is dropped required: - model - messages properties: model: type: string description: A model id `GET /api/v1/openai/models` lists (`/`) messages: type: array minItems: 1 description: 'The conversation: `system`, `developer`, `user`, `assistant`, `tool` (and the older `function`) messages; user content is text, `image_url` and `file` parts' items: type: object stream: type: boolean description: Answer as a `text/event-stream` of chunks tools: type: array description: The caller’s own tools (`function`, `custom`); the model asks for them in `tool_calls` items: type: object responses: '200': description: 'The completion — or, with `stream: true`, its chunks' content: application/json: schema: type: object description: A `chat.completion` object as OpenAI defines it, `model` the id the request named, `usage` as the vendor reported it text/event-stream: schema: type: string description: 'Server-Sent Events: one `data:` line per `chat.completion.chunk`, `data: [DONE]` last; a stream the vendor breaks off ends with a `data:` line carrying an `OpenAiError`' headers: X-Request-Id: $ref: '#/components/headers/XRequestId' X-Tale-Api-Version: $ref: '#/components/headers/XTaleApiVersion' '400': description: 'A body the endpoint cannot relay: not JSON, a missing `model` or `messages` (`max_tokens` on Anthropic), a role or content part outside the wire’s own, an image URL that is neither `data:` nor `https:`, a file stored in the vendor account (`file_id`, a `file` source), more than 8 answers (`n`), a service tier other than `auto`/`default` (OpenAI) or `auto`/`standard_only` (Anthropic), audio output, `store: true` (`INVALID_BODY`, `param` naming the field); a `context-1m` beta in `anthropic-beta` (`INVALID_HEADER`); a tool the vendor would run (`MODEL_API_VENDOR_TOOL_UNSUPPORTED`); images for a model without vision (`MODEL_API_VISION_UNSUPPORTED`); tools for a model that takes none (`MODEL_API_TOOLS_UNSUPPORTED`); text the organization’s input guardrails block, or would mask in a name (`MODEL_API_GUARDRAIL_BLOCKED`); or the vendor refused the request itself (`MODEL_API_UPSTREAM_ERROR`, its message relayed unless it names the platform’s internal addresses)' content: application/json: schema: $ref: '#/components/schemas/OpenAiError' headers: X-Request-Id: $ref: '#/components/headers/XRequestId' X-Tale-Api-Version: $ref: '#/components/headers/XTaleApiVersion' '401': description: 'Missing or invalid API key (`UNAUTHORIZED`) — the key rides `Authorization: Bearer `; a request carrying `x-api-key` (where `ANTHROPIC_API_KEY` puts it) is refused whatever else it carries' content: application/json: schema: $ref: '#/components/schemas/OpenAiError' headers: X-Request-Id: $ref: '#/components/headers/XRequestId' X-Tale-Api-Version: $ref: '#/components/headers/XTaleApiVersion' WWW-Authenticate: $ref: '#/components/headers/WWWAuthenticate' '403': description: The organization has not turned the model endpoints on (`MODEL_API_DISABLED`); the key holder is neither owner, administrator nor developer and holds no `tale:models.api` grant (`MODEL_API_FORBIDDEN`); the organization’s model access refuses the model (`MODEL_API_MODEL_FORBIDDEN`); or its PII policy tokenizes, a round trip a relayed answer cannot make (`MODEL_API_GUARDRAIL_UNSUPPORTED`); or `X-Organization-Slug` names an organization the key holder is no member of (`ORG_FORBIDDEN`, with the slugs the key holder may send under `data.organizations`) content: application/json: schema: $ref: '#/components/schemas/OpenAiError' headers: X-Request-Id: $ref: '#/components/headers/XRequestId' X-Tale-Api-Version: $ref: '#/components/headers/XTaleApiVersion' '404': description: No model this key holder may call carries the id (`MODEL_API_MODEL_UNKNOWN`); or the path is not one of the wire’s (`NOT_FOUND`); or `X-Organization-Slug` names no organization (`ORG_SLUG_INVALID`, with the slugs the key holder may send under `data.organizations`) content: application/json: schema: $ref: '#/components/schemas/OpenAiError' headers: X-Request-Id: $ref: '#/components/headers/XRequestId' X-Tale-Api-Version: $ref: '#/components/headers/XTaleApiVersion' '405': description: The path exists, but not for this method (`METHOD_NOT_ALLOWED`); `Allow` names the methods it serves content: application/json: schema: $ref: '#/components/schemas/OpenAiError' headers: X-Request-Id: $ref: '#/components/headers/XRequestId' X-Tale-Api-Version: $ref: '#/components/headers/XTaleApiVersion' Allow: $ref: '#/components/headers/Allow' '413': description: The body exceeds 32 MiB (`BODY_TOO_LARGE`), the Anthropic Messages API’s own request limit; or, while the organization’s input guardrails are on, it carries more than 2 MB of text, more than 20,000 separate texts, or more new text than the guardrails read in one request (`MODEL_API_TEXT_TOO_LARGE`) content: application/json: schema: $ref: '#/components/schemas/OpenAiError' headers: X-Request-Id: $ref: '#/components/headers/XRequestId' X-Tale-Api-Version: $ref: '#/components/headers/XTaleApiVersion' '429': description: 'A budget cap that binds the key holder, one of their teams, the organization or the key is reached, or leaves less than the request’s worst case — its prompt plus its output cap, once per answer — in which case the message names the output cap that would fit (`BUDGET_EXCEEDED`, `Retry-After` naming when its period resets and `x-should-retry: false`); the key holder or the key already has 8 requests running in the organization (`MODEL_API_CONCURRENCY_EXCEEDED`, `Retry-After`); the key holder’s request budget is spent (`RATE_LIMITED`); or the vendor’s rate limit (`MODEL_API_UPSTREAM_ERROR`)' content: application/json: schema: $ref: '#/components/schemas/OpenAiError' headers: X-Request-Id: $ref: '#/components/headers/XRequestId' X-Tale-Api-Version: $ref: '#/components/headers/XTaleApiVersion' Retry-After: $ref: '#/components/headers/RetryAfter' '500': description: Internal error (`INTERNAL_ERROR`); the answer carries the request id to quote content: application/json: schema: $ref: '#/components/schemas/OpenAiError' headers: X-Request-Id: $ref: '#/components/headers/XRequestId' X-Tale-Api-Version: $ref: '#/components/headers/XTaleApiVersion' '502': description: The model gateway could not be reached, the vendor failed, or its stream broke off before the answer was complete (`MODEL_API_UPSTREAM_ERROR`); a whole answer that outlived the gateway’s request timeout answers 504 with the same code content: application/json: schema: $ref: '#/components/schemas/OpenAiError' headers: X-Request-Id: $ref: '#/components/headers/XRequestId' X-Tale-Api-Version: $ref: '#/components/headers/XTaleApiVersion' '503': description: 'The model gateway cannot serve the model right now, the provider credential cannot be used, or the model access policy cannot be read (`MODEL_API_UNAVAILABLE`, `Retry-After`); a fail-closed input guardrail could not judge the request, or a guardrail policy cannot be read (`MODEL_API_GUARDRAIL_UNAVAILABLE`); or the vendor is overloaded (`MODEL_API_UPSTREAM_ERROR`); or the platform’s database is restarting or cannot be reached (`DATABASE_UNAVAILABLE`): `Retry-After` names the wait in whole seconds — retry with backoff; the envelope carries a `requestId`' content: application/json: schema: $ref: '#/components/schemas/OpenAiError' headers: X-Request-Id: $ref: '#/components/headers/XRequestId' X-Tale-Api-Version: $ref: '#/components/headers/XTaleApiVersion' Retry-After: $ref: '#/components/headers/RetryAfter' parameters: - name: X-Organization-Slug in: header required: false schema: type: string description: The organization to operate on. STRICTLY REQUIRED on every call, reads included, when the key holder belongs to more than one organization — without it such requests are refused with 400 `ORG_SLUG_REQUIRED` (the dashboard’s last-active organization never steers a machine call). A slug that names no organization answers 404 `ORG_SLUG_INVALID`, one the key holder is no member of 403 `ORG_FORBIDDEN`. Single-organization keys may omit it; a blank or whitespace-only value reads as the header absent. Each of the three refusals lists the slugs the key holder may send under `data.organizations`; `GET /api/v1/me` answers them too. - name: X-Request-Id in: header required: false description: 'Your own correlation id, echoed back on the response and written to the platform’s log: up to 255 characters of letters, digits, `_`, `-` and `=`. Any other value is replaced by a fresh UUID (the response carries the id that was used), and uniqueness of an id you choose is yours to keep.' schema: type: string pattern: ^[A-Za-z0-9_=-]{1,255}$ /api/v1/openai/models: get: tags: - Model endpoints summary: List the models the key can call (OpenAI-compatible) description: 'The models this key holder may call through the compatible model endpoints, in OpenAI’s list shape — the complete set, never paginated: the organization’s configured chat models whose provider serves them with a direct credential (an API key or an environment variable), narrowed by each credential’s model allowlist and by the key holder’s model access. `id` is what `model` takes on both wires; `owned_by` is the provider’s slug; `created` is 0 — the catalog records no release date. Context windows, capabilities and prices are on `GET /api/v1/models`.' operationId: listOpenAiModels security: - bearerAuth: [] responses: '200': description: The models content: application/json: schema: type: object x-tale-pagination: none required: - data - object properties: data: type: array items: type: object required: - id - object - created - owned_by properties: id: type: string description: '`/` — what `model` takes on both wires' object: type: string enum: - model created: type: integer description: Always 0 — the catalog records no release date owned_by: type: string description: The provider’s slug object: type: string enum: - list headers: ETag: $ref: '#/components/headers/ETag' Cache-Control: $ref: '#/components/headers/CacheControl' X-Request-Id: $ref: '#/components/headers/XRequestId' X-Tale-Api-Version: $ref: '#/components/headers/XTaleApiVersion' '304': description: Not Modified — `If-None-Match` named the current `ETag`, so the body is not sent headers: ETag: $ref: '#/components/headers/ETag' Cache-Control: $ref: '#/components/headers/CacheControl' X-Request-Id: $ref: '#/components/headers/XRequestId' X-Tale-Api-Version: $ref: '#/components/headers/XTaleApiVersion' '401': description: 'Missing or invalid API key (`UNAUTHORIZED`) — the key rides `Authorization: Bearer `; a request carrying `x-api-key` (where `ANTHROPIC_API_KEY` puts it) is refused whatever else it carries' content: application/json: schema: $ref: '#/components/schemas/OpenAiError' headers: X-Request-Id: $ref: '#/components/headers/XRequestId' X-Tale-Api-Version: $ref: '#/components/headers/XTaleApiVersion' WWW-Authenticate: $ref: '#/components/headers/WWWAuthenticate' '403': description: The organization has not turned the model endpoints on (`MODEL_API_DISABLED`); the key holder is neither owner, administrator nor developer and holds no `tale:models.api` grant (`MODEL_API_FORBIDDEN`); or `X-Organization-Slug` names an organization the key holder is no member of (`ORG_FORBIDDEN`, with the slugs the key holder may send under `data.organizations`) content: application/json: schema: $ref: '#/components/schemas/OpenAiError' headers: X-Request-Id: $ref: '#/components/headers/XRequestId' X-Tale-Api-Version: $ref: '#/components/headers/XTaleApiVersion' '404': description: The path is not one of the wire’s (`NOT_FOUND`); or `X-Organization-Slug` names no organization (`ORG_SLUG_INVALID`, with the slugs the key holder may send under `data.organizations`) content: application/json: schema: $ref: '#/components/schemas/OpenAiError' headers: X-Request-Id: $ref: '#/components/headers/XRequestId' X-Tale-Api-Version: $ref: '#/components/headers/XTaleApiVersion' '405': description: The path exists, but not for this method (`METHOD_NOT_ALLOWED`); `Allow` names the methods it serves content: application/json: schema: $ref: '#/components/schemas/OpenAiError' headers: X-Request-Id: $ref: '#/components/headers/XRequestId' X-Tale-Api-Version: $ref: '#/components/headers/XTaleApiVersion' Allow: $ref: '#/components/headers/Allow' '429': description: 'The key holder’s request budget is spent (`RATE_LIMITED`): `Retry-After` names the wait in whole seconds' content: application/json: schema: $ref: '#/components/schemas/OpenAiError' headers: X-Request-Id: $ref: '#/components/headers/XRequestId' X-Tale-Api-Version: $ref: '#/components/headers/XTaleApiVersion' Retry-After: $ref: '#/components/headers/RetryAfter' '500': description: Internal error (`INTERNAL_ERROR`); the answer carries the request id to quote content: application/json: schema: $ref: '#/components/schemas/OpenAiError' headers: X-Request-Id: $ref: '#/components/headers/XRequestId' X-Tale-Api-Version: $ref: '#/components/headers/XTaleApiVersion' '503': description: 'The model access policy cannot be read right now (`MODEL_API_UNAVAILABLE`, `Retry-After`); or the platform’s database is restarting or cannot be reached (`DATABASE_UNAVAILABLE`): `Retry-After` names the wait in whole seconds — retry with backoff; the envelope carries a `requestId`' content: application/json: schema: $ref: '#/components/schemas/OpenAiError' headers: X-Request-Id: $ref: '#/components/headers/XRequestId' X-Tale-Api-Version: $ref: '#/components/headers/XTaleApiVersion' Retry-After: $ref: '#/components/headers/RetryAfter' parameters: - name: X-Organization-Slug in: header required: false schema: type: string description: The organization to operate on. STRICTLY REQUIRED on every call, reads included, when the key holder belongs to more than one organization — without it such requests are refused with 400 `ORG_SLUG_REQUIRED` (the dashboard’s last-active organization never steers a machine call). A slug that names no organization answers 404 `ORG_SLUG_INVALID`, one the key holder is no member of 403 `ORG_FORBIDDEN`. Single-organization keys may omit it; a blank or whitespace-only value reads as the header absent. Each of the three refusals lists the slugs the key holder may send under `data.organizations`; `GET /api/v1/me` answers them too. - name: X-Request-Id in: header required: false description: 'Your own correlation id, echoed back on the response and written to the platform’s log: up to 255 characters of letters, digits, `_`, `-` and `=`. Any other value is replaced by a fresh UUID (the response carries the id that was used), and uniqueness of an id you choose is yours to keep.' schema: type: string pattern: ^[A-Za-z0-9_=-]{1,255}$ /api/v1/anthropic/v1/messages: post: tags: - Model endpoints summary: Create a message (Anthropic-compatible) description: 'Anthropic Messages, relayed to the organization’s provider through the platform’s model gateway. Claude Code and the Anthropic SDKs take the base URL `https:///api/v1/anthropic` (`ANTHROPIC_BASE_URL`) and append `/v1/messages`; the key rides as a bearer token — `ANTHROPIC_AUTH_TOKEN` for Claude Code, `authToken`/`auth_token` for an SDK — with `ANTHROPIC_API_KEY` unset, since the `x-api-key` it sends is refused. A multi-organization key names the organization in `X-Organization-Slug` (Claude Code: `ANTHROPIC_CUSTOM_HEADERS`). `model` is an id `GET /api/v1/openai/models` lists; a provider that declares a native Anthropic endpoint is served through it, any other through the gateway’s translation. The body is Anthropic’s own and is relayed as sent, with `anthropic-version` and `anthropic-beta`; query parameters (the SDKs’ `beta=true`) are ignored. `max_tokens` is required; `stream: true` answers the Messages event stream. Images ride `image` blocks (base64 or an `https:` URL, in a tool result too) for a model with vision; documents ride `document` blocks; the caller’s own tools — plain ones and Anthropic’s client tools (`bash`, `text_editor`, `computer`, `memory`) — are relayed, a tool the vendor would run (web search, web fetch, code execution) and `mcp_servers` are not. The organization’s input guardrails judge the system prompt and the user text first; the answer is not filtered. The spend is held and booked as on the OpenAI endpoint. `count_tokens` and the other Messages routes are not served.' operationId: createAnthropicMessage security: - bearerAuth: [] requestBody: required: true content: application/json: schema: type: object description: An Anthropic Messages request — relayed as sent, bar the gateway’s own `fallbacks`, which is dropped required: - model - messages - max_tokens properties: model: type: string description: A model id `GET /api/v1/openai/models` lists (`/`) max_tokens: type: integer minimum: 1 description: The most output tokens the answer may take messages: type: array minItems: 1 description: '`user` and `assistant` turns; user content is `text`, `image`, `document`, `tool_result` and `search_result` blocks' items: type: object system: description: 'The system prompt: a string or `text` blocks' stream: type: boolean description: Answer as the Messages event stream tools: type: array description: The caller’s own tools; the model asks for them in `tool_use` blocks items: type: object responses: '200': description: 'The message — or, with `stream: true`, its events' content: application/json: schema: type: object description: A `message` object as Anthropic defines it, `model` the id the request named, `usage` as the vendor reported it text/event-stream: schema: type: string description: Server-Sent Events as Anthropic defines them (`message_start`, `content_block_*`, `message_delta`, `message_stop`, `ping`); a stream the vendor breaks off ends with an `error` event carrying an `AnthropicError` headers: X-Request-Id: $ref: '#/components/headers/XRequestId' X-Tale-Api-Version: $ref: '#/components/headers/XTaleApiVersion' '400': description: 'A body the endpoint cannot relay: not JSON, a missing `model` or `messages` (`max_tokens` on Anthropic), a role or content part outside the wire’s own, an image URL that is neither `data:` nor `https:`, a file stored in the vendor account (`file_id`, a `file` source), more than 8 answers (`n`), a service tier other than `auto`/`default` (OpenAI) or `auto`/`standard_only` (Anthropic), audio output, `store: true` (`INVALID_BODY`, `param` naming the field); a `context-1m` beta in `anthropic-beta` (`INVALID_HEADER`); a tool the vendor would run (`MODEL_API_VENDOR_TOOL_UNSUPPORTED`); images for a model without vision (`MODEL_API_VISION_UNSUPPORTED`); tools for a model that takes none (`MODEL_API_TOOLS_UNSUPPORTED`); text the organization’s input guardrails block, or would mask in a name (`MODEL_API_GUARDRAIL_BLOCKED`); or the vendor refused the request itself (`MODEL_API_UPSTREAM_ERROR`, its message relayed unless it names the platform’s internal addresses)' content: application/json: schema: $ref: '#/components/schemas/AnthropicError' headers: X-Request-Id: $ref: '#/components/headers/XRequestId' X-Tale-Api-Version: $ref: '#/components/headers/XTaleApiVersion' '401': description: 'Missing or invalid API key (`UNAUTHORIZED`) — the key rides `Authorization: Bearer `; a request carrying `x-api-key` (where `ANTHROPIC_API_KEY` puts it) is refused whatever else it carries' content: application/json: schema: $ref: '#/components/schemas/AnthropicError' headers: X-Request-Id: $ref: '#/components/headers/XRequestId' X-Tale-Api-Version: $ref: '#/components/headers/XTaleApiVersion' WWW-Authenticate: $ref: '#/components/headers/WWWAuthenticate' '403': description: The organization has not turned the model endpoints on (`MODEL_API_DISABLED`); the key holder is neither owner, administrator nor developer and holds no `tale:models.api` grant (`MODEL_API_FORBIDDEN`); the organization’s model access refuses the model (`MODEL_API_MODEL_FORBIDDEN`); or its PII policy tokenizes, a round trip a relayed answer cannot make (`MODEL_API_GUARDRAIL_UNSUPPORTED`); or `X-Organization-Slug` names an organization the key holder is no member of (`ORG_FORBIDDEN`, with the slugs the key holder may send under `data.organizations`) content: application/json: schema: $ref: '#/components/schemas/AnthropicError' headers: X-Request-Id: $ref: '#/components/headers/XRequestId' X-Tale-Api-Version: $ref: '#/components/headers/XTaleApiVersion' '404': description: No model this key holder may call carries the id (`MODEL_API_MODEL_UNKNOWN`); or the path is not one of the wire’s (`NOT_FOUND`); or `X-Organization-Slug` names no organization (`ORG_SLUG_INVALID`, with the slugs the key holder may send under `data.organizations`) content: application/json: schema: $ref: '#/components/schemas/AnthropicError' headers: X-Request-Id: $ref: '#/components/headers/XRequestId' X-Tale-Api-Version: $ref: '#/components/headers/XTaleApiVersion' '405': description: The path exists, but not for this method (`METHOD_NOT_ALLOWED`); `Allow` names the methods it serves content: application/json: schema: $ref: '#/components/schemas/AnthropicError' headers: X-Request-Id: $ref: '#/components/headers/XRequestId' X-Tale-Api-Version: $ref: '#/components/headers/XTaleApiVersion' Allow: $ref: '#/components/headers/Allow' '413': description: The body exceeds 32 MiB (`BODY_TOO_LARGE`), the Anthropic Messages API’s own request limit; or, while the organization’s input guardrails are on, it carries more than 2 MB of text, more than 20,000 separate texts, or more new text than the guardrails read in one request (`MODEL_API_TEXT_TOO_LARGE`) content: application/json: schema: $ref: '#/components/schemas/AnthropicError' headers: X-Request-Id: $ref: '#/components/headers/XRequestId' X-Tale-Api-Version: $ref: '#/components/headers/XTaleApiVersion' '429': description: 'A budget cap that binds the key holder, one of their teams, the organization or the key is reached, or leaves less than the request’s worst case — its prompt plus its output cap, once per answer — in which case the message names the output cap that would fit (`BUDGET_EXCEEDED`, `Retry-After` naming when its period resets and `x-should-retry: false`); the key holder or the key already has 8 requests running in the organization (`MODEL_API_CONCURRENCY_EXCEEDED`, `Retry-After`); the key holder’s request budget is spent (`RATE_LIMITED`); or the vendor’s rate limit (`MODEL_API_UPSTREAM_ERROR`)' content: application/json: schema: $ref: '#/components/schemas/AnthropicError' headers: X-Request-Id: $ref: '#/components/headers/XRequestId' X-Tale-Api-Version: $ref: '#/components/headers/XTaleApiVersion' Retry-After: $ref: '#/components/headers/RetryAfter' '500': description: Internal error (`INTERNAL_ERROR`); the answer carries the request id to quote content: application/json: schema: $ref: '#/components/schemas/AnthropicError' headers: X-Request-Id: $ref: '#/components/headers/XRequestId' X-Tale-Api-Version: $ref: '#/components/headers/XTaleApiVersion' '502': description: The model gateway could not be reached, the vendor failed, or its stream broke off before the answer was complete (`MODEL_API_UPSTREAM_ERROR`); a whole answer that outlived the gateway’s request timeout answers 504 with the same code content: application/json: schema: $ref: '#/components/schemas/AnthropicError' headers: X-Request-Id: $ref: '#/components/headers/XRequestId' X-Tale-Api-Version: $ref: '#/components/headers/XTaleApiVersion' '503': description: 'The model gateway cannot serve the model right now, the provider credential cannot be used, or the model access policy cannot be read (`MODEL_API_UNAVAILABLE`, `Retry-After`); a fail-closed input guardrail could not judge the request, or a guardrail policy cannot be read (`MODEL_API_GUARDRAIL_UNAVAILABLE`); or the vendor is overloaded (`MODEL_API_UPSTREAM_ERROR`); or the platform’s database is restarting or cannot be reached (`DATABASE_UNAVAILABLE`): `Retry-After` names the wait in whole seconds — retry with backoff; the envelope carries a `requestId`' content: application/json: schema: $ref: '#/components/schemas/AnthropicError' headers: X-Request-Id: $ref: '#/components/headers/XRequestId' X-Tale-Api-Version: $ref: '#/components/headers/XTaleApiVersion' Retry-After: $ref: '#/components/headers/RetryAfter' parameters: - name: X-Organization-Slug in: header required: false schema: type: string description: The organization to operate on. STRICTLY REQUIRED on every call, reads included, when the key holder belongs to more than one organization — without it such requests are refused with 400 `ORG_SLUG_REQUIRED` (the dashboard’s last-active organization never steers a machine call). A slug that names no organization answers 404 `ORG_SLUG_INVALID`, one the key holder is no member of 403 `ORG_FORBIDDEN`. Single-organization keys may omit it; a blank or whitespace-only value reads as the header absent. Each of the three refusals lists the slugs the key holder may send under `data.organizations`; `GET /api/v1/me` answers them too. - name: X-Request-Id in: header required: false description: 'Your own correlation id, echoed back on the response and written to the platform’s log: up to 255 characters of letters, digits, `_`, `-` and `=`. Any other value is replaced by a fresh UUID (the response carries the id that was used), and uniqueness of an id you choose is yours to keep.' schema: type: string pattern: ^[A-Za-z0-9_=-]{1,255}$ components: headers: RetryAfter: description: How long to wait before retrying, in whole seconds schema: type: integer minimum: 1 WWWAuthenticate: description: 'The challenge RFC 9110 §11.6.1 requires of a 401: `Bearer`, or `Bearer error="invalid_token"` when a key was presented and refused' schema: type: string XTaleApiVersion: description: The version of this contract (`info.version`) the serving instance implements — semver for the wire schema: type: string example: 3.27.0 ETag: description: 'A validator: over the answer’s bytes on a JSON read, the stored object’s tag on a download. Send it back as `If-None-Match` — as received; the weak and edge-suffixed forms match too — to be told 304 when nothing changed.' schema: type: string Allow: description: The methods this path serves, comma-separated schema: type: string example: GET, POST, HEAD, OPTIONS XRequestId: description: The request id the platform logged this call under — quote it when reporting a problem. Echoes a sane `X-Request-Id` the caller sent. schema: type: string CacheControl: description: '`private, no-cache` on a validated read and on a download: keep the answer, revalidate it before reuse, and let no shared cache keep it. Every other answer says `no-store`.' schema: type: string schemas: OpenAiError: type: object description: A refusal on the OpenAI-compatible model endpoints, in OpenAI’s own error shape — the REST door’s refusals (a missing key, the organization header, the request budget) included. `code` is this API’s stable refusal code. required: - error properties: error: type: object required: - message - type - param - code properties: message: type: string description: What went wrong, in a sentence type: type: string description: 'OpenAI’s error class: `invalid_request_error`, `authentication_error`, `permission_error`, `not_found_error`, `rate_limit_error`, `insufficient_quota` (a spent budget), `server_error`, or the vendor’s own on a relayed refusal' param: type: - string - 'null' description: The request field the refusal is about (`messages.2.content.0`), or null code: type: string enum: - ACTOR_AMBIGUOUS - ACTOR_DISABLED - ACTOR_FORBIDDEN - ACTOR_NOT_FOUND - ACTOR_REBOUND - ACTOR_UNVERIFIED - API_KEY_SCOPE_FORBIDDEN - ATTACHMENT_NOT_FOUND - ATTACHMENT_NOT_OWNED - ATTACHMENT_NOT_STAGED - ATTACHMENT_SIZE_MISMATCH - AUTHOR_UNVERIFIED - AUTOMATION_DELIVERY_SCOPE_MISMATCH - AUTOMATION_HAS_ACTIVE_RUNS - AUTOMATION_INPUT_INVALID - AUTOMATION_NOT_DEPLOYED - AUTOMATION_NOT_FOUND - AUTOMATION_NOT_INSTALLED - AUTOMATION_PROJECT_FORBIDDEN - AUTOMATION_PROJECT_SCOPE_REQUIRED - AUTOMATION_TRIGGER_INVALID - AUTOMATION_VERSION_NOT_DEPLOYED - AUTOMATION_VERSION_UNKNOWN - BLOB_NOT_FOUND - BODY_CHUNK_MALFORMED - BODY_LENGTH_MISMATCH - BODY_TOO_LARGE - BROWSER_SESSION_NOT_FOUND - BUDGET_EXCEEDED - CHAT_MODEL_AMBIGUOUS - CHAT_MODEL_NOT_ON_PROVIDER - CHAT_MODEL_UNKNOWN - CHAT_PROVIDER_UNKNOWN - CHAT_THREAD_ARCHIVED - CHAT_THREAD_NOT_DIRECT - CHAT_TURN_IN_PROGRESS - CHAT_TURN_NOT_RUNNING - CONTACT_AMBIGUOUS - CONTACT_DUPLICATE_EMAIL - CONTACT_DUPLICATE_EXTERNAL_ID - CONTACT_IDENTITY_REQUIRED - CONTACT_NOT_FOUND - CONTACT_STALE - CONVERSATION_CLOSED - CONVERSATION_CONTACT_CONFLICT - CONVERSATION_CONTACT_TRASHED - CONVERSATION_NOT_FOUND - CONVERSATION_SNAPSHOT_CONFLICT - CONVERSATION_SOURCE_NOT_FOUND - DATABASE_UNAVAILABLE - DELIVERY_NOT_FOUND - DELIVERY_RECEIPT_CONFLICT - DELIVERY_RETRY_UNAVAILABLE - DELIVERY_UNACKNOWLEDGED - DOCUMENT_HAS_KNOWLEDGE_ENTRY - DOCUMENT_NOT_FOUND - DOCUMENT_RECORD_FROZEN - DOCUMENT_RECORD_PROTECTED - DOCUMENT_RECORD_REPLACEMENT_REQUIRED - DOCUMENT_STALE - DUPLICATE_PRODUCT_EXTERNAL_ID - DUPLICATE_PRODUCT_NAME - EMBEDDING_CREDENTIAL_REJECTED - EMBEDDING_CREDIT_EXHAUSTED - EMBEDDING_NOT_CONFIGURED - EMBEDDING_UPSTREAM_ERROR - EMPTY_ANSWER - FILE_NOT_FOUND - FILE_SIZE_INVALID - FILE_TOO_LARGE - FOLDER_DEPTH_EXCEEDED - FOLDER_NAME_INVALID - FOLDER_NAME_TAKEN - FOLDER_NOT_ACCESSIBLE - FOLDER_NOT_FOUND - FORBIDDEN_DEPLOYMENT_EDITOR - FORBIDDEN_INSTANCE_ADMIN - HTTP_ERROR - HUMAN_ASK_EXPIRED - HUMAN_ASK_NOT_FOUND - HUMAN_ASK_NOT_PENDING - IDEMPOTENCY_KEY_REUSED - INTEGRATION_NOT_OWNED - INTERNAL_ERROR - INVALID_BODY - INVALID_CURSOR - INVALID_HEADER - INVALID_LIMIT - INVALID_QUERY - INVALID_SESSION - INVALID_SKILL - INVALID_SKILL_SLUG - INVALID_URL - KNOWLEDGE_ENTRY_DUPLICATE - KNOWLEDGE_ENTRY_FORBIDDEN - KNOWLEDGE_ENTRY_NOT_FOUND - KNOWLEDGE_ENTRY_STORE_TIMEOUT - KNOWLEDGE_ENTRY_SUPERSEDED - LEGAL_HOLD_ACTIVE - MENTION_DIRECTORY_UNAVAILABLE - MESSAGE_NOT_FOUND - METHOD_NOT_ALLOWED - MODEL_API_CONCURRENCY_EXCEEDED - MODEL_API_DISABLED - MODEL_API_FORBIDDEN - MODEL_API_GUARDRAIL_BLOCKED - MODEL_API_GUARDRAIL_UNAVAILABLE - MODEL_API_GUARDRAIL_UNSUPPORTED - MODEL_API_MODEL_FORBIDDEN - MODEL_API_MODEL_UNKNOWN - MODEL_API_TEXT_TOO_LARGE - MODEL_API_TOOLS_UNSUPPORTED - MODEL_API_UNAVAILABLE - MODEL_API_UPSTREAM_ERROR - MODEL_API_VENDOR_TOOL_UNSUPPORTED - MODEL_API_VISION_UNSUPPORTED - NOT_FOUND - OBJECT_STORE_UNAVAILABLE - OBJECT_STORE_UNCONFIGURED - ORG_FORBIDDEN - ORG_SLUG_INVALID - ORG_SLUG_REQUIRED - ORIGIN_FORBIDDEN - PRECONDITION_FAILED - PRODUCT_NOT_FOUND - PRODUCT_STALE - PROJECT_AGENT_CONNECTOR_UNKNOWN - PROJECT_AGENT_HARNESS_INVALID - PROJECT_AGENT_LIMIT - PROJECT_AGENT_MANAGED - PROJECT_AGENT_MODEL_INVALID - PROJECT_AGENT_NAME_TAKEN - PROJECT_AGENT_NOT_FOUND - PROJECT_AGENT_PROVIDER_UNKNOWN - PROJECT_AGENT_SECRETS_FORBIDDEN - PROJECT_AGENT_SECRET_UNKNOWN - PROJECT_AGENT_SKILL_UNKNOWN - PROJECT_AGENT_STALE - PROJECT_AGENT_TOOL_UNKNOWN - PROJECT_ARCHIVED - PROJECT_DUPLICATE_EXTERNAL_ID - PROJECT_FORBIDDEN - PROJECT_HAS_BOUND_AUTOMATIONS - PROJECT_HAS_PROTECTED_RECORDS - PROJECT_KEY_INVALID - PROJECT_KEY_TAKEN - PROJECT_LEGAL_HOLD - PROJECT_NOT_FOUND - PROJECT_SHARING_INVALID - PURGE_INCOMPLETE - RATE_LIMITED - RBAC_FORBIDDEN - REQUEST_TIMEOUT - REVIEW_COMPETENCE_REQUIRED - REVIEW_INDEPENDENT_REVIEWER_REQUIRED - ROLE_FORBIDDEN - RUN_ACTIVE - RUN_NOT_FOUND - RUN_QUARANTINED - RUN_QUARANTINE_CHANGED - SETUP_FOLDER_MISSING - SKILL_EXISTS - SKILL_FILE_NOT_FOUND - SKILL_FORBIDDEN - SKILL_MALFORMED - SKILL_NOT_FOUND - SKILL_PUBLISH_FORBIDDEN - SKILL_STALE - SKILL_TEAM_UNKNOWN - STANDARD_AGENT_OFF - STANDARD_AGENT_UNAVAILABLE - TASK_AGENT_REVIEW_REQUIRED - TASK_ARCHIVED - TASK_AUTOMATION_DISABLED - TASK_AUTOMATION_UNAVAILABLE - TASK_EXTERNAL_REF_INVALID - TASK_EXTERNAL_STATUS_STALE - TASK_HAS_LIVE_RUN - TASK_HAS_OPEN_SUBTASKS - TASK_LABEL_UNKNOWN - TASK_NOT_FOUND - TASK_NOT_IN_REVIEW - TASK_REVIEW_POLICY_UNAVAILABLE - TASK_STATUS_CONFLICT - TEAM_ACCESS_DENIED - TEAM_INHERITED_FROM_FOLDER - TEAM_NOT_IN_ORG - THREAD_NOT_FOUND - UNAUTHORIZED - UNSUPPORTED_FILE_TYPE - UPLOAD_FILE_MISMATCH - UPLOAD_INTENT_INVALID - UPLOAD_POLICY_REJECTED - UPSTREAM_UNAVAILABLE - URI_TOO_LONG - WEBSITE_DOMAIN_IMMUTABLE - WEBSITE_DOMAIN_INVALID - WEBSITE_DOMAIN_NOT_CRAWLABLE - WEBSITE_DUPLICATE_DOMAIN - WEBSITE_INVALID_LIST_URL - WEBSITE_NOT_FOUND description: The stable refusal code AnthropicError: type: object description: A refusal on the Anthropic-compatible model endpoint, in Anthropic’s own error shape — the REST door’s refusals included. `error.code` is this API’s stable refusal code, an addition to Anthropic’s shape. required: - type - error properties: type: type: string enum: - error error: type: object required: - type - message - code properties: type: type: string description: 'Anthropic’s error class: `invalid_request_error`, `authentication_error`, `permission_error`, `not_found_error`, `request_too_large`, `rate_limit_error`, `api_error`, `overloaded_error`, or the vendor’s own on a relayed refusal' message: type: string description: What went wrong, in a sentence code: type: string enum: - ACTOR_AMBIGUOUS - ACTOR_DISABLED - ACTOR_FORBIDDEN - ACTOR_NOT_FOUND - ACTOR_REBOUND - ACTOR_UNVERIFIED - API_KEY_SCOPE_FORBIDDEN - ATTACHMENT_NOT_FOUND - ATTACHMENT_NOT_OWNED - ATTACHMENT_NOT_STAGED - ATTACHMENT_SIZE_MISMATCH - AUTHOR_UNVERIFIED - AUTOMATION_DELIVERY_SCOPE_MISMATCH - AUTOMATION_HAS_ACTIVE_RUNS - AUTOMATION_INPUT_INVALID - AUTOMATION_NOT_DEPLOYED - AUTOMATION_NOT_FOUND - AUTOMATION_NOT_INSTALLED - AUTOMATION_PROJECT_FORBIDDEN - AUTOMATION_PROJECT_SCOPE_REQUIRED - AUTOMATION_TRIGGER_INVALID - AUTOMATION_VERSION_NOT_DEPLOYED - AUTOMATION_VERSION_UNKNOWN - BLOB_NOT_FOUND - BODY_CHUNK_MALFORMED - BODY_LENGTH_MISMATCH - BODY_TOO_LARGE - BROWSER_SESSION_NOT_FOUND - BUDGET_EXCEEDED - CHAT_MODEL_AMBIGUOUS - CHAT_MODEL_NOT_ON_PROVIDER - CHAT_MODEL_UNKNOWN - CHAT_PROVIDER_UNKNOWN - CHAT_THREAD_ARCHIVED - CHAT_THREAD_NOT_DIRECT - CHAT_TURN_IN_PROGRESS - CHAT_TURN_NOT_RUNNING - CONTACT_AMBIGUOUS - CONTACT_DUPLICATE_EMAIL - CONTACT_DUPLICATE_EXTERNAL_ID - CONTACT_IDENTITY_REQUIRED - CONTACT_NOT_FOUND - CONTACT_STALE - CONVERSATION_CLOSED - CONVERSATION_CONTACT_CONFLICT - CONVERSATION_CONTACT_TRASHED - CONVERSATION_NOT_FOUND - CONVERSATION_SNAPSHOT_CONFLICT - CONVERSATION_SOURCE_NOT_FOUND - DATABASE_UNAVAILABLE - DELIVERY_NOT_FOUND - DELIVERY_RECEIPT_CONFLICT - DELIVERY_RETRY_UNAVAILABLE - DELIVERY_UNACKNOWLEDGED - DOCUMENT_HAS_KNOWLEDGE_ENTRY - DOCUMENT_NOT_FOUND - DOCUMENT_RECORD_FROZEN - DOCUMENT_RECORD_PROTECTED - DOCUMENT_RECORD_REPLACEMENT_REQUIRED - DOCUMENT_STALE - DUPLICATE_PRODUCT_EXTERNAL_ID - DUPLICATE_PRODUCT_NAME - EMBEDDING_CREDENTIAL_REJECTED - EMBEDDING_CREDIT_EXHAUSTED - EMBEDDING_NOT_CONFIGURED - EMBEDDING_UPSTREAM_ERROR - EMPTY_ANSWER - FILE_NOT_FOUND - FILE_SIZE_INVALID - FILE_TOO_LARGE - FOLDER_DEPTH_EXCEEDED - FOLDER_NAME_INVALID - FOLDER_NAME_TAKEN - FOLDER_NOT_ACCESSIBLE - FOLDER_NOT_FOUND - FORBIDDEN_DEPLOYMENT_EDITOR - FORBIDDEN_INSTANCE_ADMIN - HTTP_ERROR - HUMAN_ASK_EXPIRED - HUMAN_ASK_NOT_FOUND - HUMAN_ASK_NOT_PENDING - IDEMPOTENCY_KEY_REUSED - INTEGRATION_NOT_OWNED - INTERNAL_ERROR - INVALID_BODY - INVALID_CURSOR - INVALID_HEADER - INVALID_LIMIT - INVALID_QUERY - INVALID_SESSION - INVALID_SKILL - INVALID_SKILL_SLUG - INVALID_URL - KNOWLEDGE_ENTRY_DUPLICATE - KNOWLEDGE_ENTRY_FORBIDDEN - KNOWLEDGE_ENTRY_NOT_FOUND - KNOWLEDGE_ENTRY_STORE_TIMEOUT - KNOWLEDGE_ENTRY_SUPERSEDED - LEGAL_HOLD_ACTIVE - MENTION_DIRECTORY_UNAVAILABLE - MESSAGE_NOT_FOUND - METHOD_NOT_ALLOWED - MODEL_API_CONCURRENCY_EXCEEDED - MODEL_API_DISABLED - MODEL_API_FORBIDDEN - MODEL_API_GUARDRAIL_BLOCKED - MODEL_API_GUARDRAIL_UNAVAILABLE - MODEL_API_GUARDRAIL_UNSUPPORTED - MODEL_API_MODEL_FORBIDDEN - MODEL_API_MODEL_UNKNOWN - MODEL_API_TEXT_TOO_LARGE - MODEL_API_TOOLS_UNSUPPORTED - MODEL_API_UNAVAILABLE - MODEL_API_UPSTREAM_ERROR - MODEL_API_VENDOR_TOOL_UNSUPPORTED - MODEL_API_VISION_UNSUPPORTED - NOT_FOUND - OBJECT_STORE_UNAVAILABLE - OBJECT_STORE_UNCONFIGURED - ORG_FORBIDDEN - ORG_SLUG_INVALID - ORG_SLUG_REQUIRED - ORIGIN_FORBIDDEN - PRECONDITION_FAILED - PRODUCT_NOT_FOUND - PRODUCT_STALE - PROJECT_AGENT_CONNECTOR_UNKNOWN - PROJECT_AGENT_HARNESS_INVALID - PROJECT_AGENT_LIMIT - PROJECT_AGENT_MANAGED - PROJECT_AGENT_MODEL_INVALID - PROJECT_AGENT_NAME_TAKEN - PROJECT_AGENT_NOT_FOUND - PROJECT_AGENT_PROVIDER_UNKNOWN - PROJECT_AGENT_SECRETS_FORBIDDEN - PROJECT_AGENT_SECRET_UNKNOWN - PROJECT_AGENT_SKILL_UNKNOWN - PROJECT_AGENT_STALE - PROJECT_AGENT_TOOL_UNKNOWN - PROJECT_ARCHIVED - PROJECT_DUPLICATE_EXTERNAL_ID - PROJECT_FORBIDDEN - PROJECT_HAS_BOUND_AUTOMATIONS - PROJECT_HAS_PROTECTED_RECORDS - PROJECT_KEY_INVALID - PROJECT_KEY_TAKEN - PROJECT_LEGAL_HOLD - PROJECT_NOT_FOUND - PROJECT_SHARING_INVALID - PURGE_INCOMPLETE - RATE_LIMITED - RBAC_FORBIDDEN - REQUEST_TIMEOUT - REVIEW_COMPETENCE_REQUIRED - REVIEW_INDEPENDENT_REVIEWER_REQUIRED - ROLE_FORBIDDEN - RUN_ACTIVE - RUN_NOT_FOUND - RUN_QUARANTINED - RUN_QUARANTINE_CHANGED - SETUP_FOLDER_MISSING - SKILL_EXISTS - SKILL_FILE_NOT_FOUND - SKILL_FORBIDDEN - SKILL_MALFORMED - SKILL_NOT_FOUND - SKILL_PUBLISH_FORBIDDEN - SKILL_STALE - SKILL_TEAM_UNKNOWN - STANDARD_AGENT_OFF - STANDARD_AGENT_UNAVAILABLE - TASK_AGENT_REVIEW_REQUIRED - TASK_ARCHIVED - TASK_AUTOMATION_DISABLED - TASK_AUTOMATION_UNAVAILABLE - TASK_EXTERNAL_REF_INVALID - TASK_EXTERNAL_STATUS_STALE - TASK_HAS_LIVE_RUN - TASK_HAS_OPEN_SUBTASKS - TASK_LABEL_UNKNOWN - TASK_NOT_FOUND - TASK_NOT_IN_REVIEW - TASK_REVIEW_POLICY_UNAVAILABLE - TASK_STATUS_CONFLICT - TEAM_ACCESS_DENIED - TEAM_INHERITED_FROM_FOLDER - TEAM_NOT_IN_ORG - THREAD_NOT_FOUND - UNAUTHORIZED - UNSUPPORTED_FILE_TYPE - UPLOAD_FILE_MISMATCH - UPLOAD_INTENT_INVALID - UPLOAD_POLICY_REJECTED - UPSTREAM_UNAVAILABLE - URI_TOO_LONG - WEBSITE_DOMAIN_IMMUTABLE - WEBSITE_DOMAIN_INVALID - WEBSITE_DOMAIN_NOT_CRAWLABLE - WEBSITE_DUPLICATE_DOMAIN - WEBSITE_INVALID_LIST_URL - WEBSITE_NOT_FOUND description: The stable refusal code request_id: type: string description: The request id — the same value as the `request-id` and `X-Request-Id` headers securitySchemes: bearerAuth: type: http scheme: bearer description: An organization API key. Create one in Settings → API. Pasted into the explorer on /docs it stays in the page’s memory only and is forgotten on reload — it is never stored.