Use Claude code execution with Claude Sonnet 5

by AnthropicCode execution

Claude Sonnet 5 uses Claude code execution through Opper on the Messages endpoint, passed through as Anthropic defines it. It runs on Anthropic's own route, not on Bedrock or Vertex.

UseClaude code executionwithin

Add Claude code execution to Claude Sonnet 5

Set up with agents

Paste this into your coding agent (Claude Code, Cursor, Codex, and more) and it will set up and build with Opper for you.

Get your API key

In your code

curl https://api.opper.ai/v3/compat/v1/messages \
-H "Authorization: Bearer $OPPER_API_KEY" \
-H "Content-Type: application/json" \
-d '{"model": "anthropic/claude-sonnet-5", "max_tokens": 1024,
"messages": [{"role": "user", "content": "Sum the first 50 primes and show your working."}],
"tools": [{"type": "code_execution_20260521", "name": "code_execution"}]}'

Where you can run it

Claude Sonnet 5 runs Claude code execution on the routes below.

ProviderRegionZero data retentionTrainingInputOutputCache read
USNo$2.00$10.00$0.20$2.50 write

The model

by Anthropic

Claude Sonnet 5 is Anthropic's balanced production model, bringing near-Opus agentic coding and tool use to a 1M token context window.

Available on

Pricing from$2.00/ 1M input$10.00/ 1M output$0.20/ 1M cache read1Mcontext

Privacy

ZDR
Training
No
Region
US, EU, Multi

Use Claude code execution with other models

Step-by-step setup for Claude code execution on each of these models through Opper.

More tools on Opper

Use Claude code execution with Claude Sonnet 5

One key, 700+ models, a choice of region, and zero data retention. Tools run in the same request, with every call in your traces.

Get startedView Documentation