Compressed context वाला Fable 5
यह variant लंबी बातचीत के पुराने भाग को model call से पहले छोटा करता है। इसका अलग model ID है और यह केवल Anthropic format उपयोग करता है।
- Claude Code या Anthropic SDK में compressed public ID चुनें।
- लंबे session में input tokens बच सकते हैं; छोटे में हमेशा नहीं।
- Cache साथ उपयोग हो सकता है; usage में परिणाम तुलना करें।
पूरे उदाहरण
मूल गाइड के सभी चलने योग्य उदाहरण नीचे सुरक्षित रखे गए हैं। केवल अपने टूल और ऑपरेटिंग सिस्टम से संबंधित ब्लॉक चलाएँ।
json
"ANTHROPIC_MODEL": "anthropic/claude-fable-5-compressed-context"bash
curl https://nordrouter.com/v1/messages \
-H "x-api-key: sk-nr-YOUR-KEY" \
-H "anthropic-version: 2023-06-01" \
-H "content-type: application/json" \
-d '{
"model": "anthropic/claude-fable-5-compressed-context",
"max_tokens": 1024,
"messages": [{ "role": "user", "content": "Hello!" }]
}'python
from anthropic import Anthropic
client = Anthropic(base_url="https://nordrouter.com", api_key="sk-nr-YOUR-KEY")
resp = client.messages.create(
model="anthropic/claude-fable-5-compressed-context",
max_tokens=1024,
messages=[{"role": "user", "content": "Hello!"}],
)
print(resp.content[0].text)आधिकारिक दस्तावेज़ और लिंक
| prompt_tokens | Input cost | |
|---|---|---|
claude-fable-5 | 5,053 | ~$0.0078 |
claude-fable-5-compressed-context | 1,287 | ~$0.0020 |
| Scenario | Model |
|---|---|
| Agentic coding, long chats, large documents in context | claude-fable-5-compressed-context — maximum savings |
| Verbatim quoting/auditing of huge texts, critical production pipelines | claude-fable-5 — the regular mode |
| Short requests without long context | No difference — use the regular one |
संबंधित गाइड
पहले न्यूनतम text request से कनेक्शन जाँचें, फिर streaming, tool calls, images और दूसरी advanced सुविधाएँ जोड़ें। API key को public code या browser frontend में कभी न रखें।