Skip to main content
Sail provides inference endpoints compatible with the OpenAI Responses API, the OpenAI Chat Completions API, and the Anthropic Messages API. All three inference APIs accept the same models and completion windows. Additionally, Sail offers a Batch API for running large numbers of Responses API requests efficiently in a single asynchronous job.

Responses API

RecommendedOpenAI SDK compatibleAPI reference

Supported features

Not yet supported


Chat Completions API

OpenAI SDK compatibleAPI reference

Supported features

Not yet supported

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

Anthropic Messages formatAnthropic SDK compatibleAPI reference
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.

Supported features

Not yet supported

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.
  • 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:
  • 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 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 for the end-to-end workflow and the Batch API reference 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 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 and Pricing.
  • Webhooks — set metadata.completion_webhook to receive a POST when processing finishes. See Webhooks.
  • Response storagestore: 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.