> ## Documentation Index
> Fetch the complete documentation index at: https://docs.sailresearch.com/llms.txt
> Use this file to discover all available pages before exploring further.

# API support matrix

> What each Sail inference API supports today, and what's coming soon

Sail provides inference endpoints compatible with the [OpenAI Responses API](https://developers.openai.com/api/reference/resources/responses/methods/create), the [OpenAI Chat Completions API](https://developers.openai.com/api/reference/resources/chat/subresources/completions/methods/create), and the [Anthropic Messages API](https://platform.claude.com/docs/en/api/messages/create).
All three inference APIs accept the same [models](/models) and [completion windows](/completion-windows).

Additionally, Sail offers a [Batch API](#batch-api) for running large numbers of [Responses API](#responses-api) requests efficiently in a single asynchronous job.

| API                     | Endpoint                    | Maturity                            |
| ----------------------- | --------------------------- | ----------------------------------- |
| OpenAI Responses        | `POST /v1/responses`        | <Badge color="green">Stable</Badge> |
| OpenAI Chat Completions | `POST /v1/chat/completions` | <Badge color="green">Stable</Badge> |
| Anthropic Messages      | `POST /v1/messages`         | <Badge color="blue">Beta</Badge>    |
| Batch                   | `POST /v1/batches`          | <Badge color="green">Stable</Badge> |

***

## Responses API

<div className="flex flex-wrap items-center gap-2">
  <Badge color="green">Recommended</Badge>
  <Badge color="blue">OpenAI SDK compatible</Badge>

  <a href="/api-reference/responses-api/create-a-response" className="inline-flex items-center gap-1 rounded-full border border-gray-200 px-2.5 py-1 text-xs font-medium no-underline transition-colors hover:bg-gray-50 dark:border-gray-700 dark:hover:bg-gray-800">
    API reference <span aria-hidden="true">→</span>
  </a>
</div>

### Supported features

| Feature                  | Details                                                                                                                                                                 |
| ------------------------ | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| **Core parameters**      | `model`, `input` (string or message array), `max_output_tokens`, `temperature`, `top_p`, `user`, `prompt_cache_key`                                                     |
| **Instructions**         | `instructions` is prepended to the input as a system message.                                                                                                           |
| **Structured outputs**   | `text.format` with `type: "text"` or `type: "json_schema"`                                                                                                              |
| **Reasoning**            | `reasoning.effort` (`none` / `minimal` / `low` / `medium` / `high` / `xhigh`), `reasoning.generate_summary` (`auto` / `concise` / `detailed`)                           |
| **Function tools**       | `tools` with `type: "function"` — client-side function calling with `name`, `description`, `parameters`, `strict`                                                       |
| **Custom tools**         | `tools` with `type: "custom"`                                                                                                                                           |
| **Tool choice**          | `tool_choice`: `"none"`, `"auto"`, `"required"`, or a specific function/custom tool                                                                                     |
| **Background mode**      | `background: true` returns `202` immediately; poll with `GET /v1/responses/{id}`                                                                                        |
| **Streaming**            | `stream: true` on foreground requests returns Server-Sent Events using OpenAI Responses event names.                                                                    |
| **Prompt cache routing** | `prompt_cache_key` is an optional routing hint for requests that share a large prompt prefix                                                                            |
| **Image input**          | `input_image` content blocks on [multimodal models](/models). Non-multimodal models accept text only.                                                                   |
| **Video input**          | `input_video` content blocks on models that declare video input support. The `video_url` value can be a URL string or an object with `url` and model-specific controls. |
| **Output logprobs**      | `include: ["message.output_text.logprobs"]` returns one logprob per output token (best effort; omitted when unavailable).                                               |

### Not yet supported

| Feature                   | Notes                                                                                                                                                                                                                                                                                                                                                                           |
| ------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| **Conversation chaining** | `previous_response_id` and `conversation` are not supported. Send the full input each request.                                                                                                                                                                                                                                                                                  |
| **Prompt templates**      | The `prompt` parameter is not supported.                                                                                                                                                                                                                                                                                                                                        |
| **Server-side tools**     | `web_search`, `web_search_preview`, and `image_generation` tools are accepted for OpenAI-client compatibility and removed from the request; the model has no such tool to call. `file_search`, `code_interpreter`, `computer_use`, `mcp`, `shell`, and `apply_patch` are not supported.                                                                                         |
| **Multimodal input**      | Audio and file input blocks are not supported. Image and video input are supported on models that declare those input modalities (see above).                                                                                                                                                                                                                                   |
| **Include**               | Accepted for compatibility when it is an array of strings. `reasoning.encrypted_content` is accepted for OpenAI-client compatibility, but reasoning items are returned without encrypted content. Requests that include `web_search_call.action.sources`, `code_interpreter_call.outputs`, `computer_call_output.output.image_url`, or `file_search_call.results` are rejected. |
| **Truncation**            | Only `"disabled"` is accepted. Custom truncation strategies are not supported.                                                                                                                                                                                                                                                                                                  |
| **Parallel tool calls**   | `parallel_tool_calls` is accepted for compatibility. Models decide their own tool-call cadence, so the field has no effect.                                                                                                                                                                                                                                                     |
| **json\_object format**   | `text.format.type: "json_object"` is not supported. Use `"json_schema"` instead.                                                                                                                                                                                                                                                                                                |
| **Service tier**          | Only `"auto"` is accepted. Use `metadata.completion_window` to control response timing instead.                                                                                                                                                                                                                                                                                 |
| **Delete / cancel**       | `DELETE /v1/responses/{id}` and cancel endpoints are not implemented.                                                                                                                                                                                                                                                                                                           |

***

## Chat Completions API

<div className="flex flex-wrap items-center gap-2">
  <Badge color="blue">OpenAI SDK compatible</Badge>

  <a href="/api-reference/chat-completions-api/create-a-chat-completion" className="inline-flex items-center gap-1 rounded-full border border-gray-200 px-2.5 py-1 text-xs font-medium no-underline transition-colors hover:bg-gray-50 dark:border-gray-700 dark:hover:bg-gray-800">
    API reference <span aria-hidden="true">→</span>
  </a>
</div>

### Supported features

| Feature                  | Details                                                                                                                                                                                                                  |
| ------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
| **Core parameters**      | `model`, `messages`, `max_completion_tokens`, `temperature`, `top_p`, `user`, `prompt_cache_key`                                                                                                                         |
| **Message roles**        | `system`, `user`, `assistant`, `tool`, `function` (deprecated), `developer`                                                                                                                                              |
| **Structured outputs**   | `response_format` with `type: "text"`, `"json_object"`, or `"json_schema"`                                                                                                                                               |
| **Reasoning**            | `reasoning_effort` (`none` / `minimal` / `low` / `medium` / `high` / `xhigh`)                                                                                                                                            |
| **Function tools**       | `tools` with `type: "function"` — standard `{type, function: {name, description, parameters, strict}}` format                                                                                                            |
| **Custom tools**         | `tools` with `type: "custom"`                                                                                                                                                                                            |
| **Tool choice**          | `tool_choice`: `"none"`, `"auto"`, `"required"`, or a specific function/custom tool                                                                                                                                      |
| **Parallel tool calls**  | `parallel_tool_calls` is passed through                                                                                                                                                                                  |
| **Metadata**             | `metadata` with string key-value pairs, including [`completion_window`](/completion-windows) and [`completion_webhook`](/webhooks)                                                                                       |
| **Prompt cache routing** | `prompt_cache_key` is an optional routing hint for requests that share a large prompt prefix                                                                                                                             |
| **Streaming**            | `stream: true` returns Server-Sent Events (`chat.completion.chunk`); `stream_options.include_usage` adds a final usage chunk. Reasoning is streamed as `reasoning_content` deltas and tool calls are emitted atomically. |
| **Image input**          | `image_url` content parts on [multimodal models](/models). Non-multimodal models accept text only.                                                                                                                       |
| **Video input**          | `video_url` content parts on models that declare video input support. URL objects and model-specific controls such as `num_frames` and `fps` are preserved.                                                              |

### Not yet supported

| Feature                | Notes                                                                                                                                                 |
| ---------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------- |
| **Multiple choices**   | `n` must be `1`.                                                                                                                                      |
| **Multimodal content** | Audio (`input_audio`) content parts are not supported. Image and video input are supported on models that declare those input modalities (see above). |
| **Sampling controls**  | `frequency_penalty`, `presence_penalty`, `logit_bias`, `stop`, `seed`, `top_logprobs`, `logprobs`, `verbosity` are not supported.                     |
| **Audio modality**     | `audio` and `modalities: ["audio"]` are not supported.                                                                                                |
| **Predicted output**   | `prediction` is not supported.                                                                                                                        |
| **Web search**         | `web_search_options` is not supported.                                                                                                                |
| **Service tier**       | Only `"auto"` is accepted.                                                                                                                            |
| **CRUD endpoints**     | `GET`, `POST`, `DELETE` on stored completions are not implemented.                                                                                    |
| **Deprecated fields**  | `max_tokens`, `functions`, `function_call` are rejected. Use their modern replacements.                                                               |

### Response notes

* Responses always contain exactly one choice (`n=1`).
* `finish_reason` reflects the provider result when available, including
  `"stop"`, `"tool_calls"`, `"length"`, and `"content_filter"`.
* `system_fingerprint` and `service_tier` are not included in responses.
* `logprobs` is always `null`.

***

## Messages API

<div className="flex flex-wrap items-center gap-2">
  <Badge color="blue">Anthropic Messages format</Badge>
  <Badge color="blue">Anthropic SDK compatible</Badge>

  <a href="/api-reference/messages-api/create-an-anthropic-message" className="inline-flex items-center gap-1 rounded-full border border-gray-200 px-2.5 py-1 text-xs font-medium no-underline transition-colors hover:bg-gray-50 dark:border-gray-700 dark:hover:bg-gray-800">
    API reference <span aria-hidden="true">→</span>
  </a>
</div>

<Note>
  The Messages API is Anthropic-compatible for agentic use: system prompts, tool
  calling, and streaming (SSE) are supported. Prompt caching (`cache_control`)
  is accepted but not yet applied.
</Note>

### Supported features

| Feature                | Details                                                                                                                                                                                                                                           |
| ---------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| **Core parameters**    | `model`, `max_tokens`, `messages`                                                                                                                                                                                                                 |
| **System prompt**      | The top-level `system` parameter (string or array of text blocks)                                                                                                                                                                                 |
| **Sampling**           | `temperature` (0–1), `top_p` (0–1)                                                                                                                                                                                                                |
| **Tools**              | `tools` and `tool_choice` (`"auto"`, `"any"`, `"tool"`, `"none"`). The model calls tools; responses include `tool_use` blocks, and text `tool_result` blocks round-trip. Tool results with `is_error: true` retain an error signal for the model. |
| **Extended thinking**  | `thinking` is translated to the model's reasoning                                                                                                                                                                                                 |
| **Streaming**          | `stream: true` returns Anthropic Server-Sent Events (`message_start`, `content_block_delta`, `message_stop`, …) after generation completes. It is not incremental token delivery.                                                                 |
| **Structured outputs** | `output_config.format` with `type: "json_schema"`                                                                                                                                                                                                 |
| **Metadata**           | `metadata` with string key-value pairs, including [`completion_window`](/completion-windows) and [`completion_webhook`](/webhooks)                                                                                                                |
| **Image input**        | `image` content blocks on [multimodal models](/models). Non-multimodal models accept text only.                                                                                                                                                   |
| **Request routing**    | `routing.allowed_countries: ["US"]` restricts that request to United States capacity                                                                                                                                                              |
| **Voyage attribution** | `X-Sail-Voyage-Id`, with optional span and agent headers, associates the model call with a [Voyage](/voyages-sdk)                                                                                                                                 |
| **Token counting**     | `POST /v1/messages/count_tokens` returns the request's input token count without running the model                                                                                                                                                |

### Not yet supported

| Feature                | Notes                                                                                                                                               |
| ---------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------- |
| **Prompt caching**     | `cache_control` on content blocks is accepted but ignored (no cache read/write).                                                                    |
| **Stop sequences**     | `stop_sequences` is not supported.                                                                                                                  |
| **Top-K sampling**     | `top_k` is not supported.                                                                                                                           |
| **Multimodal content** | Document content blocks are not supported. Image input is supported on multimodal models (see above).                                               |
| **Tool result images** | Images inside `tool_result` are replaced with `[Image omitted: Sail does not yet support images inside tool results.]`. The request still succeeds. |
| **Redacted thinking**  | Replayed `redacted_thinking` blocks are accepted so conversations can continue, but the opaque reasoning is not forwarded to the model.             |
| **Service tier**       | `service_tier` is not supported.                                                                                                                    |
| **Inference geo**      | `inference_geo` is not supported.                                                                                                                   |
| **Batches**            | `POST /v1/messages/batches` and related endpoints are not implemented.                                                                              |

### Response notes

* `stop_reason` reflects the outcome. Sail returns `"end_turn"` normally,
  `"tool_use"` for tool calls, `"max_tokens"` for token limits, and
  `"refusal"` when the provider reports a refusal. Sail returns
  `"model_context_window_exceeded"` when the provider reports that the
  model's context window was exceeded.
* Responses contain `text` content blocks, plus `tool_use` blocks when the model calls a tool.
* Cache-related usage fields (`cache_creation_input_tokens`, `cache_read_input_tokens`) are not included (prompt caching isn't applied yet).
* Thinking output does not include an Anthropic cryptographic signature.
  `thinking.budget_tokens` is approximated as medium reasoning effort unless
  `output_config.effort` provides an explicit effort.
* When reasoning is present, Messages content begins with a `thinking` block
  before the text block. Select content by block type rather than assuming
  `content[0]` is text. The Chat Completions response exposes the same reasoning
  through `reasoning_content`.
* Token counting applies the same replay-block policy as message creation:
  redacted thinking is omitted and tool-result images count as the replacement
  text marker.
* Non-streaming requests wait for up to nine minutes. If generation is still
  running, Sail returns a `408 timeout_error` and includes the response ID in
  `X-Sail-Message-Id`. Sail also returns `X-Should-Retry: false` so Anthropic
  SDKs do not create a second task. The original task continues. Retrieve it with
  `GET /v1/messages/{id}`, or use `stream: true` for long-running requests.
  Streaming requests use heartbeats and remain connected for up to 20 minutes.
  If that wait expires, the stream emits a timeout error with the response ID.
  The task continues and remains retrievable with `GET /v1/messages/{id}`.

### Compatibility notes

* Sail accepts both the Anthropic `x-api-key` header and
  `Authorization: Bearer <key>`. If both are present, `Authorization` takes
  precedence.

<CodeGroup>
  ```python Python theme={null}
  from anthropic import Anthropic

  client = Anthropic(
      api_key="YOUR_SAIL_API_KEY",
      base_url="https://api.sailresearch.com",
  )
  ```

  ```typescript TypeScript theme={null}
  import Anthropic from "@anthropic-ai/sdk";

  const client = new Anthropic({
    apiKey: process.env.SAIL_API_KEY,
    baseURL: "https://api.sailresearch.com",
  });
  ```
</CodeGroup>

* The Anthropic Python and TypeScript SDKs type `metadata` with only `user_id`.
  Sail also accepts `completion_window`. Keep the additional cast or type
  assertion scoped to the `metadata` value:

```python theme={null}
from typing import cast

from anthropic.types import MetadataParam

metadata = cast(MetadataParam, {"completion_window": "standard"})
```

```typescript theme={null}
metadata: {
  completion_window: "standard",
} as Anthropic.Messages.Metadata & { completion_window: string },
```

* The `anthropic-version` header is not required or checked.
* Errors use the Anthropic envelope
  `{"type":"error","error":{"type":"...","message":"..."},"request_id":"..."}`
  and Anthropic error types such as `invalid_request_error`,
  `rate_limit_error`, and `overloaded_error`.

***

## Batch API

The Batch API runs large numbers of [Responses API](#responses-api) requests asynchronously. Every item targets `/v1/responses` — batching `/v1/chat/completions` or `/v1/messages` is not currently supported. You can submit up to 100,000 requests in a single `POST /v1/batches` call, then poll `GET /v1/batches/{id}` for status and fetch each result by `custom_id`.

See [Sending Requests at Scale](/requests_at_scale) for the end-to-end workflow and the [Batch API reference](/api-reference/batches-api/create-a-batch) for the request and response schemas.

***

## Cross-API behavior

These behaviors apply across the inference API surfaces:

* **Streaming:** The Chat Completions API supports `stream: true`, returning Server-Sent Events (`chat.completion.chunk`); set `stream_options.include_usage` for a final usage chunk. The Messages API supports `stream: true`, returning Anthropic SSE events after generation completes rather than incremental token delivery. The Responses API supports foreground `stream: true`, returning OpenAI Responses SSE events. `background: true` requests return `202` immediately and cannot be streamed; use polling or [webhooks](/webhooks) for long-running background work.
* **Completion windows** — set `metadata.completion_window` to `"asap"`, `"priority"`, `"standard"`, or `"flex"` to control scheduling and pricing. See [Completion Windows](/completion-windows) and [Pricing](/pricing).
* **Webhooks** — set `metadata.completion_webhook` to receive a POST when processing finishes. See [Webhooks](/webhooks).
* **Response storage** — `store: false` is accepted for OpenAI compatibility, but does not change Sail's normal temporary request/response storage for processing, retries, polling, and idempotency. Customer Data remains governed by Sail's DPA retention and deletion terms.
