AI & Agents

Claude Developer Guide: API, Console, SDKs, and Building with Claude

Anthropic's Claude developer platform spans nine APIs, seven official SDKs, a CLI, and a managed agents framework. Most tutorials stop at a basic Python quickstart and never cover batch processing (50% cost savings) or prompt caching (90% input cost reduction). This guide walks the full stack from Console setup to production deployment.

Fast.io Editorial Team 12 min read
AI agent sharing workspace with file collaboration tools

What the Claude Developer Platform Includes

Anthropic's Message Batches API cuts inference costs by 50% on any Claude model, and prompt caching reduces input token costs by 90%. Both features ship as production-grade endpoints documented in the official API reference at platform.claude.com. Yet most Claude developer guides never mention them. They stop after a single synchronous Messages API call and move on.

The full platform is larger than that first tutorial suggests. At the API layer, four endpoints are generally available: Messages (conversational interactions), Message Batches (asynchronous bulk processing), Token Counting (pre-call cost estimation), and Models (listing available models and their capabilities). Five more are in beta: Files (upload and reuse documents across calls), Skills (custom agent capabilities), Agents (reusable agent configurations), Sessions (stateful agent runs in cloud sandboxes), and Environments (sandbox templates for agent sessions). Together, these beta APIs power Claude Managed Agents, a framework for running stateful agent sessions in Anthropic's cloud infrastructure.

On the tooling side, Anthropic ships official SDKs for Python, TypeScript, C#, Go, Java, PHP, and Ruby. Each handles authentication headers, request formatting, retry logic, and streaming automatically. The ant CLI adds shell-level access with typed flags for model selection, token limits, and message content. And Claude Code is a standalone agentic coding tool that reads entire codebases, makes multi-file edits, and submits pull requests from your terminal, IDE, or browser.

The developer Console at platform.claude.com ties everything together: API key generation, workspace organization, spend limits, and the built-in Workbench for prompt testing. The gap between what the platform offers and what most guides cover is where this article lives. If you've completed a basic quickstart but haven't explored batching, caching, or managed agents, the sections below fill in what you missed.

How to Set Up the Console and Make Your First API Call

The Claude developer Console at platform.claude.com is the control center for everything API-related. Create an account with email, Google OAuth, or SSO, then navigate to Settings > Keys to generate your first API key. Copy the key immediately after creation. The Console only shows the full key once.

Store your key in an environment variable called ANTHROPIC_API_KEY. Every official SDK reads this variable automatically, so you never need to hardcode credentials in source files. For CI/CD and production environments, use your platform's secret management system (AWS Secrets Manager, HashiCorp Vault, or similar).

Workspaces let you segment API keys by project or team. Each workspace gets its own keys, spend limits, and rate limit allocations. If you're building a chatbot and a data pipeline that both call Claude, put them in separate workspaces so a runaway pipeline doesn't consume your chatbot's rate limit budget.

With your API key set, make your first call using the Python SDK:

import anthropic

client = anthropic.Anthropic()
message = client.messages.create(
    model="claude-sonnet-4-6",
    max_tokens=1024,
    messages=[
        {"role": "user", "content": "Explain API rate limiting in two sentences."}
    ]
)
print(message.content[0].text)

Or with TypeScript:

import Anthropic from "@anthropic-ai/sdk";

const client = new Anthropic();
const message = await client.messages.create({
  model: "claude-sonnet-4-6",
  max_tokens: 1024,
  messages: [
    { role: "user", content: "Explain API rate limiting in two sentences." }
  ]
});
console.log(message.content[0].text);

The response JSON includes the generated text, a stop_reason field (end_turn for natural completion, max_tokens if truncated), and a usage object with input_tokens and output_tokens. Those token counts map directly to your billing.

For quick shell testing, install the ant CLI with brew install anthropics/tap/ant, authenticate with ant auth login, and run:

ant messages create \
  --model claude-sonnet-4-6 \
  --max-tokens 1024 \
  --message '{ role: user, content: "Explain API rate limiting." }'

Testing Prompts in the Workbench

The Workbench is the Console's built-in prompt playground. Open it from the Console navigation or go directly to platform.claude.com/workbench. You can set a system prompt, compose user messages, adjust parameters (temperature, max tokens, top-p), and see results with token counts in real time.

Workbench is faster than writing test scripts when you're iterating on prompt phrasing. Compare how the same prompt behaves across different models, test system prompt variations, and verify that your instructions produce the formatting you expect. Once a prompt works, export the request as Python, TypeScript, or curl and drop it into your codebase.

Models, Pricing, and Cost Optimization

