Reference · Glossary

Anthropic API

Cloud API for **Claude models** — messages API with long context, system prompts, tool use, and vision inputs.

When to use

Long-document analysis, careful reasoning tasks, coding assistants, when Claude fits your eval benchmarks.

When not to

Identical to any API choice — pick based on evals, cost, latency, and compliance, not hype.

Example

client.messages.create(
    model="claude-sonnet-4-20250514",
    max_tokens=1024,
    messages=[{"role": "user", "content": "Summarize this policy."}],
)