• Anthropic's model family — flagship Fable 5, balanced Sonnet, fast Haiku
• Strongest at coding, agents, and long documents (200K context)
• Use prompt caching + the Batch API to cut costs dramatically
Get an API key from the Anthropic Console, install the SDK (`npm i @anthropic-ai/sdk` or `pip install anthropic`), and call the Messages API. Set the key via the ANTHROPIC_API_KEY environment variable — never hardcode it.
Use XML-style tags to separate instructions from data (<instructions>, <document>). Put persistent rules in the system prompt. For structured output, show the exact JSON shape or prefill the assistant turn with `{`.
Prompt caching: mark your stable prefix (system prompt, examples, docs) — cache reads cost ~10% of normal input. Batch API: 50% off for async jobs with results within 24h. Together they routinely cut bills 60–80%.