Anthropic maintains four model tiers. Each trades off capability, speed, and cost differently.

Claude Fable 5 is the most capable model in the lineup, built for demanding reasoning tasks and long-horizon agentic work. Claude Opus 4.8 sits close behind, optimized for complex reasoning and agentic coding. Claude Sonnet 4.6 offers strong quality at a lower price, making it the go-to default for many production applications. Claude Haiku 4.5 is the fast and cheapest option, built for high-volume, latency-sensitive workloads like classification and routing.

Standard API pricing per million tokens (input / output):

  • Haiku 4.5: $1 / $5
  • Sonnet 4.6: $3 / $15
  • Opus 4.8: $5 / $25

All models support context windows up to 200K tokens. Opus 4.8 and Sonnet 4.6 extend to 1M tokens at the same per-token rates, with no surcharge for the larger context.

Choosing a model comes down to your workload. Haiku handles classification, entity extraction, and simple Q&A at high throughput. Sonnet covers most production use cases: content generation, code review, customer support, and moderate reasoning. Opus and Fable are for problems that need deeper analysis, multi-step planning, or agentic tool use over long sessions.

AI-powered document summaries and audit trail interface

Batch Processing and Prompt Caching

Two features can cut your API costs substantially, and they stack.

The Message Batches API accepts a collection of message requests, processes them asynchronously, and returns results at a 50% discount across all models. Submit a batch, poll for completion, and retrieve all responses when ready. Batch processing fits non-interactive workloads: generating product descriptions, summarizing documents, evaluating datasets, or scoring content. The tradeoff is latency. Batches don't stream responses in real time, so they're not suited for chatbots or interactive applications.

Prompt caching reduces the cost of repeated input context. When you send the same system prompt, tool definitions, or few-shot examples across requests, Claude caches those tokens and charges 90% less for them on subsequent calls. If your application includes a 4,000-token system prompt on every request, caching drops that portion of your input cost to one-tenth of the standard rate after the first call.

Combine both: submit a batch of requests that share a cached system prompt, and you get the 50% batch discount on top of the 90% caching discount for the cached tokens. For high-volume workloads with consistent prompts, the compound savings are substantial.

Fastio features

Give your Claude agents persistent file storage

Fast.io provides Claude agents 50GB of free workspace storage with MCP access, semantic search, and ownership transfer. No credit card required.

Official SDKs, CLI, and Cloud Platform Options

All seven SDKs share the same design principles. They handle the x-api-key and anthropic-version headers automatically, retry failed requests with exponential backoff, support both synchronous and streaming responses, and provide type-safe interfaces so your IDE catches parameter errors before runtime.

Python is the most popular choice. Install with pip install anthropic. The SDK provides both synchronous (anthropic.Anthropic()) and asynchronous (anthropic.AsyncAnthropic()) clients. Streaming uses a context manager that yields text chunks as they arrive:

with client.messages.stream(
    model="claude-sonnet-4-6",
    max_tokens=1024,
    messages=[
        {"role": "user", "content": "Write a CSV parser in Python"}
    ]
) as stream:
    for text in stream.text_stream:
        print(text, end="", flush=True)

TypeScript works across Node.js, Deno, Bun, and browsers. Install with npm install @anthropic-ai/sdk. The C# SDK targets .NET Standard 2.0+ and works alongside Microsoft's IChatClient interface. Go uses context-based cancellation and functional options. Java follows a builder pattern with CompletableFuture async. PHP uses value objects, and Ruby includes Sorbet type annotations.

If your application already uses OpenAI's SDK, Anthropic provides a compatibility layer that lets you swap models without rewriting client code. There's also an Apple Foundation Models package for Swift developers building within Apple's LanguageModelSession API.

Cloud Platform Deployment

Beyond the direct API at api.anthropic.com, Claude runs on four cloud platforms. Claude Platform on AWS and Microsoft Foundry are Anthropic-operated, meaning you get the same feature set as the direct API but with cloud-native billing and IAM integration. Amazon Bedrock and Google Cloud Vertex AI are partner-operated, where feature availability may lag behind the direct API by weeks or months.

Choose based on your existing infrastructure. If you're already on AWS with consolidated billing, Bedrock or Claude Platform on AWS avoids a separate vendor relationship. If you need the latest beta features (Managed Agents, Files API, Skills API), the direct API is the safest choice since those ship there first. Check the features overview at platform.claude.com/docs for current platform parity.

How to Build Agents and Deploy to Production

Claude Code is the fast path from idea to working agent. It reads your entire codebase without manual file selection, makes coordinated changes across files, runs your test suite, and submits pull requests. It runs in your terminal, VS Code, JetBrains IDEs, a web interface at claude.ai/code, and a standalone desktop app. Individual plans start at $17/month with annual billing.

