balanced or flex completion windows to cut token costs drastically, for work that is latency tolerant.
Completion windows can be specified on a per-request basis. Long-horizon agents can make use of all three depending on the task at hand.
Completion windows at a glance
Not every core model supports every completion window yet. Check Pricing for current per-model availability.
Completion window details
asap
asap is the default, low-latency path for Sail’s core models. Use it when a person is
waiting or when one agent turn blocks the next.
GLM 5.2 FP8 TTFT & TPS
GLM 5.2 FP8 TTFT & TPS
For GLM-5.2 FP8 requests using
asap, Sail targets:- Average time to first token (TTFT) under 10 seconds
- P90 TTFT under
10 + (input tokens / 1,000)seconds - Average generation speed of about 20 to 30 tokens per second (TPS)
asap and are not an SLA.balanced
balanced gives Sail more time to place work on efficient capacity, greatly
lowering token costs for long-horizon background agents and pipelines.
flex
flex gives Sail the widest scheduling window and offers the lowest available
token prices. It has no TTFT or TPS target. Common use cases include batch jobs, evals, and offline processing.
For individual requests, flex requires the Responses API
with background=True. Batch API requests can also use
flex.
flex with Chat Completions and Messages
flex with Chat Completions and Messages
Chat Completions and Messages technically accept
flex as a completion window,
but both wait synchronously and may time out before the request finishes.
Therefore, we recommend using the Responses API or Batch API instead.Retries and timeouts
Retries and timeouts
flex requests can spend longer queued than other completion windows. Once Sail
accepts a request, Sail keeps processing it unless it reaches a terminal status.
A client-side polling timeout does not cancel its background work. Keep polling
the response instead of creating a duplicate request. If submission fails
ambiguously, retry with the same Idempotency-Key so Sail returns the existing
work instead of creating a duplicate. If the response reaches failed, inspect
its error before deciding whether to submit a new request.How to set completion windows
Setmetadata.completion_window to asap, balanced, or flex:
flex, set background=true when using the Responses API. For reliable flex requests, use Responses API background mode or Batch instead of waiting synchronously through Chat Completions or Messages.
Default behavior
For inference requests for core models, the default behavior (when nocompletion_window is specified) is low-latency inference (asap).
The exceptions to this default behavior are:
- Batch inference requests, which default to
balancedfor core models. - LoRA requests, which default to
balancedfor core models.
flex for all inference requests, including Batch and LoRA. Flex-only models require background requests (see examples above).