xAI has introduced a new feature called Priority Processing for its API, designed to provide lower latency for requests. This functionality allows developers to specify a higher scheduling priority for their API calls, which can result in reduced time-to-first-token (TTFT) and faster inter-token latency (ITL).
This feature is particularly beneficial during periods of high demand on the xAI API. It does not require capacity reservations or advance provisioning.
Key Points
- Priority Processing enables higher scheduling priority for xAI API requests.
- This typically leads to lower time-to-first-token (TTFT) and faster inter-token latency (ITL).
- The feature is activated by adding
service_tier: "priority"to the request body. - It is supported on text inference endpoints, specifically Chat Completions and Responses.
- The API response includes a
service_tierfield to confirm if priority was granted. - Priority requests are billed at a premium per-token rate.
- Cache discounts still apply to cached input tokens before the premium rate is applied.
Context
According to xAI, when priority capacity is available, requests with the service_tier: "priority" setting are scheduled ahead of standard traffic. The response from the API will always include a service_tier field, allowing developers to verify that priority processing was applied.
Why It Matters
This new capability offers developers a method to optimize the responsiveness of their applications, especially those requiring minimal latency for text inference. The ability to prioritize requests without pre-booking capacity provides flexibility for managing performance during fluctuating demand.
What To Do
- Add
service_tier: "priority"to the request body for Chat Completions and Responses endpoints. - Check the
service_tierfield in the API response to confirm priority processing was applied. - Review the xAI Pricing page for current per-model rates and the exact priority premium.
- Note that cache discounts still apply to cached input tokens before the premium rate.
