claude-api · Claude API Reference

The authoritative reference skill for building Claude-powered applications: model IDs and pricing, request parameters, streaming, tool use, MCP, agents, prompt caching, token counting, and model migration — all verified against the skill's bundled docs, never written from memory.
Covers Python, TypeScript, Java, Go, Ruby, C#, PHP SDKs plus raw cURL, with built-in subcommand workflows: migrate, prompt-audit, upgrade, cost-optimize, and build-eval.
Example invocation: "Write a Python streaming chat example using the Claude API."
Full brief
Positioning
claude-api is a reference-manual skill for building LLM applications with the Claude API / Anthropic SDKs: it answers "how do I write this call" and "how do I migrate, audit, or optimize it." Its core discipline is never writing SDK usage from memory — function names, parameters, and model IDs always come from the skill's per-language docs; stale recall gets verified first.
Core capabilities
- Models & pricing: built-in model table (default
claude-opus-5-5; per-model context windows and input/output prices, e.g. Opus 5.5 at $4/$20 per million tokens); live capability lookup via the Models API. - API drift tables: quick-reference for frequently changed surfaces (thinking config, tool type versions, parameter naming) — check before writing code.
- Surface selection: four tiers — single call / workflow / manual loop / Tool Runner / Managed Agents — chosen by who supplies the harness and who hosts the deployment.
- Per-language docs: Python, TypeScript, Java, Go, Ruby, C#, PHP, and raw cURL/HTTP, each with its own reference directory.
- Subcommand workflows:
migrate(model migration),prompt-audit(prompt auditing),upgrade(major SDK upgrades),cost-optimize(cost reduction),build-eval(eval set construction),hillclimb(iterative improvement). - Auth resolution: multi-source credential resolution from
ANTHROPIC_API_KEYtoant auth loginprofiles.
Workflow
- Scan the target file or request; confirm the language and provider (stops to confirm on non-Anthropic projects)
- Read the matching language reference
- Write the call code per the docs; compile/run to verify
- Subcommand mode: recognize the subcommand, then follow its dedicated guide step by step
Inputs & outputs
| Input | Notes |
|---|---|
| Requirement or target file | Required |
| Language | Inferred; asked when unclear |
| Subcommand | Optional — e.g. migrate, cost-optimize |
Output: SDK call code, migration/audit/cost-optimization reports.
Boundaries with adjacent skills
- mcp-builder: a guide to building MCP servers (producing external tools for LLMs).
- claude-api (this): the reference manual for building applications with the Claude API (consuming LLM capabilities). Complementary: an MCP server is one tool source a claude-api app can connect to.
Fit
- Wiring the Claude API into a new project with verified multi-language SDK usage
- Migrating existing code to a newer model (breaking-change checklists)
- Prompt audits: cleaning up patterns written for older models
- Cost optimization: ranked savings levers across caching, effort levels, and model choice
Before you start
- Bring your own Anthropic API key (
ANTHROPIC_API_KEYenv var) or sign in withant auth login; if no key is set, runant auth statusfirst to confirm the credential source. - API calls are metered; model prices are in the skill's pricing table.
build-evalandhillclimbspend real tokens — confirm the budget before running.
claude-api is part of the Aiglade Skill library. Invoke it from the Aiglade chat box in plain language.