Claude on WholeTech network
Build on top

Claude API shipping

Direct programmatic access to the models. SDKs for Python, TypeScript, Java, Go, Ruby, and .NET. Bedrock and Vertex if you need cloud-native deployment.

01 — When to use it

Reach for the API when…

If you just want to do a thing once, claude.ai is faster.

02 — Your first call

Five minutes, end to end.

  1. Get a key at console.anthropic.com. Add a small balance ($5 is plenty to learn).
  2. Save it as an env var so it never lands in code: export ANTHROPIC_API_KEY=sk-ant-… (Mac/Linux) or setx ANTHROPIC_API_KEY "sk-ant-…" (Windows).
  3. Install the SDK: pip install anthropic or npm install @anthropic-ai/sdk.
  4. Send a message:
import anthropic
client = anthropic.Anthropic()
msg = client.messages.create(
    model="claude-sonnet-4-6",
    max_tokens=1024,
    messages=[{"role": "user", "content": "Hello, Claude."}],
)
print(msg.content[0].text)
03 — The message shape

Three things to know.

Pick the model with model="claude-…". As of May 2026 the latest 4.x family includes Opus 4.7, Sonnet 4.6, Haiku 4.5. Default to Sonnet for cost-quality balance.

04 — Capabilities

What you turn on.

Tool Use

Define functions in JSON schema. Claude decides when to call them; you execute and return.

Prompt Caching

Mark long, repeated context (system prompt, big documents) as cacheable. ~90% cost reduction on cache hits.

Extended Thinking

Give Claude a thinking budget. Better answers on hard reasoning.

Citations

Pass documents in; Claude grounds its answer with span-level citations.

Vision

Drop images in messages. Claude reads them as content.

Files API

Upload once, reference by ID across calls. Pairs with caching for big PDFs.

Batch API

Half-price async lane. Submit a batch, pick it up later. Great for backfills.

Computer Use

Screenshots in, mouse/keyboard out. Drives apps that have no API.

05 — Best practices

Habits that pay back fast.

Workspaces in console.anthropic.com let you scope keys per project, set spend caps, and watch usage. Use them.
06 — Cloud-native paths

If you live on AWS or GCP.