For custom agent backends, the Managed Agents framework (beta) provides server-side infrastructure. You define an Agent with system prompts and tool configurations, create an Environment template for the sandbox, and start Sessions that persist state across turns. The agent runs in Anthropic's cloud, so you don't manage the compute. This works well for long-running async tasks where you don't want to keep your own server up.

Tool use is the mechanism that connects Claude to external systems. You define tools as JSON schemas describing the function name, parameters, and purpose. Claude reads the schemas, decides when to invoke a tool based on the conversation, and returns a tool_use content block with the function name and arguments. Your code executes the function and sends the result back. This loop repeats until Claude has the information it needs to respond.

Structured outputs guarantee that Claude returns data matching a JSON schema you define. Instead of parsing free-text responses, you get validated JSON every time. This matters for pipelines where Claude's output feeds directly into another system without human review.

Before going live, set spend limits in the Console to prevent runaway costs. Implement retry logic for HTTP 429 (rate limit) responses. Use the Token Counting API to estimate costs before processing large batches. Rate limits scale automatically through usage tiers, and you can view your current tier under Settings > Limits in the Console.

Organized workspaces with shared folders and file previews

Persistent Storage for Agent Output

Agents that produce files need somewhere to put them. A local filesystem works for single-machine scripts. S3 or Google Cloud Storage handles cloud-scale object storage with standard durability guarantees. But when agents need to share files with humans or other agents, and those files need to be searchable, versioned, and transferable, you need a workspace layer.

Fast.io provides shared workspaces where Claude agents and humans collaborate on the same files. Agents connect via a Streamable HTTP MCP server or the REST API. Intelligence Mode auto-indexes uploaded files for semantic search, so agents can query workspace documents and get citation-backed answers without setting up a separate vector database.

The ownership transfer pattern is useful for agency and contractor workflows: an agent builds workspaces, uploads deliverables, and configures branded shares, then transfers the entire org to a human client. The agent keeps admin access for ongoing maintenance.

The free plan includes 50GB of storage, 5,000 monthly credits, and 5 workspaces with no credit card or trial expiration. For Claude developers building agentic applications that produce files, it's a zero-friction starting point. Any LLM that speaks MCP can connect, not just Claude.

Frequently Asked Questions

How do I start developing with Claude?

Create an account at platform.claude.com, generate an API key under Settings > Keys, and store it in an environment variable called ANTHROPIC_API_KEY. Install the SDK for your language (pip install anthropic for Python, npm install @anthropic-ai/sdk for TypeScript), then make a Messages API call. Test prompt variations in the Workbench before writing production code.

What SDKs does Claude support?

Anthropic ships official SDKs for seven languages: Python, TypeScript, C#, Go, Java, PHP, and Ruby. Each handles authentication, retries, streaming, and type safety automatically. The ant CLI provides shell-level access with typed flags, and there's an OpenAI SDK compatibility layer for applications migrating from GPT models.

How do I get a Claude API key?

Log into the Console at platform.claude.com, navigate to Settings > Keys, and click Create Key. Name the key descriptively (for example, production-chatbot or dev-testing) and copy it immediately. The full key is shown only once. All official SDKs read the ANTHROPIC_API_KEY environment variable by default, so set it in your shell profile or CI secrets.

What is the Claude developer console?

The Console at platform.claude.com is the management dashboard for the Claude API. It provides API key generation, workspace organization, spend limit controls, rate limit monitoring, and the Workbench prompt testing tool. You can also access the Claude Cookbook, a collection of interactive Jupyter notebooks covering common integration patterns like PDF processing and embeddings.

What is the difference between the Messages API and Managed Agents?

The Messages API gives you direct model access for custom conversation loops where you control every turn. Managed Agents (beta) is a hosted framework that handles infrastructure, state persistence, and sandboxed execution. Use the Messages API when you need fine-grained control over the agent loop. Use Managed Agents for long-running async tasks where Anthropic handles the compute and session state.

How much does the Claude API cost?

Per million tokens (input/output): Haiku 4.5 costs $1/$5, Sonnet 4.6 costs $3/$15, and Opus 4.8 costs $5/$25. Prompt caching cuts cached input costs by 90%. The Message Batches API gives a 50% discount for asynchronous processing. Both optimizations stack. Start with a low spend limit in the Console and increase as your usage patterns stabilize.

Related Resources

Fastio features

Give your Claude agents persistent file storage

Fast.io provides Claude agents 50GB of free workspace storage with MCP access, semantic search, and ownership transfer. No credit card required.