The same models and completion windows work across all three inference surfaces. The Batch API layers on top: it wraps a large set of Responses API calls into one asynchronous job.
Behavior shared across every API
Before the per-API detail, a few rules hold no matter which surface you call:- Streaming is available on Chat Completions and Messages. Pass
stream: trueand you get Server-Sent Events (chat.completion.chunkon Chat Completions, Anthropic-style events on Messages); addstream_options.include_usageon Chat Completions for a closing usage chunk. The Responses API rejectsstream: true. For long jobs, usebackground: trueon the Responses API and poll or wait on webhooks. - Completion windows steer scheduling and price. Set
metadata.completion_window(or theX-Valar-Completion-Windowheader) to"asap"(the Now tier),"priority","standard", or"flex"(background only). See Completion windows and Pricing. - Webhooks fire on completion. Set
metadata.completion_webhookto receive a POST when processing finishes. See Webhooks. - Responses are always stored.
store: falseis unsupported.
Inference APIs
Each accordion below lists what the API accepts and what it rejects. Open the one that matches the SDK you’re using.Responses API - POST /v1/responses
Responses API - POST /v1/responses
This is the surface we recommend reaching for first.Supported
Not yet supported
Chat Completions API - POST /v1/chat/completions
Chat Completions API - POST /v1/chat/completions
This surface streams
chat.completion.chunk events.SupportedNot yet supported
What comes back
- A response always carries exactly one choice (
n=1). finish_reasonis either"stop"or"tool_calls"- values such as"length"and"content_filter"are never returned.- Neither
system_fingerprintnorservice_tierappears in responses. logprobsis alwaysnull.
Messages API - POST /v1/messages
Messages API - POST /v1/messages
Valar’s Anthropic-compatible surface. The Anthropic Python SDK and the Claude Agent SDK work against it with a base URL and key change.SupportedThe
Not yet supported
What comes back
stop_reasonisend_turn,tool_use, ormax_tokens. (A run halted on astop_sequencesmatch comes back asend_turn, notstop_sequence.)- The response content is one or more blocks:
text,thinking, andtool_use. usageincludesinput_tokens,output_tokens,cache_read_input_tokens, andcache_creation_input_tokens.
Authorization: Bearer <key> (the OpenAI convention) and the Anthropic x-api-key: <key> header. With the Anthropic SDK, either auth_token or api_key works:anthropic-version header is neither required nor inspected, and errors come back in the OpenAI-style error envelope format. See Anthropic SDK & Claude Agent SDK for end-to-end examples.Batch API
The Batch API runs large volumes of Responses API requests asynchronously. Every entry targets/v1/responses - you can’t batch /v1/chat/completions or /v1/messages today. One POST /v1/batches call takes up to 100,000 requests; you then poll GET /v1/batches/{id} for status and fetch each result by its custom_id.
For the end-to-end workflow, see Sending Requests at Scale; for the request and response schemas, see the Batch API reference.