Sozdai LogoDocs
Doku/LLM

Qwen3.8 Max

1M contextPrompt-CachingDenken
POSThttps://api.foxwire.ai/v1/chat/completions

#Pricing Summary

#Beispielanfrage

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

#Antwortbeispiel

Ein standardmäßiges OpenAI-kompatibles Chat-Completion-Objekt. Das model-Feld wird auf den von Ihnen angeforderten Namen normalisiert.

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

#Prompt-Caching

Bei cache-fähigen Modellen setzen Sie den langen statischen Inhalt (System, Wissensbasis) an den Anfang und fügen einen Cache-Haltepunkt hinzu. Zwischengespeicherte Teile können nur 1/10 kosten. Cache-Treffer werden im usage-Feld der Antwort ausgewiesen.

json
{
  "model": "qwen3.8-max",
  "messages": [
    {
      "role": "system",
      "content": [
        { "type": "text", "text": "( long static context ... )", "cache_control": { "type": "ephemeral" } }
      ]
    },
    { "role": "user", "content": "your question" }
  ]
}

Prompt Caching Tip

Prompt caching matches request prefixes exactly. Make sure long contexts (e.g. system instructions, developer tools) appear at the start of your message list.

#Denken

Bei Modellen, die dies unterstützen, fügen Sie reasoning_effort hinzu (low / medium / high). Das Denken wird im Feld reasoning_content der Antwort zurückgegeben; Denk-Token werden zum Ausgabetarif abgerechnet.

json
{
  "model": "qwen3.8-max",
  "max_tokens": 2048,
  "reasoning_effort": "high",
  "messages": [{ "role": "user", "content": "your question" }]
}