Docs/LLM
Grok 4.6
500K contextMise en cache des promptsRéflexion
POST
https://api.foxwire.ai/v1/chat/completions#Pricing Summary
#Exemple de requête
Execute completions using standard OpenAI SDK formats by pointing base endpoints here.
bash
curl https://api.foxwire.ai/v1/chat/completions \
-H "Authorization: Bearer $CORRY_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "grok-4.6",
"messages": [{"role": "user", "content": "Hello"}]
}'#Exemple de réponse
Un objet de complétion de chat standard compatible OpenAI. Le champ model est normalisé selon le nom que vous avez demandé.
json
{
"id": "chatcmpl-abc123",
"object": "chat.completion",
"model": "grok-4.6",
"choices": [
{
"index": 0,
"message": { "role": "assistant", "content": "Hello! How can I help you today?" },
"finish_reason": "stop"
}
],
"usage": { "prompt_tokens": 12, "completion_tokens": 9, "total_tokens": 21, "cost": 0.000234, "currency": "USD" }
}Cost field
usage.cost is the amount charged for this call (in USD); in streaming it arrives on the final chunk that carries usage. OpenAI SDKs ignore this extra field.
#Mise en cache des prompts
This model uses automatic (implicit) caching — repeated prompt prefixes are cached upstream automatically and billed at a lower rate, with no parameters needed (no cache_control). Keep long, stable context (system prompt, tools) at the start of your messages to get hits.
Automatic — nothing to do
Cache hits show up in the returned usage (cached tokens) and your cost drops automatically.
#Réflexion
Pour les modèles qui le prennent en charge, ajoutez reasoning_effort (low / medium / high). La réflexion est renvoyée dans le champ reasoning_content de la réponse ; les tokens de réflexion sont facturés au tarif de sortie.
json
{
"model": "grok-4.6",
"max_tokens": 2048,
"reasoning_effort": "high",
"messages": [{ "role": "user", "content": "your question" }]
}