Sozdai LogoDocs
문서/LLM

Grok 4.5

500K context프롬프트 캐싱사고
POSThttps://api.foxwire.ai/v1/chat/completions

#Pricing Summary

#요청 예시

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.5",
    "messages": [{"role": "user", "content": "Hello"}]
  }'

#응답 예시

표준 OpenAI 호환 채팅 컴플리션 객체입니다. model 필드는 요청한 이름으로 정규화됩니다.

json
{
  "id": "chatcmpl-abc123",
  "object": "chat.completion",
  "model": "grok-4.5",
  "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.

#프롬프트 캐싱

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.

#사고

지원 모델에서는 reasoning_effort(low / medium / high)를 추가하세요. 사고 내용은 응답의 reasoning_content 필드로 반환되며, 사고 토큰은 출력 요금으로 청구됩니다.

json
{
  "model": "grok-4.5",
  "max_tokens": 2048,
  "reasoning_effort": "high",
  "messages": [{ "role": "user", "content": "your question" }]
}