Use priority processing
Use priority processing
Add service_tier: "priority" on a Chat Completions or Responses request body for higher scheduling priority (typically lower TTFT and faster inter-token latency under load). Values are "default" (same as omitting the field) or "priority".
The response includes service_tier confirming which tier ran. You are only billed at the priority rate when the response says "priority". Priority is a premium per-token rate; cache discounts apply before the multiplier.
Responses curl
curl https://api.x.ai/v1/responses \
-H "Authorization: Bearer $XAI_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "grok-4.6",
"input": "Explain the Riemann hypothesis in one paragraph.",
"service_tier": "priority"
}'
OpenAI SDK
import os
from openai import OpenAI
client = OpenAI(
api_key=os.getenv("XAI_API_KEY"),
base_url="https://api.x.ai/v1",
)
response = client.responses.create(
model="grok-4.6",
input="Explain the Riemann hypothesis in one paragraph.",
service_tier="priority",
)
print(response.output_text)
print(f"Tier used: {response.service_tier}")
xAI SDK
import os
from xai_sdk import Client
from xai_sdk.chat import user
client = Client(api_key=os.getenv("XAI_API_KEY"))
chat = client.chat.create(
model="grok-4.6",
service_tier="priority",
)
chat.append(user("Explain the Riemann hypothesis in one paragraph."))
response = chat.sample()
print(response.content)
print(f"Tier used: {response.service_tier}")
Best for latency-sensitive user-facing paths. Background, eval, and bulk work fit the Batch API better.
Pitfalls
- Check
service_tieron every response. Priority capacity is not guaranteed; a"default"reply means default billing. - Log the returned tier next to your latency metrics so you can see how often priority actually lands.
- Combine with prompt caching. Cached input tokens are discounted before the priority multiplier.
- Console API credits are separate from SuperGrok's weekly pool on grok.com.