Completion windows at a glance
A completion window sets how much wall-clock time per turn you’re willing to trade for a lower rate. Valar runs four. Choose one withmetadata.completion_window (or the X-Valar-Completion-Window header), or leave it off and get standard. Each is detailed in Completion windows below.
The three modes
Realtime
A normal synchronous request that returns the result immediately. You send the call withoutbackground and read the output from the response. This is the lowest-latency path, finishing in seconds, and it runs on the Now completion window.
Realtime works across the Responses API (/v1/responses), Chat Completions (/v1/chat/completions). Use it for interactive chat, prototyping, and human-in-the-loop steps.
Async
Setbackground=True on the Responses API. The create call returns a response id immediately, then you poll the retrieve endpoint or receive a webhook when the work finishes. On the Standard window a turn takes at most a minute and is usually much faster, so async clears high throughput at lower cost.
Async jobs usually run on the Standard window (standard), the lower-cost default. Use async for agent loops, background jobs, and large fan-out. See Sending requests at scale.
Batch (Private Preview)
Batch lets you submit many requests at once and retrieve the results when the set completes - the lowest cost and highest throughput, with the longest turnaround. It runs on the Standard window and suits large datasets, evals, and offline transforms. For the end-to-end workflow, see Sending requests at scale.Compare the modes
Completion windows
A completion window tells Valar how much wall-clock time per turn your workload can tolerate, and you pay less the more time you give it. There are four, from fastest to cheapest:
Realtime uses the Now window; async work uses Priority for a firm ~10 s deadline, Standard for lower cost, or Flex for the cheapest background runs. Each model-and-window price pairing is on the Pricing page.
Set the window
Passmetadata.completion_window on the request:
X-Valar-Completion-Window header to the same value. This is useful when a client owns the request body on your behalf (for example, the Claude Agent SDK) and body metadata isn’t available. The body field takes precedence when both are set.
Accepted values are "asap" (Now), "priority", "standard", and "flex".
How each tier behaves
Now runs immediately on the fastest available hardware in a latency-optimized setup, at the higher on-demand rate. Use it for realtime, interactive requests where a person or another system is waiting on the result. Priority is a durable async window that targets a tight ~10-second turn-time ceiling - a firm, low-latency completion target for agent loops - priced about 25% below the Now rate. Like the other async windows, request it explicitly withbackground=True.
Standard is the default wherever a model supports it. It runs on Valar’s maximum-efficiency serving stack with a turn-time ceiling of one minute - and in practice most turns complete much faster than that. Most of Valar’s published prices reference this window, and it’s the right default for async agent loops and batch jobs.
Flex is the lowest-cost tier, for background bulk work that can tolerate a little extra latency. It targets a turn-time ceiling of about five minutes and requires background=True - it isn’t available for realtime or synchronous calls. Flex is always explicit: Valar never selects it for you, so request it with metadata.completion_window: "flex" when you want it.
Default behavior
Leavecompletion_window off and the request defaults to standard when the model supports it; otherwise it falls back to the Now tier. Priority and Flex are never selected automatically - set either explicitly when you want it.
Next steps
Quickstart
Send your first request with an OpenAI-compatible client.
Sending requests at scale
Fan out async and batch work across many requests.