One read of Claude Developer Platform
229 pages moved out of 583 read.
api/beta/memory_stores/memories/list Changed · +3 / -1 lines
- `string` - - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 30 more` + - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 31 more` - `"message-batches-2024-09-24"`
- `"output-300k-2026-03-24"` - `"user-profiles-2026-03-24"` + + - `"user-profiles-2026-08-18"` - `"advisor-tool-2026-03-01"`
api/beta/memory_stores/delete Changed · +3 / -1 lines
- `string` - - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 30 more` + - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 31 more` - `"message-batches-2024-09-24"`
- `"output-300k-2026-03-24"` - `"user-profiles-2026-03-24"` + + - `"user-profiles-2026-08-18"` - `"advisor-tool-2026-03-01"`
api/beta/memory_stores/memories/create Changed · +3 / -1 lines
- `string` - - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 30 more` + - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 31 more` - `"message-batches-2024-09-24"`
- `"output-300k-2026-03-24"` - `"user-profiles-2026-03-24"` + + - `"user-profiles-2026-08-18"` - `"advisor-tool-2026-03-01"`
api/beta/sessions/resources/delete Changed · +3 / -1 lines
- `string` - - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 30 more` + - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 31 more` - `"message-batches-2024-09-24"`
- `"output-300k-2026-03-24"` - `"user-profiles-2026-03-24"` + + - `"user-profiles-2026-08-18"` - `"advisor-tool-2026-03-01"`
api/beta/memory_stores/archive Changed · +3 / -1 lines
- `string` - - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 30 more` + - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 31 more` - `"message-batches-2024-09-24"`
- `"output-300k-2026-03-24"` - `"user-profiles-2026-03-24"` + + - `"user-profiles-2026-08-18"` - `"advisor-tool-2026-03-01"`
api/beta/messages/batches/delete Changed · +3 / -1 lines
- `string` - - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 30 more` + - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 31 more` - `"message-batches-2024-09-24"`
- `"output-300k-2026-03-24"` - `"user-profiles-2026-03-24"` + + - `"user-profiles-2026-08-18"` - `"advisor-tool-2026-03-01"`
api/beta/sessions/events/list Changed · +3 / -1 lines
- `string` - - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 30 more` + - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 31 more` - `"message-batches-2024-09-24"`
- `"output-300k-2026-03-24"` - `"user-profiles-2026-03-24"` + + - `"user-profiles-2026-08-18"` - `"advisor-tool-2026-03-01"`
api/beta/deployments/create Changed · +3 / -1 lines
- `string` - - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 30 more` + - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 31 more` - `"message-batches-2024-09-24"`
- `"output-300k-2026-03-24"` - `"user-profiles-2026-03-24"` + + - `"user-profiles-2026-08-18"` - `"advisor-tool-2026-03-01"`
api/beta/deployments/list Changed · +3 / -1 lines
- `string` - - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 30 more` + - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 31 more` - `"message-batches-2024-09-24"`
- `"output-300k-2026-03-24"` - `"user-profiles-2026-03-24"` + + - `"user-profiles-2026-08-18"` - `"advisor-tool-2026-03-01"`
api/beta/deployment_runs/retrieve Changed · +3 / -1 lines
- `string` - - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 30 more` + - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 31 more` - `"message-batches-2024-09-24"`
- `"output-300k-2026-03-24"` - `"user-profiles-2026-03-24"` + + - `"user-profiles-2026-08-18"` - `"advisor-tool-2026-03-01"`
api/beta/deployments/archive Changed · +3 / -1 lines
- `string` - - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 30 more` + - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 31 more` - `"message-batches-2024-09-24"`
- `"output-300k-2026-03-24"` - `"user-profiles-2026-03-24"` + + - `"user-profiles-2026-08-18"` - `"advisor-tool-2026-03-01"`
api/beta/deployment_runs/list Changed · +3 / -1 lines
- `string` - - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 30 more` + - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 31 more` - `"message-batches-2024-09-24"`
- `"output-300k-2026-03-24"` - `"user-profiles-2026-03-24"` + + - `"user-profiles-2026-08-18"` - `"advisor-tool-2026-03-01"`
agents-and-tools/tool-use/tool-search-tool Changed · +1 / -1 lines
if err != nil { log.Fatal(err) } - fmt.Println(response) + fmt.Println(response.RawJSON()) ``` ```java Java
agents-and-tools/tool-use/strict-tool-use Changed · +2 / -2 lines
if err != nil { log.Fatal(err) } - fmt.Println(response) + fmt.Println(response.RawJSON()) ``` ```java Java
if err != nil { log.Fatal(err) } - fmt.Println(response) + fmt.Println(response.RawJSON()) ``` ```java Java
api/beta/memory_stores/memories/update Changed · +3 / -1 lines
- `string` - - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 30 more` + - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 31 more` - `"message-batches-2024-09-24"`
- `"output-300k-2026-03-24"` - `"user-profiles-2026-03-24"` + + - `"user-profiles-2026-08-18"` - `"advisor-tool-2026-03-01"`
api/beta/deployments/pause Changed · +3 / -1 lines
- `string` - - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 30 more` + - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 31 more` - `"message-batches-2024-09-24"`
- `"output-300k-2026-03-24"` - `"user-profiles-2026-03-24"` + + - `"user-profiles-2026-08-18"` - `"advisor-tool-2026-03-01"`
api/beta/memory_stores/update Changed · +3 / -1 lines
- `string` - - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 30 more` + - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 31 more` - `"message-batches-2024-09-24"`
- `"output-300k-2026-03-24"` - `"user-profiles-2026-03-24"` + + - `"user-profiles-2026-08-18"` - `"advisor-tool-2026-03-01"`
api/beta/deployments/retrieve Changed · +3 / -1 lines
- `string` - - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 30 more` + - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 31 more` - `"message-batches-2024-09-24"`
- `"output-300k-2026-03-24"` - `"user-profiles-2026-03-24"` + + - `"user-profiles-2026-08-18"` - `"advisor-tool-2026-03-01"`
api/beta/messages/batches/retrieve Changed · +3 / -1 lines
- `string` - - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 30 more` + - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 31 more` - `"message-batches-2024-09-24"`
- `"output-300k-2026-03-24"` - `"user-profiles-2026-03-24"` + + - `"user-profiles-2026-08-18"` - `"advisor-tool-2026-03-01"`
api/beta/deployments/run Changed · +3 / -1 lines
- `string` - - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 30 more` + - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 31 more` - `"message-batches-2024-09-24"`
- `"output-300k-2026-03-24"` - `"user-profiles-2026-03-24"` + + - `"user-profiles-2026-08-18"` - `"advisor-tool-2026-03-01"`
api/beta/sessions/events/stream Changed · +3 / -1 lines
- `string` - - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 30 more` + - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 31 more` - `"message-batches-2024-09-24"`
- `"output-300k-2026-03-24"` - `"user-profiles-2026-03-24"` + + - `"user-profiles-2026-08-18"` - `"advisor-tool-2026-03-01"`
api/beta/deployments/unpause Changed · +3 / -1 lines
- `string` - - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 30 more` + - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 31 more` - `"message-batches-2024-09-24"`
- `"output-300k-2026-03-24"` - `"user-profiles-2026-03-24"` + + - `"user-profiles-2026-08-18"` - `"advisor-tool-2026-03-01"`
api/beta/sessions/resources/retrieve Changed · +3 / -1 lines
- `string` - - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 30 more` + - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 31 more` - `"message-batches-2024-09-24"`
- `"output-300k-2026-03-24"` - `"user-profiles-2026-03-24"` + + - `"user-profiles-2026-08-18"` - `"advisor-tool-2026-03-01"`
api/beta/deployments/update Changed · +3 / -1 lines
- `string` - - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 30 more` + - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 31 more` - `"message-batches-2024-09-24"`
- `"output-300k-2026-03-24"` - `"user-profiles-2026-03-24"` + + - `"user-profiles-2026-08-18"` - `"advisor-tool-2026-03-01"`
api/beta/memory_stores/create Changed · +3 / -1 lines
- `string` - - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 30 more` + - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 31 more` - `"message-batches-2024-09-24"`
- `"output-300k-2026-03-24"` - `"user-profiles-2026-03-24"` + + - `"user-profiles-2026-08-18"` - `"advisor-tool-2026-03-01"`
api/beta/environments/delete Changed · +3 / -1 lines
- `string` - - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 30 more` + - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 31 more` - `"message-batches-2024-09-24"`
- `"output-300k-2026-03-24"` - `"user-profiles-2026-03-24"` + + - `"user-profiles-2026-08-18"` - `"advisor-tool-2026-03-01"`
api/beta/memory_stores/list Changed · +3 / -1 lines
- `string` - - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 30 more` + - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 31 more` - `"message-batches-2024-09-24"`
- `"output-300k-2026-03-24"` - `"user-profiles-2026-03-24"` + + - `"user-profiles-2026-08-18"` - `"advisor-tool-2026-03-01"`
api/beta/environments/work/ack Changed · +3 / -1 lines
- `string` - - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 30 more` + - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 31 more` - `"message-batches-2024-09-24"`
- `"output-300k-2026-03-24"` - `"user-profiles-2026-03-24"` + + - `"user-profiles-2026-08-18"` - `"advisor-tool-2026-03-01"`
api/beta/memory_stores/memories/delete Changed · +3 / -1 lines
- `string` - - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 30 more` + - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 31 more` - `"message-batches-2024-09-24"`
- `"output-300k-2026-03-24"` - `"user-profiles-2026-03-24"` + + - `"user-profiles-2026-08-18"` - `"advisor-tool-2026-03-01"`
api/beta/environments/work/heartbeat Changed · +3 / -1 lines
- `string` - - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 30 more` + - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 31 more` - `"message-batches-2024-09-24"`
- `"output-300k-2026-03-24"` - `"user-profiles-2026-03-24"` + + - `"user-profiles-2026-08-18"` - `"advisor-tool-2026-03-01"`
api/beta/memory_stores/memories/retrieve Changed · +3 / -1 lines
- `string` - - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 30 more` + - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 31 more` - `"message-batches-2024-09-24"`
- `"output-300k-2026-03-24"` - `"user-profiles-2026-03-24"` + + - `"user-profiles-2026-08-18"` - `"advisor-tool-2026-03-01"`
api/beta/environments/work/list Changed · +3 / -1 lines
- `string` - - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 30 more` + - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 31 more` - `"message-batches-2024-09-24"`
- `"output-300k-2026-03-24"` - `"user-profiles-2026-03-24"` + + - `"user-profiles-2026-08-18"` - `"advisor-tool-2026-03-01"`
api/beta/memory_stores/retrieve Changed · +3 / -1 lines
- `string` - - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 30 more` + - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 31 more` - `"message-batches-2024-09-24"`
- `"output-300k-2026-03-24"` - `"user-profiles-2026-03-24"` + + - `"user-profiles-2026-08-18"` - `"advisor-tool-2026-03-01"`
api/beta/environments/work/poll Changed · +3 / -1 lines
- `string` - - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 30 more` + - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 31 more` - `"message-batches-2024-09-24"`
- `"output-300k-2026-03-24"` - `"user-profiles-2026-03-24"` + + - `"user-profiles-2026-08-18"` - `"advisor-tool-2026-03-01"`
api/beta/messages/batches/cancel Changed · +3 / -1 lines
- `string` - - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 30 more` + - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 31 more` - `"message-batches-2024-09-24"`
- `"output-300k-2026-03-24"` - `"user-profiles-2026-03-24"` + + - `"user-profiles-2026-08-18"` - `"advisor-tool-2026-03-01"`
api/beta/environments/work/retrieve Changed · +3 / -1 lines
- `string` - - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 30 more` + - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 31 more` - `"message-batches-2024-09-24"`
- `"output-300k-2026-03-24"` - `"user-profiles-2026-03-24"` + + - `"user-profiles-2026-08-18"` - `"advisor-tool-2026-03-01"`
api/beta/messages/batches/list Changed · +3 / -1 lines
- `string` - - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 30 more` + - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 31 more` - `"message-batches-2024-09-24"`
- `"output-300k-2026-03-24"` - `"user-profiles-2026-03-24"` + + - `"user-profiles-2026-08-18"` - `"advisor-tool-2026-03-01"`
api/beta/environments/work/stats Changed · +3 / -1 lines
- `string` - - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 30 more` + - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 31 more` - `"message-batches-2024-09-24"`
- `"output-300k-2026-03-24"` - `"user-profiles-2026-03-24"` + + - `"user-profiles-2026-08-18"` - `"advisor-tool-2026-03-01"`
api/beta/sessions/delete Changed · +3 / -1 lines
- `string` - - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 30 more` + - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 31 more` - `"message-batches-2024-09-24"`
- `"output-300k-2026-03-24"` - `"user-profiles-2026-03-24"` + + - `"user-profiles-2026-08-18"` - `"advisor-tool-2026-03-01"`
api/beta/environments/work/stop Changed · +3 / -1 lines
- `string` - - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 30 more` + - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 31 more` - `"message-batches-2024-09-24"`
- `"output-300k-2026-03-24"` - `"user-profiles-2026-03-24"` + + - `"user-profiles-2026-08-18"` - `"advisor-tool-2026-03-01"`
api/beta/sessions/events/send Changed · +3 / -1 lines
- `string` - - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 30 more` + - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 31 more` - `"message-batches-2024-09-24"`
- `"output-300k-2026-03-24"` - `"user-profiles-2026-03-24"` + + - `"user-profiles-2026-08-18"` - `"advisor-tool-2026-03-01"`
api/beta/environments/work/update Changed · +3 / -1 lines
- `string` - - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 30 more` + - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 31 more` - `"message-batches-2024-09-24"`
- `"output-300k-2026-03-24"` - `"user-profiles-2026-03-24"` + + - `"user-profiles-2026-08-18"` - `"advisor-tool-2026-03-01"`
api/beta/sessions/resources/add Changed · +3 / -1 lines
- `string` - - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 30 more` + - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 31 more` - `"message-batches-2024-09-24"`
- `"output-300k-2026-03-24"` - `"user-profiles-2026-03-24"` + + - `"user-profiles-2026-08-18"` - `"advisor-tool-2026-03-01"`
api/beta/files/download Changed · +3 / -1 lines
- `string` - - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 30 more` + - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 31 more` - `"message-batches-2024-09-24"`
- `"output-300k-2026-03-24"` - `"user-profiles-2026-03-24"` + + - `"user-profiles-2026-08-18"` - `"advisor-tool-2026-03-01"`
api/beta/sessions/resources/list Changed · +3 / -1 lines
- `string` - - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 30 more` + - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 31 more` - `"message-batches-2024-09-24"`
- `"output-300k-2026-03-24"` - `"user-profiles-2026-03-24"` + + - `"user-profiles-2026-08-18"` - `"advisor-tool-2026-03-01"`
api/beta/sessions/resources/update Changed · +3 / -1 lines
- `string` - - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 30 more` + - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 31 more` - `"message-batches-2024-09-24"`
- `"output-300k-2026-03-24"` - `"user-profiles-2026-03-24"` + + - `"user-profiles-2026-08-18"` - `"advisor-tool-2026-03-01"`
about-claude/models/migration-guide Changed · +4 / -4 lines
To increase tool usage, raise the effort setting. `high` or `xhigh` effort settings show substantially more tool usage in agentic search and coding. You can also adjust your prompt to explicitly instruct the model about when and how to properly use its tools. -8. **Real-time cybersecurity safeguards:** Newly added in Claude Opus 4.7, requests that involve prohibited or high-risk topics may lead to refusals. For legitimate security work such as penetration testing, vulnerability research, or red-teaming, apply to the [Cyber Verification Program](https://claude.com/form/cyber-use-case) to request reduced restrictions. See [Safeguards, warnings, and appeals](https://support.claude.com/en/articles/8241253-safeguards-warnings-and-appeals) for background. +8. **Real-time cybersecurity safeguards:** Newly added in Claude Opus 4.7, requests that involve prohibited or high-risk topics may lead to refusals. For legitimate security work such as penetration testing, vulnerability research, or red-teaming, apply to the [Cyber Verification Program](https://support.claude.com/en/articles/14604842-real-time-cyber-safeguards-on-claude-opus-and-sonnet) to request reduced restrictions. The application route depends on how you access Claude. 9. **High-resolution image support:** Claude Opus 4.7 is the first Claude model with high-resolution image support. Maximum image resolution is 2,576 pixels on the long edge, up from 1,568 pixels on prior models. This unlocks gains on vision-heavy workloads and is particularly valuable for computer use, screenshot understanding, and document analysis.
* If you use [web fetch](https://platform.claude.com/docs/en/agents-and-tools/tool-use/web-fetch-tool), plan an alternative: it is not available on Claude Opus 5. * If your organization has a [Priority Tier](https://platform.claude.com/docs/en/api/service-tiers#supported-models) commitment, note that Priority Tier is not supported on Claude Opus 5. * Remove verification and self-check instructions carried over from prompts tuned for earlier models; they cause over-verification on Claude Opus 5. -* If your product does legitimate security work, apply to the [Cyber Verification Program](https://claude.com/form/cyber-use-case) for access to lower restrictions on cyber content. +* If your product does legitimate security work, apply to the [Cyber Verification Program](https://support.claude.com/en/articles/14604842-real-time-cyber-safeguards-on-claude-opus-and-sonnet) for access to lower restrictions on cyber content. #### Migrating from Claude Opus 4.5 or earlier
5. **Sampling parameters removed:** Sampling parameters (`temperature`, `top_p`, `top_k`) set to a non-default value are not accepted and return a 400 error. -6. **Cybersecurity safeguards:** Claude Sonnet 5 is the first Sonnet-tier model with real-time cybersecurity safeguards. Requests that involve prohibited or high-risk cybersecurity topics may be refused. Refusals return as a successful HTTP 200 response with `stop_reason: "refusal"`, not an error. See [Safeguards, warnings, and appeals](https://support.claude.com/en/articles/8241253-safeguards-warnings-and-appeals) for background. +6. **Cybersecurity safeguards:** Claude Sonnet 5 is the first Sonnet-tier model with real-time cybersecurity safeguards. Requests that involve prohibited or high-risk cybersecurity topics may be refused. Refusals return as a successful HTTP 200 response with `stop_reason: "refusal"`, not an error. See [Real-time cyber safeguards on Claude Opus and Sonnet](https://support.claude.com/en/articles/14604842-real-time-cyber-safeguards-on-claude-opus-and-sonnet) for what the safeguards block and how legitimate security work can apply to the Cyber Verification Program. #### Migration checklist
5. **Pricing:** Claude Haiku 4.5 is priced at $1/$5 per million input/output tokens. Claude Sonnet 5 is priced at $2/$10 per million input/output tokens. See [Claude pricing](https://platform.claude.com/docs/en/about-claude/pricing). -6. **Cybersecurity safeguards:** Claude Sonnet 5 has real-time cybersecurity safeguards. Requests that involve prohibited or high-risk cybersecurity topics may be refused, returned as a successful HTTP 200 response with `stop_reason: "refusal"`. See [Safeguards, warnings, and appeals](https://support.claude.com/en/articles/8241253-safeguards-warnings-and-appeals) for background. +6. **Cybersecurity safeguards:** Claude Sonnet 5 has real-time cybersecurity safeguards. Requests that involve prohibited or high-risk cybersecurity topics may be refused, returned as a successful HTTP 200 response with `stop_reason: "refusal"`. See [Real-time cyber safeguards on Claude Opus and Sonnet](https://support.claude.com/en/articles/14604842-real-time-cyber-safeguards-on-claude-opus-and-sonnet) for what the safeguards block and how legitimate security work can apply to the Cyber Verification Program. #### Migration checklist
api/beta/vaults/credentials/list Changed · +3 / -1 lines
- `string` - - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 30 more` + - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 31 more` - `"message-batches-2024-09-24"`
- `"output-300k-2026-03-24"` - `"user-profiles-2026-03-24"` + + - `"user-profiles-2026-08-18"` - `"advisor-tool-2026-03-01"`
api/beta/vaults/credentials/retrieve Changed · +3 / -1 lines
- `string` - - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 30 more` + - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 31 more` - `"message-batches-2024-09-24"`
- `"output-300k-2026-03-24"` - `"user-profiles-2026-03-24"` + + - `"user-profiles-2026-08-18"` - `"advisor-tool-2026-03-01"`
api/beta/sessions/threads/events/list Changed · +3 / -1 lines
- `string` - - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 30 more` + - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 31 more` - `"message-batches-2024-09-24"`
- `"output-300k-2026-03-24"` - `"user-profiles-2026-03-24"` + + - `"user-profiles-2026-08-18"` - `"advisor-tool-2026-03-01"`
api/beta/vaults/credentials/create Changed · +3 / -1 lines
- `string` - - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 30 more` + - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 31 more` - `"message-batches-2024-09-24"`
- `"output-300k-2026-03-24"` - `"user-profiles-2026-03-24"` + + - `"user-profiles-2026-08-18"` - `"advisor-tool-2026-03-01"`
build-with-claude/claude-in-microsoft-foundry Changed · +2 / -2 lines
<Tabs> <Tab title="Gradle"> ```kotlin - implementation("com.anthropic:anthropic-java-foundry:2.53.0") + implementation("com.anthropic:anthropic-java-foundry:2.57.0") // For Entra ID authentication, also add the Azure Identity library implementation("com.azure:azure-identity:1.18.3")
<dependency> <groupId>com.anthropic</groupId> <artifactId>anthropic-java-foundry</artifactId> - <version>2.53.0</version> + <version>2.57.0</version> </dependency> <!-- For Entra ID authentication, also add the Azure Identity library --> <dependency>
get-started Changed · +2 / -2 lines
} dependencies { - implementation("com.anthropic:anthropic-java:2.53.0") + implementation("com.anthropic:anthropic-java:2.57.0") } application {
<dependency> <groupId>com.anthropic</groupId> <artifactId>anthropic-java</artifactId> - <version>2.53.0</version> + <version>2.57.0</version> </dependency> </dependencies> </project>
agents-and-tools/mcp-connector Changed · +8 / -8 lines
<Tabs> <Tab title="Gradle"> ```kotlin - implementation("com.anthropic:anthropic-java-mcp:2.53.0") + implementation("com.anthropic:anthropic-java-mcp:2.57.0") ``` </Tab>
<dependency> <groupId>com.anthropic</groupId> <artifactId>anthropic-java-mcp</artifactId> - <version>2.53.0</version> + <version>2.57.0</version> </dependency> ``` </Tab>
file_resource = await mcp_client.read_resource( uri="file:///path/to/data.json", ) - uploaded = await client.beta.files.upload( + uploaded = await client.files.upload( file=mcp_resource_to_file(file_resource), ) print(uploaded.id)
// As a file upload const fileResource = await mcpClient.readResource({ uri: "file:///path/to/data.json" }); - const uploaded = await anthropic.beta.files.upload({ file: mcpResourceToFile(fileResource) }); + const uploaded = await anthropic.files.upload({ file: mcpResourceToFile(fileResource) }); console.log(uploaded.id); ```
file.ContentType = new(mediaType); } - var uploaded = await anthropic.Beta.Files.Upload(new FileUploadParams { File = file }); + var uploaded = await anthropic.Files.Upload(new FileUploadParams { File = file }); Console.WriteLine(uploaded.ID); ```
if err != nil { log.Fatal(err) } - uploaded, err := client.Beta.Files.Upload(ctx, anthropic.BetaFileUploadParams{File: fileReader}) + uploaded, err := client.Files.Upload(ctx, anthropic.FileUploadParams{File: fileReader}) if err != nil { log.Fatal(err) }
fileField.contentType(resourceFile.mimeType()); } - var uploaded = anthropic.beta().files().upload(FileUploadParams.builder() + var uploaded = anthropic.files().upload(FileUploadParams.builder() .file(fileField.build()) .build());
# As a file upload file_resource = mcp_client.read_resource(uri: "file:///path/to/data.json") file = Anthropic::Mcp.resource_to_files(file_resource).first - uploaded_file = anthropic.beta.files.upload(file: file) + uploaded_file = anthropic.files.upload(file: file) puts uploaded_file.id ``` </CodeGroup>
api/completions Changed · +3 / -1 lines
- `string` - - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 30 more` + - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 31 more` - `"message-batches-2024-09-24"`
- `"output-300k-2026-03-24"` - `"user-profiles-2026-03-24"` + + - `"user-profiles-2026-08-18"` - `"advisor-tool-2026-03-01"`
agents-and-tools/tool-use/code-execution-tool Changed · +67 / -84 lines
To analyze your own data files (such as CSV, Excel, or images), upload them through the Files API and reference them in your request: <Note> - This workflow doesn't require a beta header: uploading and downloading files through the Files API and referencing them in `container_upload` blocks are all generally available. The examples on this page send `anthropic-beta: files-api-2025-04-14`, which the API accepts but doesn't require. + This workflow doesn't require a beta header: uploading and downloading files through the Files API and referencing them in `container_upload` blocks are all generally available. </Note> The Python environment can process various file types uploaded through the Files API, including:
FILE_ID=$(curl --fail-with-body -sS https://api.anthropic.com/v1/files \ -H "x-api-key: $ANTHROPIC_API_KEY" \ -H "anthropic-version: 2023-06-01" \ - -H "anthropic-beta: files-api-2025-04-14" \ -F "[email protected]" | jq -r '.id') # Then use the file_id with code execution
curl --fail-with-body -sS https://api.anthropic.com/v1/messages \ -H "x-api-key: $ANTHROPIC_API_KEY" \ -H "anthropic-version: 2023-06-01" \ - -H "anthropic-beta: files-api-2025-04-14" \ -H "content-type: application/json" \ -d '{ "model": "claude-opus-5",
```bash CLI # First, upload a file and capture the file ID - FILE_ID=$(ant beta:files upload \ + FILE_ID=$(ant files upload \ --file ./data.csv \ --transform id --raw-output) # Then use the file_id with code execution - ant beta:messages create \ - --beta files-api-2025-04-14 <<YAML + ant messages create <<YAML model: claude-opus-5 max_tokens: 4096 messages:
client = anthropic.Anthropic() # Upload a file - file_object = client.beta.files.upload(file=Path("data.csv")) + file_object = client.files.upload(file=Path("data.csv")) # Use the file_id with code execution - response = client.beta.messages.create( + response = client.messages.create( model="claude-opus-5", - betas=["files-api-2025-04-14"], max_tokens=4096, messages=[ {
const client = new Anthropic(); // Upload a file - const fileObject = await client.beta.files.upload({ + const fileObject = await client.files.upload({ file: createReadStream("data.csv") }); // Use the file_id with code execution - const response = await client.beta.messages.create({ + const response = await client.messages.create({ model: "claude-opus-5", - betas: ["files-api-2025-04-14"], max_tokens: 4096, messages: [ {
AnthropicClient client = new(); // Upload a file - var fileObject = await client.Beta.Files.Upload(new FileUploadParams + var fileObject = await client.Files.Upload(new FileUploadParams { File = File.OpenRead("data.csv") });
{ Model = Model.ClaudeOpus5, MaxTokens = 4096, - Betas = [AnthropicBeta.FilesApi2025_04_14], Messages = [ new() { Role = Role.User, Content = new([ - new BetaTextBlockParam { Text = "Analyze this CSV data" }, - new BetaContainerUploadBlockParam { FileID = fileObject.ID } + new TextBlockParam { Text = "Analyze this CSV data" }, + new ContainerUploadBlockParam { FileID = fileObject.ID } ]) } ], - Tools = [new BetaCodeExecutionTool20250825()] + Tools = [new CodeExecutionTool20250825()] }; - var response = await client.Beta.Messages.Create(parameters); + var response = await client.Messages.Create(parameters); Console.WriteLine(response); ```
} defer file.Close() - fileObject, err := client.Beta.Files.Upload(ctx, anthropic.BetaFileUploadParams{ + fileObject, err := client.Files.Upload(ctx, anthropic.FileUploadParams{ File: file, }) if err != nil {
} // Use the file_id with code execution - response, err := client.Beta.Messages.New(ctx, anthropic.BetaMessageNewParams{ + response, err := client.Messages.New(ctx, anthropic.MessageNewParams{ Model: anthropic.ModelClaudeOpus5, MaxTokens: 4096, - Messages: []anthropic.BetaMessageParam{ - anthropic.NewBetaUserMessage( - anthropic.NewBetaTextBlock("Analyze this CSV data"), - anthropic.NewBetaContainerUploadBlock(fileObject.ID), + Messages: []anthropic.MessageParam{ + anthropic.NewUserMessage( + anthropic.NewTextBlock("Analyze this CSV data"), + anthropic.NewContainerUploadBlock(fileObject.ID), ), }, - Tools: []anthropic.BetaToolUnionParam{ - {OfCodeExecutionTool20250825: &anthropic.BetaCodeExecutionTool20250825Param{}}, + Tools: []anthropic.ToolUnionParam{ + {OfCodeExecutionTool20250825: &anthropic.CodeExecutionTool20250825Param{}}, }, - Betas: []anthropic.AnthropicBeta{ - anthropic.AnthropicBetaFilesAPI2025_04_14, - }, }) if err != nil { log.Fatal(err)
AnthropicClient client = AnthropicOkHttpClient.fromEnv(); // Upload a file - FileMetadata fileObject = client.beta().files().upload( + FileMetadata fileObject = client.files().upload( FileUploadParams.builder() .file(Path.of("data.csv")) .build()
); // Use the file_id with code execution - BetaMessage response = client.beta().messages().create( + Message response = client.messages().create( MessageCreateParams.builder() .model(Model.CLAUDE_OPUS_5) - .addBeta(AnthropicBeta.FILES_API_2025_04_14) .maxTokens(4096L) - .addUserMessageOfBetaContentBlockParams(List.of( - BetaContentBlockParam.ofText(BetaTextBlockParam.builder() + .addUserMessageOfBlockParams(List.of( + ContentBlockParam.ofText(TextBlockParam.builder() .text("Analyze this CSV data") .build()), - BetaContentBlockParam.ofContainerUpload(BetaContainerUploadBlockParam.builder() + ContentBlockParam.ofContainerUpload(ContainerUploadBlockParam.builder() .fileId(fileObject.id()) .build()) )) - .addTool(BetaCodeExecutionTool20250825.builder().build()) + .addTool(CodeExecutionTool20250825.builder().build()) .build() );
client = Anthropic::Client.new # Upload a file - file_object = client.beta.files.upload( + file_object = client.files.upload( file: Pathname("data.csv") ) # Use the file_id with code execution - response = client.beta.messages.create( + response = client.messages.create( model: Anthropic::Model::CLAUDE_OPUS_5, - betas: [Anthropic::AnthropicBeta::FILES_API_2025_04_14], max_tokens: 4096, messages: [ {
} ], tools: [ - Anthropic::Beta::BetaCodeExecutionTool20250825.new + Anthropic::CodeExecutionTool20250825.new ] )
client = Anthropic() # Request code execution that creates files - response = client.beta.messages.create( + response = client.messages.create( model="claude-opus-5", - betas=["files-api-2025-04-14"], max_tokens=4096, messages=[ {
# Extract file IDs from the response - def extract_file_ids(response: BetaMessage) -> list[str]: + def extract_file_ids(response: Message) -> list[str]: file_ids: list[str] = [] for item in response.content: if item.type == "bash_code_execution_tool_result":
# Download the created files for file_id in extract_file_ids(response): - file_metadata = client.beta.files.retrieve_metadata(file_id) - file_content = client.beta.files.download(file_id) + file_metadata = client.files.retrieve_metadata(file_id) + file_content = client.files.download(file_id) file_content.write_to_file(file_metadata.filename) print(f"Downloaded: {file_metadata.filename}") ```
const client = new Anthropic(); // Request code execution that creates files - const response = await client.beta.messages.create({ + const response = await client.messages.create({ model: "claude-opus-5", - betas: ["files-api-2025-04-14"], max_tokens: 4096, messages: [ {
if (result.type === "bash_code_execution_result") { for (const outputBlock of result.content) { const [fileMetadata, fileResponse] = await Promise.all([ - client.beta.files.retrieveMetadata(outputBlock.file_id), - client.beta.files.download(outputBlock.file_id) + client.files.retrieveMetadata(outputBlock.file_id), + client.files.download(outputBlock.file_id) ]); await writeFile(fileMetadata.filename, await fileResponse.bytes()); console.log(`Downloaded: ${fileMetadata.filename}`);
{ Model = Model.ClaudeOpus5, MaxTokens = 4096, - Betas = [AnthropicBeta.FilesApi2025_04_14], Messages = [new() { Role = Role.User, Content = "Create a matplotlib visualization and save it as output.png" }], - Tools = [new BetaCodeExecutionTool20250825()] + Tools = [new CodeExecutionTool20250825()] }; - var response = await client.Beta.Messages.Create(parameters); + var response = await client.Messages.Create(parameters); // Collect the file IDs from the tool results List<string> fileIds = [];
{ if (!block.TryPickBashCodeExecutionToolResult(out var toolResult)) continue; - if (!toolResult.Content.TryPickBetaBashCodeExecutionResultBlock(out var result)) + if (!toolResult.Content.TryPickBashCodeExecutionResultBlock(out var result)) continue; foreach (var output in result.Content) {
// Download each created file foreach (var fileId in fileIds) { - var fileMetadata = await client.Beta.Files.RetrieveMetadata(fileId); - using var download = await client.Beta.Files.Download(fileId); + var fileMetadata = await client.Files.RetrieveMetadata(fileId); + using var download = await client.Files.Download(fileId); var downloadStream = await download.ReadAsStream(); await using var target = File.Create(fileMetadata.Filename); await downloadStream.CopyToAsync(target);
client := anthropic.NewClient() ctx := context.Background() - response, err := client.Beta.Messages.New(ctx, anthropic.BetaMessageNewParams{ + response, err := client.Messages.New(ctx, anthropic.MessageNewParams{ Model: anthropic.ModelClaudeOpus5, MaxTokens: 4096, - Messages: []anthropic.BetaMessageParam{ - anthropic.NewBetaUserMessage(anthropic.NewBetaTextBlock("Create a matplotlib visualization and save it as output.png")), + Messages: []anthropic.MessageParam{ + anthropic.NewUserMessage(anthropic.NewTextBlock("Create a matplotlib visualization and save it as output.png")), }, - Tools: []anthropic.BetaToolUnionParam{ - {OfCodeExecutionTool20250825: &anthropic.BetaCodeExecutionTool20250825Param{}}, + Tools: []anthropic.ToolUnionParam{ + {OfCodeExecutionTool20250825: &anthropic.CodeExecutionTool20250825Param{}}, }, - Betas: []anthropic.AnthropicBeta{ - anthropic.AnthropicBetaFilesAPI2025_04_14, - }, }) if err != nil { log.Fatal(err)
fileIDs := extractFileIDs(response) for _, fileID := range fileIDs { - fileMetadata, err := client.Beta.Files.GetMetadata(ctx, fileID, anthropic.BetaFileGetMetadataParams{}) + fileMetadata, err := client.Files.GetMetadata(ctx, fileID) if err != nil { log.Fatal(err) } - fileContent, err := client.Beta.Files.Download(ctx, fileID, anthropic.BetaFileDownloadParams{}) + fileContent, err := client.Files.Download(ctx, fileID) if err != nil { log.Fatal(err) }
} // ... - func extractFileIDs(response *anthropic.BetaMessage) []string { + func extractFileIDs(response *anthropic.Message) []string { var fileIDs []string for _, item := range response.Content { switch variant := item.AsAny().(type) { - case anthropic.BetaBashCodeExecutionToolResultBlock: + case anthropic.BashCodeExecutionToolResultBlock: // Collect the file IDs from the tool result for _, file := range variant.Content.Content { if file.FileID != "" {
MessageCreateParams params = MessageCreateParams.builder() .model(Model.CLAUDE_OPUS_5) - .addBeta(AnthropicBeta.FILES_API_2025_04_14) .maxTokens(4096L) .addUserMessage("Create a matplotlib visualization and save it as output.png") - .addTool(BetaCodeExecutionTool20250825.builder().build()) + .addTool(CodeExecutionTool20250825.builder().build()) .build(); - BetaMessage response = client.beta().messages().create(params); + Message response = client.messages().create(params); List<String> fileIds = extractFileIds(response); for (String fileId : fileIds) { - FileMetadata fileMetadata = client.beta().files().retrieveMetadata(fileId); - try (HttpResponse fileContent = client.beta().files().download(fileId)) { + FileMetadata fileMetadata = client.files().retrieveMetadata(fileId); + try (HttpResponse fileContent = client.files().download(fileId)) { Files.copy( fileContent.body(), Path.of(fileMetadata.filename()),
} } - List<String> extractFileIds(BetaMessage response) { + List<String> extractFileIds(Message response) { List<String> fileIds = new ArrayList<>(); // Collect the file IDs from the tool results - for (BetaContentBlock item : response.content()) { + for (ContentBlock item : response.content()) { item.bashCodeExecutionToolResult().ifPresent(toolResult -> { - if (toolResult.content().isBetaBashCodeExecutionResultBlock()) { - BetaBashCodeExecutionResultBlock result = - toolResult.content().asBetaBashCodeExecutionResultBlock(); - for (BetaBashCodeExecutionOutputBlock output : result.content()) { + if (toolResult.content().isBashCodeExecutionResultBlock()) { + BashCodeExecutionResultBlock result = + toolResult.content().asBashCodeExecutionResultBlock(); + for (BashCodeExecutionOutputBlock output : result.content()) { fileIds.add(output.fileId()); } }
```ruby Ruby client = Anthropic::Client.new - response = client.beta.messages.create( + response = client.messages.create( model: Anthropic::Model::CLAUDE_OPUS_5, - betas: ["files-api-2025-04-14"], max_tokens: 4096, messages: [ {
end extract_file_ids(response).each do |file_id| - file_metadata = client.beta.files.retrieve_metadata(file_id) - file_content = client.beta.files.download(file_id) + file_metadata = client.files.retrieve_metadata(file_id) + file_content = client.files.download(file_id) File.open(file_metadata.filename, "wb") do |f| f.write(file_content.read)
// Reuse the container from the first request so the file is still there. response2, err := client.Messages.New(ctx, anthropic.MessageNewParams{ - Container: anthropic.String(response1.Container.ID), + Container: anthropic.MessageCreateParamsContainerUnion{ + OfString: anthropic.String(response1.Container.ID), + }, Model: anthropic.ModelClaudeOpus5, MaxTokens: 4096, Messages: []anthropic.MessageParam{
## Data retention -Code execution runs in server-side sandbox containers. Container data, including execution artifacts, uploaded files, and outputs, is retained for up to 30 days. This retention applies to all data processed within the container environment. Files that code execution creates in the [Files API](https://platform.claude.com/docs/en/build-with-claude/files) (retrievable with `client.beta.files.download()`) persist until explicitly deleted. +Code execution runs in server-side sandbox containers. Container data, including execution artifacts, uploaded files, and outputs, is retained for up to 30 days. This retention applies to all data processed within the container environment. Files that code execution creates in the [Files API](https://platform.claude.com/docs/en/build-with-claude/files) (retrievable with `client.files.download()`) persist until explicitly deleted. For ZDR eligibility across all features, see [API and data retention](https://platform.claude.com/docs/en/manage-claude/api-and-data-retention).
api/beta/skills/retrieve Changed · +3 / -1 lines
- `string` - - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 30 more` + - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 31 more` - `"message-batches-2024-09-24"`
- `"output-300k-2026-03-24"` - `"user-profiles-2026-03-24"` + + - `"user-profiles-2026-08-18"` - `"advisor-tool-2026-03-01"`
api/beta/skills/delete Changed · +3 / -1 lines
- `string` - - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 30 more` + - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 31 more` - `"message-batches-2024-09-24"`
- `"output-300k-2026-03-24"` - `"user-profiles-2026-03-24"` + + - `"user-profiles-2026-08-18"` - `"advisor-tool-2026-03-01"`
agents-and-tools/tool-use/overview Changed · +5 / -8 lines
description: Connect Claude to external tools and APIs. See where tools execute, when Claude calls them, and which tool fits your task. --- -Tool use lets Claude call functions that you define or that Anthropic provides. Claude determines when to call a tool based on the user's request and the tool's description. It then returns a structured call that your application executes (client tools) or that Anthropic executes (server tools). +Tool use (also called function calling) lets Claude call functions that you define or that Anthropic provides. Claude determines when to call a tool based on the user's request and the tool's description. It then returns a structured call that your application executes (client tools) or that Anthropic executes (server tools). Here's a minimal example using a server tool, the [Web search tool](https://platform.claude.com/docs/en/agents-and-tools/tool-use/web-search-tool), which Anthropic executes for you:
echo "Claude called $(echo "$TOOL_USE" | jq -r '.name') with $(echo "$TOOL_USE" | jq -c '.input')" # Run the tool, then send the result back in a tool_result block. + # Claude uses the result to answer the original question. WEATHER="15 degrees Celsius, partly cloudy" - FOLLOWUP=$(curl -s https://api.anthropic.com/v1/messages \ + curl -s https://api.anthropic.com/v1/messages \ -H "x-api-key: $ANTHROPIC_API_KEY" \ -H "anthropic-version: 2023-06-01" \ -H "content-type: application/json" \
{type: "tool_result", tool_use_id: $tool_use_id, content: $weather} ]} ] - }')") - - # Claude uses the result to answer the original question. - echo "$FOLLOWUP" | jq -r '.content[] | select(.type == "text") | .text' + }')" ``` ```bash CLI
{type: "tool_result", tool_use_id: $tool_use_id, content: $weather} ]} ]' <<<"$MESSAGES") - FOLLOWUP=$(call_api) # Claude uses the result to answer the original question. - jq -r '.content[] | select(.type == "text") | .text' <<<"$FOLLOWUP" + call_api ``` ```python Python
api/beta/sessions/threads/events/stream Changed · +3 / -1 lines
- `string` - - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 30 more` + - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 31 more` - `"message-batches-2024-09-24"`
- `"output-300k-2026-03-24"` - `"user-profiles-2026-03-24"` + + - `"user-profiles-2026-08-18"` - `"advisor-tool-2026-03-01"`
api/beta/vaults/delete Changed · +3 / -1 lines
- `string` - - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 30 more` + - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 31 more` - `"message-batches-2024-09-24"`
- `"output-300k-2026-03-24"` - `"user-profiles-2026-03-24"` + + - `"user-profiles-2026-08-18"` - `"advisor-tool-2026-03-01"`
api/beta/skills/versions/delete Changed · +3 / -1 lines
- `string` - - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 30 more` + - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 31 more` - `"message-batches-2024-09-24"`
- `"output-300k-2026-03-24"` - `"user-profiles-2026-03-24"` + + - `"user-profiles-2026-08-18"` - `"advisor-tool-2026-03-01"`
api/beta/vaults/retrieve Changed · +3 / -1 lines
- `string` - - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 30 more` + - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 31 more` - `"message-batches-2024-09-24"`
- `"output-300k-2026-03-24"` - `"user-profiles-2026-03-24"` + + - `"user-profiles-2026-08-18"` - `"advisor-tool-2026-03-01"`
agents-and-tools/agent-skills/quickstart Changed · +126 / -172 lines
# List Anthropic-managed Skills curl --fail-with-body -sS "https://api.anthropic.com/v1/skills?source=anthropic" \ -H "x-api-key: $ANTHROPIC_API_KEY" \ - -H "anthropic-version: 2023-06-01" \ - -H "anthropic-beta: skills-2025-10-02" | - jq -r '.data[] | "\(.id): \(.display_title)"' + -H "anthropic-version: 2023-06-01" ``` ```bash CLI # List Anthropic-managed Skills - ant beta:skills list --source anthropic + ant skills list --source anthropic ``` ```python Python # List Anthropic-managed Skills - skills = client.beta.skills.list(source="anthropic") + skills = client.skills.list(source="anthropic") for skill in skills.data: - print(f"{skill.id}: {skill.display_title}") + print(f"{skill.id}: {skill.display_name}") ``` ```typescript TypeScript // List Anthropic-managed Skills - const skills = await client.beta.skills.list({ source: "anthropic" }); + const skills = await client.skills.list({ source: "anthropic" }); for (const skill of skills.data) { - console.log(`${skill.id}: ${skill.display_title}`); + console.log(`${skill.id}: ${skill.display_name}`); } ``` ```csharp C# // List Anthropic-managed Skills - var skills = await client.Beta.Skills.List(new SkillListParams { Source = "anthropic" }); + var skills = await client.Skills.List(new SkillListParams { Source = "anthropic" }); foreach (var skill in skills.Items) { - Console.WriteLine($"{skill.ID}: {skill.DisplayTitle}"); + Console.WriteLine($"{skill.ID}: {skill.DisplayName}"); } ``` ```go Go // List Anthropic-managed Skills - skills, err := client.Beta.Skills.List(ctx, anthropic.BetaSkillListParams{ + skills, err := client.Skills.List(ctx, anthropic.SkillListParams{ Source: anthropic.String("anthropic"), }) if err != nil {
} for _, skill := range skills.Data { - fmt.Printf("%s: %s\n", skill.ID, skill.DisplayTitle) + fmt.Printf("%s: %s\n", skill.ID, skill.DisplayName) } ``` ```java Java // List Anthropic-managed Skills - SkillListPage skills = client.beta().skills().list( + SkillListPage skills = client.skills().list( SkillListParams.builder().source("anthropic").build() ); - for (SkillListResponse skill : skills.data()) { - IO.println(skill.id() + ": " + skill.displayTitle().orElse("")); + for (Skill skill : skills.data()) { + IO.println(skill.id() + ": " + skill.displayName()); } ```
```ruby Ruby # List Anthropic-managed Skills - skills = client.beta.skills.list(source: "anthropic") + skills = client.skills.list(source: "anthropic") skills.data.each do |skill| - puts "#{skill.id}: #{skill.display_title}" + puts "#{skill.id}: #{skill.display_name}" end ``` </CodeGroup>
-H "content-type: application/json" \ -H "x-api-key: $ANTHROPIC_API_KEY" \ -H "anthropic-version: 2023-06-01" \ - -H "anthropic-beta: skills-2025-10-02" \ -d @- <<'EOF' { "model": "claude-opus-5",
} EOF ) - jq -r '"stop_reason=\(.stop_reason), blocks=\(.content | length)"' <<<"$response" ``` ```bash CLI # Create a message with the PowerPoint Skill - response=$(ant beta:messages create --format json \ - --beta skills-2025-10-02 <<'YAML' + response=$(ant messages create --format json <<'YAML' model: claude-opus-5 max_tokens: 16000 container:
name: code_execution YAML ) - - jq -r '"stop_reason=\(.stop_reason), blocks=\(.content | length)"' <<<"$response" ``` ```python Python # Create a message with the PowerPoint Skill - response = client.beta.messages.create( + response = client.messages.create( model="claude-opus-5", max_tokens=16000, - betas=["skills-2025-10-02"], container={ "skills": [{"type": "anthropic", "skill_id": "pptx", "version": "latest"}] },
```typescript TypeScript // Create a message with the PowerPoint Skill - const response = await client.beta.messages.create({ + const response = await client.messages.create({ model: "claude-opus-5", max_tokens: 16000, - betas: ["skills-2025-10-02"], container: { skills: [{ type: "anthropic", skill_id: "pptx", version: "latest" }], },
```csharp C# // Create a message with the PowerPoint Skill - var response = await client.Beta.Messages.Create(new MessageCreateParams + var response = await client.Messages.Create(new MessageCreateParams { Model = Model.ClaudeOpus5, MaxTokens = 16000, - Betas = ["skills-2025-10-02"], - Container = new BetaContainerParams + Container = new ContainerParams { Skills = [ - new BetaSkillParams + new SkillParams { - Type = BetaSkillParamsType.Anthropic, + Type = SkillParamsType.Anthropic, SkillID = "pptx", Version = "latest", },
}, Messages = [ - new BetaMessageParam + new MessageParam { Role = Role.User, Content = "Create a presentation about renewable energy with 5 slides", }, ], - Tools = [new BetaCodeExecutionTool20260521()], + Tools = [new CodeExecutionTool20260521()], }); Console.WriteLine($"stop_reason={response.StopReason?.Raw()}, blocks={response.Content.Count}");
```go Go // Create a message with the PowerPoint Skill - response, err := client.Beta.Messages.New(ctx, anthropic.BetaMessageNewParams{ + response, err := client.Messages.New(ctx, anthropic.MessageNewParams{ Model: anthropic.ModelClaudeOpus5, MaxTokens: 16000, - Betas: []anthropic.AnthropicBeta{ - anthropic.AnthropicBetaSkills2025_10_02, - }, - Container: anthropic.BetaMessageNewParamsContainerUnion{ - OfContainers: &anthropic.BetaContainerParams{ - Skills: []anthropic.BetaSkillParams{ + Container: anthropic.MessageCreateParamsContainerUnion{ + OfContainers: &anthropic.ContainerParams{ + Skills: []anthropic.SkillParams{ { - Type: anthropic.BetaSkillParamsTypeAnthropic, + Type: anthropic.SkillParamsTypeAnthropic, SkillID: "pptx", Version: anthropic.String("latest"), },
}, }, }, - Messages: []anthropic.BetaMessageParam{ - anthropic.NewBetaUserMessage( - anthropic.NewBetaTextBlock("Create a presentation about renewable energy with 5 slides"), + Messages: []anthropic.MessageParam{ + anthropic.NewUserMessage( + anthropic.NewTextBlock("Create a presentation about renewable energy with 5 slides"), ), }, - Tools: []anthropic.BetaToolUnionParam{ - {OfCodeExecutionTool20260521: &anthropic.BetaCodeExecutionTool20260521Param{}}, + Tools: []anthropic.ToolUnionParam{ + {OfCodeExecutionTool20260521: &anthropic.CodeExecutionTool20260521Param{}}, }, }) if err != nil {
```java Java // Create a message with the PowerPoint Skill - BetaMessage response = client.beta().messages().create( + Message response = client.messages().create( MessageCreateParams.builder() .model(Model.CLAUDE_OPUS_5) .maxTokens(16000) - .addBeta(AnthropicBeta.SKILLS_2025_10_02) .container( - BetaContainerParams.builder() + ContainerParams.builder() .addSkill( - BetaSkillParams.builder() - .type(BetaSkillParams.Type.ANTHROPIC) + SkillParams.builder() + .type(SkillParams.Type.ANTHROPIC) .skillId("pptx") .version("latest") .build()
.build() ) .addUserMessage("Create a presentation about renewable energy with 5 slides") - .addTool(BetaCodeExecutionTool20260521.builder().build()) + .addTool(CodeExecutionTool20260521.builder().build()) .build() );
```ruby Ruby # Create a message with the PowerPoint Skill - response = client.beta.messages.create( + response = client.messages.create( model: "claude-opus-5", max_tokens: 16_000, - betas: ["skills-2025-10-02"], container: { skills: [{type: "anthropic", skill_id: "pptx", version: "latest"}] },
* **`tools`:** Enables code execution (required for Skills) <Note> - Skills are generally available on the Claude API and don't require a beta header. The examples on this page still send the `skills-2025-10-02` beta header and use the SDKs' `beta` namespace. Both remain valid, so you can run the examples as written and omit the header in your own requests. + Skills are generally available on the Claude API and don't require a beta header. This covers the Skills API, the `container.skills` parameter, and the Files API. Requests that still send the `skills-2025-10-02` or `files-api-2025-04-14` header keep working, and the Skills API and Files API return the earlier response format for them. The PHP tabs in this quickstart still call the SDK's `beta` namespace and send those headers, so their printed output shows the earlier response fields. The examples use the `code_execution_20260521` tool version, and the Step 3 code parses the result types that current tool versions return. Skills also work with older [code execution tool](https://platform.claude.com/docs/en/agents-and-tools/tool-use/code-execution-tool) versions such as `code_execution_20250825`: any current code execution tool version satisfies the Skills requirement without a beta header. If you use a different version, use the tool `type` listed on the code execution tool page. </Note>
curl --fail-with-body -sS "https://api.anthropic.com/v1/files/$file_id/content" \ -H "x-api-key: $ANTHROPIC_API_KEY" \ -H "anthropic-version: 2023-06-01" \ - -H "anthropic-beta: files-api-2025-04-14" \ -o "$output_path" echo "Presentation saved to $output_path" fi
if [[ -n "$file_id" ]]; then # Download the file and save it output_path="${TMPDIR:-/tmp}/renewable_energy.pptx" - ant beta:files download --file-id "$file_id" --output "$output_path" + ant files download --file-id "$file_id" --output "$output_path" echo "Presentation saved to $output_path" fi ```
if file_id: # Download the file and save it output_path = Path(tempfile.gettempdir()) / "renewable_energy.pptx" - file_content = client.beta.files.download(file_id=file_id) + file_content = client.files.download(file_id=file_id) file_content.write_to_file(output_path) print(f"Presentation saved to {output_path}") ```
if (fileId) { // Download the file and save it const outputPath = path.join(os.tmpdir(), "renewable_energy.pptx"); - const fileContent = await client.beta.files.download(fileId); + const fileContent = await client.files.download(fileId); await fs.writeFile(outputPath, Buffer.from(await fileContent.arrayBuffer())); console.log(`Presentation saved to ${outputPath}`); }
foreach (var block in response.Content) { if (block.TryPickBashCodeExecutionToolResult(out var bashResult) - && bashResult.Content.TryPickBetaBashCodeExecutionResultBlock(out var bashResultBlock)) + && bashResult.Content.TryPickBashCodeExecutionResultBlock(out var bashResultBlock)) { foreach (var output in bashResultBlock.Content) {
{ // Download the file and save it var outputPath = Path.Combine(Path.GetTempPath(), "renewable_energy.pptx"); - using var download = await client.Beta.Files.Download(fileId); + using var download = await client.Files.Download(fileId); await using var source = await download.ReadAsStream(); await using var destination = File.Create(outputPath); await source.CopyToAsync(destination);
var fileID string for _, block := range response.Content { switch result := block.AsAny().(type) { - case anthropic.BetaBashCodeExecutionToolResultBlock: + case anthropic.BashCodeExecutionToolResultBlock: if result.Content.Type == "bash_code_execution_result" { for _, output := range result.Content.Content { fileID = output.FileID
if fileID != "" { // Download the file and save it outputPath := filepath.Join(os.TempDir(), "renewable_energy.pptx") - fileContent, err := client.Beta.Files.Download(ctx, fileID, anthropic.BetaFileDownloadParams{}) + fileContent, err := client.Files.Download(ctx, fileID) if err != nil { panic(err) }
// its Bash sub-tool, and generated files appear as bash_code_execution_output // items inside the bash_code_execution_tool_result block. String fileId = null; - for (BetaContentBlock block : response.content()) { + for (ContentBlock block : response.content()) { if (block.isBashCodeExecutionToolResult()) { var content = block.asBashCodeExecutionToolResult().content(); - if (content.isBetaBashCodeExecutionResultBlock()) { - for (var output : content.asBetaBashCodeExecutionResultBlock().content()) { + if (content.isBashCodeExecutionResultBlock()) { + for (var output : content.asBashCodeExecutionResultBlock().content()) { fileId = output.fileId(); } }
if (fileId != null) { // Download the file and save it Path outputPath = Files.createTempFile("renewable_energy", ".pptx"); - try (HttpResponse fileContent = client.beta().files().download(fileId)) { + try (HttpResponse fileContent = client.files().download(fileId)) { Files.copy(fileContent.body(), outputPath, StandardCopyOption.REPLACE_EXISTING); } IO.println("Presentation saved to " + outputPath);
if file_id # Download the file and save it output_path = File.join(Dir.tmpdir, "renewable_energy.pptx") - file_content = client.beta.files.download(file_id) + file_content = client.files.download(file_id) File.binwrite(output_path, file_content.read) puts "Presentation saved to #{output_path}" end
-H "content-type: application/json" \ -H "x-api-key: $ANTHROPIC_API_KEY" \ -H "anthropic-version: 2023-06-01" \ - -H "anthropic-beta: skills-2025-10-02" \ -d '{ "model": "claude-opus-5", "max_tokens": 16000,
{"role": "user", "content": "Create a quarterly sales tracking spreadsheet with sample data"} ], "tools": [{"type": "code_execution_20260521", "name": "code_execution"}] - }' | jq -r '"stop_reason=\(.stop_reason)"' + }' ``` ```bash CLI - ant beta:messages create --format json \ - --beta skills-2025-10-02 <<'YAML' | jq -r '"stop_reason=\(.stop_reason)"' + ant messages create <<'YAML' model: claude-opus-5 max_tokens: 16000 container:
``` ```python Python - response = client.beta.messages.create( + response = client.messages.create( model="claude-opus-5", max_tokens=16000, - betas=["skills-2025-10-02"], container={ "skills": [{"type": "anthropic", "skill_id": "xlsx", "version": "latest"}] },
``` ```typescript TypeScript - const response = await client.beta.messages.create({ + const response = await client.messages.create({ model: "claude-opus-5", max_tokens: 16000, - betas: ["skills-2025-10-02"], container: { skills: [{ type: "anthropic", skill_id: "xlsx", version: "latest" }] },
``` ```csharp C# - var response = await client.Beta.Messages.Create( + var response = await client.Messages.Create( new MessageCreateParams { Model = Model.ClaudeOpus5, MaxTokens = 16000, - Betas = ["skills-2025-10-02"], - Container = new BetaContainerParams + Container = new ContainerParams { Skills = [ - new BetaSkillParams + new SkillParams { - Type = BetaSkillParamsType.Anthropic, + Type = SkillParamsType.Anthropic, SkillID = "xlsx", Version = "latest", },
}, Messages = [ - new BetaMessageParam + new MessageParam { Role = Role.User, Content = "Create a quarterly sales tracking spreadsheet with sample data", }, ], - Tools = [new BetaCodeExecutionTool20260521()], + Tools = [new CodeExecutionTool20260521()], } ); ``` ```go Go - response, err := client.Beta.Messages.New(context.Background(), anthropic.BetaMessageNewParams{ + response, err := client.Messages.New(context.Background(), anthropic.MessageNewParams{ Model: anthropic.ModelClaudeOpus5, MaxTokens: 16000, - Betas: []anthropic.AnthropicBeta{ - anthropic.AnthropicBetaSkills2025_10_02, - }, - Container: anthropic.BetaMessageNewParamsContainerUnion{ - OfContainers: &anthropic.BetaContainerParams{ - Skills: []anthropic.BetaSkillParams{ + Container: anthropic.MessageCreateParamsContainerUnion{ + OfContainers: &anthropic.ContainerParams{ + Skills: []anthropic.SkillParams{ { - Type: anthropic.BetaSkillParamsTypeAnthropic, + Type: anthropic.SkillParamsTypeAnthropic, SkillID: "xlsx", Version: anthropic.String("latest"), },
}, }, }, - Messages: []anthropic.BetaMessageParam{ - anthropic.NewBetaUserMessage(anthropic.NewBetaTextBlock("Create a quarterly sales tracking spreadsheet with sample data")), + Messages: []anthropic.MessageParam{ + anthropic.NewUserMessage(anthropic.NewTextBlock("Create a quarterly sales tracking spreadsheet with sample data")), }, - Tools: []anthropic.BetaToolUnionParam{ + Tools: []anthropic.ToolUnionParam{ { - OfCodeExecutionTool20260521: &anthropic.BetaCodeExecutionTool20260521Param{}, + OfCodeExecutionTool20260521: &anthropic.CodeExecutionTool20260521Param{}, }, }, })
``` ```java Java - BetaMessage response = client.beta().messages().create( + Message response = client.messages().create( MessageCreateParams.builder() .model(CLAUDE_OPUS_5) .maxTokens(16000) - .addBeta(AnthropicBeta.SKILLS_2025_10_02) .container( - BetaContainerParams.builder() + ContainerParams.builder() .addSkill( - BetaSkillParams.builder() + SkillParams.builder() .type(ANTHROPIC) .skillId("xlsx") .version("latest")
.build() ) .addUserMessage("Create a quarterly sales tracking spreadsheet with sample data") - .addTool(BetaCodeExecutionTool20260521.builder().build()) + .addTool(CodeExecutionTool20260521.builder().build()) .build() );
``` ```ruby Ruby - response = client.beta.messages.create( + response = client.messages.create( model: "claude-opus-5", max_tokens: 16_000, - betas: ["skills-2025-10-02"], container: { skills: [{type: "anthropic", skill_id: "xlsx", version: "latest"}] },
-H "content-type: application/json" \ -H "x-api-key: $ANTHROPIC_API_KEY" \ -H "anthropic-version: 2023-06-01" \ - -H "anthropic-beta: skills-2025-10-02" \ -d '{ "model": "claude-opus-5", "max_tokens": 16000,
{"role": "user", "content": "Write a 2-page report on the benefits of renewable energy"} ], "tools": [{"type": "code_execution_20260521", "name": "code_execution"}] - }' | jq -r '"stop_reason=\(.stop_reason)"' + }' ``` ```bash CLI - ant beta:messages create --format json \ - --beta skills-2025-10-02 <<'YAML' | jq -r '"stop_reason=\(.stop_reason)"' + ant messages create <<'YAML' model: claude-opus-5 max_tokens: 16000 container:
``` ```python Python - response = client.beta.messages.create( + response = client.messages.create( model="claude-opus-5", max_tokens=16000, - betas=["skills-2025-10-02"], container={ "skills": [{"type": "anthropic", "skill_id": "docx", "version": "latest"}] },
``` ```typescript TypeScript - const response = await client.beta.messages.create({ + const response = await client.messages.create({ model: "claude-opus-5", max_tokens: 16000, - betas: ["skills-2025-10-02"], container: { skills: [{ type: "anthropic", skill_id: "docx", version: "latest" }] },
``` ```csharp C# - var response = await client.Beta.Messages.Create( + var response = await client.Messages.Create( new MessageCreateParams { Model = Model.ClaudeOpus5, MaxTokens = 16000, - Betas = ["skills-2025-10-02"], - Container = new BetaContainerParams + Container = new ContainerParams { Skills = [ - new BetaSkillParams + new SkillParams { - Type = BetaSkillParamsType.Anthropic, + Type = SkillParamsType.Anthropic, SkillID = "docx", Version = "latest", },
}, Messages = [ - new BetaMessageParam + new MessageParam { Role = Role.User, Content = "Write a 2-page report on the benefits of renewable energy", }, ], - Tools = [new BetaCodeExecutionTool20260521()], + Tools = [new CodeExecutionTool20260521()], } ); ``` ```go Go - response, err := client.Beta.Messages.New(context.Background(), anthropic.BetaMessageNewParams{ + response, err := client.Messages.New(context.Background(), anthropic.MessageNewParams{ Model: anthropic.ModelClaudeOpus5, MaxTokens: 16000, - Betas: []anthropic.AnthropicBeta{ - anthropic.AnthropicBetaSkills2025_10_02, - }, - Container: anthropic.BetaMessageNewParamsContainerUnion{ - OfContainers: &anthropic.BetaContainerParams{ - Skills: []anthropic.BetaSkillParams{ + Container: anthropic.MessageCreateParamsContainerUnion{ + OfContainers: &anthropic.ContainerParams{ + Skills: []anthropic.SkillParams{ { - Type: anthropic.BetaSkillParamsTypeAnthropic, + Type: anthropic.SkillParamsTypeAnthropic, SkillID: "docx", Version: anthropic.String("latest"), },
}, }, }, - Messages: []anthropic.BetaMessageParam{ - anthropic.NewBetaUserMessage(anthropic.NewBetaTextBlock("Write a 2-page report on the benefits of renewable energy")), + Messages: []anthropic.MessageParam{ + anthropic.NewUserMessage(anthropic.NewTextBlock("Write a 2-page report on the benefits of renewable energy")), }, - Tools: []anthropic.BetaToolUnionParam{ + Tools: []anthropic.ToolUnionParam{ { - OfCodeExecutionTool20260521: &anthropic.BetaCodeExecutionTool20260521Param{}, + OfCodeExecutionTool20260521: &anthropic.CodeExecutionTool20260521Param{}, }, }, })
``` ```java Java - BetaMessage response = client.beta().messages().create( + Message response = client.messages().create( MessageCreateParams.builder() .model(CLAUDE_OPUS_5) .maxTokens(16000) - .addBeta(AnthropicBeta.SKILLS_2025_10_02) .container( - BetaContainerParams.builder() + ContainerParams.builder() .addSkill( - BetaSkillParams.builder() + SkillParams.builder() .type(ANTHROPIC) .skillId("docx") .version("latest")
.build() ) .addUserMessage("Write a 2-page report on the benefits of renewable energy") - .addTool(BetaCodeExecutionTool20260521.builder().build()) + .addTool(CodeExecutionTool20260521.builder().build()) .build() );
``` ```ruby Ruby - response = client.beta.messages.create( + response = client.messages.create( model: "claude-opus-5", max_tokens: 16_000, - betas: ["skills-2025-10-02"], container: { skills: [{type: "anthropic", skill_id: "docx", version: "latest"}] },
-H "content-type: application/json" \ -H "x-api-key: $ANTHROPIC_API_KEY" \ -H "anthropic-version: 2023-06-01" \ - -H "anthropic-beta: skills-2025-10-02" \ -d '{ "model": "claude-opus-5", "max_tokens": 16000,
{"role": "user", "content": "Generate a PDF invoice template"} ], "tools": [{"type": "code_execution_20260521", "name": "code_execution"}] - }' | jq -r '"stop_reason=\(.stop_reason)"' + }' ``` ```bash CLI - ant beta:messages create --format json \ - --beta skills-2025-10-02 <<'YAML' | jq -r '"stop_reason=\(.stop_reason)"' + ant messages create <<'YAML' model: claude-opus-5 max_tokens: 16000 container:
``` ```python Python - response = client.beta.messages.create( + response = client.messages.create( model="claude-opus-5", max_tokens=16000, - betas=["skills-2025-10-02"], container={ "skills": [{"type": "anthropic", "skill_id": "pdf", "version": "latest"}] },
``` ```typescript TypeScript - const response = await client.beta.messages.create({ + const response = await client.messages.create({ model: "claude-opus-5", max_tokens: 16000, - betas: ["skills-2025-10-02"], container: { skills: [{ type: "anthropic", skill_id: "pdf", version: "latest" }] },
``` ```csharp C# - var response = await client.Beta.Messages.Create( + var response = await client.Messages.Create( new MessageCreateParams { Model = Model.ClaudeOpus5, MaxTokens = 16000, - Betas = ["skills-2025-10-02"], - Container = new BetaContainerParams + Container = new ContainerParams { Skills = [ - new BetaSkillParams + new SkillParams { - Type = BetaSkillParamsType.Anthropic, + Type = SkillParamsType.Anthropic, SkillID = "pdf", Version = "latest", },
}, Messages = [ - new BetaMessageParam + new MessageParam { Role = Role.User, Content = "Generate a PDF invoice template", }, ], - Tools = [new BetaCodeExecutionTool20260521()], + Tools = [new CodeExecutionTool20260521()], } ); ``` ```go Go - response, err := client.Beta.Messages.New(context.Background(), anthropic.BetaMessageNewParams{ + response, err := client.Messages.New(context.Background(), anthropic.MessageNewParams{ Model: anthropic.ModelClaudeOpus5, MaxTokens: 16000, - Betas: []anthropic.AnthropicBeta{ - anthropic.AnthropicBetaSkills2025_10_02, - }, - Container: anthropic.BetaMessageNewParamsContainerUnion{ - OfContainers: &anthropic.BetaContainerParams{ - Skills: []anthropic.BetaSkillParams{ + Container: anthropic.MessageCreateParamsContainerUnion{ + OfContainers: &anthropic.ContainerParams{ + Skills: []anthropic.SkillParams{ { - Type: anthropic.BetaSkillParamsTypeAnthropic, + Type: anthropic.SkillParamsTypeAnthropic, SkillID: "pdf", Version: anthropic.String("latest"), },
}, }, }, - Messages: []anthropic.BetaMessageParam{ - anthropic.NewBetaUserMessage(anthropic.NewBetaTextBlock("Generate a PDF invoice template")), + Messages: []anthropic.MessageParam{ + anthropic.NewUserMessage(anthropic.NewTextBlock("Generate a PDF invoice template")), }, - Tools: []anthropic.BetaToolUnionParam{ + Tools: []anthropic.ToolUnionParam{ { - OfCodeExecutionTool20260521: &anthropic.BetaCodeExecutionTool20260521Param{}, + OfCodeExecutionTool20260521: &anthropic.CodeExecutionTool20260521Param{}, }, }, })
``` ```java Java - BetaMessage response = client.beta().messages().create( + Message response = client.messages().create( MessageCreateParams.builder() .model(CLAUDE_OPUS_5) .maxTokens(16000) - .addBeta(AnthropicBeta.SKILLS_2025_10_02) .container( - BetaContainerParams.builder() + ContainerParams.builder() .addSkill( - BetaSkillParams.builder() + SkillParams.builder() .type(ANTHROPIC) .skillId("pdf") .version("latest")
.build() ) .addUserMessage("Generate a PDF invoice template") - .addTool(BetaCodeExecutionTool20260521.builder().build()) + .addTool(CodeExecutionTool20260521.builder().build()) .build() );
``` ```ruby Ruby - response = client.beta.messages.create( + response = client.messages.create( model: "claude-opus-5", max_tokens: 16_000, - betas: ["skills-2025-10-02"], container: { skills: [{type: "anthropic", skill_id: "pdf", version: "latest"}] },
Learn how to use Agent Skills to extend Claude's capabilities through the API. </Card> - <Card title="Create custom Skills" icon="code" href="https://platform.claude.com/docs/en/api/skills/create-skill"> + <Card title="Create custom Skills" icon="code" href="https://platform.claude.com/docs/en/api/skills/create"> Upload your own Skills for specialized tasks. </Card>
api/errors Changed · +2 / -2 lines
The API follows a predictable HTTP error code format: -* 400 - `invalid_request_error`: There was an issue with the format or content of your request. This error type may also be used for other 4XX status codes not listed in this section. +* 400 - `invalid_request_error`: There was an issue with the format or content of your request. This error type may also be used for other 4XX status codes not listed in this section. The API also returns a 400 when usage reaches an organization or workspace [spend limit you set](https://platform.claude.com/docs/en/api/rate-limits#setting-your-own-spend-limit), except limits on the [Claude Code workspace](https://platform.claude.com/docs/en/manage-claude/workspaces#claude-code-workspace), which can return a 429 instead. * 401 - `authentication_error`: There's an issue with your API key (for example, it's malformed, revoked, or expired; see [Key expiration](https://platform.claude.com/docs/en/manage-claude/authentication#key-expiration)). On Claude Platform on AWS, this can also indicate a problem with your AWS credentials or SigV4 signature.
* 413 - `request_too_large`: Request exceeds the maximum allowed number of bytes. See [Request size limits](https://platform.claude.com/docs/en/api/errors#request-size-limits) for per-endpoint maximums. -* 429 - `rate_limit_error`: Your account has hit a rate limit. +* 429 - `rate_limit_error`: Your organization has hit a [rate limit](https://platform.claude.com/docs/en/api/rate-limits), reached its usage tier's monthly spend cap, or reached a spend limit on the Claude Code workspace. A tier spend-cap 429 has no `retry-after` header and keeps failing until access resumes; see [Reaching your spend cap](https://platform.claude.com/docs/en/api/rate-limits#reaching-your-spend-cap) for how to recognize it. * 500 - `api_error`: An unexpected error has occurred internal to Anthropic's systems. Retry the request with exponential backoff; if the error persists, contact support with the [request ID](https://platform.claude.com/docs/en/api/errors#request-id).
api/beta/skills/versions/list Changed · +3 / -1 lines
- `string` - - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 30 more` + - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 31 more` - `"message-batches-2024-09-24"`
- `"output-300k-2026-03-24"` - `"user-profiles-2026-03-24"` + + - `"user-profiles-2026-08-18"` - `"advisor-tool-2026-03-01"`
cli-sdks-libraries/cli/quickstart Changed · +2 / -2 lines
For Linux environments, download the release binary directly. ```bash - VERSION=1.22.1 + VERSION=1.26.1 OS=$(uname -s | tr '[:upper:]' '[:lower:]') case $(uname -m) in x86_64) ARCH=amd64 ;;
</Tab> <Tab title="Go"> - You can also install the CLI from source using `go install`. Requires Go 1.22 or later. + You can also install the CLI from source using `go install`. Requires Go 1.25 or later. ```bash go install github.com/anthropics/anthropic-cli/cmd/ant@latest
api/beta/skills/versions/retrieve Changed · +3 / -1 lines
- `string` - - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 30 more` + - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 31 more` - `"message-batches-2024-09-24"`
- `"output-300k-2026-03-24"` - `"user-profiles-2026-03-24"` + + - `"user-profiles-2026-08-18"` - `"advisor-tool-2026-03-01"`
managed-agents/memory Changed · +2 / -2 lines
<Note> Don't combine `agent-memory-2026-07-22` with `managed-agents-2026-04-01` on a memory store request: sending both returns a `400` error. If your code sets beta headers explicitly, replace `managed-agents-2026-04-01` with `agent-memory-2026-07-22` on memory store calls rather than adding a second value. Session endpoints, including attaching a memory store to a session, still use `managed-agents-2026-04-01`. - On July 22, 2026, the `managed-agents-2026-04-01` header adopts the same list behavior on `GET /v1/memory_stores/{memory_store_id}/memories`; sending `agent-memory-2026-07-22` opts you into that behavior now. Page cursors from requests made without the header aren't valid with it, so restart from the first page. + `GET /v1/memory_stores/{memory_store_id}/memories` behaves the same under either header: results come back in a stable, server-defined order, and `path_prefix` and `depth` apply the same way. </Note> ## Overview
### How the agent accesses memory -Each attached store is mounted inside the session's sandbox as a directory under `/mnt/memory/`. The directory name is the store's display name sanitized to a filesystem-safe slug (lowercased; non-alphanumeric runs become a single hyphen), so a store named "Demo Memory" mounts at `/mnt/memory/demo-memory/`. The exact path is returned in the `mount_path` field on the session's memory-store resource; read it from there rather than constructing it yourself. The agent reads and writes the store with the standard [agent toolset](https://platform.claude.com/docs/en/managed-agents/tools). Writes under the mount path are persisted back to the store and stay in sync across sessions that share it; writes to any other path under `/mnt/memory/` land in container-local scratch and are lost when the session ends. A short description of each mount (display name, mount path, access mode, store `description`, and any `instructions`) is automatically added to the system prompt. +Each attached store is mounted inside the session's sandbox as a directory under `/mnt/memory/`. The directory name is the store's display name sanitized to a filesystem-safe slug (lowercased; non-alphanumeric runs become a single hyphen), so a store named "Demo Memory" mounts at `/mnt/memory/demo-memory/`. The exact path is returned in the `mount_path` field on the session's memory-store resource; read it from there rather than constructing it yourself. The agent reads and writes the store with the standard [agent toolset](https://platform.claude.com/docs/en/managed-agents/tools). Writes under the mount path are persisted back to the store and stay in sync across sessions that share it; writes to any other path under `/mnt/memory/` fail, because the sandbox mounts that parent directory read-only. A short description of each mount (display name, mount path, access mode, store `description`, and any `instructions`) is automatically added to the system prompt. `access` is enforced at the filesystem level: a `read_only` mount rejects writes, while writes to a `read_write` mount produce [memory versions](https://platform.claude.com/docs/en/managed-agents/memory#audit-memory-changes) attributed to the session.
api/beta/tunnels/archive Changed · +3 / -1 lines
- `string` - - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 30 more` + - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 31 more` - `"message-batches-2024-09-24"`
- `"output-300k-2026-03-24"` - `"user-profiles-2026-03-24"` + + - `"user-profiles-2026-08-18"` - `"advisor-tool-2026-03-01"`
api/beta/vaults/credentials/archive Changed · +3 / -1 lines
- `string` - - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 30 more` + - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 31 more` - `"message-batches-2024-09-24"`
- `"output-300k-2026-03-24"` - `"user-profiles-2026-03-24"` + + - `"user-profiles-2026-08-18"` - `"advisor-tool-2026-03-01"`
api/beta/tunnels/certificates/archive Changed · +3 / -1 lines
- `string` - - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 30 more` + - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 31 more` - `"message-batches-2024-09-24"`
- `"output-300k-2026-03-24"` - `"user-profiles-2026-03-24"` + + - `"user-profiles-2026-08-18"` - `"advisor-tool-2026-03-01"`
api/beta/vaults/credentials/delete Changed · +3 / -1 lines
- `string` - - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 30 more` + - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 31 more` - `"message-batches-2024-09-24"`
- `"output-300k-2026-03-24"` - `"user-profiles-2026-03-24"` + + - `"user-profiles-2026-08-18"` - `"advisor-tool-2026-03-01"`
api/beta/tunnels/certificates/create Changed · +3 / -1 lines
- `string` - - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 30 more` + - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 31 more` - `"message-batches-2024-09-24"`
- `"output-300k-2026-03-24"` - `"user-profiles-2026-03-24"` + + - `"user-profiles-2026-08-18"` - `"advisor-tool-2026-03-01"`
api/beta/vaults/credentials/mcp_oauth_validate Changed · +3 / -1 lines
- `string` - - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 30 more` + - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 31 more` - `"message-batches-2024-09-24"`
- `"output-300k-2026-03-24"` - `"user-profiles-2026-03-24"` + + - `"user-profiles-2026-08-18"` - `"advisor-tool-2026-03-01"`
api/beta/tunnels/certificates/list Changed · +3 / -1 lines
- `string` - - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 30 more` + - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 31 more` - `"message-batches-2024-09-24"`
- `"output-300k-2026-03-24"` - `"user-profiles-2026-03-24"` + + - `"user-profiles-2026-08-18"` - `"advisor-tool-2026-03-01"`
api/beta/vaults/credentials/update Changed · +3 / -1 lines
- `string` - - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 30 more` + - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 31 more` - `"message-batches-2024-09-24"`
- `"output-300k-2026-03-24"` - `"user-profiles-2026-03-24"` + + - `"user-profiles-2026-08-18"` - `"advisor-tool-2026-03-01"`
api/beta/tunnels/certificates/retrieve Changed · +3 / -1 lines
- `string` - - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 30 more` + - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 31 more` - `"message-batches-2024-09-24"`
- `"output-300k-2026-03-24"` - `"user-profiles-2026-03-24"` + + - `"user-profiles-2026-08-18"` - `"advisor-tool-2026-03-01"`
api/beta/vaults/list Changed · +3 / -1 lines
- `string` - - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 30 more` + - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 31 more` - `"message-batches-2024-09-24"`
- `"output-300k-2026-03-24"` - `"user-profiles-2026-03-24"` + + - `"user-profiles-2026-08-18"` - `"advisor-tool-2026-03-01"`
api/beta/tunnels/create Changed · +3 / -1 lines
- `string` - - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 30 more` + - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 31 more` - `"message-batches-2024-09-24"`
- `"output-300k-2026-03-24"` - `"user-profiles-2026-03-24"` + + - `"user-profiles-2026-08-18"` - `"advisor-tool-2026-03-01"`
api/beta/vaults/update Changed · +3 / -1 lines
- `string` - - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 30 more` + - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 31 more` - `"message-batches-2024-09-24"`
- `"output-300k-2026-03-24"` - `"user-profiles-2026-03-24"` + + - `"user-profiles-2026-08-18"` - `"advisor-tool-2026-03-01"`
api/beta/tunnels/list Changed · +3 / -1 lines
- `string` - - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 30 more` + - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 31 more` - `"message-batches-2024-09-24"`
- `"output-300k-2026-03-24"` - `"user-profiles-2026-03-24"` + + - `"user-profiles-2026-08-18"` - `"advisor-tool-2026-03-01"`
api/completions/create Changed · +3 / -1 lines
- `string` - - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 30 more` + - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 31 more` - `"message-batches-2024-09-24"`
- `"output-300k-2026-03-24"` - `"user-profiles-2026-03-24"` + + - `"user-profiles-2026-08-18"` - `"advisor-tool-2026-03-01"`
api/beta/tunnels/retrieve Changed · +3 / -1 lines
- `string` - - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 30 more` + - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 31 more` - `"message-batches-2024-09-24"`
- `"output-300k-2026-03-24"` - `"user-profiles-2026-03-24"` + + - `"user-profiles-2026-08-18"` - `"advisor-tool-2026-03-01"`
build-with-claude/claude-in-amazon-bedrock Changed · +2 / -2 lines
<Tabs> <Tab title="Gradle"> ```kotlin - implementation("com.anthropic:anthropic-java-bedrock:2.53.0") + implementation("com.anthropic:anthropic-java-bedrock:2.57.0") ``` </Tab>
<dependency> <groupId>com.anthropic</groupId> <artifactId>anthropic-java-bedrock</artifactId> - <version>2.53.0</version> + <version>2.57.0</version> </dependency> ``` </Tab>
api/beta/tunnels/reveal_token Changed · +3 / -1 lines
- `string` - - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 30 more` + - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 31 more` - `"message-batches-2024-09-24"`
- `"output-300k-2026-03-24"` - `"user-profiles-2026-03-24"` + + - `"user-profiles-2026-08-18"` - `"advisor-tool-2026-03-01"`
build-with-claude/claude-on-amazon-bedrock-legacy Changed · +2 / -2 lines
<Tab title="Java"> <CodeGroup> ```groovy Gradle - implementation("com.anthropic:anthropic-java-bedrock:2.53.0") + implementation("com.anthropic:anthropic-java-bedrock:2.57.0") ``` ```xml Maven
<dependency> <groupId>com.anthropic</groupId> <artifactId>anthropic-java-bedrock</artifactId> - <version>2.53.0</version> + <version>2.57.0</version> </dependency> ```
api/beta/tunnels/rotate_token Changed · +3 / -1 lines
- `string` - - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 30 more` + - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 31 more` - `"message-batches-2024-09-24"`
- `"output-300k-2026-03-24"` - `"user-profiles-2026-03-24"` + + - `"user-profiles-2026-08-18"` - `"advisor-tool-2026-03-01"`
cli-sdks-libraries/cli/using Changed · +2 / -2 lines
Run `ant --help` for the full resource list, or append `--help` to any subcommand for its flags. -Resources in beta (including agents, sessions, deployments, environments, and skills) live under the `beta:` prefix. Commands in this namespace automatically send the appropriate `anthropic-beta` header for that resource, so you don't need to pass it yourself. Use `--beta <header>` only to override the default (for example, to opt into a different schema version). +Resources in beta (including agents, sessions, deployments, and environments) live under the `beta:` prefix. Commands in this namespace automatically send the appropriate `anthropic-beta` header for that resource, so you don't need to pass it yourself. Use `--beta <header>` only to override the default (for example, to opt into a different schema version). ```bash ant models list
Flags that take a file path, such as `--file` on the upload command, accept a bare path: ```bash -ant beta:files upload --file ./report.pdf +ant files upload --file ./report.pdf ``` To inline a file's contents into a string-valued field, prefix the path with `@`:
api/beta/vaults/archive Changed · +3 / -1 lines
- `string` - - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 30 more` + - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 31 more` - `"message-batches-2024-09-24"`
- `"output-300k-2026-03-24"` - `"user-profiles-2026-03-24"` + + - `"user-profiles-2026-08-18"` - `"advisor-tool-2026-03-01"`
manage-claude/api-and-data-retention Changed · +2 / -2 lines
| [Thinking](https://platform.claude.com/docs/en/build-with-claude/thinking) | `/v1/messages` (with `thinking`) | <Eligible>Yes</Eligible> | <Eligible>Yes</Eligible> | | | [Token counting](https://platform.claude.com/docs/en/build-with-claude/token-counting) | `/v1/messages/count_tokens` | <Eligible>Yes</Eligible> | <Eligible>Yes</Eligible> | Count tokens before sending requests. | | [Tool search](https://platform.claude.com/docs/en/agents-and-tools/tool-use/tool-search-tool) | `/v1/messages` (with `tool_search` tool) | <Eligible>Yes</Eligible> | <Eligible status="no">No</Eligible> | Server-side tool executed by Anthropic; the tool definitions in the request are searched in memory per call and nothing is stored after the response. | -| [Web fetch](https://platform.claude.com/docs/en/agents-and-tools/tool-use/web-fetch-tool) | `/v1/messages` (with `web_fetch` tool) | <Eligible>Yes</Eligible> | <Eligible status="no">No</Eligible> | Fetched web content returned in the API response. [Dynamic filtering](https://platform.claude.com/docs/en/agents-and-tools/tool-use/web-search-tool#dynamic-filtering) is not eligible for ZDR or HIPAA. Website publishers may retain request data (such as fetched URLs and request metadata) according to their own policies. | +| [Web fetch](https://platform.claude.com/docs/en/agents-and-tools/tool-use/web-fetch-tool) | `/v1/messages` (with `web_fetch` tool) | <Eligible>Yes</Eligible> | <Eligible status="no">No</Eligible> | Fetched web content returned in the API response. [Dynamic filtering](https://platform.claude.com/docs/en/agents-and-tools/tool-use/web-fetch-tool#dynamic-filtering) is not eligible for ZDR or HIPAA. Website publishers may retain request data (such as fetched URLs and request metadata) according to their own policies. | | [Web search](https://platform.claude.com/docs/en/agents-and-tools/tool-use/web-search-tool) | `/v1/messages` (with `web_search` tool) | <Eligible>Yes</Eligible> | <Eligible>Yes</Eligible> | Real-time web search results returned in the API response. [Dynamic filtering](https://platform.claude.com/docs/en/agents-and-tools/tool-use/web-search-tool#dynamic-filtering) is not eligible for ZDR or HIPAA. | ## Retention regardless of arrangement
* [Structured outputs](https://platform.claude.com/docs/en/build-with-claude/structured-outputs) * [Prompt caching](https://platform.claude.com/docs/en/build-with-claude/prompt-caching) * [Batch processing](https://platform.claude.com/docs/en/build-with-claude/batch-processing) -* [Files API reference](https://platform.claude.com/docs/en/api/beta/files/upload) +* [Files API reference](https://platform.claude.com/docs/en/api/files/upload) * [Trust Center](https://trust.anthropic.com/resources)
api/beta/vaults/create Changed · +3 / -1 lines
- `string` - - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 30 more` + - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 31 more` - `"message-batches-2024-09-24"`
- `"output-300k-2026-03-24"` - `"user-profiles-2026-03-24"` + + - `"user-profiles-2026-08-18"` - `"advisor-tool-2026-03-01"`
api/beta/skills/create Changed · +3 / -1 lines
- `string` - - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 30 more` + - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 31 more` - `"message-batches-2024-09-24"`
- `"output-300k-2026-03-24"` - `"user-profiles-2026-03-24"` + + - `"user-profiles-2026-08-18"` - `"advisor-tool-2026-03-01"`
about-claude/models/optimizing-for-cost-and-intelligence Changed · +15 / -11 lines
```text wrap $ claude -> add prompt caching to this integration +> /claude-api add prompt caching to this integration Done. Prompt caching is now wired into the harness. Two changes:
Three controls do three different jobs. A task budget saves money, because the model sees it. `max_tokens` is a safety cap that saves nothing. On Claude Managed Agents, a session budget is the hard dollar stop behind both. Set all three: a task budget, a high `max_tokens`, and a session cap for the run you never want on a bill, with a [workspace spend limit](https://platform.claude.com/docs/en/api/rate-limits#setting-lower-limits-for-workspaces) as the final backstop. * **Task budgets** are in beta (beta header `task-budgets-2026-03-13`) on Claude Opus 5, Claude Fable 5, Claude Opus 4.8, and Claude Opus 4.7, but not Claude Sonnet 5; check the [support table](https://platform.claude.com/docs/en/build-with-claude/task-budgets#feature-support) first. Start near your loop's 90th-percentile token usage, then tighten ([Choosing a budget](https://platform.claude.com/docs/en/build-with-claude/task-budgets#choosing-a-budget) shows how to collect that distribution). Budgets below the current 20,000-token floor are rejected, and very tight budgets can produce refusal-like behavior. Set the budget once, on the first request, because a mid-task change [invalidates the cache](https://platform.claude.com/docs/en/about-claude/models/optimizing-for-cost-and-intelligence#cache-repeated-context). The budget is advisory, steering the model rather than stopping it, so verify adherence on your workload. -* **`max_tokens`** caps a single response, invisibly to the model, so lowering it does not make the model economize. The turns that needed the room are discarded and still billed. On an internal repository-task benchmark[12](https://platform.claude.com/docs/en/about-claude/models/optimizing-for-cost-and-intelligence#refs), a 16,384-token cap ended 15% of Claude Opus 5's attempts and a third of Claude Fable 5's, none of them solved. Capped runs spent less per attempt but bought proportionally fewer solves, so cost per solved task was the same as at 64,000. At that setting nothing was cut off, and Fable solved 54.6% of tasks instead of 33.3% (on a separate cut of the SWE-bench Pro[3](https://platform.claude.com/docs/en/about-claude/models/optimizing-for-cost-and-intelligence#refs) subset, described in reference 12, 92% instead of 90%). Retrying capped attempts only adds cost: at the same cap they never succeeded, and at a higher one you also pay for the wasted attempt. Set `max_tokens` to 64,000 for agentic work (128,000, the maximum, at `xhigh` or `max` effort), [stream responses](https://platform.claude.com/docs/en/build-with-claude/streaming) that large, treat [`stop_reason: max_tokens`](https://platform.claude.com/docs/en/build-with-claude/handling-stop-reasons#max-tokens) as a failure, and save money with effort and task budgets, which the model can see. +* **`max_tokens`** caps a single response, invisibly to the model, so lowering it does not make the model economize. The turns that needed the room are discarded and still billed. On an internal repository-task benchmark[12](https://platform.claude.com/docs/en/about-claude/models/optimizing-for-cost-and-intelligence#refs), a 16,384-token cap ended 15% of Claude Opus 5's attempts and a third of Claude Fable 5's, none of them solved. Capped runs spent less per attempt but bought proportionally fewer solves, so cost per solved task was the same as at 64,000. At that setting nothing was cut off, and Fable solved 54.6% of tasks instead of 36.6% on the problems both runs scored (on a separate cut of the SWE-bench Pro[3](https://platform.claude.com/docs/en/about-claude/models/optimizing-for-cost-and-intelligence#refs) subset, described in reference 12, 92% instead of 90%). Retrying capped attempts only adds cost: at the same cap they never succeeded, and at a higher one you also pay for the wasted attempt. Set `max_tokens` to 64,000 for agentic work (128,000, the maximum, at `xhigh` or `max` effort), [stream responses](https://platform.claude.com/docs/en/build-with-claude/streaming) that large, treat [`stop_reason: max_tokens`](https://platform.claude.com/docs/en/build-with-claude/handling-stop-reasons#max-tokens) as a failure, and save money with effort and task budgets, which the model can see. * **Session budgets on Claude Managed Agents** are the hard stop. A [session budget](https://platform.claude.com/docs/en/managed-agents/budgets) is a dollar cap on one session at list rates for tokens, searches, and session time. At the cap, the session pauses with `stop_reason: budget_reached`; raising the budget resumes it. It is platform-enforced, works on any model with a list price (including Claude Sonnet 5), and combines with the advisory task budget. Deployments apply the same field to every run. The first of two `max_tokens` charts plots cost per attempt and per solved task at each cap:
 -This pattern saves wall-clock time when workers can run in parallel: on the corpus benchmark[8](https://platform.claude.com/docs/en/about-claude/models/optimizing-for-cost-and-intelligence#refs) later in this section, an episode took 1.9 hours with the coordinator compared with 11.4 hours solo. It saved money in only two measured situations. On work a single model could handle alone, the same model at lower effort was cheaper every time. +This pattern saves wall-clock time when workers can run in parallel: on the corpus benchmark[8](https://platform.claude.com/docs/en/about-claude/models/optimizing-for-cost-and-intelligence#refs), an episode took a little over 2 hours with the coordinator running the platform's documented limit of 25 concurrent workers, compared with 11.4 hours solo. It saved money in only two measured situations. On work a single model could handle alone, the same model at lower effort was cheaper every time. **Case 1: insurance against the cost tail on routine work.** A frontier model running alone occasionally spirals on a routine problem it would normally solve. Because you cannot tell in advance which those will be, a few such runs dominate the bill. A coordinator that hands routine work to a lower-cost worker caps that tail, because any spiraling now happens at worker rates.
**Case 2: work larger than one context window.** A solo model must work through an input that large serially, one context window at a time, paying to re-read its own state on every pass. Workers each read their own partition, in parallel and at worker rates. Reading-heavy work that still fits in one context window is a model-choice problem, not a delegation problem: on reading cost alone, the orchestrator comes out ahead only when no single context can hold the work. -Anthropic built a benchmark for this case[8](https://platform.claude.com/docs/en/about-claude/models/optimizing-for-cost-and-intelligence#refs): a 21.6-million-token corpus of 14 public Python packages with 130 planted defects, too large for any context window. Lowering effort cannot help, because the bill is the corpus read itself: Claude Fable 5 solo cost $720 to $764 per episode at every effort setting, and only its accuracy moved. The coordinator configuration cost 55% less than any of those settings and scored 3 to 7 points below Fable at `medium` or the default, while beating a Claude Sonnet 5 solo baseline outright: +Anthropic built a benchmark for this case[8](https://platform.claude.com/docs/en/about-claude/models/optimizing-for-cost-and-intelligence#refs): a 21.6-million-token corpus of 14 public Python packages with 130 planted defects, too large for any context window. Lowering effort cannot help, because the bill is the corpus read itself: Claude Fable 5 solo cost $720 to $764 per episode at every effort setting, and only its accuracy moved. The coordinator configuration cost more than 60% less than any of those settings and scored 2 to 6 points below Fable at `medium` or the default, while beating a Claude Sonnet 5 solo baseline outright: - + -The token accounting shows why. The coordinator configuration read more than the solo model (32 million input tokens compared with 14.5 million) and still cost less, because partitioned reading at worker rates is cheaper than repeated re-reading at frontier rates. Fable 5 at default effort still holds peak accuracy, at 2.3 times the coordinator configuration's cost, so delegation here buys most of the accuracy, not all of it. +The token accounting shows why. Both bills are mostly corpus reading served from the cache: the coordinator configuration read about 570 million cached tokens per episode, nearly three times the solo model's roughly 200 million, and still cost less than half as much, because its reads were billed at Claude Sonnet 5's cache-read rate rather than Claude Fable 5's. Fable 5 at default effort still holds peak accuracy, at 2.8 times the coordinator configuration's cost, so delegation here buys most of the accuracy, not all of it. **When delegation doesn't pay.** An orchestrator buys something only when there is bulk to hand off: many independent pieces, ideally too many for one context window. When the work is one dependent chain, or fits in a single context, the orchestrator pays for a plan, a handoff, and a merge that a single model gets for free. In every such case measured, the coordinator's model alone at lower effort came out ahead.
| Lower effort | Knowledge work: `medium` 15% to 30%, `low` a third to a half; long coding: `medium` about half, `low` about three quarters | 1 to 3 points on knowledge work, 2 to 8 on long coding | Faster | [Tune effort](https://platform.claude.com/docs/en/about-claude/models/optimizing-for-cost-and-intelligence#tune-effort) | | Re-run failures | About half, at the same pass rate | None | Two runs on the tasks that fail | [Re-run failures at higher effort](https://platform.claude.com/docs/en/about-claude/models/optimizing-for-cost-and-intelligence#re-run-failures-at-higher-effort) | | Task budget | 18% to 47% | 3 to 4 points | Faster | [Set budgets and output caps](https://platform.claude.com/docs/en/about-claude/models/optimizing-for-cost-and-intelligence#set-budgets-and-output-caps) | -| Raising `max_tokens` | None per solved task, but more tasks solved | Gains of 2 to 21 points | Neutral | [Set budgets and output caps](https://platform.claude.com/docs/en/about-claude/models/optimizing-for-cost-and-intelligence#set-budgets-and-output-caps) | +| Raising `max_tokens` | None per solved task, but more tasks solved | Gains of 2 to 18 points | Neutral | [Set budgets and output caps](https://platform.claude.com/docs/en/about-claude/models/optimizing-for-cost-and-intelligence#set-budgets-and-output-caps) | | Advisor | Depends on the capability gap and the consult rate; the chart-reading pairing scored above both models' effort curves, the coding pairing only marginally | Small gains | About two extra calls per task | [Advisor strategy](https://platform.claude.com/docs/en/about-claude/models/optimizing-for-cost-and-intelligence#advisor-strategy-escalate-hard-decisions) | -| Orchestrator | 55% below the frontier model beyond one context window; about half on routine tails | 3 to 7 points below the frontier model | Much faster on large inputs | [Orchestrator strategy](https://platform.claude.com/docs/en/about-claude/models/optimizing-for-cost-and-intelligence#orchestrator-strategy-delegate-bulk-work) | +| Orchestrator | More than 60% below the frontier model beyond one context window; about half on routine tails | 2 to 6 points below the frontier model | Much faster on large inputs | [Orchestrator strategy](https://platform.claude.com/docs/en/about-claude/models/optimizing-for-cost-and-intelligence#orchestrator-strategy-delegate-bulk-work) | ## Benchmarks referenced
5. **Agent-architecture scaling:** Kim et al., "Towards a Science of Scaling Agent Systems," arXiv.08296, 2025. Independent external study, cited only for the direction of the finding on when delegation does not pay, not for any figure. 6. **DeepWideSearch:** "DeepWideSearch: Benchmarking Depth and Width in Agentic Information Seeking," arXiv.20168, 2025. The 220 questions span 15 domains, each combining many-row collection with multi-hop retrieval; measured on the benchmark's standing row set, 3 runs per configuration. 7. **DeepResearch Bench II:** Li et al., "DeepResearch Bench II: Diagnosing Deep Research Agents via Rubrics from Expert Report," arXiv.08536, 2026. Its 132 research tasks across 22 domains are graded against expert-derived binary rubrics; measured on a 50-task subset stratified across all themes, one attempt per task, 3 runs, scored on tasks no configuration refused. Claude Opus 4.6 judges under the benchmark's rubric protocol; the original uses a different judge, and an Anthropic judge may favor the house style. The runs predate Claude Opus 5, hence its absence from the [Compare models](https://platform.claude.com/docs/en/about-claude/models/optimizing-for-cost-and-intelligence#compare-models-on-cost-per-task) chart. The Sonnet 5 cost differs slightly between the caching chart (inference cost, with and without caching) and that chart (all-in cost, caching on); both come from the same runs. -8. **Corpus defect sweep:** Anthropic-internal, for work larger than one context window: a 21.6-million-token corpus from 14 public Python package sources with 130 planted defects and deterministic grading; protocol fixed before the runs and internally reviewed; three runs per configuration. The charted team configuration ran its workers on Claude Managed Agents: each of six waves was one session in which the Claude Fable 5 lead ran 40 Claude Sonnet 5 worker threads, the platform's limit at the time (the current default is lower), with a small external driver sequencing the waves and carrying the findings between them. Absolute F1 is specific to this corpus build, not comparable across benchmarks; configuration comparisons are like for like. +8. **Corpus defect sweep:** Anthropic-internal, for work larger than one context window: a 21.6-million-token corpus from 14 public Python package sources with 130 planted defects and deterministic grading; protocol fixed before the runs and internally reviewed; three runs per configuration. Every configuration ran on Claude Managed Agents. The charted team configuration is an August 2026 run in which the Claude Fable 5 coordinator ran the whole sweep inside the platform at its documented limit of 25 concurrent Claude Sonnet 5 workers; its three episodes scored F1 0.842, 0.805, and 0.810 for $263, $299, and $261. The solo configurations are July 2026 runs on the same corpus build. Absolute F1 is specific to this corpus build, not comparable across benchmarks; configuration comparisons are like for like. 9. **GPQA Diamond:** Rein et al., "GPQA: A Graduate-Level Google-Proof Q\&A Benchmark," 2023. The 198-question Diamond subset, measured August 2026, two runs per configuration, model-graded against reference answers, advisor tokens metered per request. A platform safety check refused two biology questions on the Sonnet and Opus executors; excluding them changes no comparison by more than one point. 10. **DeepSWE:** Datacurve, "DeepSWE: Measuring Frontier Coding Agents on Original, Long-Horizon Engineering Tasks," arXiv.07946, 2026. Measured August 2026: 113 original tasks across five languages with program-based verifiers. Pairings are two runs each with advisor tokens metered per request, and used a client-side advisor loop rather than the advisor tool, with identical accounting. Single-model effort sweeps are single runs priced from token counts, a cache-aware approximation. Costs per task are run totals divided by 113. 11. **Internal agentic-coding benchmark:** Anthropic-internal: 370 repository tasks graded by the repositories' own tests. The API figures (Opus 5 alone, Fable 5 alone, and the pairing) were measured August 2026 at the default effort with a 128,000-token output cap, one run per configuration: five attempts per task at the default settings and for the pairing, one at `low` and `medium`; the pairing averaged about two advisor consultations per attempt; costs are per attempt. The Claude Code figures are July 2026 runs of the same tasks, one run per configuration, costs approximate.
<Card title="Pricing" icon="dollar-sign" href="https://platform.claude.com/docs/en/about-claude/pricing"> See current per-token pricing for every Claude model. + </Card> + + <Card title="Cookbook: cost optimization on the Claude API" icon="book" href="https://platform.claude.com/cookbook/cost-optimization-cost-optimization"> + Apply these levers one at a time to a working agent in a runnable notebook, with cost per task after each step. </Card> <Card title="Webinar: Building on the Claude Platform" icon="play" href="https://www.anthropic.com/webinars/building-on-the-claude-platform-claude-fable-5-and-model-orchestration-patterns">
agents-and-tools/tool-use/programmatic-tool-calling Changed · +3 / -3 lines
if err != nil { log.Fatal(err) } - fmt.Println(response) + fmt.Println(response.RawJSON()) ``` ```java Java
response, err := client.Messages.New(context.TODO(), anthropic.MessageNewParams{ Model: anthropic.ModelClaudeOpus5, MaxTokens: 4096, - Container: anthropic.MessageNewParamsContainerUnion{ + Container: anthropic.MessageCreateParamsContainerUnion{ OfString: anthropic.String("container_xyz789"), }, Messages: []anthropic.MessageParam{
if err != nil { log.Fatal(err) } - fmt.Println(response) + fmt.Println(response.RawJSON()) ``` ```java Java
api/beta/skills/list Changed · +3 / -1 lines
- `string` - - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 30 more` + - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 31 more` - `"message-batches-2024-09-24"`
- `"output-300k-2026-03-24"` - `"user-profiles-2026-03-24"` + + - `"user-profiles-2026-08-18"` - `"advisor-tool-2026-03-01"`
agents-and-tools/tool-use/server-tools Changed · +5 / -5 lines
} ], "tools": [{"type": "web_search_20250305", "name": "web_search", "max_uses": 10}] - }' | jq '{stop_reason, content}' + }' ``` ```bash CLI # Initial request. If "stop_reason" in the output is "pause_turn", re-run with # the assistant content appended to messages (see the SDK tabs). - ant messages create --format json <<'YAML' | jq '{stop_reason, content}' + ant messages create <<'YAML' model: claude-opus-5 max_tokens: 1024 tools:
} } ] - }' | jq '{stop_reason, content}' + }' ``` ```bash CLI
# If "stop_reason" is "tool_use" and a server_tool_use block has no matching # result block, run the client tools and re-run with a user message of only # their tool_result blocks appended (see the SDK tabs). - ant messages create --format json <<'YAML' | jq '{stop_reason, content}' + ant messages create <<'YAML' model: claude-opus-4-8 max_tokens: 1024 messages:
Invalid domain formats are rejected at request time with a 400 `invalid_request_error`. <Note> - Request-level domain restrictions work together with any organization-level domain restrictions configured in Claude Console. Request-level `allowed_domains` must be a subset of the organization-level allowed list; entries outside it cause the API to return a validation error. Domains your organization blocks are removed from a request-level allowed list rather than returning an error. + Request-level domain restrictions work together with any organization-level domain restrictions configured in Claude Console. Request-level `allowed_domains` must be a subset of the organization-level allowed list; entries outside it cause the API to return a validation error. A request-level allowed list that includes a domain your organization blocks is rejected with a `400` error that names the conflicting entries. </Note> <Warning>
agents-and-tools/tool-use/troubleshooting-tool-use Changed · +6 / -6 lines
## Errors at request time -| Error | Cause | Fix | -| ------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `tool_use ids were found without tool_result blocks immediately after` | Missing `tool_result` for some `tool_use` ids, or `tool_result` is not the first content block in the user message | Return one `tool_result` for every `tool_use` block in the assistant response. Put `tool_result` blocks before any text. See [Handle tool calls](https://platform.claude.com/docs/en/agents-and-tools/tool-use/handle-tool-calls) and [Parallel tool use](https://platform.claude.com/docs/en/agents-and-tools/tool-use/parallel-tool-use). | -| `was found without a corresponding <name>_tool_result block` | The previous assistant turn has a `server_tool_use` block with no result block (most often, Claude called it alongside a client tool), and either your next user message ended that turn (for example, with text after the `tool_result` blocks) or the resume request no longer defines that server tool (the message then ends with `but no <name> tool was provided`) | Send a user message containing only the `tool_result` blocks for the client `tool_use` ids and keep the same `tools` array. See [Stop reasons and fallback](https://platform.claude.com/docs/en/build-with-claude/handling-stop-reasons#tool-use). | -| `Input schema is not compatible with strict mode: string patterns are not supported` | Using `pattern` with `strict: true` | Remove the pattern or drop `strict: true`. The `pattern` keyword is not in the supported JSON Schema subset yet. | -| `All tools have defer_loading: true` | No tools visible to the model | At least one tool must be immediately loaded. The tool search tool itself must never have `defer_loading: true`. | +| Error | Cause | Fix | +| ---------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `tool_use ids were found without tool_result blocks immediately after` | Missing `tool_result` for some `tool_use` ids, or `tool_result` is not the first content block in the user message | Return one `tool_result` for every `tool_use` block in the assistant response. Put `tool_result` blocks before any text. See [Handle tool calls](https://platform.claude.com/docs/en/agents-and-tools/tool-use/handle-tool-calls) and [Parallel tool use](https://platform.claude.com/docs/en/agents-and-tools/tool-use/parallel-tool-use). | +| `was found without a corresponding <name>_tool_result block` | The previous assistant turn has a `server_tool_use` block with no result block (most often, Claude called it alongside a client tool), and either your next user message ended that turn (for example, with text after the `tool_result` blocks) or the resume request no longer defines that server tool (the message then ends with `but no <name> tool was provided`) | Send a user message containing only the `tool_result` blocks for the client `tool_use` ids and keep the same `tools` array. See [Stop reasons and fallback](https://platform.claude.com/docs/en/build-with-claude/handling-stop-reasons#tool-use). | +| `Unsupported regex feature in pattern field: ...` | A `pattern` in a strict tool's `input_schema` uses a regex feature that strict mode can't compile, such as a backreference, a lookaround, a word boundary, or a large `{n,m}` range | Simplify the pattern. Anchored patterns with basic quantifiers, character classes, and groups are supported; see [JSON Schema limitations](https://platform.claude.com/docs/en/build-with-claude/structured-outputs#json-schema-limitations). | +| `All tools have defer_loading: true` | No tools visible to the model | At least one tool must be immediately loaded. The tool search tool itself must never have `defer_loading: true`. | ## Error: thinking blocks cannot be modified
agents-and-tools/tool-use/web-fetch-tool Changed · +3 / -3 lines
if err != nil { log.Fatal(err) } - fmt.Println(response) + fmt.Println(response.RawJSON()) ``` ```java Java
if err != nil { log.Fatal(err) } - fmt.Println(response) + fmt.Println(response.RawJSON()) ``` ```java Java
if err != nil { log.Fatal(err) } - fmt.Println(response) + fmt.Println(response.RawJSON()) ``` ```java Java
api/beta Changed · +7632 / -1583 lines
### Beta Browser Close Tab Config ### Beta Browser Double Click Config ### Beta Browser File Upload Config ### Beta Browser Find Config ### Beta Browser Form Input Config ### Beta Browser Get Page Text Config ### Beta Browser Hold Key Config ### Beta Browser Hover Config ### Beta Browser Javascript Exec Config ### Beta Browser Key Config ### Beta Browser Left Click Config ### Beta Browser Left Click Drag Config ### Beta Browser Left Mouse Down Config ### Beta Browser Left Mouse Up Config ### Beta Browser List Tabs Config ### Beta Browser Middle Click Config ### Beta Browser Mouse Move Config ### Beta Browser Navigate Config ### Beta Browser New Tab Config ### Beta Browser Read Console Config ### Beta Browser Read Network Config ### Beta Browser Read Page Config ### Beta Browser Right Click Config ### Beta Browser Screenshot Config ### Beta Browser Scroll Config ### Beta Browser Scroll To Config ### Beta Browser State Block Param ### Beta Browser State Change ### Beta Browser State Change Download Completed ### Beta Browser State Change Download Failed ### Beta Browser State Change Download Started ### Beta Browser State Change Tab Opened ### Beta Browser State Tab Entry ### Beta Browser Switch Tab Config ### Beta Browser Toolset 20260801 ### Beta Browser Toolset Configs ### Beta Browser Triple Click Config ### Beta Browser Type Config ### Beta Browser Wait Config ### Beta Browser Zoom Config ### Beta Computer Cursor Position Config ### Beta Computer Double Click Config ### Beta Computer Hold Key Config ### Beta Computer Key Config ### Beta Computer Left Click Config ### Beta Computer Left Click Drag Config ### Beta Computer Left Mouse Down Config ### Beta Computer Left Mouse Up Config ### Beta Computer Middle Click Config ### Beta Computer Mouse Move Config ### Beta Computer Right Click Config ### Beta Computer Screenshot Config ### Beta Computer Scroll Config ### Beta Computer Toolset 20260801 ### Beta Computer Toolset Configs ### Beta Computer Triple Click Config ### Beta Computer Type Config ### Beta Computer Wait Config ### Beta Computer Zoom Config ### Beta Image Transformations Param ### Beta Managed Agents Service Account Actor ### Beta Deleted File ### Beta File Metadata ### Beta Output Behavior ### Beta Output Behavior Create New ### Beta Output Behavior Update Existing ### Beta Mid Conversation System Block Param ### Deleted File ### File Metadata
This page is larger than the 256 KiB this site keeps, so one side of the diff below stops where the stored text does.
api/beta-headers Changed · +10 / -10 lines
Each feature's documentation states the exact beta name to send. The [API overview](https://platform.claude.com/docs/en/api/overview) lists the APIs currently in beta. -The following examples show the same request with cURL, the `ant` CLI, and the SDKs. The SDKs take beta names in the `betas` parameter and send the `anthropic-beta` header for you: +The following examples show the same request with cURL, the `ant` CLI, and the SDKs, using the [context editing](https://platform.claude.com/docs/en/build-with-claude/context-editing) beta as the example. The SDKs take beta names in the `betas` parameter and send the `anthropic-beta` header for you: <CodeGroup> ```bash cURL
curl https://api.anthropic.com/v1/messages \ -H "x-api-key: $ANTHROPIC_API_KEY" \ -H "anthropic-version: 2023-06-01" \ - -H "anthropic-beta: files-api-2025-04-14" \ + -H "anthropic-beta: context-management-2025-06-27" \ -H "content-type: application/json" \ -d '{ "model": "claude-opus-5",
```bash CLI ant beta:messages create \ - --beta files-api-2025-04-14 \ + --beta context-management-2025-06-27 \ --model claude-opus-5 \ --max-tokens 1024 \ --message '{role: user, content: "Hello, Claude"}'
model="claude-opus-5", max_tokens=1024, messages=[{"role": "user", "content": "Hello, Claude"}], - betas=["files-api-2025-04-14"], + betas=["context-management-2025-06-27"], ) print(response.content)
model: "claude-opus-5", max_tokens: 1024, messages: [{ role: "user", content: "Hello, Claude" }], - betas: ["files-api-2025-04-14"] + betas: ["context-management-2025-06-27"] }); console.log(msg.content);
Model = "claude-opus-5", MaxTokens = 1024, Messages = [new() { Role = Role.User, Content = "Hello, Claude" }], - Betas = ["files-api-2025-04-14"], + Betas = ["context-management-2025-06-27"], } );
Messages: []anthropic.BetaMessageParam{ anthropic.NewBetaUserMessage(anthropic.NewBetaTextBlock("Hello, Claude")), }, - Betas: []anthropic.AnthropicBeta{anthropic.AnthropicBetaFilesAPI2025_04_14}, + Betas: []anthropic.AnthropicBeta{anthropic.AnthropicBetaContextManagement2025_06_27}, }) if err != nil { panic(err)
.model(Model.CLAUDE_OPUS_5) .maxTokens(1024) .addUserMessage("Hello, Claude") - .addBeta(AnthropicBeta.FILES_API_2025_04_14) + .addBeta(AnthropicBeta.CONTEXT_MANAGEMENT_2025_06_27) .build(); BetaMessage message = client.beta().messages().create(params);
maxTokens: 1024, messages: [['role' => 'user', 'content' => 'Hello, Claude']], model: 'claude-opus-5', - betas: ['files-api-2025-04-14'], + betas: ['context-management-2025-06-27'], ); echo $message;
model: "claude-opus-5", max_tokens: 1024, messages: [{role: "user", content: "Hello, Claude"}], - betas: ["files-api-2025-04-14"] + betas: ["context-management-2025-06-27"] ) puts(message.content)
api/beta/skills/versions/create Changed · +3 / -1 lines
- `string` - - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 30 more` + - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 31 more` - `"message-batches-2024-09-24"`
- `"output-300k-2026-03-24"` - `"user-profiles-2026-03-24"` + + - `"user-profiles-2026-08-18"` - `"advisor-tool-2026-03-01"`
api/beta/agents Changed · +27 / -15 lines
- `string` - - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 30 more` + - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 31 more` - `"message-batches-2024-09-24"`
- `"user-profiles-2026-03-24"` + - `"user-profiles-2026-08-18"` + - `"advisor-tool-2026-03-01"` - `"managed-agents-2026-04-01"`
- `model: BetaManagedAgentsModel or BetaManagedAgentsModelConfigParams` - Model identifier. Accepts the [model string](https://platform.claude.com/docs/en/about-claude/models/overview#latest-models-comparison), e.g. `claude-opus-4-6`, or a `model_config` object for additional configuration control + Model identifier. Accepts the [model string](https://platform.claude.com/docs/en/about-claude/models/overview#latest-models-comparison), e.g. `claude-opus-5`, or a `model_config` object for additional configuration control - `BetaManagedAgentsModel = "claude-sonnet-5" or "claude-fable-5" or "claude-opus-5" or 10 more or string`
-H 'anthropic-beta: managed-agents-2026-04-01' \ -H "X-Api-Key: $ANTHROPIC_API_KEY" \ -d '{ - "model": "claude-sonnet-4-6", + "model": "claude-opus-5", "name": "My First Agent", "description": "A general-purpose starter agent.", "metadata": {
"foo": "bar" }, "model": { - "id": "claude-sonnet-4-6", + "id": "claude-opus-5", "effort": { "type": "low" },
- `string` - - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 30 more` + - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 31 more` - `"message-batches-2024-09-24"`
- `"user-profiles-2026-03-24"` + - `"user-profiles-2026-08-18"` + - `"advisor-tool-2026-03-01"` - `"managed-agents-2026-04-01"`
"foo": "bar" }, "model": { - "id": "claude-sonnet-4-6", + "id": "claude-opus-5", "effort": { "type": "low" },
- `string` - - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 30 more` + - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 31 more` - `"message-batches-2024-09-24"`
- `"user-profiles-2026-03-24"` + - `"user-profiles-2026-08-18"` + - `"advisor-tool-2026-03-01"` - `"managed-agents-2026-04-01"`
"foo": "bar" }, "model": { - "id": "claude-sonnet-4-6", + "id": "claude-opus-5", "effort": { "type": "low" },
- `string` - - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 30 more` + - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 31 more` - `"message-batches-2024-09-24"`
- `"user-profiles-2026-03-24"` + - `"user-profiles-2026-08-18"` + - `"advisor-tool-2026-03-01"` - `"managed-agents-2026-04-01"`
- `model: optional BetaManagedAgentsModel or BetaManagedAgentsModelConfigParams` - Model identifier. Accepts the [model string](https://platform.claude.com/docs/en/about-claude/models/overview#latest-models-comparison), e.g. `claude-opus-4-6`, or a `model_config` object for additional configuration control. Omit to preserve. Cannot be cleared. + Model identifier. Accepts the [model string](https://platform.claude.com/docs/en/about-claude/models/overview#latest-models-comparison), e.g. `claude-opus-5`, or a `model_config` object for additional configuration control. Omit to preserve. Cannot be cleared. - `BetaManagedAgentsModel = "claude-sonnet-5" or "claude-fable-5" or "claude-opus-5" or 10 more or string`
"foo": "bar" }, "model": { - "id": "claude-sonnet-4-6", + "id": "claude-opus-5", "effort": { "type": "low" },
- `string` - - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 30 more` + - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 31 more` - `"message-batches-2024-09-24"`
- `"user-profiles-2026-03-24"` + - `"user-profiles-2026-08-18"` + - `"advisor-tool-2026-03-01"` - `"managed-agents-2026-04-01"`
"foo": "bar" }, "model": { - "id": "claude-sonnet-4-6", + "id": "claude-opus-5", "effort": { "type": "low" },
- `string` - - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 30 more` + - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 31 more` - `"message-batches-2024-09-24"`
- `"user-profiles-2026-03-24"` + - `"user-profiles-2026-08-18"` + - `"advisor-tool-2026-03-01"` - `"managed-agents-2026-04-01"`
"foo": "bar" }, "model": { - "id": "claude-sonnet-4-6", + "id": "claude-opus-5", "effort": { "type": "low" },
api/beta/agents/archive Changed · +4 / -2 lines
- `string` - - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 30 more` + - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 31 more` - `"message-batches-2024-09-24"`
- `"user-profiles-2026-03-24"` + - `"user-profiles-2026-08-18"` + - `"advisor-tool-2026-03-01"` - `"managed-agents-2026-04-01"`
"foo": "bar" }, "model": { - "id": "claude-sonnet-4-6", + "id": "claude-opus-5", "effort": { "type": "low" },
api/beta/agents/create Changed · +6 / -4 lines
- `string` - - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 30 more` + - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 31 more` - `"message-batches-2024-09-24"`
- `"user-profiles-2026-03-24"` + - `"user-profiles-2026-08-18"` + - `"advisor-tool-2026-03-01"` - `"managed-agents-2026-04-01"`
- `model: BetaManagedAgentsModel or BetaManagedAgentsModelConfigParams` - Model identifier. Accepts the [model string](https://platform.claude.com/docs/en/about-claude/models/overview#latest-models-comparison), e.g. `claude-opus-4-6`, or a `model_config` object for additional configuration control + Model identifier. Accepts the [model string](https://platform.claude.com/docs/en/about-claude/models/overview#latest-models-comparison), e.g. `claude-opus-5`, or a `model_config` object for additional configuration control - `BetaManagedAgentsModel = "claude-sonnet-5" or "claude-fable-5" or "claude-opus-5" or 10 more or string`
-H 'anthropic-beta: managed-agents-2026-04-01' \ -H "X-Api-Key: $ANTHROPIC_API_KEY" \ -d '{ - "model": "claude-sonnet-4-6", + "model": "claude-opus-5", "name": "My First Agent", "description": "A general-purpose starter agent.", "metadata": {
"foo": "bar" }, "model": { - "id": "claude-sonnet-4-6", + "id": "claude-opus-5", "effort": { "type": "low" },
api/beta/agents/list Changed · +4 / -2 lines
- `string` - - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 30 more` + - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 31 more` - `"message-batches-2024-09-24"`
- `"user-profiles-2026-03-24"` + - `"user-profiles-2026-08-18"` + - `"advisor-tool-2026-03-01"` - `"managed-agents-2026-04-01"`
"foo": "bar" }, "model": { - "id": "claude-sonnet-4-6", + "id": "claude-opus-5", "effort": { "type": "low" },
api/beta/agents/retrieve Changed · +4 / -2 lines
- `string` - - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 30 more` + - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 31 more` - `"message-batches-2024-09-24"`
- `"user-profiles-2026-03-24"` + - `"user-profiles-2026-08-18"` + - `"advisor-tool-2026-03-01"` - `"managed-agents-2026-04-01"`
"foo": "bar" }, "model": { - "id": "claude-sonnet-4-6", + "id": "claude-opus-5", "effort": { "type": "low" },
api/beta/skills/versions/download Changed · +3 / -1 lines
- `string` - - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 30 more` + - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 31 more` - `"message-batches-2024-09-24"`
- `"output-300k-2026-03-24"` - `"user-profiles-2026-03-24"` + + - `"user-profiles-2026-08-18"` - `"advisor-tool-2026-03-01"`
api/beta/agents/update Changed · +5 / -3 lines
- `string` - - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 30 more` + - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 31 more` - `"message-batches-2024-09-24"`
- `"user-profiles-2026-03-24"` + - `"user-profiles-2026-08-18"` + - `"advisor-tool-2026-03-01"` - `"managed-agents-2026-04-01"`
- `model: optional BetaManagedAgentsModel or BetaManagedAgentsModelConfigParams` - Model identifier. Accepts the [model string](https://platform.claude.com/docs/en/about-claude/models/overview#latest-models-comparison), e.g. `claude-opus-4-6`, or a `model_config` object for additional configuration control. Omit to preserve. Cannot be cleared. + Model identifier. Accepts the [model string](https://platform.claude.com/docs/en/about-claude/models/overview#latest-models-comparison), e.g. `claude-opus-5`, or a `model_config` object for additional configuration control. Omit to preserve. Cannot be cleared. - `BetaManagedAgentsModel = "claude-sonnet-5" or "claude-fable-5" or "claude-opus-5" or 10 more or string`
"foo": "bar" }, "model": { - "id": "claude-sonnet-4-6", + "id": "claude-opus-5", "effort": { "type": "low" },
api/beta/agents/versions Changed · +4 / -2 lines
- `string` - - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 30 more` + - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 31 more` - `"message-batches-2024-09-24"`
- `"user-profiles-2026-03-24"` + - `"user-profiles-2026-08-18"` + - `"advisor-tool-2026-03-01"` - `"managed-agents-2026-04-01"`
"foo": "bar" }, "model": { - "id": "claude-sonnet-4-6", + "id": "claude-opus-5", "effort": { "type": "low" },
api/beta/agents/versions/list Changed · +4 / -2 lines
- `string` - - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 30 more` + - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 31 more` - `"message-batches-2024-09-24"`
- `"user-profiles-2026-03-24"` + - `"user-profiles-2026-08-18"` + - `"advisor-tool-2026-03-01"` - `"managed-agents-2026-04-01"`
"foo": "bar" }, "model": { - "id": "claude-sonnet-4-6", + "id": "claude-opus-5", "effort": { "type": "low" },
api/beta/deployment_runs Changed · +6 / -2 lines
- `string` - - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 30 more` + - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 31 more` - `"message-batches-2024-09-24"`
- `"user-profiles-2026-03-24"` + - `"user-profiles-2026-08-18"` + - `"advisor-tool-2026-03-01"` - `"managed-agents-2026-04-01"`
- `string` - - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 30 more` + - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 31 more` - `"message-batches-2024-09-24"`
- `"output-300k-2026-03-24"` - `"user-profiles-2026-03-24"` + + - `"user-profiles-2026-08-18"` - `"advisor-tool-2026-03-01"`
api/beta/deployments Changed · +24 / -8 lines
- `string` - - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 30 more` + - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 31 more` - `"message-batches-2024-09-24"`
- `"user-profiles-2026-03-24"` + - `"user-profiles-2026-08-18"` + - `"advisor-tool-2026-03-01"` - `"managed-agents-2026-04-01"`
- `string` - - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 30 more` + - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 31 more` - `"message-batches-2024-09-24"`
- `"user-profiles-2026-03-24"` + - `"user-profiles-2026-08-18"` + - `"advisor-tool-2026-03-01"` - `"managed-agents-2026-04-01"`
- `string` - - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 30 more` + - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 31 more` - `"message-batches-2024-09-24"`
- `"user-profiles-2026-03-24"` + - `"user-profiles-2026-08-18"` + - `"advisor-tool-2026-03-01"` - `"managed-agents-2026-04-01"`
- `string` - - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 30 more` + - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 31 more` - `"message-batches-2024-09-24"`
- `"user-profiles-2026-03-24"` + - `"user-profiles-2026-08-18"` + - `"advisor-tool-2026-03-01"` - `"managed-agents-2026-04-01"`
- `string` - - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 30 more` + - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 31 more` - `"message-batches-2024-09-24"`
- `"user-profiles-2026-03-24"` + - `"user-profiles-2026-08-18"` + - `"advisor-tool-2026-03-01"` - `"managed-agents-2026-04-01"`
- `string` - - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 30 more` + - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 31 more` - `"message-batches-2024-09-24"`
- `"user-profiles-2026-03-24"` + - `"user-profiles-2026-08-18"` + - `"advisor-tool-2026-03-01"` - `"managed-agents-2026-04-01"`
- `string` - - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 30 more` + - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 31 more` - `"message-batches-2024-09-24"`
- `"user-profiles-2026-03-24"` + - `"user-profiles-2026-08-18"` + - `"advisor-tool-2026-03-01"` - `"managed-agents-2026-04-01"`
- `string` - - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 30 more` + - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 31 more` - `"message-batches-2024-09-24"`
- `"output-300k-2026-03-24"` - `"user-profiles-2026-03-24"` + + - `"user-profiles-2026-08-18"` - `"advisor-tool-2026-03-01"`
api/beta/dreams Changed · +264 / -39 lines
### Beta Output Behavior ### Beta Output Behavior Create New ### Beta Output Behavior Update Existing
- `string` - - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 30 more` + - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 31 more` - `"message-batches-2024-09-24"`
- `"user-profiles-2026-03-24"` + - `"user-profiles-2026-08-18"` + - `"advisor-tool-2026-03-01"` - `"managed-agents-2026-04-01"`
- `BetaDreamMemoryStoreInput object { memory_store_id, type }` - An input memory store the dream reads from. The dream never mutates this store. + An input memory store the dream reads from. The dream never mutates this store unless it is also the destination: with output_behavior {type: "update_existing"} the job consolidates this store in place. - `memory_store_id: string`
- `id: string` - Model identifier, e.g. "claude-opus-4-7". 1-256 characters. + Model identifier, e.g. "claude-opus-5". 1-256 characters. - `speed: optional "standard" or "fast" or null`
- `instructions: optional string or null` +- `output_behavior: optional BetaOutputBehavior` + + The default destination: the job creates a new output memory store as a clone of the memory_store input and writes the consolidated memories into it. The input store is never mutated. + + - `BetaOutputBehaviorCreateNew object { type }` + + The default destination: the job creates a new output memory store as a clone of the memory_store input and writes the consolidated memories into it. The input store is never mutated. + + - `type: "create_new"` + + - `"create_new"` + + - `BetaOutputBehaviorUpdateExisting object { memory_store_id, type }` + + The job writes the consolidated memories into this existing memory store instead of creating one. In EAP the store must be the job's own memory_store input, so the job consolidates the store in place. + + - `memory_store_id: string` + + - `type: "update_existing"` + + - `"update_existing"` + ### Returns -- `BetaDream object { id, archived_at, created_at, 10 more }` +- `BetaDream object { id, archived_at, created_at, 11 more }` - An asynchronous memory-consolidation job that reads a memory store plus a set of session transcripts and writes consolidated memories into a new output memory store. The Dreams API is in research preview: the request and response shapes are volatile and may change without the deprecation period that applies to generally-available endpoints. + An asynchronous memory-consolidation job that reads a memory store plus a set of session transcripts and writes consolidated memories into an output memory store โ a new store by default, or an existing store chosen via output_behavior. The Dreams API is in research preview: the request and response shapes are volatile and may change without the deprecation period that applies to generally-available endpoints. - `id: string`
- `BetaDreamMemoryStoreInput object { memory_store_id, type }` - An input memory store the dream reads from. The dream never mutates this store. + An input memory store the dream reads from. The dream never mutates this store unless it is also the destination: with output_behavior {type: "update_existing"} the job consolidates this store in place. - `memory_store_id: string`
- `id: string` - Model identifier, e.g. "claude-opus-4-7". 1-256 characters. + Model identifier, e.g. "claude-opus-5". 1-256 characters. - `speed: optional "standard" or "fast"`
- `"fast"` + - `output_behavior: BetaOutputBehavior` + + The default destination: the job creates a new output memory store as a clone of the memory_store input and writes the consolidated memories into it. The input store is never mutated. + + - `BetaOutputBehaviorCreateNew object { type }` + + The default destination: the job creates a new output memory store as a clone of the memory_store input and writes the consolidated memories into it. The input store is never mutated. + + - `type: "create_new"` + + - `"create_new"` + + - `BetaOutputBehaviorUpdateExisting object { memory_store_id, type }` + + The job writes the consolidated memories into this existing memory store instead of creating one. In EAP the store must be the job's own memory_store input, so the job consolidates the store in place. + + - `memory_store_id: string` + + - `type: "update_existing"` + + - `"update_existing"` + - `outputs: array of BetaDreamOutput` - `memory_store_id: string`
"id": "x", "speed": "standard" }, + "output_behavior": { + "type": "create_new" + }, "outputs": [ { "memory_store_id": "memory_store_id",
- `string` - - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 30 more` + - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 31 more` - `"message-batches-2024-09-24"`
- `"user-profiles-2026-03-24"` + - `"user-profiles-2026-08-18"` + - `"advisor-tool-2026-03-01"` - `"managed-agents-2026-04-01"`
- `BetaDreamMemoryStoreInput object { memory_store_id, type }` - An input memory store the dream reads from. The dream never mutates this store. + An input memory store the dream reads from. The dream never mutates this store unless it is also the destination: with output_behavior {type: "update_existing"} the job consolidates this store in place. - `memory_store_id: string`
- `id: string` - Model identifier, e.g. "claude-opus-4-7". 1-256 characters. + Model identifier, e.g. "claude-opus-5". 1-256 characters. - `speed: optional "standard" or "fast"`
- `"fast"` + - `output_behavior: BetaOutputBehavior` + + The default destination: the job creates a new output memory store as a clone of the memory_store input and writes the consolidated memories into it. The input store is never mutated. + + - `BetaOutputBehaviorCreateNew object { type }` + + The default destination: the job creates a new output memory store as a clone of the memory_store input and writes the consolidated memories into it. The input store is never mutated. + + - `type: "create_new"` + + - `"create_new"` + + - `BetaOutputBehaviorUpdateExisting object { memory_store_id, type }` + + The job writes the consolidated memories into this existing memory store instead of creating one. In EAP the store must be the job's own memory_store input, so the job consolidates the store in place. + + - `memory_store_id: string` + + - `type: "update_existing"` + + - `"update_existing"` + - `outputs: array of BetaDreamOutput` - `memory_store_id: string`
"id": "x", "speed": "standard" }, + "output_behavior": { + "type": "create_new" + }, "outputs": [ { "memory_store_id": "memory_store_id",
- `string` - - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 30 more` + - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 31 more` - `"message-batches-2024-09-24"`
- `"user-profiles-2026-03-24"` + - `"user-profiles-2026-08-18"` + - `"advisor-tool-2026-03-01"` - `"managed-agents-2026-04-01"`
### Returns -- `BetaDream object { id, archived_at, created_at, 10 more }` +- `BetaDream object { id, archived_at, created_at, 11 more }` - An asynchronous memory-consolidation job that reads a memory store plus a set of session transcripts and writes consolidated memories into a new output memory store. The Dreams API is in research preview: the request and response shapes are volatile and may change without the deprecation period that applies to generally-available endpoints. + An asynchronous memory-consolidation job that reads a memory store plus a set of session transcripts and writes consolidated memories into an output memory store โ a new store by default, or an existing store chosen via output_behavior. The Dreams API is in research preview: the request and response shapes are volatile and may change without the deprecation period that applies to generally-available endpoints. - `id: string`
- `BetaDreamMemoryStoreInput object { memory_store_id, type }` - An input memory store the dream reads from. The dream never mutates this store. + An input memory store the dream reads from. The dream never mutates this store unless it is also the destination: with output_behavior {type: "update_existing"} the job consolidates this store in place. - `memory_store_id: string`
- `id: string` - Model identifier, e.g. "claude-opus-4-7". 1-256 characters. + Model identifier, e.g. "claude-opus-5". 1-256 characters. - `speed: optional "standard" or "fast"`
- `"fast"` + - `output_behavior: BetaOutputBehavior` + + The default destination: the job creates a new output memory store as a clone of the memory_store input and writes the consolidated memories into it. The input store is never mutated. + + - `BetaOutputBehaviorCreateNew object { type }` + + The default destination: the job creates a new output memory store as a clone of the memory_store input and writes the consolidated memories into it. The input store is never mutated. + + - `type: "create_new"` + + - `"create_new"` + + - `BetaOutputBehaviorUpdateExisting object { memory_store_id, type }` + + The job writes the consolidated memories into this existing memory store instead of creating one. In EAP the store must be the job's own memory_store input, so the job consolidates the store in place. + + - `memory_store_id: string` + + - `type: "update_existing"` + + - `"update_existing"` + - `outputs: array of BetaDreamOutput` - `memory_store_id: string`
"id": "x", "speed": "standard" }, + "output_behavior": { + "type": "create_new" + }, "outputs": [ { "memory_store_id": "memory_store_id",
- `string` - - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 30 more` + - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 31 more` - `"message-batches-2024-09-24"`
- `"user-profiles-2026-03-24"` + - `"user-profiles-2026-08-18"` + - `"advisor-tool-2026-03-01"` - `"managed-agents-2026-04-01"`
### Returns -- `BetaDream object { id, archived_at, created_at, 10 more }` +- `BetaDream object { id, archived_at, created_at, 11 more }` - An asynchronous memory-consolidation job that reads a memory store plus a set of session transcripts and writes consolidated memories into a new output memory store. The Dreams API is in research preview: the request and response shapes are volatile and may change without the deprecation period that applies to generally-available endpoints. + An asynchronous memory-consolidation job that reads a memory store plus a set of session transcripts and writes consolidated memories into an output memory store โ a new store by default, or an existing store chosen via output_behavior. The Dreams API is in research preview: the request and response shapes are volatile and may change without the deprecation period that applies to generally-available endpoints. - `id: string`
- `BetaDreamMemoryStoreInput object { memory_store_id, type }` - An input memory store the dream reads from. The dream never mutates this store. + An input memory store the dream reads from. The dream never mutates this store unless it is also the destination: with output_behavior {type: "update_existing"} the job consolidates this store in place. - `memory_store_id: string`
- `id: string` - Model identifier, e.g. "claude-opus-4-7". 1-256 characters. + Model identifier, e.g. "claude-opus-5". 1-256 characters. - `speed: optional "standard" or "fast"`
- `"fast"` + - `output_behavior: BetaOutputBehavior` + + The default destination: the job creates a new output memory store as a clone of the memory_store input and writes the consolidated memories into it. The input store is never mutated. + + - `BetaOutputBehaviorCreateNew object { type }` + + The default destination: the job creates a new output memory store as a clone of the memory_store input and writes the consolidated memories into it. The input store is never mutated. + + - `type: "create_new"` + + - `"create_new"` + + - `BetaOutputBehaviorUpdateExisting object { memory_store_id, type }` + + The job writes the consolidated memories into this existing memory store instead of creating one. In EAP the store must be the job's own memory_store input, so the job consolidates the store in place. + + - `memory_store_id: string` + + - `type: "update_existing"` + + - `"update_existing"` + - `outputs: array of BetaDreamOutput` - `memory_store_id: string`
"id": "x", "speed": "standard" }, + "output_behavior": { + "type": "create_new" + }, "outputs": [ { "memory_store_id": "memory_store_id",
- `string` - - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 30 more` + - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 31 more` - `"message-batches-2024-09-24"`
- `"user-profiles-2026-03-24"` + - `"user-profiles-2026-08-18"` + - `"advisor-tool-2026-03-01"` - `"managed-agents-2026-04-01"`
### Returns -- `BetaDream object { id, archived_at, created_at, 10 more }` +- `BetaDream object { id, archived_at, created_at, 11 more }` - An asynchronous memory-consolidation job that reads a memory store plus a set of session transcripts and writes consolidated memories into a new output memory store. The Dreams API is in research preview: the request and response shapes are volatile and may change without the deprecation period that applies to generally-available endpoints. + An asynchronous memory-consolidation job that reads a memory store plus a set of session transcripts and writes consolidated memories into an output memory store โ a new store by default, or an existing store chosen via output_behavior. The Dreams API is in research preview: the request and response shapes are volatile and may change without the deprecation period that applies to generally-available endpoints. - `id: string`
- `BetaDreamMemoryStoreInput object { memory_store_id, type }` - An input memory store the dream reads from. The dream never mutates this store. + An input memory store the dream reads from. The dream never mutates this store unless it is also the destination: with output_behavior {type: "update_existing"} the job consolidates this store in place. - `memory_store_id: string`
- `id: string` - Model identifier, e.g. "claude-opus-4-7". 1-256 characters. + Model identifier, e.g. "claude-opus-5". 1-256 characters. - `speed: optional "standard" or "fast"`
- `"fast"` + - `output_behavior: BetaOutputBehavior` + + The default destination: the job creates a new output memory store as a clone of the memory_store input and writes the consolidated memories into it. The input store is never mutated. + + - `BetaOutputBehaviorCreateNew object { type }` + + The default destination: the job creates a new output memory store as a clone of the memory_store input and writes the consolidated memories into it. The input store is never mutated. + + - `type: "create_new"` + + - `"create_new"` + + - `BetaOutputBehaviorUpdateExisting object { memory_store_id, type }` + + The job writes the consolidated memories into this existing memory store instead of creating one. In EAP the store must be the job's own memory_store input, so the job consolidates the store in place. + + - `memory_store_id: string` + + - `type: "update_existing"` + + - `"update_existing"` + - `outputs: array of BetaDreamOutput` - `memory_store_id: string`
"id": "x", "speed": "standard" }, + "output_behavior": { + "type": "create_new" + }, "outputs": [ { "memory_store_id": "memory_store_id",
### Beta Dream -- `BetaDream object { id, archived_at, created_at, 10 more }` +- `BetaDream object { id, archived_at, created_at, 11 more }` - An asynchronous memory-consolidation job that reads a memory store plus a set of session transcripts and writes consolidated memories into a new output memory store. The Dreams API is in research preview: the request and response shapes are volatile and may change without the deprecation period that applies to generally-available endpoints. + An asynchronous memory-consolidation job that reads a memory store plus a set of session transcripts and writes consolidated memories into an output memory store โ a new store by default, or an existing store chosen via output_behavior. The Dreams API is in research preview: the request and response shapes are volatile and may change without the deprecation period that applies to generally-available endpoints. - `id: string`
- `BetaDreamMemoryStoreInput object { memory_store_id, type }` - An input memory store the dream reads from. The dream never mutates this store. + An input memory store the dream reads from. The dream never mutates this store unless it is also the destination: with output_behavior {type: "update_existing"} the job consolidates this store in place. - `memory_store_id: string`
- `id: string` - Model identifier, e.g. "claude-opus-4-7". 1-256 characters. + Model identifier, e.g. "claude-opus-5". 1-256 characters. - `speed: optional "standard" or "fast"`
- `"fast"` + - `output_behavior: BetaOutputBehavior` + + The default destination: the job creates a new output memory store as a clone of the memory_store input and writes the consolidated memories into it. The input store is never mutated. + + - `BetaOutputBehaviorCreateNew object { type }` + + The default destination: the job creates a new output memory store as a clone of the memory_store input and writes the consolidated memories into it. The input store is never mutated. + + - `type: "create_new"` + + - `"create_new"` + + - `BetaOutputBehaviorUpdateExisting object { memory_store_id, type }` + + The job writes the consolidated memories into this existing memory store instead of creating one. In EAP the store must be the job's own memory_store input, so the job consolidates the store in place. + + - `memory_store_id: string` + + - `type: "update_existing"` + + - `"update_existing"` + - `outputs: array of BetaDreamOutput` - `memory_store_id: string`
- `BetaDreamInput = BetaDreamMemoryStoreInput or BetaDreamSessionsInput` - An input memory store the dream reads from. The dream never mutates this store. + An input memory store the dream reads from. The dream never mutates this store unless it is also the destination: with output_behavior {type: "update_existing"} the job consolidates this store in place. - `BetaDreamMemoryStoreInput object { memory_store_id, type }` - An input memory store the dream reads from. The dream never mutates this store. + An input memory store the dream reads from. The dream never mutates this store unless it is also the destination: with output_behavior {type: "update_existing"} the job consolidates this store in place. - `memory_store_id: string`
- `BetaDreamMemoryStoreInput object { memory_store_id, type }` - An input memory store the dream reads from. The dream never mutates this store. + An input memory store the dream reads from. The dream never mutates this store unless it is also the destination: with output_behavior {type: "update_existing"} the job consolidates this store in place. - `memory_store_id: string`
- `id: string` - Model identifier, e.g. "claude-opus-4-7". 1-256 characters. + Model identifier, e.g. "claude-opus-5". 1-256 characters. - `speed: optional "standard" or "fast"`
- `id: string` - Model identifier, e.g. "claude-opus-4-7". 1-256 characters. + Model identifier, e.g. "claude-opus-5". 1-256 characters. - `speed: optional "standard" or "fast" or null`
- `output_tokens: number` Total output tokens generated across every pipeline stage. + +### Beta Output Behavior + +- `BetaOutputBehavior = BetaOutputBehaviorCreateNew or BetaOutputBehaviorUpdateExisting` + + The default destination: the job creates a new output memory store as a clone of the memory_store input and writes the consolidated memories into it. The input store is never mutated. + + - `BetaOutputBehaviorCreateNew object { type }` + + The default destination: the job creates a new output memory store as a clone of the memory_store input and writes the consolidated memories into it. The input store is never mutated. + + - `type: "create_new"` + + - `"create_new"` + + - `BetaOutputBehaviorUpdateExisting object { memory_store_id, type }` + + The job writes the consolidated memories into this existing memory store instead of creating one. In EAP the store must be the job's own memory_store input, so the job consolidates the store in place. + + - `memory_store_id: string` + + - `type: "update_existing"` + + - `"update_existing"` + +### Beta Output Behavior Create New + +- `BetaOutputBehaviorCreateNew object { type }` + + The default destination: the job creates a new output memory store as a clone of the memory_store input and writes the consolidated memories into it. The input store is never mutated. + + - `type: "create_new"` + + - `"create_new"` + +### Beta Output Behavior Update Existing + +- `BetaOutputBehaviorUpdateExisting object { memory_store_id, type }` + + The job writes the consolidated memories into this existing memory store instead of creating one. In EAP the store must be the job's own memory_store input, so the job consolidates the store in place. + + - `memory_store_id: string` + + - `type: "update_existing"` + + - `"update_existing"`
api/beta/dreams/archive Changed · +33 / -6 lines
- `string` - - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 30 more` + - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 31 more` - `"message-batches-2024-09-24"`
- `"user-profiles-2026-03-24"` + - `"user-profiles-2026-08-18"` + - `"advisor-tool-2026-03-01"` - `"managed-agents-2026-04-01"`
### Returns -- `BetaDream object { id, archived_at, created_at, 10 more }` +- `BetaDream object { id, archived_at, created_at, 11 more }` - An asynchronous memory-consolidation job that reads a memory store plus a set of session transcripts and writes consolidated memories into a new output memory store. The Dreams API is in research preview: the request and response shapes are volatile and may change without the deprecation period that applies to generally-available endpoints. + An asynchronous memory-consolidation job that reads a memory store plus a set of session transcripts and writes consolidated memories into an output memory store โ a new store by default, or an existing store chosen via output_behavior. The Dreams API is in research preview: the request and response shapes are volatile and may change without the deprecation period that applies to generally-available endpoints. - `id: string`
- `BetaDreamMemoryStoreInput object { memory_store_id, type }` - An input memory store the dream reads from. The dream never mutates this store. + An input memory store the dream reads from. The dream never mutates this store unless it is also the destination: with output_behavior {type: "update_existing"} the job consolidates this store in place. - `memory_store_id: string`
- `id: string` - Model identifier, e.g. "claude-opus-4-7". 1-256 characters. + Model identifier, e.g. "claude-opus-5". 1-256 characters. - `speed: optional "standard" or "fast"`
- `"fast"` + - `output_behavior: BetaOutputBehavior` + + The default destination: the job creates a new output memory store as a clone of the memory_store input and writes the consolidated memories into it. The input store is never mutated. + + - `BetaOutputBehaviorCreateNew object { type }` + + The default destination: the job creates a new output memory store as a clone of the memory_store input and writes the consolidated memories into it. The input store is never mutated. + + - `type: "create_new"` + + - `"create_new"` + + - `BetaOutputBehaviorUpdateExisting object { memory_store_id, type }` + + The job writes the consolidated memories into this existing memory store instead of creating one. In EAP the store must be the job's own memory_store input, so the job consolidates the store in place. + + - `memory_store_id: string` + + - `type: "update_existing"` + + - `"update_existing"` + - `outputs: array of BetaDreamOutput` - `memory_store_id: string`
"model": { "id": "x", "speed": "standard" + }, + "output_behavior": { + "type": "create_new" }, "outputs": [ {
api/beta/dreams/cancel Changed · +33 / -6 lines
- `string` - - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 30 more` + - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 31 more` - `"message-batches-2024-09-24"`
- `"user-profiles-2026-03-24"` + - `"user-profiles-2026-08-18"` + - `"advisor-tool-2026-03-01"` - `"managed-agents-2026-04-01"`
### Returns -- `BetaDream object { id, archived_at, created_at, 10 more }` +- `BetaDream object { id, archived_at, created_at, 11 more }` - An asynchronous memory-consolidation job that reads a memory store plus a set of session transcripts and writes consolidated memories into a new output memory store. The Dreams API is in research preview: the request and response shapes are volatile and may change without the deprecation period that applies to generally-available endpoints. + An asynchronous memory-consolidation job that reads a memory store plus a set of session transcripts and writes consolidated memories into an output memory store โ a new store by default, or an existing store chosen via output_behavior. The Dreams API is in research preview: the request and response shapes are volatile and may change without the deprecation period that applies to generally-available endpoints. - `id: string`
- `BetaDreamMemoryStoreInput object { memory_store_id, type }` - An input memory store the dream reads from. The dream never mutates this store. + An input memory store the dream reads from. The dream never mutates this store unless it is also the destination: with output_behavior {type: "update_existing"} the job consolidates this store in place. - `memory_store_id: string`
- `id: string` - Model identifier, e.g. "claude-opus-4-7". 1-256 characters. + Model identifier, e.g. "claude-opus-5". 1-256 characters. - `speed: optional "standard" or "fast"`
- `"fast"` + - `output_behavior: BetaOutputBehavior` + + The default destination: the job creates a new output memory store as a clone of the memory_store input and writes the consolidated memories into it. The input store is never mutated. + + - `BetaOutputBehaviorCreateNew object { type }` + + The default destination: the job creates a new output memory store as a clone of the memory_store input and writes the consolidated memories into it. The input store is never mutated. + + - `type: "create_new"` + + - `"create_new"` + + - `BetaOutputBehaviorUpdateExisting object { memory_store_id, type }` + + The job writes the consolidated memories into this existing memory store instead of creating one. In EAP the store must be the job's own memory_store input, so the job consolidates the store in place. + + - `memory_store_id: string` + + - `type: "update_existing"` + + - `"update_existing"` + - `outputs: array of BetaDreamOutput` - `memory_store_id: string`
"model": { "id": "x", "speed": "standard" + }, + "output_behavior": { + "type": "create_new" }, "outputs": [ {
api/beta/dreams/create Changed · +57 / -8 lines
- `string` - - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 30 more` + - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 31 more` - `"message-batches-2024-09-24"`
- `"user-profiles-2026-03-24"` + - `"user-profiles-2026-08-18"` + - `"advisor-tool-2026-03-01"` - `"managed-agents-2026-04-01"`
- `BetaDreamMemoryStoreInput object { memory_store_id, type }` - An input memory store the dream reads from. The dream never mutates this store. + An input memory store the dream reads from. The dream never mutates this store unless it is also the destination: with output_behavior {type: "update_existing"} the job consolidates this store in place. - `memory_store_id: string`
- `id: string` - Model identifier, e.g. "claude-opus-4-7". 1-256 characters. + Model identifier, e.g. "claude-opus-5". 1-256 characters. - `speed: optional "standard" or "fast" or null`
- `instructions: optional string or null` +- `output_behavior: optional BetaOutputBehavior` + + The default destination: the job creates a new output memory store as a clone of the memory_store input and writes the consolidated memories into it. The input store is never mutated. + + - `BetaOutputBehaviorCreateNew object { type }` + + The default destination: the job creates a new output memory store as a clone of the memory_store input and writes the consolidated memories into it. The input store is never mutated. + + - `type: "create_new"` + + - `"create_new"` + + - `BetaOutputBehaviorUpdateExisting object { memory_store_id, type }` + + The job writes the consolidated memories into this existing memory store instead of creating one. In EAP the store must be the job's own memory_store input, so the job consolidates the store in place. + + - `memory_store_id: string` + + - `type: "update_existing"` + + - `"update_existing"` + ### Returns -- `BetaDream object { id, archived_at, created_at, 10 more }` +- `BetaDream object { id, archived_at, created_at, 11 more }` - An asynchronous memory-consolidation job that reads a memory store plus a set of session transcripts and writes consolidated memories into a new output memory store. The Dreams API is in research preview: the request and response shapes are volatile and may change without the deprecation period that applies to generally-available endpoints. + An asynchronous memory-consolidation job that reads a memory store plus a set of session transcripts and writes consolidated memories into an output memory store โ a new store by default, or an existing store chosen via output_behavior. The Dreams API is in research preview: the request and response shapes are volatile and may change without the deprecation period that applies to generally-available endpoints. - `id: string`
- `BetaDreamMemoryStoreInput object { memory_store_id, type }` - An input memory store the dream reads from. The dream never mutates this store. + An input memory store the dream reads from. The dream never mutates this store unless it is also the destination: with output_behavior {type: "update_existing"} the job consolidates this store in place. - `memory_store_id: string`
- `id: string` - Model identifier, e.g. "claude-opus-4-7". 1-256 characters. + Model identifier, e.g. "claude-opus-5". 1-256 characters. - `speed: optional "standard" or "fast"`
- `"fast"` + - `output_behavior: BetaOutputBehavior` + + The default destination: the job creates a new output memory store as a clone of the memory_store input and writes the consolidated memories into it. The input store is never mutated. + + - `BetaOutputBehaviorCreateNew object { type }` + + The default destination: the job creates a new output memory store as a clone of the memory_store input and writes the consolidated memories into it. The input store is never mutated. + + - `type: "create_new"` + + - `"create_new"` + + - `BetaOutputBehaviorUpdateExisting object { memory_store_id, type }` + + The job writes the consolidated memories into this existing memory store instead of creating one. In EAP the store must be the job's own memory_store input, so the job consolidates the store in place. + + - `memory_store_id: string` + + - `type: "update_existing"` + + - `"update_existing"` + - `outputs: array of BetaDreamOutput` - `memory_store_id: string`
"model": { "id": "x", "speed": "standard" + }, + "output_behavior": { + "type": "create_new" }, "outputs": [ {
api/beta/dreams/list Changed · +30 / -3 lines
- `string` - - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 30 more` + - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 31 more` - `"message-batches-2024-09-24"`
- `"user-profiles-2026-03-24"` + - `"user-profiles-2026-08-18"` + - `"advisor-tool-2026-03-01"` - `"managed-agents-2026-04-01"`
- `BetaDreamMemoryStoreInput object { memory_store_id, type }` - An input memory store the dream reads from. The dream never mutates this store. + An input memory store the dream reads from. The dream never mutates this store unless it is also the destination: with output_behavior {type: "update_existing"} the job consolidates this store in place. - `memory_store_id: string`
- `id: string` - Model identifier, e.g. "claude-opus-4-7". 1-256 characters. + Model identifier, e.g. "claude-opus-5". 1-256 characters. - `speed: optional "standard" or "fast"`
- `"fast"` + - `output_behavior: BetaOutputBehavior` + + The default destination: the job creates a new output memory store as a clone of the memory_store input and writes the consolidated memories into it. The input store is never mutated. + + - `BetaOutputBehaviorCreateNew object { type }` + + The default destination: the job creates a new output memory store as a clone of the memory_store input and writes the consolidated memories into it. The input store is never mutated. + + - `type: "create_new"` + + - `"create_new"` + + - `BetaOutputBehaviorUpdateExisting object { memory_store_id, type }` + + The job writes the consolidated memories into this existing memory store instead of creating one. In EAP the store must be the job's own memory_store input, so the job consolidates the store in place. + + - `memory_store_id: string` + + - `type: "update_existing"` + + - `"update_existing"` + - `outputs: array of BetaDreamOutput` - `memory_store_id: string`
"model": { "id": "x", "speed": "standard" + }, + "output_behavior": { + "type": "create_new" }, "outputs": [ {
api/beta/dreams/retrieve Changed · +33 / -6 lines
- `string` - - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 30 more` + - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 31 more` - `"message-batches-2024-09-24"`
- `"user-profiles-2026-03-24"` + - `"user-profiles-2026-08-18"` + - `"advisor-tool-2026-03-01"` - `"managed-agents-2026-04-01"`
### Returns -- `BetaDream object { id, archived_at, created_at, 10 more }` +- `BetaDream object { id, archived_at, created_at, 11 more }` - An asynchronous memory-consolidation job that reads a memory store plus a set of session transcripts and writes consolidated memories into a new output memory store. The Dreams API is in research preview: the request and response shapes are volatile and may change without the deprecation period that applies to generally-available endpoints. + An asynchronous memory-consolidation job that reads a memory store plus a set of session transcripts and writes consolidated memories into an output memory store โ a new store by default, or an existing store chosen via output_behavior. The Dreams API is in research preview: the request and response shapes are volatile and may change without the deprecation period that applies to generally-available endpoints. - `id: string`
- `BetaDreamMemoryStoreInput object { memory_store_id, type }` - An input memory store the dream reads from. The dream never mutates this store. + An input memory store the dream reads from. The dream never mutates this store unless it is also the destination: with output_behavior {type: "update_existing"} the job consolidates this store in place. - `memory_store_id: string`
- `id: string` - Model identifier, e.g. "claude-opus-4-7". 1-256 characters. + Model identifier, e.g. "claude-opus-5". 1-256 characters. - `speed: optional "standard" or "fast"`
- `"fast"` + - `output_behavior: BetaOutputBehavior` + + The default destination: the job creates a new output memory store as a clone of the memory_store input and writes the consolidated memories into it. The input store is never mutated. + + - `BetaOutputBehaviorCreateNew object { type }` + + The default destination: the job creates a new output memory store as a clone of the memory_store input and writes the consolidated memories into it. The input store is never mutated. + + - `type: "create_new"` + + - `"create_new"` + + - `BetaOutputBehaviorUpdateExisting object { memory_store_id, type }` + + The job writes the consolidated memories into this existing memory store instead of creating one. In EAP the store must be the job's own memory_store input, so the job consolidates the store in place. + + - `memory_store_id: string` + + - `type: "update_existing"` + + - `"update_existing"` + - `outputs: array of BetaDreamOutput` - `memory_store_id: string`
"model": { "id": "x", "speed": "standard" + }, + "output_behavior": { + "type": "create_new" }, "outputs": [ {
api/beta/environments Changed · +61 / -33 lines
- `string` - - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 30 more` + - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 31 more` - `"message-batches-2024-09-24"`
- `"user-profiles-2026-03-24"` + - `"user-profiles-2026-08-18"` + - `"advisor-tool-2026-03-01"` - `"managed-agents-2026-04-01"`
RFC 3339 timestamp when environment was created - - `description: string` + - `description: string or null` - User-provided description for the environment + User-provided description for the environment; null when unset - `metadata: map[string]`
- `string` - - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 30 more` + - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 31 more` - `"message-batches-2024-09-24"`
- `"user-profiles-2026-03-24"` + - `"user-profiles-2026-08-18"` + - `"advisor-tool-2026-03-01"` - `"managed-agents-2026-04-01"`
RFC 3339 timestamp when environment was created - - `description: string` + - `description: string or null` - User-provided description for the environment + User-provided description for the environment; null when unset - `metadata: map[string]`
- `string` - - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 30 more` + - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 31 more` - `"message-batches-2024-09-24"`
- `"user-profiles-2026-03-24"` + - `"user-profiles-2026-08-18"` + - `"advisor-tool-2026-03-01"` - `"managed-agents-2026-04-01"`
RFC 3339 timestamp when environment was created - - `description: string` + - `description: string or null` - User-provided description for the environment + User-provided description for the environment; null when unset - `metadata: map[string]`
- `string` - - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 30 more` + - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 31 more` - `"message-batches-2024-09-24"`
- `"user-profiles-2026-03-24"` + - `"user-profiles-2026-08-18"` + - `"advisor-tool-2026-03-01"` - `"managed-agents-2026-04-01"`
- `description: optional string or null` - Updated description of the environment + Updated description of the environment. Omit to preserve; null clears to null; an empty string is stored as an empty string. - `metadata: optional map[string]`
RFC 3339 timestamp when environment was created - - `description: string` + - `description: string or null` - User-provided description for the environment + User-provided description for the environment; null when unset - `metadata: map[string]`
- `string` - - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 30 more` + - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 31 more` - `"message-batches-2024-09-24"`
- `"user-profiles-2026-03-24"` + - `"user-profiles-2026-08-18"` + - `"advisor-tool-2026-03-01"` - `"managed-agents-2026-04-01"`
- `string` - - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 30 more` + - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 31 more` - `"message-batches-2024-09-24"`
- `"user-profiles-2026-03-24"` + - `"user-profiles-2026-08-18"` + - `"advisor-tool-2026-03-01"` - `"managed-agents-2026-04-01"`
RFC 3339 timestamp when environment was created - - `description: string` + - `description: string or null` - User-provided description for the environment + User-provided description for the environment; null when unset - `metadata: map[string]`
RFC 3339 timestamp when environment was created - - `description: string` + - `description: string or null` - User-provided description for the environment + User-provided description for the environment; null when unset - `metadata: map[string]`
- `string` - - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 30 more` + - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 31 more` - `"message-batches-2024-09-24"`
- `"user-profiles-2026-03-24"` + - `"user-profiles-2026-08-18"` + - `"advisor-tool-2026-03-01"` - `"managed-agents-2026-04-01"`
- `string` - - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 30 more` + - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 31 more` - `"message-batches-2024-09-24"`
- `"user-profiles-2026-03-24"` + - `"user-profiles-2026-08-18"` + - `"advisor-tool-2026-03-01"` - `"managed-agents-2026-04-01"`
- `string` - - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 30 more` + - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 31 more` - `"message-batches-2024-09-24"`
- `"user-profiles-2026-03-24"` + - `"user-profiles-2026-08-18"` + - `"advisor-tool-2026-03-01"` - `"managed-agents-2026-04-01"`
- `string` - - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 30 more` + - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 31 more` - `"message-batches-2024-09-24"`
- `"user-profiles-2026-03-24"` + - `"user-profiles-2026-08-18"` + - `"advisor-tool-2026-03-01"` - `"managed-agents-2026-04-01"`
- `string` - - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 30 more` + - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 31 more` - `"message-batches-2024-09-24"`
- `"user-profiles-2026-03-24"` + - `"user-profiles-2026-08-18"` + - `"advisor-tool-2026-03-01"` - `"managed-agents-2026-04-01"`
- `string` - - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 30 more` + - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 31 more` - `"message-batches-2024-09-24"`
- `"user-profiles-2026-03-24"` + - `"user-profiles-2026-08-18"` + - `"advisor-tool-2026-03-01"` - `"managed-agents-2026-04-01"`
- `string` - - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 30 more` + - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 31 more` - `"message-batches-2024-09-24"`
- `"user-profiles-2026-03-24"` + - `"user-profiles-2026-08-18"` + - `"advisor-tool-2026-03-01"` - `"managed-agents-2026-04-01"`
- `string` - - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 30 more` + - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 31 more` - `"message-batches-2024-09-24"`
- `"output-300k-2026-03-24"` - `"user-profiles-2026-03-24"` + + - `"user-profiles-2026-08-18"` - `"advisor-tool-2026-03-01"`
api/beta/environments/archive Changed · +6 / -4 lines
- `string` - - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 30 more` + - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 31 more` - `"message-batches-2024-09-24"`
- `"user-profiles-2026-03-24"` + - `"user-profiles-2026-08-18"` + - `"advisor-tool-2026-03-01"` - `"managed-agents-2026-04-01"`
RFC 3339 timestamp when environment was created - - `description: string` + - `description: string or null` - User-provided description for the environment + User-provided description for the environment; null when unset - `metadata: map[string]`
api/beta/environments/create Changed · +6 / -4 lines
- `string` - - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 30 more` + - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 31 more` - `"message-batches-2024-09-24"`
- `"user-profiles-2026-03-24"` + - `"user-profiles-2026-08-18"` + - `"advisor-tool-2026-03-01"` - `"managed-agents-2026-04-01"`
RFC 3339 timestamp when environment was created - - `description: string` + - `description: string or null` - User-provided description for the environment + User-provided description for the environment; null when unset - `metadata: map[string]`
api/beta/environments/list Changed · +6 / -4 lines
- `string` - - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 30 more` + - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 31 more` - `"message-batches-2024-09-24"`
- `"user-profiles-2026-03-24"` + - `"user-profiles-2026-08-18"` + - `"advisor-tool-2026-03-01"` - `"managed-agents-2026-04-01"`
RFC 3339 timestamp when environment was created - - `description: string` + - `description: string or null` - User-provided description for the environment + User-provided description for the environment; null when unset - `metadata: map[string]`
api/beta/environments/retrieve Changed · +6 / -4 lines
- `string` - - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 30 more` + - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 31 more` - `"message-batches-2024-09-24"`
- `"user-profiles-2026-03-24"` + - `"user-profiles-2026-08-18"` + - `"advisor-tool-2026-03-01"` - `"managed-agents-2026-04-01"`
RFC 3339 timestamp when environment was created - - `description: string` + - `description: string or null` - User-provided description for the environment + User-provided description for the environment; null when unset - `metadata: map[string]`
api/beta/environments/update Changed · +7 / -5 lines
- `string` - - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 30 more` + - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 31 more` - `"message-batches-2024-09-24"`
- `"user-profiles-2026-03-24"` + - `"user-profiles-2026-08-18"` + - `"advisor-tool-2026-03-01"` - `"managed-agents-2026-04-01"`
- `description: optional string or null` - Updated description of the environment + Updated description of the environment. Omit to preserve; null clears to null; an empty string is stored as an empty string. - `metadata: optional map[string]`
RFC 3339 timestamp when environment was created - - `description: string` + - `description: string or null` - User-provided description for the environment + User-provided description for the environment; null when unset - `metadata: map[string]`
api/beta/environments/work Changed · +24 / -8 lines
- `string` - - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 30 more` + - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 31 more` - `"message-batches-2024-09-24"`
- `"user-profiles-2026-03-24"` + - `"user-profiles-2026-08-18"` + - `"advisor-tool-2026-03-01"` - `"managed-agents-2026-04-01"`
- `string` - - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 30 more` + - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 31 more` - `"message-batches-2024-09-24"`
- `"user-profiles-2026-03-24"` + - `"user-profiles-2026-08-18"` + - `"advisor-tool-2026-03-01"` - `"managed-agents-2026-04-01"`
- `string` - - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 30 more` + - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 31 more` - `"message-batches-2024-09-24"`
- `"user-profiles-2026-03-24"` + - `"user-profiles-2026-08-18"` + - `"advisor-tool-2026-03-01"` - `"managed-agents-2026-04-01"`
- `string` - - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 30 more` + - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 31 more` - `"message-batches-2024-09-24"`
- `"user-profiles-2026-03-24"` + - `"user-profiles-2026-08-18"` + - `"advisor-tool-2026-03-01"` - `"managed-agents-2026-04-01"`
- `string` - - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 30 more` + - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 31 more` - `"message-batches-2024-09-24"`
- `"user-profiles-2026-03-24"` + - `"user-profiles-2026-08-18"` + - `"advisor-tool-2026-03-01"` - `"managed-agents-2026-04-01"`
- `string` - - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 30 more` + - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 31 more` - `"message-batches-2024-09-24"`
- `"user-profiles-2026-03-24"` + - `"user-profiles-2026-08-18"` + - `"advisor-tool-2026-03-01"` - `"managed-agents-2026-04-01"`
- `string` - - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 30 more` + - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 31 more` - `"message-batches-2024-09-24"`
- `"user-profiles-2026-03-24"` + - `"user-profiles-2026-08-18"` + - `"advisor-tool-2026-03-01"` - `"managed-agents-2026-04-01"`
- `string` - - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 30 more` + - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 31 more` - `"message-batches-2024-09-24"`
- `"output-300k-2026-03-24"` - `"user-profiles-2026-03-24"` + + - `"user-profiles-2026-08-18"` - `"advisor-tool-2026-03-01"`
api/beta/files Changed · +87 / -77 lines
### Beta Deleted File ### Beta File Metadata ### Deleted File ### File Metadata
- `string` - - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 30 more` + - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 31 more` - `"message-batches-2024-09-24"`
- `"user-profiles-2026-03-24"` + - `"user-profiles-2026-08-18"` + - `"advisor-tool-2026-03-01"` - `"managed-agents-2026-04-01"`
### Returns -- `FileMetadata object { id, created_at, filename, 5 more }` +- `BetaFileMetadata object { id, created_at, filename, 5 more }` - `id: string`
- `string` - - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 30 more` + - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 31 more` - `"message-batches-2024-09-24"`
- `"user-profiles-2026-03-24"` + - `"user-profiles-2026-08-18"` + - `"advisor-tool-2026-03-01"` - `"managed-agents-2026-04-01"`
### Returns -- `data: array of FileMetadata` +- `data: array of BetaFileMetadata` List of file metadata objects.
- `string` - - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 30 more` + - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 31 more` - `"message-batches-2024-09-24"`
- `"user-profiles-2026-03-24"` + - `"user-profiles-2026-08-18"` + - `"advisor-tool-2026-03-01"` - `"managed-agents-2026-04-01"`
- `string` - - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 30 more` + - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 31 more` - `"message-batches-2024-09-24"`
- `"user-profiles-2026-03-24"` + - `"user-profiles-2026-08-18"` + - `"advisor-tool-2026-03-01"` - `"managed-agents-2026-04-01"`
### Returns -- `FileMetadata object { id, created_at, filename, 5 more }` +- `BetaFileMetadata object { id, created_at, filename, 5 more }` - `id: string`
- `string` - - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 30 more` + - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 31 more` - `"message-batches-2024-09-24"`
- `"user-profiles-2026-03-24"` + - `"user-profiles-2026-08-18"` + - `"advisor-tool-2026-03-01"` - `"managed-agents-2026-04-01"`
### Returns -- `DeletedFile object { id, type }` +- `BetaDeletedFile object { id, type }` - `id: string`
## Domain Types -### Beta File Scope +### Beta Deleted File -- `BetaFileScope object { id, type }` +- `BetaDeletedFile object { id, type }` - `id: string` - The ID of the scoping resource (e.g., the session ID). - - - `type: "session"` - - The type of scope (e.g., `"session"`). - - - `"session"` - -### Deleted File - -- `DeletedFile object { id, type }` - - - `id: string` - ID of the deleted file. - `type: optional "file_deleted"`
- `"file_deleted"` -### File Metadata +### Beta File Metadata -- `FileMetadata object { id, created_at, filename, 5 more }` +- `BetaFileMetadata object { id, created_at, filename, 5 more }` - `id: string`
The type of scope (e.g., `"session"`). - `"session"` + +### Beta File Scope + +- `BetaFileScope object { id, type }` + + - `id: string` + + The ID of the scoping resource (e.g., the session ID). + + - `type: "session"` + + The type of scope (e.g., `"session"`). + + - `"session"`
api/beta/files/delete Changed · +4 / -2 lines
- `string` - - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 30 more` + - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 31 more` - `"message-batches-2024-09-24"`
- `"user-profiles-2026-03-24"` + - `"user-profiles-2026-08-18"` + - `"advisor-tool-2026-03-01"` - `"managed-agents-2026-04-01"`
### Returns -- `DeletedFile object { id, type }` +- `BetaDeletedFile object { id, type }` - `id: string`
api/beta/files/list Changed · +4 / -2 lines
- `string` - - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 30 more` + - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 31 more` - `"message-batches-2024-09-24"`
- `"user-profiles-2026-03-24"` + - `"user-profiles-2026-08-18"` + - `"advisor-tool-2026-03-01"` - `"managed-agents-2026-04-01"`
### Returns -- `data: array of FileMetadata` +- `data: array of BetaFileMetadata` List of file metadata objects.
api/beta/files/retrieve_metadata Changed · +4 / -2 lines
- `string` - - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 30 more` + - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 31 more` - `"message-batches-2024-09-24"`
- `"user-profiles-2026-03-24"` + - `"user-profiles-2026-08-18"` + - `"advisor-tool-2026-03-01"` - `"managed-agents-2026-04-01"`
### Returns -- `FileMetadata object { id, created_at, filename, 5 more }` +- `BetaFileMetadata object { id, created_at, filename, 5 more }` - `id: string`
api/beta/files/upload Changed · +4 / -2 lines
- `string` - - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 30 more` + - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 31 more` - `"message-batches-2024-09-24"`
- `"user-profiles-2026-03-24"` + - `"user-profiles-2026-08-18"` + - `"advisor-tool-2026-03-01"` - `"managed-agents-2026-04-01"`
### Returns -- `FileMetadata object { id, created_at, filename, 5 more }` +- `BetaFileMetadata object { id, created_at, filename, 5 more }` - `id: string`
api/beta/memory_stores Changed · +121 / -15 lines
### Beta Managed Agents Service Account Actor
- `string` - - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 30 more` + - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 31 more` - `"message-batches-2024-09-24"`
- `"user-profiles-2026-03-24"` + - `"user-profiles-2026-08-18"` + - `"advisor-tool-2026-03-01"` - `"managed-agents-2026-04-01"`
- `string` - - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 30 more` + - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 31 more` - `"message-batches-2024-09-24"`
- `"user-profiles-2026-03-24"` + - `"user-profiles-2026-08-18"` + - `"advisor-tool-2026-03-01"` - `"managed-agents-2026-04-01"`
- `string` - - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 30 more` + - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 31 more` - `"message-batches-2024-09-24"`
- `"user-profiles-2026-03-24"` + - `"user-profiles-2026-08-18"` + - `"advisor-tool-2026-03-01"` - `"managed-agents-2026-04-01"`
- `string` - - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 30 more` + - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 31 more` - `"message-batches-2024-09-24"`
- `"user-profiles-2026-03-24"` + - `"user-profiles-2026-08-18"` + - `"advisor-tool-2026-03-01"` - `"managed-agents-2026-04-01"`
- `string` - - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 30 more` + - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 31 more` - `"message-batches-2024-09-24"`
- `"user-profiles-2026-03-24"` + - `"user-profiles-2026-08-18"` + - `"advisor-tool-2026-03-01"` - `"managed-agents-2026-04-01"`
- `string` - - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 30 more` + - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 31 more` - `"message-batches-2024-09-24"`
- `"user-profiles-2026-03-24"` + - `"user-profiles-2026-08-18"` + - `"advisor-tool-2026-03-01"` - `"managed-agents-2026-04-01"`
- `string` - - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 30 more` + - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 31 more` - `"message-batches-2024-09-24"`
- `"user-profiles-2026-03-24"` + - `"user-profiles-2026-08-18"` + - `"advisor-tool-2026-03-01"` - `"managed-agents-2026-04-01"`
- `string` - - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 30 more` + - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 31 more` - `"message-batches-2024-09-24"`
- `"user-profiles-2026-03-24"` + - `"user-profiles-2026-08-18"` + - `"advisor-tool-2026-03-01"` - `"managed-agents-2026-04-01"`
- `string` - - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 30 more` + - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 31 more` - `"message-batches-2024-09-24"`
- `"user-profiles-2026-03-24"` + - `"user-profiles-2026-08-18"` + - `"advisor-tool-2026-03-01"` - `"managed-agents-2026-04-01"`
- `string` - - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 30 more` + - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 31 more` - `"message-batches-2024-09-24"`
- `"user-profiles-2026-03-24"` + - `"user-profiles-2026-08-18"` + - `"advisor-tool-2026-03-01"` - `"managed-agents-2026-04-01"`
- `string` - - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 30 more` + - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 31 more` - `"message-batches-2024-09-24"`
- `"user-profiles-2026-03-24"` + - `"user-profiles-2026-08-18"` + - `"advisor-tool-2026-03-01"` - `"managed-agents-2026-04-01"`
Query parameter for page +- `service_account_id: optional string` + + Query parameter for service_account_id + - `session_id: optional string` Query parameter for session_id
- `string` - - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 30 more` + - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 31 more` - `"message-batches-2024-09-24"`
- `"user-profiles-2026-03-24"` + - `"user-profiles-2026-08-18"` + - `"advisor-tool-2026-03-01"` - `"managed-agents-2026-04-01"`
ID of the user who performed the write (a `user_...` value). + - `BetaManagedAgentsServiceAccountActor object { service_account_id, type }` + + Attribution for a write made by a workload authenticated as a service account, for example via Workload Identity Federation. + + - `service_account_id: string` + + ID of the service account that performed the write (a `svac_...` value). + + - `type: "service_account_actor"` + + - `"service_account_actor"` + - `path: optional string or null` The memory's path at the time of this write. `null` if and only if `redacted_at` is set.
- `string` - - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 30 more` + - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 31 more` - `"message-batches-2024-09-24"`
- `"user-profiles-2026-03-24"` + - `"user-profiles-2026-08-18"` + - `"advisor-tool-2026-03-01"` - `"managed-agents-2026-04-01"`
ID of the user who performed the write (a `user_...` value). + - `BetaManagedAgentsServiceAccountActor object { service_account_id, type }` + + Attribution for a write made by a workload authenticated as a service account, for example via Workload Identity Federation. + + - `service_account_id: string` + + ID of the service account that performed the write (a `svac_...` value). + + - `type: "service_account_actor"` + + - `"service_account_actor"` + - `path: optional string or null` The memory's path at the time of this write. `null` if and only if `redacted_at` is set.
- `string` - - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 30 more` + - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 31 more` - `"message-batches-2024-09-24"`
- `"user-profiles-2026-03-24"` + - `"user-profiles-2026-08-18"` + - `"advisor-tool-2026-03-01"` - `"managed-agents-2026-04-01"`
ID of the user who performed the write (a `user_...` value). + - `BetaManagedAgentsServiceAccountActor object { service_account_id, type }` + + Attribution for a write made by a workload authenticated as a service account, for example via Workload Identity Federation. + + - `service_account_id: string` + + ID of the service account that performed the write (a `svac_...` value). + + - `type: "service_account_actor"` + + - `"service_account_actor"` + - `path: optional string or null` The memory's path at the time of this write. `null` if and only if `redacted_at` is set.
### Beta Managed Agents Actor -- `BetaManagedAgentsActor = BetaManagedAgentsSessionActor or BetaManagedAgentsAPIActor or BetaManagedAgentsUserActor` +- `BetaManagedAgentsActor = BetaManagedAgentsSessionActor or BetaManagedAgentsAPIActor or BetaManagedAgentsUserActor or BetaManagedAgentsServiceAccountActor` Identifies who performed a write or redact operation. Captured at write time on the `memory_version` row. The API key that created a session is not recorded on agent writes; attribution answers who made the write, not who is ultimately responsible. Look up session provenance separately via the [Sessions API](/docs/en/api/sessions-retrieve).
ID of the user who performed the write (a `user_...` value). + - `BetaManagedAgentsServiceAccountActor object { service_account_id, type }` + + Attribution for a write made by a workload authenticated as a service account, for example via Workload Identity Federation. + + - `service_account_id: string` + + ID of the service account that performed the write (a `svac_...` value). + + - `type: "service_account_actor"` + + - `"service_account_actor"` + ### Beta Managed Agents API Actor - `BetaManagedAgentsAPIActor object { api_key_id, type }`
ID of the user who performed the write (a `user_...` value). + - `BetaManagedAgentsServiceAccountActor object { service_account_id, type }` + + Attribution for a write made by a workload authenticated as a service account, for example via Workload Identity Federation. + + - `service_account_id: string` + + ID of the service account that performed the write (a `svac_...` value). + + - `type: "service_account_actor"` + + - `"service_account_actor"` + - `path: optional string or null` The memory's path at the time of this write. `null` if and only if `redacted_at` is set.
- `"modified"` - `"deleted"` + +### Beta Managed Agents Service Account Actor + +- `BetaManagedAgentsServiceAccountActor object { service_account_id, type }` + + Attribution for a write made by a workload authenticated as a service account, for example via Workload Identity Federation. + + - `service_account_id: string` + + ID of the service account that performed the write (a `svac_...` value). + + - `type: "service_account_actor"` + + - `"service_account_actor"` ### Beta Managed Agents Session Actor
api/beta/memory_stores/memories Changed · +15 / -5 lines
- `string` - - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 30 more` + - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 31 more` - `"message-batches-2024-09-24"`
- `"user-profiles-2026-03-24"` + - `"user-profiles-2026-08-18"` + - `"advisor-tool-2026-03-01"` - `"managed-agents-2026-04-01"`
- `string` - - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 30 more` + - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 31 more` - `"message-batches-2024-09-24"`
- `"user-profiles-2026-03-24"` + - `"user-profiles-2026-08-18"` + - `"advisor-tool-2026-03-01"` - `"managed-agents-2026-04-01"`
- `string` - - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 30 more` + - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 31 more` - `"message-batches-2024-09-24"`
- `"user-profiles-2026-03-24"` + - `"user-profiles-2026-08-18"` + - `"advisor-tool-2026-03-01"` - `"managed-agents-2026-04-01"`
- `string` - - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 30 more` + - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 31 more` - `"message-batches-2024-09-24"`
- `"user-profiles-2026-03-24"` + - `"user-profiles-2026-08-18"` + - `"advisor-tool-2026-03-01"` - `"managed-agents-2026-04-01"`
- `string` - - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 30 more` + - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 31 more` - `"message-batches-2024-09-24"`
- `"output-300k-2026-03-24"` - `"user-profiles-2026-03-24"` + + - `"user-profiles-2026-08-18"` - `"advisor-tool-2026-03-01"`
api/beta/memory_stores/memory_versions Changed · +88 / -4 lines
### Beta Managed Agents Service Account Actor
Query parameter for page +- `service_account_id: optional string` + + Query parameter for service_account_id + - `session_id: optional string` Query parameter for session_id
- `string` - - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 30 more` + - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 31 more` - `"message-batches-2024-09-24"`
- `"user-profiles-2026-03-24"` + - `"user-profiles-2026-08-18"` + - `"advisor-tool-2026-03-01"` - `"managed-agents-2026-04-01"`
ID of the user who performed the write (a `user_...` value). + - `BetaManagedAgentsServiceAccountActor object { service_account_id, type }` + + Attribution for a write made by a workload authenticated as a service account, for example via Workload Identity Federation. + + - `service_account_id: string` + + ID of the service account that performed the write (a `svac_...` value). + + - `type: "service_account_actor"` + + - `"service_account_actor"` + - `path: optional string or null` The memory's path at the time of this write. `null` if and only if `redacted_at` is set.
- `string` - - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 30 more` + - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 31 more` - `"message-batches-2024-09-24"`
- `"user-profiles-2026-03-24"` + - `"user-profiles-2026-08-18"` + - `"advisor-tool-2026-03-01"` - `"managed-agents-2026-04-01"`
ID of the user who performed the write (a `user_...` value). + - `BetaManagedAgentsServiceAccountActor object { service_account_id, type }` + + Attribution for a write made by a workload authenticated as a service account, for example via Workload Identity Federation. + + - `service_account_id: string` + + ID of the service account that performed the write (a `svac_...` value). + + - `type: "service_account_actor"` + + - `"service_account_actor"` + - `path: optional string or null` The memory's path at the time of this write. `null` if and only if `redacted_at` is set.
- `string` - - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 30 more` + - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 31 more` - `"message-batches-2024-09-24"`
- `"user-profiles-2026-03-24"` + - `"user-profiles-2026-08-18"` + - `"advisor-tool-2026-03-01"` - `"managed-agents-2026-04-01"`
ID of the user who performed the write (a `user_...` value). + - `BetaManagedAgentsServiceAccountActor object { service_account_id, type }` + + Attribution for a write made by a workload authenticated as a service account, for example via Workload Identity Federation. + + - `service_account_id: string` + + ID of the service account that performed the write (a `svac_...` value). + + - `type: "service_account_actor"` + + - `"service_account_actor"` + - `path: optional string or null` The memory's path at the time of this write. `null` if and only if `redacted_at` is set.
### Beta Managed Agents Actor -- `BetaManagedAgentsActor = BetaManagedAgentsSessionActor or BetaManagedAgentsAPIActor or BetaManagedAgentsUserActor` +- `BetaManagedAgentsActor = BetaManagedAgentsSessionActor or BetaManagedAgentsAPIActor or BetaManagedAgentsUserActor or BetaManagedAgentsServiceAccountActor` Identifies who performed a write or redact operation. Captured at write time on the `memory_version` row. The API key that created a session is not recorded on agent writes; attribution answers who made the write, not who is ultimately responsible. Look up session provenance separately via the [Sessions API](/docs/en/api/sessions-retrieve).
ID of the user who performed the write (a `user_...` value). + - `BetaManagedAgentsServiceAccountActor object { service_account_id, type }` + + Attribution for a write made by a workload authenticated as a service account, for example via Workload Identity Federation. + + - `service_account_id: string` + + ID of the service account that performed the write (a `svac_...` value). + + - `type: "service_account_actor"` + + - `"service_account_actor"` + ### Beta Managed Agents API Actor - `BetaManagedAgentsAPIActor object { api_key_id, type }`
ID of the user who performed the write (a `user_...` value). + - `BetaManagedAgentsServiceAccountActor object { service_account_id, type }` + + Attribution for a write made by a workload authenticated as a service account, for example via Workload Identity Federation. + + - `service_account_id: string` + + ID of the service account that performed the write (a `svac_...` value). + + - `type: "service_account_actor"` + + - `"service_account_actor"` + - `path: optional string or null` The memory's path at the time of this write. `null` if and only if `redacted_at` is set.
- `"modified"` - `"deleted"` + +### Beta Managed Agents Service Account Actor + +- `BetaManagedAgentsServiceAccountActor object { service_account_id, type }` + + Attribution for a write made by a workload authenticated as a service account, for example via Workload Identity Federation. + + - `service_account_id: string` + + ID of the service account that performed the write (a `svac_...` value). + + - `type: "service_account_actor"` + + - `"service_account_actor"` ### Beta Managed Agents Session Actor
api/beta/memory_stores/memory_versions/list Changed · +19 / -1 lines
Query parameter for page +- `service_account_id: optional string` + + Query parameter for service_account_id + - `session_id: optional string` Query parameter for session_id
- `string` - - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 30 more` + - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 31 more` - `"message-batches-2024-09-24"`
- `"user-profiles-2026-03-24"` + - `"user-profiles-2026-08-18"` + - `"advisor-tool-2026-03-01"` - `"managed-agents-2026-04-01"`
- `user_id: string` ID of the user who performed the write (a `user_...` value). + + - `BetaManagedAgentsServiceAccountActor object { service_account_id, type }` + + Attribution for a write made by a workload authenticated as a service account, for example via Workload Identity Federation. + + - `service_account_id: string` + + ID of the service account that performed the write (a `svac_...` value). + + - `type: "service_account_actor"` + + - `"service_account_actor"` - `path: optional string or null`
api/beta/memory_stores/memory_versions/redact Changed · +15 / -1 lines
- `string` - - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 30 more` + - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 31 more` - `"message-batches-2024-09-24"`
- `"user-profiles-2026-03-24"` + - `"user-profiles-2026-08-18"` + - `"advisor-tool-2026-03-01"` - `"managed-agents-2026-04-01"`
- `user_id: string` ID of the user who performed the write (a `user_...` value). + + - `BetaManagedAgentsServiceAccountActor object { service_account_id, type }` + + Attribution for a write made by a workload authenticated as a service account, for example via Workload Identity Federation. + + - `service_account_id: string` + + ID of the service account that performed the write (a `svac_...` value). + + - `type: "service_account_actor"` + + - `"service_account_actor"` - `path: optional string or null`
api/beta/memory_stores/memory_versions/retrieve Changed · +15 / -1 lines
- `string` - - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 30 more` + - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 31 more` - `"message-batches-2024-09-24"`
- `"user-profiles-2026-03-24"` + - `"user-profiles-2026-08-18"` + - `"advisor-tool-2026-03-01"` - `"managed-agents-2026-04-01"`
- `user_id: string` ID of the user who performed the write (a `user_...` value). + + - `BetaManagedAgentsServiceAccountActor object { service_account_id, type }` + + Attribution for a write made by a workload authenticated as a service account, for example via Workload Identity Federation. + + - `service_account_id: string` + + ID of the service account that performed the write (a `svac_...` value). + + - `type: "service_account_actor"` + + - `"service_account_actor"` - `path: optional string or null`
api/beta/messages Changed · +6396 / -926 lines
### Beta Browser Close Tab Config ### Beta Browser Double Click Config ### Beta Browser File Upload Config ### Beta Browser Find Config ### Beta Browser Form Input Config ### Beta Browser Get Page Text Config ### Beta Browser Hold Key Config ### Beta Browser Hover Config ### Beta Browser Javascript Exec Config ### Beta Browser Key Config ### Beta Browser Left Click Config ### Beta Browser Left Click Drag Config ### Beta Browser Left Mouse Down Config ### Beta Browser Left Mouse Up Config ### Beta Browser List Tabs Config ### Beta Browser Middle Click Config ### Beta Browser Mouse Move Config ### Beta Browser Navigate Config ### Beta Browser New Tab Config ### Beta Browser Read Console Config ### Beta Browser Read Network Config ### Beta Browser Read Page Config ### Beta Browser Right Click Config ### Beta Browser Screenshot Config ### Beta Browser Scroll Config ### Beta Browser Scroll To Config ### Beta Browser State Block Param ### Beta Browser State Change ### Beta Browser State Change Download Completed ### Beta Browser State Change Download Failed ### Beta Browser State Change Download Started ### Beta Browser State Change Tab Opened ### Beta Browser State Tab Entry ### Beta Browser Switch Tab Config ### Beta Browser Toolset 20260801 ### Beta Browser Toolset Configs ### Beta Browser Triple Click Config ### Beta Browser Type Config ### Beta Browser Wait Config ### Beta Browser Zoom Config ### Beta Computer Cursor Position Config ### Beta Computer Double Click Config ### Beta Computer Hold Key Config ### Beta Computer Key Config ### Beta Computer Left Click Config ### Beta Computer Left Click Drag Config ### Beta Computer Left Mouse Down Config ### Beta Computer Left Mouse Up Config ### Beta Computer Middle Click Config ### Beta Computer Mouse Move Config ### Beta Computer Right Click Config ### Beta Computer Screenshot Config ### Beta Computer Scroll Config ### Beta Computer Toolset 20260801 ### Beta Computer Toolset Configs ### Beta Computer Triple Click Config ### Beta Computer Type Config ### Beta Computer Wait Config ### Beta Computer Zoom Config ### Beta Image Transformations Param ### Beta Mid Conversation System Block Param
This page is larger than the 256 KiB this site keeps, so one side of the diff below stops where the stored text does.
api/beta/messages/batches Changed · +919 / -137 lines
This page is larger than the 256 KiB this site keeps, so one side of the diff below stops where the stored text does.
The two sides of this change are too far apart to line up, so this is the differ's own diff of it.
- `string` - - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 30 more` + - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 31 more` - `"message-batches-2024-09-24"`
- `"output-300k-2026-03-24"` - `"user-profiles-2026-03-24"` + + - `"user-profiles-2026-08-18"` - `"advisor-tool-2026-03-01"`
- `"search_result_location"` - - `BetaImageBlockParam object { source, type, cache_control }` + - `BetaImageBlockParam object { source, type, cache_control, transformations }` - `source: BetaBase64ImageSource or BetaURLImageSource or BetaFileImageSource`
Create a cache control breakpoint at this content block. + - `transformations: optional BetaImageTransformationsParam or null` + + Configures the transformations the server applies to this image before the model observes it. Each key names a condition the server transforms images for; its value selects the transformation applied. Omitted keys keep their default behavior, and an empty object is equivalent to omitting the field. + + - `oversized_image: optional "downsize" or "error"` + + What the server does when this image exceeds the model's maximum image size. `"downsize"` (the default) scales the image down to fit, which changes the dimensions the model observes without telling you. `"error"` instead rejects the request with a 400 error naming the image's dimensions and the largest dimensions that fit, so you can scale the image deliberately โ your image is never silently scaled down. + + - `"downsize"` + + - `"error"` + - `BetaRequestDocumentBlock object { source, type, cache_control, 3 more }` - `source: BetaBase64PDFSource or BetaPlainTextSource or BetaContentBlockSource or 2 more`
- `BetaTextBlockParam object { text, type, cache_control, citations }` - - `BetaImageBlockParam object { source, type, cache_control }` + - `BetaImageBlockParam object { source, type, cache_control, transformations }` - `type: "content"`
- `"redacted_thinking"` - - `BetaToolUseBlockParam object { id, input, name, 3 more }` + - `BetaToolUseBlockParam object { id, input, name, 4 more }` - `id: string`
- `"code_execution_20260120"` - - `BetaToolResultBlockParam object { tool_use_id, type, cache_control, 2 more }` + - `toolset_name: optional string or null` + + For a toolset member tool_use, the toolset family this member belongs to. + + - `BetaToolResultBlockParam object { tool_use_id, type, cache_control, 3 more }` - `tool_use_id: string`
Create a cache control breakpoint at this content block. - - `content: optional string or array of BetaTextBlockParam or BetaImageBlockParam or BetaSearchResultBlockParam or 2 more` + - `content: optional string or array of BetaTextBlockParam or BetaImageBlockParam or BetaSearchResultBlockParam or 3 more` - `string` - - `array of BetaTextBlockParam or BetaImageBlockParam or BetaSearchResultBlockParam or 2 more` + - `array of BetaTextBlockParam or BetaImageBlockParam or BetaSearchResultBlockParam or 3 more` - `BetaTextBlockParam object { text, type, cache_control, citations }` - - `BetaImageBlockParam object { source, type, cache_control }` + - `BetaImageBlockParam object { source, type, cache_control, transformations }` - `BetaSearchResultBlockParam object { content, source, title, 3 more }`
Create a cache control breakpoint at this content block. + - `BetaBrowserStateBlockParam object { tabs, type, cache_control, state_changes }` + + The caller's browser state after a browser toolset member call โ + the full inventory of open tabs, which tab is active, and any side + effects (tabs opened, download state changes) the call produced. + + At most one per `tool_result`, only on a non-error result answering a + browser toolset member `tool_use`. The server renders the + model-visible text from it; the model never sees the raw fields. + + - `tabs: array of BetaBrowserStateTabEntry` + + All tabs open in the browser after this call โ the full inventory, not a delta. May be empty. Whenever non-empty, exactly one entry carries `active: true`. + + - `tab_id: string` + + The caller-assigned identifier for this tab, unique within the inventory. + + - `title: string` + + The title of the page the tab is showing. May be empty. + + - `url: string` + + The URL of the page the tab is showing. May be empty. + + - `active: optional boolean` + + Whether this tab is the active tab after this call. Whenever `tabs` is non-empty, exactly one entry is marked `active: true`. + + - `type: "browser_state"` + + - `"browser_state"` + + - `cache_control: optional BetaCacheControlEphemeral or null` + + Create a cache control breakpoint at this content block. + + - `state_changes: optional array of BetaBrowserStateChange or null` + + Tabs opened and download state changes during this call. "Nothing to report" is expressed by omitting the field, never by an empty list. + + - `BetaBrowserStateChangeTabOpened object { tab_id, type }` + + A tab this call's execution opened that remains open at its end โ + the creation delta of the `tabs` inventory, not an event log. + + Carries only the `tab_id`; the tab's `title` and `url` live on its + `tabs` entry, which must include the same `tab_id`. A tab opened + during a failed call gets no deferred `tab_opened`; it simply appears + in the next result's `tabs` inventory. + + - `tab_id: string` + + The `tab_id` of the opened tab, present in `tabs`. + + - `type: "tab_opened"` + + - `"tab_opened"` + + - `BetaBrowserStateChangeDownloadStarted object { download_id, type, url }` + + A file download that started during this call. + + - `download_id: string` + + The caller-assigned identifier for this download, stable across the state changes reporting it. + + - `type: "download_started"` + + - `"download_started"` + + - `url: string` + + The final post-redirect URL the download was served from. + + - `BetaBrowserStateChangeDownloadCompleted object { download_id, type, url, 2 more }` + + A file download that finished during this call, reported with the + same `download_id` as its `download_started` โ or without a prior + `download_started`, when the download finished during the call that + started it (at most one state change per `download_id` per result). + + - `download_id: string` + + The caller-assigned identifier for this download, stable across the state changes reporting it. + + - `type: "download_completed"` + + - `"download_completed"` + + - `url: string` + + The final post-redirect URL the download was served from. + + - `path: optional string or null` + + Where the executor saved the file, on the executor's filesystem. Only included when another tool in the same environment can read the file at that path. + + - `size_bytes: optional number or null` + + The completed download's size. + + - `BetaBrowserStateChangeDownloadFailed object { download_id, type, url, error }` + + A file download that failed โ or was cancelled โ during this call. + + - `download_id: string` + + The caller-assigned identifier for this download, stable across the state changes reporting it. + + - `type: "download_failed"` + + - `"download_failed"` + + - `url: string` + + The final post-redirect URL the download was served from. + + - `error: optional string or null` + + The failure or cancellation detail, when known. + - `is_error: optional boolean` + + - `toolset_name: optional string or null` + + For a toolset member tool_result, the toolset family of the paired tool_use. - `BetaServerToolUseBlockParam object { id, input, name, 3 more }`
- `encrypted_content: optional string or null` Opaque metadata from prior compaction, to be round-tripped verbatim - - - `BetaMidConversationSystemBlockParam object { content, type, cache_control }` - - System instructions that appear mid-conversation. - - Use this block to provide or update system-level instructions at a specific - point in the conversation, rather than only via the top-level `system` parameter. - - - `content: array of BetaTextBlockParam or BetaRequestToolAdditionBlock or BetaRequestToolRemovalBlock` - - System instruction text blocks. - - - `BetaTextBlockParam object { text, type, cache_control, citations }` - - - `BetaRequestToolAdditionBlock object { tool, type, cache_control }` - - Mid-conversation directive to surface a declared tool. - - `tool` references a tool (or MCP toolset) by name from the request's - `tools`; it is offered to the model from this point in the - conversation onward. - - - `tool: BetaToolChangeToolReference or BetaToolChangeMCPToolReference or BetaToolChangeMCPToolsetReference` - - Reference to a single tool the caller declared directly in - `tools[]`. Does not accept the composed `{server}_{name}` form the - server assigns to MCP-resolved tools โ use `mcp_tool_reference` or - `mcp_toolset_reference` for those. - - - `BetaToolChangeToolReference object { name, type }` - - Reference to a single tool the caller declared directly in - `tools[]`. Does not accept the composed `{server}_{name}` form the - server assigns to MCP-resolved tools โ use `mcp_tool_reference` or - `mcp_toolset_reference` for those. - - - `name: string` - - - `type: "tool_reference"` - - - `"tool_reference"` - - - `BetaToolChangeMCPToolReference object { name, server_name, type }` - - Reference to a single MCP tool by its server and remote name โ the - same `server_name`/`name` pair `mcp_tool_use` carries. - - - `name: string` - - - `server_name: string` - - - `type: "mcp_tool_reference"` - - - `"mcp_tool_reference"` - - - `BetaToolChangeMCPToolsetReference object { server_name, type }` - - Reference to every tool in the named MCP server's toolset. - - - `server_name: string` - - - `type: "mcp_toolset_reference"` - - - `"mcp_toolset_reference"` - - - `type: "tool_addition"` - - - `"tool_addition"` - - - `cache_control: optional BetaCacheControlEphemeral or null` - - Create a cache control breakpoint at this content block. - - - `BetaRequestToolRemovalBlock object { tool, type, cache_control }` - - Mid-conversation directive to withdraw a tool. - - `tool` references a tool (or MCP toolset) by name from the request's - `tools`; it is no longer offered to the model from this point in the - conversation onward. - - - `tool: BetaToolChangeToolReference or BetaToolChangeMCPToolReference or BetaToolChangeMCPToolsetReference` - - Reference to a single tool the caller declared directly in - `tools[]`. Does not accept the composed `{server}_{name}` form the - server assigns to MCP-resolved tools โ use `mcp_tool_reference` or - `mcp_toolset_reference` for those. - - - `BetaToolChangeToolReference object { name, type }` - - Reference to a single tool the caller declared directly in - `tools[]`. Does not accept the composed `{server}_{name}` form the - server assigns to MCP-resolved tools โ use `mcp_tool_reference` or - `mcp_toolset_reference` for those. - - - `BetaToolChangeMCPToolReference object { name, server_name, type }` - - Reference to a single MCP tool by its server and remote name โ the - same `server_name`/`name` pair `mcp_tool_use` carries. - - - `BetaToolChangeMCPToolsetReference object { server_name, type }` - - Reference to every tool in the named MCP server's toolset. - - - `type: "tool_removal"` - - - `"tool_removal"` - - - `cache_control: optional BetaCacheControlEphemeral or null` - - Create a cache control breakpoint at this content block. - - - `type: "mid_conv_system"` - - - `"mid_conv_system"` - - - `cache_control: optional BetaCacheControlEphemeral or null` - - Create a cache control breakpoint at this content block. - `BetaRequestToolAdditionBlock object { tool, type, cache_control }`
`tools`; it is offered to the model from this point in the conversation onward. + - `tool: BetaToolChangeToolReference or BetaToolChangeMCPToolReference or BetaToolChangeMCPToolsetReference` + + Reference to a single tool the caller declared directly in + `tools[]`. Does not accept the composed `{server}_{name}` form the + server assigns to MCP-resolved tools โ use `mcp_tool_reference` or + `mcp_toolset_reference` for those. + + - `BetaToolChangeToolReference object { name, type }` + + Reference to a single tool the caller declared directly in + `tools[]`. Does not accept the composed `{server}_{name}` form the + server assigns to MCP-resolved tools โ use `mcp_tool_reference` or + `mcp_toolset_reference` for those. + + - `name: string` + + - `type: "tool_reference"` + + - `"tool_reference"` + + - `BetaToolChangeMCPToolReference object { name, server_name, type }` + + Reference to a single MCP tool by its server and remote name โ the + same `server_name`/`name` pair `mcp_tool_use` carries. + + - `name: string` + + - `server_name: string` + + - `type: "mcp_tool_reference"` + + - `"mcp_tool_reference"` + + - `BetaToolChangeMCPToolsetReference object { server_name, type }` + + Reference to every tool in the named MCP server's toolset. + + - `server_name: string` + + - `type: "mcp_toolset_reference"` + + - `"mcp_toolset_reference"` + + - `type: "tool_addition"` + + - `"tool_addition"` + + - `cache_control: optional BetaCacheControlEphemeral or null` + + Create a cache control breakpoint at this content block. + - `BetaRequestToolRemovalBlock object { tool, type, cache_control }` Mid-conversation directive to withdraw a tool.
`tool` references a tool (or MCP toolset) by name from the request's `tools`; it is no longer offered to the model from this point in the conversation onward. + + - `tool: BetaToolChangeToolReference or BetaToolChangeMCPToolReference or BetaToolChangeMCPToolsetReference` + + Reference to a single tool the caller declared directly in + `tools[]`. Does not accept the composed `{server}_{name}` form the + server assigns to MCP-resolved tools โ use `mcp_tool_reference` or + `mcp_toolset_reference` for those. + + - `BetaToolChangeToolReference object { name, type }` + + Reference to a single tool the caller declared directly in + `tools[]`. Does not accept the composed `{server}_{name}` form the + server assigns to MCP-resolved tools โ use `mcp_tool_reference` or + `mcp_toolset_reference` for those. + + - `BetaToolChangeMCPToolReference object { name, server_name, type }` + + Reference to a single MCP tool by its server and remote name โ the + same `server_name`/`name` pair `mcp_tool_use` carries. + + - `BetaToolChangeMCPToolsetReference object { server_name, type }` + + Reference to every tool in the named MCP server's toolset. + + - `type: "tool_removal"` + + - `"tool_removal"` + + - `cache_control: optional BetaCacheControlEphemeral or null` + + Create a cache control breakpoint at this content block. - `BetaFallbackBlockParam object { from, to, type, trigger }`
When true, guarantees schema validation on tool names and inputs + - `BetaBrowserToolset20260801 object { type, allowed_callers, cache_control, configs }` + + The browser toolset: a single `tools[]` entry (carrying no + `name`) that declares the browser tool family. The model is served + the family's tool with any members disabled via `configs` removed + from its schema. + + - `type: "browser_toolset_20260801"` + + - `"browser_toolset_20260801"` + + - `allowed_callers: optional array of "direct" or "code_execution_20250825" or "code_execution_20260120" or "code_execution_20260521"` + + - `"direct"` + + - `"code_execution_20250825"` + + - `"code_execution_20260120"` + + - `"code_execution_20260521"` + + - `cache_control: optional BetaCacheControlEphemeral or null` + + Create a cache control breakpoint at this content block. + + - `configs: optional BetaBrowserToolsetConfigs or null` + + Per-member configuration for `browser_toolset_20260801`: one + optional field per member tool, keyed by the member name โ the same + name the member's `tool_use` blocks carry. Every member is an + accepted key, and a member's defaults apply wherever its key is + absent. Unknown keys are rejected: the field set is this toolset + version's complete member set. + + - `close_tab: optional BetaBrowserCloseTabConfig or null` + + `close_tab`'s config overrides. + + - `defer_loading: optional boolean or null` + + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. + + - `enabled: optional boolean or null` + + Whether this member is offered to the model. Default is per member, per the toolset's documentation. A member whose enabled resolves false is withheld from the served schema. + + - `double_click: optional BetaBrowserDoubleClickConfig or null` + + `double_click`'s config overrides. + + - `defer_loading: optional boolean or null` + + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. + + - `enabled: optional boolean or null` + + Whether this member is offered to the model. Default is per member, per the toolset's documentation. A member whose enabled resolves false is withheld from the served schema. + + - `file_upload: optional BetaBrowserFileUploadConfig or null` + + `file_upload`'s config overrides. + + - `defer_loading: optional boolean or null` + + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. + + - `enabled: optional boolean or null` + + Whether this member is offered to the model. Default is per member, per the toolset's documentation. A member whose enabled resolves false is withheld from the served schema. + + - `find: optional BetaBrowserFindConfig or null` + + `find`'s config overrides. + + - `defer_loading: optional boolean or null` + + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. + + - `enabled: optional boolean or null` + + Whether this member is offered to the model. Default is per member, per the toolset's documentation. A member whose enabled resolves false is withheld from the served schema. + + - `form_input: optional BetaBrowserFormInputConfig or null` + + `form_input`'s config overrides. + + - `defer_loading: optional boolean or null` + + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. + + - `enabled: optional boolean or null` + + Whether this member is offered to the model. Default is per member, per the toolset's documentation. A member whose enabled resolves false is withheld from the served schema. + + - `get_page_text: optional BetaBrowserGetPageTextConfig or null` + + `get_page_text`'s config overrides. + + - `defer_loading: optional boolean or null` + + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. + + - `enabled: optional boolean or null` + + Whether this member is offered to the model. Default is per member, per the toolset's documentation. A member whose enabled resolves false is withheld from the served schema. + + - `hold_key: optional BetaBrowserHoldKeyConfig or null` + + `hold_key`'s config overrides. + + - `defer_loading: optional boolean or null` + + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. + + - `enabled: optional boolean or null` + + Whether this member is offered to the model. Default is per member, per the toolset's documentation. A member whose enabled resolves false is withheld from the served schema. + + - `hover: optional BetaBrowserHoverConfig or null` + + `hover`'s config overrides. + + - `defer_loading: optional boolean or null` + + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. + + - `enabled: optional boolean or null` + + Whether this member is offered to the model. Default is per member, per the toolset's documentation. A member whose enabled resolves false is withheld from the served schema. + + - `javascript_exec: optional BetaBrowserJavascriptExecConfig or null` + + `javascript_exec`'s config overrides. + + - `defer_loading: optional boolean or null` + + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. + + - `enabled: optional boolean or null` + + Whether this member is offered to the model. Default is per member, per the toolset's documentation. A member whose enabled resolves false is withheld from the served schema. + + - `key: optional BetaBrowserKeyConfig or null` + + `key`'s config overrides. + + - `defer_loading: optional boolean or null` + + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. + + - `enabled: optional boolean or null` + + Whether this member is offered to the model. Default is per member, per the toolset's documentation. A member whose enabled resolves false is withheld from the served schema. + + - `left_click: optional BetaBrowserLeftClickConfig or null` + + `left_click`'s config overrides. + + - `defer_loading: optional boolean or null` + + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. + + - `enabled: optional boolean or null` + + Whether this member is offered to the model. Default is per member, per the toolset's documentation. A member whose enabled resolves false is withheld from the served schema. + + - `left_click_drag: optional BetaBrowserLeftClickDragConfig or null` + + `left_click_drag`'s config overrides. + + - `defer_loading: optional boolean or null` + + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. + + - `enabled: optional boolean or null` + + Whether this member is offered to the model. Default is per member, per the toolset's documentation. A member whose enabled resolves false is withheld from the served schema. + + - `left_mouse_down: optional BetaBrowserLeftMouseDownConfig or null` + + `left_mouse_down`'s config overrides. + + - `defer_loading: optional boolean or null` + + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. + + - `enabled: optional boolean or null` + + Whether this member is offered to the model. Default is per member, per the toolset's documentation. A member whose enabled resolves false is withheld from the served schema. + + - `left_mouse_up: optional BetaBrowserLeftMouseUpConfig or null` + + `left_mouse_up`'s config overrides. + + - `defer_loading: optional boolean or null` + + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. + + - `enabled: optional boolean or null` + + Whether this member is offered to the model. Default is per member, per the toolset's documentation. A member whose enabled resolves false is withheld from the served schema. + + - `list_tabs: optional BetaBrowserListTabsConfig or null` + + `list_tabs`'s config overrides. + + - `defer_loading: optional boolean or null` + + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. + + - `enabled: optional boolean or null` + + Whether this member is offered to the model. Default is per member, per the toolset's documentation. A member whose enabled resolves false is withheld from the served schema. + + - `middle_click: optional BetaBrowserMiddleClickConfig or null` + + `middle_click`'s config overrides. + + - `defer_loading: optional boolean or null` + + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. + + - `enabled: optional boolean or null` + + Whether this member is offered to the model. Default is per member, per the toolset's documentation. A member whose enabled resolves false is withheld from the served schema. + + - `mouse_move: optional BetaBrowserMouseMoveConfig or null` + + `mouse_move`'s config overrides. + + - `defer_loading: optional boolean or null` + + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. + + - `enabled: optional boolean or null` + + Whether this member is offered to the model. Default is per member, per the toolset's documentation. A member whose enabled resolves false is withheld from the served schema. + + - `navigate: optional BetaBrowserNavigateConfig or null` + + `navigate`'s config overrides. + + - `defer_loading: optional boolean or null` + + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. + + - `enabled: optional boolean or null` + + Whether this member is offered to the model. Default is per member, per the toolset's documentation. A member whose enabled resolves false is withheld from the served schema. + + - `new_tab: optional BetaBrowserNewTabConfig or null` + + `new_tab`'s config overrides. + + - `defer_loading: optional boolean or null` + + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. + + - `enabled: optional boolean or null` + + Whether this member is offered to the model. Default is per member, per the toolset's documentation. A member whose enabled resolves false is withheld from the served schema. + + - `read_console: optional BetaBrowserReadConsoleConfig or null` + + `read_console`'s config overrides. + + - `defer_loading: optional boolean or null` + + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. + + - `enabled: optional boolean or null` + + Whether this member is offered to the model. Default is per member, per the toolset's documentation. A member whose enabled resolves false is withheld from the served schema. + + - `read_network: optional BetaBrowserReadNetworkConfig or null` + + `read_network`'s config overrides. + + - `defer_loading: optional boolean or null` + + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. + + - `enabled: optional boolean or null` + + Whether this member is offered to the model. Default is per member, per the toolset's documentation. A member whose enabled resolves false is withheld from the served schema. + + - `read_page: optional BetaBrowserReadPageConfig or null` + + `read_page`'s config overrides. + + - `defer_loading: optional boolean or null` + + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. + + - `enabled: optional boolean or null` + + Whether this member is offered to the model. Default is per member, per the toolset's documentation. A member whose enabled resolves false is withheld from the served schema. + + - `right_click: optional BetaBrowserRightClickConfig or null` + + `right_click`'s config overrides. + + - `defer_loading: optional boolean or null` + + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. + + - `enabled: optional boolean or null` + + Whether this member is offered to the model. Default is per member, per the toolset's documentation. A member whose enabled resolves false is withheld from the served schema. + + - `screenshot: optional BetaBrowserScreenshotConfig or null` + + `screenshot`'s config overrides. + + - `defer_loading: optional boolean or null` + + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. + + - `enabled: optional boolean or null` + + Whether this member is offered to the model. Default is per member, per the toolset's documentation. A member whose enabled resolves false is withheld from the served schema. + + - `scroll: optional BetaBrowserScrollConfig or null` + + `scroll`'s config overrides. + + - `defer_loading: optional boolean or null` + + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. + + - `enabled: optional boolean or null` + + Whether this member is offered to the model. Default is per member, per the toolset's documentation. A member whose enabled resolves false is withheld from the served schema. + + - `scroll_to: optional BetaBrowserScrollToConfig or null` + + `scroll_to`'s config overrides. + + - `defer_loading: optional boolean or null` + + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. + + - `enabled: optional boolean or null` + + Whether this member is offered to the model. Default is per member, per the toolset's documentation. A member whose enabled resolves false is withheld from the served schema. + + - `switch_tab: optional BetaBrowserSwitchTabConfig or null` + + `switch_tab`'s config overrides. + + - `defer_loading: optional boolean or null` + + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. + + - `enabled: optional boolean or null` + + Whether this member is offered to the model. Default is per member, per the toolset's documentation. A member whose enabled resolves false is withheld from the served schema. + + - `triple_click: optional BetaBrowserTripleClickConfig or null` + + `triple_click`'s config overrides. + + - `defer_loading: optional boolean or null` + + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. + + - `enabled: optional boolean or null` + + Whether this member is offered to the model. Default is per member, per the toolset's documentation. A member whose enabled resolves false is withheld from the served schema. + + - `type: optional BetaBrowserTypeConfig or null` + + `type`'s config overrides. + + - `defer_loading: optional boolean or null` + + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. + + - `enabled: optional boolean or null` + + Whether this member is offered to the model. Default is per member, per the toolset's documentation. A member whose enabled resolves false is withheld from the served schema. + + - `wait: optional BetaBrowserWaitConfig or null` + + `wait`'s config overrides. + + - `defer_loading: optional boolean or null` + + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. + + - `enabled: optional boolean or null` + + Whether this member is offered to the model. Default is per member, per the toolset's documentation. A member whose enabled resolves false is withheld from the served schema. + + - `zoom: optional BetaBrowserZoomConfig or null` + + `zoom`'s config overrides. + + - `defer_loading: optional boolean or null` + + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. + + - `enabled: optional boolean or null` + + Whether this member is offered to the model. Default is per member, per the toolset's documentation. A member whose enabled resolves false is withheld from the served schema. + - `BetaToolComputerUse20241022 object { display_height_px, display_width_px, name, 7 more }` - `display_height_px: number`
- `strict: optional boolean` When true, guarantees schema validation on tool names and inputs + + - `BetaComputerToolset20260801 object { type, allowed_callers, cache_control, configs }` + + The computer toolset: a single `tools[]` entry (carrying no + `name`) that declares the computer tool family. The model is + served the family's tool with any members disabled via `configs` + removed from its schema. Every member is enabled by default, zoom + included. The single-tool options `display_number` and + `enable_zoom` are not fields of a toolset entry โ it carries only + `type`, `configs`, and `cache_control`; zoom is controlled + via `configs.zoom.enabled`. + + - `type: "computer_toolset_20260801"` + + - `"computer_toolset_20260801"` + + - `allowed_callers: optional array of "direct" or "code_execution_20250825" or "code_execution_20260120" or "code_execution_20260521"` + + - `"direct"` + + - `"code_execution_20250825"` + + - `"code_execution_20260120"` + + - `"code_execution_20260521"` + + - `cache_control: optional BetaCacheControlEphemeral or null` + + Create a cache control breakpoint at this content block. + + - `configs: optional BetaComputerToolsetConfigs or null` + + Per-member configuration for `computer_toolset_20260801`: one + optional field per member tool, keyed by the member name โ the same + name the member's `tool_use` blocks carry. Every member is an + accepted key, and a member's defaults apply wherever its key is + absent. Unknown keys are rejected: the field set is this toolset + version's complete member set. + + - `cursor_position: optional BetaComputerCursorPositionConfig or null` + + `cursor_position`'s config overrides. + + - `defer_loading: optional boolean or null` + + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. + + - `enabled: optional boolean or null` + + Whether this member is offered to the model. Default is per member, per the toolset's documentation. A member whose enabled resolves false is withheld from the served schema. + + - `double_click: optional BetaComputerDoubleClickConfig or null` + + `double_click`'s config overrides. + + - `defer_loading: optional boolean or null` + + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. + + - `enabled: optional boolean or null` + + Whether this member is offered to the model. Default is per member, per the toolset's documentation. A member whose enabled resolves false is withheld from the served schema. + + - `hold_key: optional BetaComputerHoldKeyConfig or null` + + `hold_key`'s config overrides. + + - `defer_loading: optional boolean or null` + + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. + + - `enabled: optional boolean or null` + + Whether this member is offered to the model. Default is per member, per the toolset's documentation. A member whose enabled resolves false is withheld from the served schema. + + - `key: optional BetaComputerKeyConfig or null` + + `key`'s config overrides. + + - `defer_loading: optional boolean or null` + + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. + + - `enabled: optional boolean or null` + + Whether this member is offered to the model. Default is per member, per the toolset's documentation. A member whose enabled resolves false is withheld from the served schema. + + - `left_click: optional BetaComputerLeftClickConfig or null` + + `left_click`'s config overrides. + + - `defer_loading: optional boolean or null` + + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. + + - `enabled: optional boolean or null` + + Whether this member is offered to the model. Default is per member, per the toolset's documentation. A member whose enabled resolves false is withheld from the served schema. + + - `left_click_drag: optional BetaComputerLeftClickDragConfig or null` + + `left_click_drag`'s config overrides. + + - `defer_loading: optional boolean or null` + + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. + + - `enabled: optional boolean or null` + + Whether this member is offered to the model. Default is per member, per the toolset's documentation. A member whose enabled resolves false is withheld from the served schema. + + - `left_mouse_down: optional BetaComputerLeftMouseDownConfig or null` + + `left_mouse_down`'s config overrides. + + - `defer_loading: optional boolean or null` + + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. + + - `enabled: optional boolean or null` + + Whether this member is offered to the model. Default is per member, per the toolset's documentation. A member whose enabled resolves false is withheld from the served schema. + + - `left_mouse_up: optional BetaComputerLeftMouseUpConfig or null` + + `left_mouse_up`'s config overrides. + + - `defer_loading: optional boolean or null` + + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. + + - `enabled: optional boolean or null` + + Whether this member is offered to the model. Default is per member, per the toolset's documentation. A member whose enabled resolves false is withheld from the served schema. + + - `middle_click: optional BetaComputerMiddleClickConfig or null` + + `middle_click`'s config overrides. + + - `defer_loading: optional boolean or null` + + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. + + - `enabled: optional boolean or null` + + Whether this member is offered to the model. Default is per member, per the toolset's documentation. A member whose enabled resolves false is withheld from the served schema. + + - `mouse_move: optional BetaComputerMouseMoveConfig or null` + + `mouse_move`'s config overrides. + + - `defer_loading: optional boolean or null` + + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. + + - `enabled: optional boolean or null` + + Whether this member is offered to the model. Default is per member, per the toolset's documentation. A member whose enabled resolves false is withheld from the served schema. + + - `right_click: optional BetaComputerRightClickConfig or null` + + `right_click`'s config overrides. + + - `defer_loading: optional boolean or null` + + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. + + - `enabled: optional boolean or null` + + Whether this member is offered to the model. Default is per member, per the toolset's documentation. A member whose enabled resolves false is withheld from the served schema. + + - `screenshot: optional BetaComputerScreenshotConfig or null` + + `screenshot`'s config overrides. + + - `defer_loading: optional boolean or null` + + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. + + - `enabled: optional boolean or null` + + Whether this member is offered to the model. Default is per member, per the toolset's documentation. A member whose enabled resolves false is withheld from the served schema. + + - `scroll: optional BetaComputerScrollConfig or null` + + `scroll`'s config overrides. + + - `defer_loading: optional boolean or null` + + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. + + - `enabled: optional boolean or null` + + Whether this member is offered to the model. Default is per member, per the toolset's documentation. A member whose enabled resolves false is withheld from the served schema. + + - `triple_click: optional BetaComputerTripleClickConfig or null` + + `triple_click`'s config overrides. + + - `defer_loading: optional boolean or null` + + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. + + - `enabled: optional boolean or null` + + Whether this member is offered to the model. Default is per member, per the toolset's documentation. A member whose enabled resolves false is withheld from the served schema. + + - `type: optional BetaComputerTypeConfig or null` + + `type`'s config overrides. + + - `defer_loading: optional boolean or null` + + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. + + - `enabled: optional boolean or null` + + Whether this member is offered to the model. Default is per member, per the toolset's documentation. A member whose enabled resolves false is withheld from the served schema. + + - `wait: optional BetaComputerWaitConfig or null` + + `wait`'s config overrides. + + - `defer_loading: optional boolean or null` + + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. + + - `enabled: optional boolean or null` + + Whether this member is offered to the model. Default is per member, per the toolset's documentation. A member whose enabled resolves false is withheld from the served schema. + + - `zoom: optional BetaComputerZoomConfig or null` + + `zoom`'s config overrides. + + - `defer_loading: optional boolean or null` + + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. + + - `enabled: optional boolean or null` + + Whether this member is offered to the model. Default is per member, per the toolset's documentation. A member whose enabled resolves false is withheld from the served schema. - `BetaToolTextEditor20250124 object { name, type, allowed_callers, 4 more }`
"role": "user" } ], - "model": "claude-opus-4-6" + "model": "claude-opus-5" } } ]
- `string` - - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 30 more` + - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 31 more` - `"message-batches-2024-09-24"`
- `"output-300k-2026-03-24"` - `"user-profiles-2026-03-24"` + + - `"user-profiles-2026-08-18"` - `"advisor-tool-2026-03-01"`
- `string` - - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 30 more` + - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 31 more` - `"message-batches-2024-09-24"`
- `"output-300k-2026-03-24"` - `"user-profiles-2026-03-24"` + + - `"user-profiles-2026-08-18"` - `"advisor-tool-2026-03-01"`
- `string` - - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 30 more` + - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 31 more` - `"message-batches-2024-09-24"`
- `"output-300k-2026-03-24"` - `"user-profiles-2026-03-24"` + + - `"user-profiles-2026-08-18"` - `"advisor-tool-2026-03-01"`
- `string` - - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 30 more` + - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 31 more` - `"message-batches-2024-09-24"`
- `"output-300k-2026-03-24"` - `"user-profiles-2026-03-24"` + + - `"user-profiles-2026-08-18"` - `"advisor-tool-2026-03-01"`
- `string` - - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 30 more` + - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 31 more` - `"message-batches-2024-09-24"`
- `"output-300k-2026-03-24"` - `"user-profiles-2026-03-24"` + + - `"user-profiles-2026-08-18"` - `"advisor-tool-2026-03-01"`
- `"redacted_thinking"` - - `BetaToolUseBlock object { id, input, name, 2 more }` + - `BetaToolUseBlock object { id, input, name, 3 more }` - `id: string`
- `type: "code_execution_20260120"` - `"code_execution_20260120"` + + - `toolset_name: optional string or null` + + For a toolset member tool_use, the toolset family. - `BetaServerToolUseBlock object { id, input, name, 2 more }`
- `"redacted_thinking"` - - `BetaToolUseBlock object { id, input, name, 2 more }` + - `BetaToolUseBlock object { id, input, name, 3 more }` - `id: string`
- `type: "code_execution_20260120"` - `"code_execution_20260120"` + + - `toolset_name: optional string or null` + + For a toolset member tool_use, the toolset family. - `BetaServerToolUseBlock object { id, input, name, 2 more }`
- `"redacted_thinking"` - - `BetaToolUseBlock object { id, input, name, 2 more }` + - `BetaToolUseBlock object { id, input, name, 3 more }` - `id: string`
- `type: "code_execution_20260120"` - `"code_execution_20260120"` + + - `toolset_name: optional string or null` + + For a toolset member tool_use, the toolset family. - `BetaServerToolUseBlock object { id, input, name, 2 more }`
- `"redacted_thinking"` - - `BetaToolUseBlock object { id, input, name, 2 more }` + - `BetaToolUseBlock object { id, input, name, 3 more }` - `id: string`
- `type: "code_execution_20260120"` - `"code_execution_20260120"` + + - `toolset_name: optional string or null` + + For a toolset member tool_use, the toolset family. - `BetaServerToolUseBlock object { id, input, name, 2 more }`
api/beta/messages/batches/create Changed · +884 / -128 lines
The two sides of this change are too far apart to line up, so this is the differ's own diff of it.
- `string` - - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 30 more` + - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 31 more` - `"message-batches-2024-09-24"`
- `"output-300k-2026-03-24"` - `"user-profiles-2026-03-24"` + + - `"user-profiles-2026-08-18"` - `"advisor-tool-2026-03-01"`
- `"search_result_location"` - - `BetaImageBlockParam object { source, type, cache_control }` + - `BetaImageBlockParam object { source, type, cache_control, transformations }` - `source: BetaBase64ImageSource or BetaURLImageSource or BetaFileImageSource`
Create a cache control breakpoint at this content block. + - `transformations: optional BetaImageTransformationsParam or null` + + Configures the transformations the server applies to this image before the model observes it. Each key names a condition the server transforms images for; its value selects the transformation applied. Omitted keys keep their default behavior, and an empty object is equivalent to omitting the field. + + - `oversized_image: optional "downsize" or "error"` + + What the server does when this image exceeds the model's maximum image size. `"downsize"` (the default) scales the image down to fit, which changes the dimensions the model observes without telling you. `"error"` instead rejects the request with a 400 error naming the image's dimensions and the largest dimensions that fit, so you can scale the image deliberately โ your image is never silently scaled down. + + - `"downsize"` + + - `"error"` + - `BetaRequestDocumentBlock object { source, type, cache_control, 3 more }` - `source: BetaBase64PDFSource or BetaPlainTextSource or BetaContentBlockSource or 2 more`
- `BetaTextBlockParam object { text, type, cache_control, citations }` - - `BetaImageBlockParam object { source, type, cache_control }` + - `BetaImageBlockParam object { source, type, cache_control, transformations }` - `type: "content"`
- `"redacted_thinking"` - - `BetaToolUseBlockParam object { id, input, name, 3 more }` + - `BetaToolUseBlockParam object { id, input, name, 4 more }` - `id: string`
- `"code_execution_20260120"` - - `BetaToolResultBlockParam object { tool_use_id, type, cache_control, 2 more }` + - `toolset_name: optional string or null` + + For a toolset member tool_use, the toolset family this member belongs to. + + - `BetaToolResultBlockParam object { tool_use_id, type, cache_control, 3 more }` - `tool_use_id: string`
Create a cache control breakpoint at this content block. - - `content: optional string or array of BetaTextBlockParam or BetaImageBlockParam or BetaSearchResultBlockParam or 2 more` + - `content: optional string or array of BetaTextBlockParam or BetaImageBlockParam or BetaSearchResultBlockParam or 3 more` - `string` - - `array of BetaTextBlockParam or BetaImageBlockParam or BetaSearchResultBlockParam or 2 more` + - `array of BetaTextBlockParam or BetaImageBlockParam or BetaSearchResultBlockParam or 3 more` - `BetaTextBlockParam object { text, type, cache_control, citations }` - - `BetaImageBlockParam object { source, type, cache_control }` + - `BetaImageBlockParam object { source, type, cache_control, transformations }` - `BetaSearchResultBlockParam object { content, source, title, 3 more }`
Create a cache control breakpoint at this content block. + - `BetaBrowserStateBlockParam object { tabs, type, cache_control, state_changes }` + + The caller's browser state after a browser toolset member call โ + the full inventory of open tabs, which tab is active, and any side + effects (tabs opened, download state changes) the call produced. + + At most one per `tool_result`, only on a non-error result answering a + browser toolset member `tool_use`. The server renders the + model-visible text from it; the model never sees the raw fields. + + - `tabs: array of BetaBrowserStateTabEntry` + + All tabs open in the browser after this call โ the full inventory, not a delta. May be empty. Whenever non-empty, exactly one entry carries `active: true`. + + - `tab_id: string` + + The caller-assigned identifier for this tab, unique within the inventory. + + - `title: string` + + The title of the page the tab is showing. May be empty. + + - `url: string` + + The URL of the page the tab is showing. May be empty. + + - `active: optional boolean` + + Whether this tab is the active tab after this call. Whenever `tabs` is non-empty, exactly one entry is marked `active: true`. + + - `type: "browser_state"` + + - `"browser_state"` + + - `cache_control: optional BetaCacheControlEphemeral or null` + + Create a cache control breakpoint at this content block. + + - `state_changes: optional array of BetaBrowserStateChange or null` + + Tabs opened and download state changes during this call. "Nothing to report" is expressed by omitting the field, never by an empty list. + + - `BetaBrowserStateChangeTabOpened object { tab_id, type }` + + A tab this call's execution opened that remains open at its end โ + the creation delta of the `tabs` inventory, not an event log. + + Carries only the `tab_id`; the tab's `title` and `url` live on its + `tabs` entry, which must include the same `tab_id`. A tab opened + during a failed call gets no deferred `tab_opened`; it simply appears + in the next result's `tabs` inventory. + + - `tab_id: string` + + The `tab_id` of the opened tab, present in `tabs`. + + - `type: "tab_opened"` + + - `"tab_opened"` + + - `BetaBrowserStateChangeDownloadStarted object { download_id, type, url }` + + A file download that started during this call. + + - `download_id: string` + + The caller-assigned identifier for this download, stable across the state changes reporting it. + + - `type: "download_started"` + + - `"download_started"` + + - `url: string` + + The final post-redirect URL the download was served from. + + - `BetaBrowserStateChangeDownloadCompleted object { download_id, type, url, 2 more }` + + A file download that finished during this call, reported with the + same `download_id` as its `download_started` โ or without a prior + `download_started`, when the download finished during the call that + started it (at most one state change per `download_id` per result). + + - `download_id: string` + + The caller-assigned identifier for this download, stable across the state changes reporting it. + + - `type: "download_completed"` + + - `"download_completed"` + + - `url: string` + + The final post-redirect URL the download was served from. + + - `path: optional string or null` + + Where the executor saved the file, on the executor's filesystem. Only included when another tool in the same environment can read the file at that path. + + - `size_bytes: optional number or null` + + The completed download's size. + + - `BetaBrowserStateChangeDownloadFailed object { download_id, type, url, error }` + + A file download that failed โ or was cancelled โ during this call. + + - `download_id: string` + + The caller-assigned identifier for this download, stable across the state changes reporting it. + + - `type: "download_failed"` + + - `"download_failed"` + + - `url: string` + + The final post-redirect URL the download was served from. + + - `error: optional string or null` + + The failure or cancellation detail, when known. + - `is_error: optional boolean` + + - `toolset_name: optional string or null` + + For a toolset member tool_result, the toolset family of the paired tool_use. - `BetaServerToolUseBlockParam object { id, input, name, 3 more }`
- `encrypted_content: optional string or null` Opaque metadata from prior compaction, to be round-tripped verbatim - - - `BetaMidConversationSystemBlockParam object { content, type, cache_control }` - - System instructions that appear mid-conversation. - - Use this block to provide or update system-level instructions at a specific - point in the conversation, rather than only via the top-level `system` parameter. - - - `content: array of BetaTextBlockParam or BetaRequestToolAdditionBlock or BetaRequestToolRemovalBlock` - - System instruction text blocks. - - - `BetaTextBlockParam object { text, type, cache_control, citations }` - - - `BetaRequestToolAdditionBlock object { tool, type, cache_control }` - - Mid-conversation directive to surface a declared tool. - - `tool` references a tool (or MCP toolset) by name from the request's - `tools`; it is offered to the model from this point in the - conversation onward. - - - `tool: BetaToolChangeToolReference or BetaToolChangeMCPToolReference or BetaToolChangeMCPToolsetReference` - - Reference to a single tool the caller declared directly in - `tools[]`. Does not accept the composed `{server}_{name}` form the - server assigns to MCP-resolved tools โ use `mcp_tool_reference` or - `mcp_toolset_reference` for those. - - - `BetaToolChangeToolReference object { name, type }` - - Reference to a single tool the caller declared directly in - `tools[]`. Does not accept the composed `{server}_{name}` form the - server assigns to MCP-resolved tools โ use `mcp_tool_reference` or - `mcp_toolset_reference` for those. - - - `name: string` - - - `type: "tool_reference"` - - - `"tool_reference"` - - - `BetaToolChangeMCPToolReference object { name, server_name, type }` - - Reference to a single MCP tool by its server and remote name โ the - same `server_name`/`name` pair `mcp_tool_use` carries. - - - `name: string` - - - `server_name: string` - - - `type: "mcp_tool_reference"` - - - `"mcp_tool_reference"` - - - `BetaToolChangeMCPToolsetReference object { server_name, type }` - - Reference to every tool in the named MCP server's toolset. - - - `server_name: string` - - - `type: "mcp_toolset_reference"` - - - `"mcp_toolset_reference"` - - - `type: "tool_addition"` - - - `"tool_addition"` - - - `cache_control: optional BetaCacheControlEphemeral or null` - - Create a cache control breakpoint at this content block. - - - `BetaRequestToolRemovalBlock object { tool, type, cache_control }` - - Mid-conversation directive to withdraw a tool. - - `tool` references a tool (or MCP toolset) by name from the request's - `tools`; it is no longer offered to the model from this point in the - conversation onward. - - - `tool: BetaToolChangeToolReference or BetaToolChangeMCPToolReference or BetaToolChangeMCPToolsetReference` - - Reference to a single tool the caller declared directly in - `tools[]`. Does not accept the composed `{server}_{name}` form the - server assigns to MCP-resolved tools โ use `mcp_tool_reference` or - `mcp_toolset_reference` for those. - - - `BetaToolChangeToolReference object { name, type }` - - Reference to a single tool the caller declared directly in - `tools[]`. Does not accept the composed `{server}_{name}` form the - server assigns to MCP-resolved tools โ use `mcp_tool_reference` or - `mcp_toolset_reference` for those. - - - `BetaToolChangeMCPToolReference object { name, server_name, type }` - - Reference to a single MCP tool by its server and remote name โ the - same `server_name`/`name` pair `mcp_tool_use` carries. - - - `BetaToolChangeMCPToolsetReference object { server_name, type }` - - Reference to every tool in the named MCP server's toolset. - - - `type: "tool_removal"` - - - `"tool_removal"` - - - `cache_control: optional BetaCacheControlEphemeral or null` - - Create a cache control breakpoint at this content block. - - - `type: "mid_conv_system"` - - - `"mid_conv_system"` - - - `cache_control: optional BetaCacheControlEphemeral or null` - - Create a cache control breakpoint at this content block. - `BetaRequestToolAdditionBlock object { tool, type, cache_control }`
`tools`; it is offered to the model from this point in the conversation onward. + - `tool: BetaToolChangeToolReference or BetaToolChangeMCPToolReference or BetaToolChangeMCPToolsetReference` + + Reference to a single tool the caller declared directly in + `tools[]`. Does not accept the composed `{server}_{name}` form the + server assigns to MCP-resolved tools โ use `mcp_tool_reference` or + `mcp_toolset_reference` for those. + + - `BetaToolChangeToolReference object { name, type }` + + Reference to a single tool the caller declared directly in + `tools[]`. Does not accept the composed `{server}_{name}` form the + server assigns to MCP-resolved tools โ use `mcp_tool_reference` or + `mcp_toolset_reference` for those. + + - `name: string` + + - `type: "tool_reference"` + + - `"tool_reference"` + + - `BetaToolChangeMCPToolReference object { name, server_name, type }` + + Reference to a single MCP tool by its server and remote name โ the + same `server_name`/`name` pair `mcp_tool_use` carries. + + - `name: string` + + - `server_name: string` + + - `type: "mcp_tool_reference"` + + - `"mcp_tool_reference"` + + - `BetaToolChangeMCPToolsetReference object { server_name, type }` + + Reference to every tool in the named MCP server's toolset. + + - `server_name: string` + + - `type: "mcp_toolset_reference"` + + - `"mcp_toolset_reference"` + + - `type: "tool_addition"` + + - `"tool_addition"` + + - `cache_control: optional BetaCacheControlEphemeral or null` + + Create a cache control breakpoint at this content block. + - `BetaRequestToolRemovalBlock object { tool, type, cache_control }` Mid-conversation directive to withdraw a tool.
`tool` references a tool (or MCP toolset) by name from the request's `tools`; it is no longer offered to the model from this point in the conversation onward. + + - `tool: BetaToolChangeToolReference or BetaToolChangeMCPToolReference or BetaToolChangeMCPToolsetReference` + + Reference to a single tool the caller declared directly in + `tools[]`. Does not accept the composed `{server}_{name}` form the + server assigns to MCP-resolved tools โ use `mcp_tool_reference` or + `mcp_toolset_reference` for those. + + - `BetaToolChangeToolReference object { name, type }` + + Reference to a single tool the caller declared directly in + `tools[]`. Does not accept the composed `{server}_{name}` form the + server assigns to MCP-resolved tools โ use `mcp_tool_reference` or + `mcp_toolset_reference` for those. + + - `BetaToolChangeMCPToolReference object { name, server_name, type }` + + Reference to a single MCP tool by its server and remote name โ the + same `server_name`/`name` pair `mcp_tool_use` carries. + + - `BetaToolChangeMCPToolsetReference object { server_name, type }` + + Reference to every tool in the named MCP server's toolset. + + - `type: "tool_removal"` + + - `"tool_removal"` + + - `cache_control: optional BetaCacheControlEphemeral or null` + + Create a cache control breakpoint at this content block. - `BetaFallbackBlockParam object { from, to, type, trigger }`
When true, guarantees schema validation on tool names and inputs + - `BetaBrowserToolset20260801 object { type, allowed_callers, cache_control, configs }` + + The browser toolset: a single `tools[]` entry (carrying no + `name`) that declares the browser tool family. The model is served + the family's tool with any members disabled via `configs` removed + from its schema. + + - `type: "browser_toolset_20260801"` + + - `"browser_toolset_20260801"` + + - `allowed_callers: optional array of "direct" or "code_execution_20250825" or "code_execution_20260120" or "code_execution_20260521"` + + - `"direct"` + + - `"code_execution_20250825"` + + - `"code_execution_20260120"` + + - `"code_execution_20260521"` + + - `cache_control: optional BetaCacheControlEphemeral or null` + + Create a cache control breakpoint at this content block. + + - `configs: optional BetaBrowserToolsetConfigs or null` + + Per-member configuration for `browser_toolset_20260801`: one + optional field per member tool, keyed by the member name โ the same + name the member's `tool_use` blocks carry. Every member is an + accepted key, and a member's defaults apply wherever its key is + absent. Unknown keys are rejected: the field set is this toolset + version's complete member set. + + - `close_tab: optional BetaBrowserCloseTabConfig or null` + + `close_tab`'s config overrides. + + - `defer_loading: optional boolean or null` + + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. + + - `enabled: optional boolean or null` + + Whether this member is offered to the model. Default is per member, per the toolset's documentation. A member whose enabled resolves false is withheld from the served schema. + + - `double_click: optional BetaBrowserDoubleClickConfig or null` + + `double_click`'s config overrides. + + - `defer_loading: optional boolean or null` + + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. + + - `enabled: optional boolean or null` + + Whether this member is offered to the model. Default is per member, per the toolset's documentation. A member whose enabled resolves false is withheld from the served schema. + + - `file_upload: optional BetaBrowserFileUploadConfig or null` + + `file_upload`'s config overrides. + + - `defer_loading: optional boolean or null` + + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. + + - `enabled: optional boolean or null` + + Whether this member is offered to the model. Default is per member, per the toolset's documentation. A member whose enabled resolves false is withheld from the served schema. + + - `find: optional BetaBrowserFindConfig or null` + + `find`'s config overrides. + + - `defer_loading: optional boolean or null` + + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. + + - `enabled: optional boolean or null` + + Whether this member is offered to the model. Default is per member, per the toolset's documentation. A member whose enabled resolves false is withheld from the served schema. + + - `form_input: optional BetaBrowserFormInputConfig or null` + + `form_input`'s config overrides. + + - `defer_loading: optional boolean or null` + + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. + + - `enabled: optional boolean or null` + + Whether this member is offered to the model. Default is per member, per the toolset's documentation. A member whose enabled resolves false is withheld from the served schema. + + - `get_page_text: optional BetaBrowserGetPageTextConfig or null` + + `get_page_text`'s config overrides. + + - `defer_loading: optional boolean or null` + + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. + + - `enabled: optional boolean or null` + + Whether this member is offered to the model. Default is per member, per the toolset's documentation. A member whose enabled resolves false is withheld from the served schema. + + - `hold_key: optional BetaBrowserHoldKeyConfig or null` + + `hold_key`'s config overrides. + + - `defer_loading: optional boolean or null` + + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. + + - `enabled: optional boolean or null` + + Whether this member is offered to the model. Default is per member, per the toolset's documentation. A member whose enabled resolves false is withheld from the served schema. + + - `hover: optional BetaBrowserHoverConfig or null` + + `hover`'s config overrides. + + - `defer_loading: optional boolean or null` + + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. + + - `enabled: optional boolean or null` + + Whether this member is offered to the model. Default is per member, per the toolset's documentation. A member whose enabled resolves false is withheld from the served schema. + + - `javascript_exec: optional BetaBrowserJavascriptExecConfig or null` + + `javascript_exec`'s config overrides. + + - `defer_loading: optional boolean or null` + + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. + + - `enabled: optional boolean or null` + + Whether this member is offered to the model. Default is per member, per the toolset's documentation. A member whose enabled resolves false is withheld from the served schema. + + - `key: optional BetaBrowserKeyConfig or null` + + `key`'s config overrides. + + - `defer_loading: optional boolean or null` + + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. + + - `enabled: optional boolean or null` + + Whether this member is offered to the model. Default is per member, per the toolset's documentation. A member whose enabled resolves false is withheld from the served schema. + + - `left_click: optional BetaBrowserLeftClickConfig or null` + + `left_click`'s config overrides. + + - `defer_loading: optional boolean or null` + + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. + + - `enabled: optional boolean or null` + + Whether this member is offered to the model. Default is per member, per the toolset's documentation. A member whose enabled resolves false is withheld from the served schema. + + - `left_click_drag: optional BetaBrowserLeftClickDragConfig or null` + + `left_click_drag`'s config overrides. + + - `defer_loading: optional boolean or null` + + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. + + - `enabled: optional boolean or null` + + Whether this member is offered to the model. Default is per member, per the toolset's documentation. A member whose enabled resolves false is withheld from the served schema. + + - `left_mouse_down: optional BetaBrowserLeftMouseDownConfig or null` + + `left_mouse_down`'s config overrides. + + - `defer_loading: optional boolean or null` + + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. + + - `enabled: optional boolean or null` + + Whether this member is offered to the model. Default is per member, per the toolset's documentation. A member whose enabled resolves false is withheld from the served schema. + + - `left_mouse_up: optional BetaBrowserLeftMouseUpConfig or null` + + `left_mouse_up`'s config overrides. + + - `defer_loading: optional boolean or null` + + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. + + - `enabled: optional boolean or null` + + Whether this member is offered to the model. Default is per member, per the toolset's documentation. A member whose enabled resolves false is withheld from the served schema. + + - `list_tabs: optional BetaBrowserListTabsConfig or null` + + `list_tabs`'s config overrides. + + - `defer_loading: optional boolean or null` + + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. + + - `enabled: optional boolean or null` + + Whether this member is offered to the model. Default is per member, per the toolset's documentation. A member whose enabled resolves false is withheld from the served schema. + + - `middle_click: optional BetaBrowserMiddleClickConfig or null` + + `middle_click`'s config overrides. + + - `defer_loading: optional boolean or null` + + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. + + - `enabled: optional boolean or null` + + Whether this member is offered to the model. Default is per member, per the toolset's documentation. A member whose enabled resolves false is withheld from the served schema. + + - `mouse_move: optional BetaBrowserMouseMoveConfig or null` + + `mouse_move`'s config overrides. + + - `defer_loading: optional boolean or null` + + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. + + - `enabled: optional boolean or null` + + Whether this member is offered to the model. Default is per member, per the toolset's documentation. A member whose enabled resolves false is withheld from the served schema. + + - `navigate: optional BetaBrowserNavigateConfig or null` + + `navigate`'s config overrides. + + - `defer_loading: optional boolean or null` + + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. + + - `enabled: optional boolean or null` + + Whether this member is offered to the model. Default is per member, per the toolset's documentation. A member whose enabled resolves false is withheld from the served schema. + + - `new_tab: optional BetaBrowserNewTabConfig or null` + + `new_tab`'s config overrides. + + - `defer_loading: optional boolean or null` + + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. + + - `enabled: optional boolean or null` + + Whether this member is offered to the model. Default is per member, per the toolset's documentation. A member whose enabled resolves false is withheld from the served schema. + + - `read_console: optional BetaBrowserReadConsoleConfig or null` + + `read_console`'s config overrides. + + - `defer_loading: optional boolean or null` + + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. + + - `enabled: optional boolean or null` + + Whether this member is offered to the model. Default is per member, per the toolset's documentation. A member whose enabled resolves false is withheld from the served schema. + + - `read_network: optional BetaBrowserReadNetworkConfig or null` + + `read_network`'s config overrides. + + - `defer_loading: optional boolean or null` + + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. + + - `enabled: optional boolean or null` + + Whether this member is offered to the model. Default is per member, per the toolset's documentation. A member whose enabled resolves false is withheld from the served schema. + + - `read_page: optional BetaBrowserReadPageConfig or null` + + `read_page`'s config overrides. + + - `defer_loading: optional boolean or null` + + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. + + - `enabled: optional boolean or null` + + Whether this member is offered to the model. Default is per member, per the toolset's documentation. A member whose enabled resolves false is withheld from the served schema. + + - `right_click: optional BetaBrowserRightClickConfig or null` + + `right_click`'s config overrides. + + - `defer_loading: optional boolean or null` + + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. + + - `enabled: optional boolean or null` + + Whether this member is offered to the model. Default is per member, per the toolset's documentation. A member whose enabled resolves false is withheld from the served schema. + + - `screenshot: optional BetaBrowserScreenshotConfig or null` + + `screenshot`'s config overrides. + + - `defer_loading: optional boolean or null` + + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. + + - `enabled: optional boolean or null` + + Whether this member is offered to the model. Default is per member, per the toolset's documentation. A member whose enabled resolves false is withheld from the served schema. + + - `scroll: optional BetaBrowserScrollConfig or null` + + `scroll`'s config overrides. + + - `defer_loading: optional boolean or null` + + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. + + - `enabled: optional boolean or null` + + Whether this member is offered to the model. Default is per member, per the toolset's documentation. A member whose enabled resolves false is withheld from the served schema. + + - `scroll_to: optional BetaBrowserScrollToConfig or null` + + `scroll_to`'s config overrides. + + - `defer_loading: optional boolean or null` + + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. + + - `enabled: optional boolean or null` + + Whether this member is offered to the model. Default is per member, per the toolset's documentation. A member whose enabled resolves false is withheld from the served schema. + + - `switch_tab: optional BetaBrowserSwitchTabConfig or null` + + `switch_tab`'s config overrides. + + - `defer_loading: optional boolean or null` + + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. + + - `enabled: optional boolean or null` + + Whether this member is offered to the model. Default is per member, per the toolset's documentation. A member whose enabled resolves false is withheld from the served schema. + + - `triple_click: optional BetaBrowserTripleClickConfig or null` + + `triple_click`'s config overrides. + + - `defer_loading: optional boolean or null` + + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. + + - `enabled: optional boolean or null` + + Whether this member is offered to the model. Default is per member, per the toolset's documentation. A member whose enabled resolves false is withheld from the served schema. + + - `type: optional BetaBrowserTypeConfig or null` + + `type`'s config overrides. + + - `defer_loading: optional boolean or null` + + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. + + - `enabled: optional boolean or null` + + Whether this member is offered to the model. Default is per member, per the toolset's documentation. A member whose enabled resolves false is withheld from the served schema. + + - `wait: optional BetaBrowserWaitConfig or null` + + `wait`'s config overrides. + + - `defer_loading: optional boolean or null` + + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. + + - `enabled: optional boolean or null` + + Whether this member is offered to the model. Default is per member, per the toolset's documentation. A member whose enabled resolves false is withheld from the served schema. + + - `zoom: optional BetaBrowserZoomConfig or null` + + `zoom`'s config overrides. + + - `defer_loading: optional boolean or null` + + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. + + - `enabled: optional boolean or null` + + Whether this member is offered to the model. Default is per member, per the toolset's documentation. A member whose enabled resolves false is withheld from the served schema. + - `BetaToolComputerUse20241022 object { display_height_px, display_width_px, name, 7 more }` - `display_height_px: number`
- `strict: optional boolean` When true, guarantees schema validation on tool names and inputs + + - `BetaComputerToolset20260801 object { type, allowed_callers, cache_control, configs }` + + The computer toolset: a single `tools[]` entry (carrying no + `name`) that declares the computer tool family. The model is + served the family's tool with any members disabled via `configs` + removed from its schema. Every member is enabled by default, zoom + included. The single-tool options `display_number` and + `enable_zoom` are not fields of a toolset entry โ it carries only + `type`, `configs`, and `cache_control`; zoom is controlled + via `configs.zoom.enabled`. + + - `type: "computer_toolset_20260801"` + + - `"computer_toolset_20260801"` + + - `allowed_callers: optional array of "direct" or "code_execution_20250825" or "code_execution_20260120" or "code_execution_20260521"` + + - `"direct"` + + - `"code_execution_20250825"` + + - `"code_execution_20260120"` + + - `"code_execution_20260521"` + + - `cache_control: optional BetaCacheControlEphemeral or null` + + Create a cache control breakpoint at this content block. + + - `configs: optional BetaComputerToolsetConfigs or null` + + Per-member configuration for `computer_toolset_20260801`: one + optional field per member tool, keyed by the member name โ the same + name the member's `tool_use` blocks carry. Every member is an + accepted key, and a member's defaults apply wherever its key is + absent. Unknown keys are rejected: the field set is this toolset + version's complete member set. + + - `cursor_position: optional BetaComputerCursorPositionConfig or null` + + `cursor_position`'s config overrides. + + - `defer_loading: optional boolean or null` + + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. + + - `enabled: optional boolean or null` + + Whether this member is offered to the model. Default is per member, per the toolset's documentation. A member whose enabled resolves false is withheld from the served schema. + + - `double_click: optional BetaComputerDoubleClickConfig or null` + + `double_click`'s config overrides. + + - `defer_loading: optional boolean or null` + + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. + + - `enabled: optional boolean or null` + + Whether this member is offered to the model. Default is per member, per the toolset's documentation. A member whose enabled resolves false is withheld from the served schema. + + - `hold_key: optional BetaComputerHoldKeyConfig or null` + + `hold_key`'s config overrides. + + - `defer_loading: optional boolean or null` + + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. + + - `enabled: optional boolean or null` + + Whether this member is offered to the model. Default is per member, per the toolset's documentation. A member whose enabled resolves false is withheld from the served schema. + + - `key: optional BetaComputerKeyConfig or null` + + `key`'s config overrides. + + - `defer_loading: optional boolean or null` + + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. + + - `enabled: optional boolean or null` + + Whether this member is offered to the model. Default is per member, per the toolset's documentation. A member whose enabled resolves false is withheld from the served schema. + + - `left_click: optional BetaComputerLeftClickConfig or null` + + `left_click`'s config overrides. + + - `defer_loading: optional boolean or null` + + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. + + - `enabled: optional boolean or null` + + Whether this member is offered to the model. Default is per member, per the toolset's documentation. A member whose enabled resolves false is withheld from the served schema. + + - `left_click_drag: optional BetaComputerLeftClickDragConfig or null` + + `left_click_drag`'s config overrides. + + - `defer_loading: optional boolean or null` + + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. + + - `enabled: optional boolean or null` + + Whether this member is offered to the model. Default is per member, per the toolset's documentation. A member whose enabled resolves false is withheld from the served schema. + + - `left_mouse_down: optional BetaComputerLeftMouseDownConfig or null` + + `left_mouse_down`'s config overrides. + + - `defer_loading: optional boolean or null` + + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. + + - `enabled: optional boolean or null` + + Whether this member is offered to the model. Default is per member, per the toolset's documentation. A member whose enabled resolves false is withheld from the served schema. + + - `left_mouse_up: optional BetaComputerLeftMouseUpConfig or null` + + `left_mouse_up`'s config overrides. + + - `defer_loading: optional boolean or null` + + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. + + - `enabled: optional boolean or null` + + Whether this member is offered to the model. Default is per member, per the toolset's documentation. A member whose enabled resolves false is withheld from the served schema. + + - `middle_click: optional BetaComputerMiddleClickConfig or null` + + `middle_click`'s config overrides. + + - `defer_loading: optional boolean or null` + + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. + + - `enabled: optional boolean or null` + + Whether this member is offered to the model. Default is per member, per the toolset's documentation. A member whose enabled resolves false is withheld from the served schema. + + - `mouse_move: optional BetaComputerMouseMoveConfig or null` + + `mouse_move`'s config overrides. + + - `defer_loading: optional boolean or null` + + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. + + - `enabled: optional boolean or null` + + Whether this member is offered to the model. Default is per member, per the toolset's documentation. A member whose enabled resolves false is withheld from the served schema. + + - `right_click: optional BetaComputerRightClickConfig or null` + + `right_click`'s config overrides. + + - `defer_loading: optional boolean or null` + + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. + + - `enabled: optional boolean or null` + + Whether this member is offered to the model. Default is per member, per the toolset's documentation. A member whose enabled resolves false is withheld from the served schema. + + - `screenshot: optional BetaComputerScreenshotConfig or null` + + `screenshot`'s config overrides. + + - `defer_loading: optional boolean or null` + + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. + + - `enabled: optional boolean or null` + + Whether this member is offered to the model. Default is per member, per the toolset's documentation. A member whose enabled resolves false is withheld from the served schema. + + - `scroll: optional BetaComputerScrollConfig or null` + + `scroll`'s config overrides. + + - `defer_loading: optional boolean or null` + + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. + + - `enabled: optional boolean or null` + + Whether this member is offered to the model. Default is per member, per the toolset's documentation. A member whose enabled resolves false is withheld from the served schema. + + - `triple_click: optional BetaComputerTripleClickConfig or null` + + `triple_click`'s config overrides. + + - `defer_loading: optional boolean or null` + + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. + + - `enabled: optional boolean or null` + + Whether this member is offered to the model. Default is per member, per the toolset's documentation. A member whose enabled resolves false is withheld from the served schema. + + - `type: optional BetaComputerTypeConfig or null` + + `type`'s config overrides. + + - `defer_loading: optional boolean or null` + + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. + + - `enabled: optional boolean or null` + + Whether this member is offered to the model. Default is per member, per the toolset's documentation. A member whose enabled resolves false is withheld from the served schema. + + - `wait: optional BetaComputerWaitConfig or null` + + `wait`'s config overrides. + + - `defer_loading: optional boolean or null` + + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. + + - `enabled: optional boolean or null` + + Whether this member is offered to the model. Default is per member, per the toolset's documentation. A member whose enabled resolves false is withheld from the served schema. + + - `zoom: optional BetaComputerZoomConfig or null` + + `zoom`'s config overrides. + + - `defer_loading: optional boolean or null` + + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. + + - `enabled: optional boolean or null` + + Whether this member is offered to the model. Default is per member, per the toolset's documentation. A member whose enabled resolves false is withheld from the served schema. - `BetaToolTextEditor20250124 object { name, type, allowed_callers, 4 more }`
"role": "user" } ], - "model": "claude-opus-4-6" + "model": "claude-opus-5" } } ]
api/beta/messages/batches/results Changed · +8 / -2 lines
- `string` - - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 30 more` + - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 31 more` - `"message-batches-2024-09-24"`
- `"user-profiles-2026-03-24"` + - `"user-profiles-2026-08-18"` + - `"advisor-tool-2026-03-01"` - `"managed-agents-2026-04-01"`
- `"redacted_thinking"` - - `BetaToolUseBlock object { id, input, name, 2 more }` + - `BetaToolUseBlock object { id, input, name, 3 more }` - `id: string`
- `type: "code_execution_20260120"` - `"code_execution_20260120"` + + - `toolset_name: optional string or null` + + For a toolset member tool_use, the toolset family. - `BetaServerToolUseBlock object { id, input, name, 2 more }`
api/beta/messages/count_tokens Changed · +885 / -129 lines
The two sides of this change are too far apart to line up, so this is the differ's own diff of it.
- `string` - - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 30 more` + - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 31 more` - `"message-batches-2024-09-24"`
- `"output-300k-2026-03-24"` - `"user-profiles-2026-03-24"` + + - `"user-profiles-2026-08-18"` - `"advisor-tool-2026-03-01"`
- `"search_result_location"` - - `BetaImageBlockParam object { source, type, cache_control }` + - `BetaImageBlockParam object { source, type, cache_control, transformations }` - `source: BetaBase64ImageSource or BetaURLImageSource or BetaFileImageSource`
Create a cache control breakpoint at this content block. + - `transformations: optional BetaImageTransformationsParam or null` + + Configures the transformations the server applies to this image before the model observes it. Each key names a condition the server transforms images for; its value selects the transformation applied. Omitted keys keep their default behavior, and an empty object is equivalent to omitting the field. + + - `oversized_image: optional "downsize" or "error"` + + What the server does when this image exceeds the model's maximum image size. `"downsize"` (the default) scales the image down to fit, which changes the dimensions the model observes without telling you. `"error"` instead rejects the request with a 400 error naming the image's dimensions and the largest dimensions that fit, so you can scale the image deliberately โ your image is never silently scaled down. + + - `"downsize"` + + - `"error"` + - `BetaRequestDocumentBlock object { source, type, cache_control, 3 more }` - `source: BetaBase64PDFSource or BetaPlainTextSource or BetaContentBlockSource or 2 more`
- `BetaTextBlockParam object { text, type, cache_control, citations }` - - `BetaImageBlockParam object { source, type, cache_control }` + - `BetaImageBlockParam object { source, type, cache_control, transformations }` - `type: "content"`
- `"redacted_thinking"` - - `BetaToolUseBlockParam object { id, input, name, 3 more }` + - `BetaToolUseBlockParam object { id, input, name, 4 more }` - `id: string`
- `"code_execution_20260120"` - - `BetaToolResultBlockParam object { tool_use_id, type, cache_control, 2 more }` + - `toolset_name: optional string or null` + + For a toolset member tool_use, the toolset family this member belongs to. + + - `BetaToolResultBlockParam object { tool_use_id, type, cache_control, 3 more }` - `tool_use_id: string`
Create a cache control breakpoint at this content block. - - `content: optional string or array of BetaTextBlockParam or BetaImageBlockParam or BetaSearchResultBlockParam or 2 more` + - `content: optional string or array of BetaTextBlockParam or BetaImageBlockParam or BetaSearchResultBlockParam or 3 more` - `string` - - `array of BetaTextBlockParam or BetaImageBlockParam or BetaSearchResultBlockParam or 2 more` + - `array of BetaTextBlockParam or BetaImageBlockParam or BetaSearchResultBlockParam or 3 more` - `BetaTextBlockParam object { text, type, cache_control, citations }` - - `BetaImageBlockParam object { source, type, cache_control }` + - `BetaImageBlockParam object { source, type, cache_control, transformations }` - `BetaSearchResultBlockParam object { content, source, title, 3 more }`
Create a cache control breakpoint at this content block. + - `BetaBrowserStateBlockParam object { tabs, type, cache_control, state_changes }` + + The caller's browser state after a browser toolset member call โ + the full inventory of open tabs, which tab is active, and any side + effects (tabs opened, download state changes) the call produced. + + At most one per `tool_result`, only on a non-error result answering a + browser toolset member `tool_use`. The server renders the + model-visible text from it; the model never sees the raw fields. + + - `tabs: array of BetaBrowserStateTabEntry` + + All tabs open in the browser after this call โ the full inventory, not a delta. May be empty. Whenever non-empty, exactly one entry carries `active: true`. + + - `tab_id: string` + + The caller-assigned identifier for this tab, unique within the inventory. + + - `title: string` + + The title of the page the tab is showing. May be empty. + + - `url: string` + + The URL of the page the tab is showing. May be empty. + + - `active: optional boolean` + + Whether this tab is the active tab after this call. Whenever `tabs` is non-empty, exactly one entry is marked `active: true`. + + - `type: "browser_state"` + + - `"browser_state"` + + - `cache_control: optional BetaCacheControlEphemeral or null` + + Create a cache control breakpoint at this content block. + + - `state_changes: optional array of BetaBrowserStateChange or null` + + Tabs opened and download state changes during this call. "Nothing to report" is expressed by omitting the field, never by an empty list. + + - `BetaBrowserStateChangeTabOpened object { tab_id, type }` + + A tab this call's execution opened that remains open at its end โ + the creation delta of the `tabs` inventory, not an event log. + + Carries only the `tab_id`; the tab's `title` and `url` live on its + `tabs` entry, which must include the same `tab_id`. A tab opened + during a failed call gets no deferred `tab_opened`; it simply appears + in the next result's `tabs` inventory. + + - `tab_id: string` + + The `tab_id` of the opened tab, present in `tabs`. + + - `type: "tab_opened"` + + - `"tab_opened"` + + - `BetaBrowserStateChangeDownloadStarted object { download_id, type, url }` + + A file download that started during this call. + + - `download_id: string` + + The caller-assigned identifier for this download, stable across the state changes reporting it. + + - `type: "download_started"` + + - `"download_started"` + + - `url: string` + + The final post-redirect URL the download was served from. + + - `BetaBrowserStateChangeDownloadCompleted object { download_id, type, url, 2 more }` + + A file download that finished during this call, reported with the + same `download_id` as its `download_started` โ or without a prior + `download_started`, when the download finished during the call that + started it (at most one state change per `download_id` per result). + + - `download_id: string` + + The caller-assigned identifier for this download, stable across the state changes reporting it. + + - `type: "download_completed"` + + - `"download_completed"` + + - `url: string` + + The final post-redirect URL the download was served from. + + - `path: optional string or null` + + Where the executor saved the file, on the executor's filesystem. Only included when another tool in the same environment can read the file at that path. + + - `size_bytes: optional number or null` + + The completed download's size. + + - `BetaBrowserStateChangeDownloadFailed object { download_id, type, url, error }` + + A file download that failed โ or was cancelled โ during this call. + + - `download_id: string` + + The caller-assigned identifier for this download, stable across the state changes reporting it. + + - `type: "download_failed"` + + - `"download_failed"` + + - `url: string` + + The final post-redirect URL the download was served from. + + - `error: optional string or null` + + The failure or cancellation detail, when known. + - `is_error: optional boolean` + + - `toolset_name: optional string or null` + + For a toolset member tool_result, the toolset family of the paired tool_use. - `BetaServerToolUseBlockParam object { id, input, name, 3 more }`
- `encrypted_content: optional string or null` Opaque metadata from prior compaction, to be round-tripped verbatim - - - `BetaMidConversationSystemBlockParam object { content, type, cache_control }` - - System instructions that appear mid-conversation. - - Use this block to provide or update system-level instructions at a specific - point in the conversation, rather than only via the top-level `system` parameter. - - - `content: array of BetaTextBlockParam or BetaRequestToolAdditionBlock or BetaRequestToolRemovalBlock` - - System instruction text blocks. - - - `BetaTextBlockParam object { text, type, cache_control, citations }` - - - `BetaRequestToolAdditionBlock object { tool, type, cache_control }` - - Mid-conversation directive to surface a declared tool. - - `tool` references a tool (or MCP toolset) by name from the request's - `tools`; it is offered to the model from this point in the - conversation onward. - - - `tool: BetaToolChangeToolReference or BetaToolChangeMCPToolReference or BetaToolChangeMCPToolsetReference` - - Reference to a single tool the caller declared directly in - `tools[]`. Does not accept the composed `{server}_{name}` form the - server assigns to MCP-resolved tools โ use `mcp_tool_reference` or - `mcp_toolset_reference` for those. - - - `BetaToolChangeToolReference object { name, type }` - - Reference to a single tool the caller declared directly in - `tools[]`. Does not accept the composed `{server}_{name}` form the - server assigns to MCP-resolved tools โ use `mcp_tool_reference` or - `mcp_toolset_reference` for those. - - - `name: string` - - - `type: "tool_reference"` - - - `"tool_reference"` - - - `BetaToolChangeMCPToolReference object { name, server_name, type }` - - Reference to a single MCP tool by its server and remote name โ the - same `server_name`/`name` pair `mcp_tool_use` carries. - - - `name: string` - - - `server_name: string` - - - `type: "mcp_tool_reference"` - - - `"mcp_tool_reference"` - - - `BetaToolChangeMCPToolsetReference object { server_name, type }` - - Reference to every tool in the named MCP server's toolset. - - - `server_name: string` - - - `type: "mcp_toolset_reference"` - - - `"mcp_toolset_reference"` - - - `type: "tool_addition"` - - - `"tool_addition"` - - - `cache_control: optional BetaCacheControlEphemeral or null` - - Create a cache control breakpoint at this content block. - - - `BetaRequestToolRemovalBlock object { tool, type, cache_control }` - - Mid-conversation directive to withdraw a tool. - - `tool` references a tool (or MCP toolset) by name from the request's - `tools`; it is no longer offered to the model from this point in the - conversation onward. - - - `tool: BetaToolChangeToolReference or BetaToolChangeMCPToolReference or BetaToolChangeMCPToolsetReference` - - Reference to a single tool the caller declared directly in - `tools[]`. Does not accept the composed `{server}_{name}` form the - server assigns to MCP-resolved tools โ use `mcp_tool_reference` or - `mcp_toolset_reference` for those. - - - `BetaToolChangeToolReference object { name, type }` - - Reference to a single tool the caller declared directly in - `tools[]`. Does not accept the composed `{server}_{name}` form the - server assigns to MCP-resolved tools โ use `mcp_tool_reference` or - `mcp_toolset_reference` for those. - - - `BetaToolChangeMCPToolReference object { name, server_name, type }` - - Reference to a single MCP tool by its server and remote name โ the - same `server_name`/`name` pair `mcp_tool_use` carries. - - - `BetaToolChangeMCPToolsetReference object { server_name, type }` - - Reference to every tool in the named MCP server's toolset. - - - `type: "tool_removal"` - - - `"tool_removal"` - - - `cache_control: optional BetaCacheControlEphemeral or null` - - Create a cache control breakpoint at this content block. - - - `type: "mid_conv_system"` - - - `"mid_conv_system"` - - - `cache_control: optional BetaCacheControlEphemeral or null` - - Create a cache control breakpoint at this content block. - `BetaRequestToolAdditionBlock object { tool, type, cache_control }`
`tools`; it is offered to the model from this point in the conversation onward. + - `tool: BetaToolChangeToolReference or BetaToolChangeMCPToolReference or BetaToolChangeMCPToolsetReference` + + Reference to a single tool the caller declared directly in + `tools[]`. Does not accept the composed `{server}_{name}` form the + server assigns to MCP-resolved tools โ use `mcp_tool_reference` or + `mcp_toolset_reference` for those. + + - `BetaToolChangeToolReference object { name, type }` + + Reference to a single tool the caller declared directly in + `tools[]`. Does not accept the composed `{server}_{name}` form the + server assigns to MCP-resolved tools โ use `mcp_tool_reference` or + `mcp_toolset_reference` for those. + + - `name: string` + + - `type: "tool_reference"` + + - `"tool_reference"` + + - `BetaToolChangeMCPToolReference object { name, server_name, type }` + + Reference to a single MCP tool by its server and remote name โ the + same `server_name`/`name` pair `mcp_tool_use` carries. + + - `name: string` + + - `server_name: string` + + - `type: "mcp_tool_reference"` + + - `"mcp_tool_reference"` + + - `BetaToolChangeMCPToolsetReference object { server_name, type }` + + Reference to every tool in the named MCP server's toolset. + + - `server_name: string` + + - `type: "mcp_toolset_reference"` + + - `"mcp_toolset_reference"` + + - `type: "tool_addition"` + + - `"tool_addition"` + + - `cache_control: optional BetaCacheControlEphemeral or null` + + Create a cache control breakpoint at this content block. + - `BetaRequestToolRemovalBlock object { tool, type, cache_control }` Mid-conversation directive to withdraw a tool.
`tool` references a tool (or MCP toolset) by name from the request's `tools`; it is no longer offered to the model from this point in the conversation onward. + + - `tool: BetaToolChangeToolReference or BetaToolChangeMCPToolReference or BetaToolChangeMCPToolsetReference` + + Reference to a single tool the caller declared directly in + `tools[]`. Does not accept the composed `{server}_{name}` form the + server assigns to MCP-resolved tools โ use `mcp_tool_reference` or + `mcp_toolset_reference` for those. + + - `BetaToolChangeToolReference object { name, type }` + + Reference to a single tool the caller declared directly in + `tools[]`. Does not accept the composed `{server}_{name}` form the + server assigns to MCP-resolved tools โ use `mcp_tool_reference` or + `mcp_toolset_reference` for those. + + - `BetaToolChangeMCPToolReference object { name, server_name, type }` + + Reference to a single MCP tool by its server and remote name โ the + same `server_name`/`name` pair `mcp_tool_use` carries. + + - `BetaToolChangeMCPToolsetReference object { server_name, type }` + + Reference to every tool in the named MCP server's toolset. + + - `type: "tool_removal"` + + - `"tool_removal"` + + - `cache_control: optional BetaCacheControlEphemeral or null` + + Create a cache control breakpoint at this content block. - `BetaFallbackBlockParam object { from, to, type, trigger }`
- `"none"` -- `tools: optional array of BetaTool or BetaToolBash20241022 or BetaToolBash20250124 or 23 more` +- `tools: optional array of BetaTool or BetaToolBash20241022 or BetaToolBash20250124 or 25 more` Definitions of tools that the model may use.
When true, guarantees schema validation on tool names and inputs + - `BetaBrowserToolset20260801 object { type, allowed_callers, cache_control, configs }` + + The browser toolset: a single `tools[]` entry (carrying no + `name`) that declares the browser tool family. The model is served + the family's tool with any members disabled via `configs` removed + from its schema. + + - `type: "browser_toolset_20260801"` + + - `"browser_toolset_20260801"` + + - `allowed_callers: optional array of "direct" or "code_execution_20250825" or "code_execution_20260120" or "code_execution_20260521"` + + - `"direct"` + + - `"code_execution_20250825"` + + - `"code_execution_20260120"` + + - `"code_execution_20260521"` + + - `cache_control: optional BetaCacheControlEphemeral or null` + + Create a cache control breakpoint at this content block. + + - `configs: optional BetaBrowserToolsetConfigs or null` + + Per-member configuration for `browser_toolset_20260801`: one + optional field per member tool, keyed by the member name โ the same + name the member's `tool_use` blocks carry. Every member is an + accepted key, and a member's defaults apply wherever its key is + absent. Unknown keys are rejected: the field set is this toolset + version's complete member set. + + - `close_tab: optional BetaBrowserCloseTabConfig or null` + + `close_tab`'s config overrides. + + - `defer_loading: optional boolean or null` + + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. + + - `enabled: optional boolean or null` + + Whether this member is offered to the model. Default is per member, per the toolset's documentation. A member whose enabled resolves false is withheld from the served schema. + + - `double_click: optional BetaBrowserDoubleClickConfig or null` + + `double_click`'s config overrides. + + - `defer_loading: optional boolean or null` + + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. + + - `enabled: optional boolean or null` + + Whether this member is offered to the model. Default is per member, per the toolset's documentation. A member whose enabled resolves false is withheld from the served schema. + + - `file_upload: optional BetaBrowserFileUploadConfig or null` + + `file_upload`'s config overrides. + + - `defer_loading: optional boolean or null` + + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. + + - `enabled: optional boolean or null` + + Whether this member is offered to the model. Default is per member, per the toolset's documentation. A member whose enabled resolves false is withheld from the served schema. + + - `find: optional BetaBrowserFindConfig or null` + + `find`'s config overrides. + + - `defer_loading: optional boolean or null` + + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. + + - `enabled: optional boolean or null` + + Whether this member is offered to the model. Default is per member, per the toolset's documentation. A member whose enabled resolves false is withheld from the served schema. + + - `form_input: optional BetaBrowserFormInputConfig or null` + + `form_input`'s config overrides. + + - `defer_loading: optional boolean or null` + + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. + + - `enabled: optional boolean or null` + + Whether this member is offered to the model. Default is per member, per the toolset's documentation. A member whose enabled resolves false is withheld from the served schema. + + - `get_page_text: optional BetaBrowserGetPageTextConfig or null` + + `get_page_text`'s config overrides. + + - `defer_loading: optional boolean or null` + + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. + + - `enabled: optional boolean or null` + + Whether this member is offered to the model. Default is per member, per the toolset's documentation. A member whose enabled resolves false is withheld from the served schema. + + - `hold_key: optional BetaBrowserHoldKeyConfig or null` + + `hold_key`'s config overrides. + + - `defer_loading: optional boolean or null` + + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. + + - `enabled: optional boolean or null` + + Whether this member is offered to the model. Default is per member, per the toolset's documentation. A member whose enabled resolves false is withheld from the served schema. + + - `hover: optional BetaBrowserHoverConfig or null` + + `hover`'s config overrides. + + - `defer_loading: optional boolean or null` + + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. + + - `enabled: optional boolean or null` + + Whether this member is offered to the model. Default is per member, per the toolset's documentation. A member whose enabled resolves false is withheld from the served schema. + + - `javascript_exec: optional BetaBrowserJavascriptExecConfig or null` + + `javascript_exec`'s config overrides. + + - `defer_loading: optional boolean or null` + + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. + + - `enabled: optional boolean or null` + + Whether this member is offered to the model. Default is per member, per the toolset's documentation. A member whose enabled resolves false is withheld from the served schema. + + - `key: optional BetaBrowserKeyConfig or null` + + `key`'s config overrides. + + - `defer_loading: optional boolean or null` + + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. + + - `enabled: optional boolean or null` + + Whether this member is offered to the model. Default is per member, per the toolset's documentation. A member whose enabled resolves false is withheld from the served schema. + + - `left_click: optional BetaBrowserLeftClickConfig or null` + + `left_click`'s config overrides. + + - `defer_loading: optional boolean or null` + + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. + + - `enabled: optional boolean or null` + + Whether this member is offered to the model. Default is per member, per the toolset's documentation. A member whose enabled resolves false is withheld from the served schema. + + - `left_click_drag: optional BetaBrowserLeftClickDragConfig or null` + + `left_click_drag`'s config overrides. + + - `defer_loading: optional boolean or null` + + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. + + - `enabled: optional boolean or null` + + Whether this member is offered to the model. Default is per member, per the toolset's documentation. A member whose enabled resolves false is withheld from the served schema. + + - `left_mouse_down: optional BetaBrowserLeftMouseDownConfig or null` + + `left_mouse_down`'s config overrides. + + - `defer_loading: optional boolean or null` + + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. + + - `enabled: optional boolean or null` + + Whether this member is offered to the model. Default is per member, per the toolset's documentation. A member whose enabled resolves false is withheld from the served schema. + + - `left_mouse_up: optional BetaBrowserLeftMouseUpConfig or null` + + `left_mouse_up`'s config overrides. + + - `defer_loading: optional boolean or null` + + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. + + - `enabled: optional boolean or null` + + Whether this member is offered to the model. Default is per member, per the toolset's documentation. A member whose enabled resolves false is withheld from the served schema. + + - `list_tabs: optional BetaBrowserListTabsConfig or null` + + `list_tabs`'s config overrides. + + - `defer_loading: optional boolean or null` + + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. + + - `enabled: optional boolean or null` + + Whether this member is offered to the model. Default is per member, per the toolset's documentation. A member whose enabled resolves false is withheld from the served schema. + + - `middle_click: optional BetaBrowserMiddleClickConfig or null` + + `middle_click`'s config overrides. + + - `defer_loading: optional boolean or null` + + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. + + - `enabled: optional boolean or null` + + Whether this member is offered to the model. Default is per member, per the toolset's documentation. A member whose enabled resolves false is withheld from the served schema. + + - `mouse_move: optional BetaBrowserMouseMoveConfig or null` + + `mouse_move`'s config overrides. + + - `defer_loading: optional boolean or null` + + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. + + - `enabled: optional boolean or null` + + Whether this member is offered to the model. Default is per member, per the toolset's documentation. A member whose enabled resolves false is withheld from the served schema. + + - `navigate: optional BetaBrowserNavigateConfig or null` + + `navigate`'s config overrides. + + - `defer_loading: optional boolean or null` + + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. + + - `enabled: optional boolean or null` + + Whether this member is offered to the model. Default is per member, per the toolset's documentation. A member whose enabled resolves false is withheld from the served schema. + + - `new_tab: optional BetaBrowserNewTabConfig or null` + + `new_tab`'s config overrides. + + - `defer_loading: optional boolean or null` + + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. + + - `enabled: optional boolean or null` + + Whether this member is offered to the model. Default is per member, per the toolset's documentation. A member whose enabled resolves false is withheld from the served schema. + + - `read_console: optional BetaBrowserReadConsoleConfig or null` + + `read_console`'s config overrides. + + - `defer_loading: optional boolean or null` + + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. + + - `enabled: optional boolean or null` + + Whether this member is offered to the model. Default is per member, per the toolset's documentation. A member whose enabled resolves false is withheld from the served schema. + + - `read_network: optional BetaBrowserReadNetworkConfig or null` + + `read_network`'s config overrides. + + - `defer_loading: optional boolean or null` + + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. + + - `enabled: optional boolean or null` + + Whether this member is offered to the model. Default is per member, per the toolset's documentation. A member whose enabled resolves false is withheld from the served schema. + + - `read_page: optional BetaBrowserReadPageConfig or null` + + `read_page`'s config overrides. + + - `defer_loading: optional boolean or null` + + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. + + - `enabled: optional boolean or null` + + Whether this member is offered to the model. Default is per member, per the toolset's documentation. A member whose enabled resolves false is withheld from the served schema. + + - `right_click: optional BetaBrowserRightClickConfig or null` + + `right_click`'s config overrides. + + - `defer_loading: optional boolean or null` + + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. + + - `enabled: optional boolean or null` + + Whether this member is offered to the model. Default is per member, per the toolset's documentation. A member whose enabled resolves false is withheld from the served schema. + + - `screenshot: optional BetaBrowserScreenshotConfig or null` + + `screenshot`'s config overrides. + + - `defer_loading: optional boolean or null` + + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. + + - `enabled: optional boolean or null` + + Whether this member is offered to the model. Default is per member, per the toolset's documentation. A member whose enabled resolves false is withheld from the served schema. + + - `scroll: optional BetaBrowserScrollConfig or null` + + `scroll`'s config overrides. + + - `defer_loading: optional boolean or null` + + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. + + - `enabled: optional boolean or null` + + Whether this member is offered to the model. Default is per member, per the toolset's documentation. A member whose enabled resolves false is withheld from the served schema. + + - `scroll_to: optional BetaBrowserScrollToConfig or null` + + `scroll_to`'s config overrides. + + - `defer_loading: optional boolean or null` + + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. + + - `enabled: optional boolean or null` + + Whether this member is offered to the model. Default is per member, per the toolset's documentation. A member whose enabled resolves false is withheld from the served schema. + + - `switch_tab: optional BetaBrowserSwitchTabConfig or null` + + `switch_tab`'s config overrides. + + - `defer_loading: optional boolean or null` + + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. + + - `enabled: optional boolean or null` + + Whether this member is offered to the model. Default is per member, per the toolset's documentation. A member whose enabled resolves false is withheld from the served schema. + + - `triple_click: optional BetaBrowserTripleClickConfig or null` + + `triple_click`'s config overrides. + + - `defer_loading: optional boolean or null` + + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. + + - `enabled: optional boolean or null` + + Whether this member is offered to the model. Default is per member, per the toolset's documentation. A member whose enabled resolves false is withheld from the served schema. + + - `type: optional BetaBrowserTypeConfig or null` + + `type`'s config overrides. + + - `defer_loading: optional boolean or null` + + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. + + - `enabled: optional boolean or null` + + Whether this member is offered to the model. Default is per member, per the toolset's documentation. A member whose enabled resolves false is withheld from the served schema. + + - `wait: optional BetaBrowserWaitConfig or null` + + `wait`'s config overrides. + + - `defer_loading: optional boolean or null` + + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. + + - `enabled: optional boolean or null` + + Whether this member is offered to the model. Default is per member, per the toolset's documentation. A member whose enabled resolves false is withheld from the served schema. + + - `zoom: optional BetaBrowserZoomConfig or null` + + `zoom`'s config overrides. + + - `defer_loading: optional boolean or null` + + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. + + - `enabled: optional boolean or null` + + Whether this member is offered to the model. Default is per member, per the toolset's documentation. A member whose enabled resolves false is withheld from the served schema. + - `BetaToolComputerUse20241022 object { display_height_px, display_width_px, name, 7 more }` - `display_height_px: number`
- `strict: optional boolean` When true, guarantees schema validation on tool names and inputs + + - `BetaComputerToolset20260801 object { type, allowed_callers, cache_control, configs }` + + The computer toolset: a single `tools[]` entry (carrying no + `name`) that declares the computer tool family. The model is + served the family's tool with any members disabled via `configs` + removed from its schema. Every member is enabled by default, zoom + included. The single-tool options `display_number` and + `enable_zoom` are not fields of a toolset entry โ it carries only + `type`, `configs`, and `cache_control`; zoom is controlled + via `configs.zoom.enabled`. + + - `type: "computer_toolset_20260801"` + + - `"computer_toolset_20260801"` + + - `allowed_callers: optional array of "direct" or "code_execution_20250825" or "code_execution_20260120" or "code_execution_20260521"` + + - `"direct"` + + - `"code_execution_20250825"` + + - `"code_execution_20260120"` + + - `"code_execution_20260521"` + + - `cache_control: optional BetaCacheControlEphemeral or null` + + Create a cache control breakpoint at this content block. + + - `configs: optional BetaComputerToolsetConfigs or null` + + Per-member configuration for `computer_toolset_20260801`: one + optional field per member tool, keyed by the member name โ the same + name the member's `tool_use` blocks carry. Every member is an + accepted key, and a member's defaults apply wherever its key is + absent. Unknown keys are rejected: the field set is this toolset + version's complete member set. + + - `cursor_position: optional BetaComputerCursorPositionConfig or null` + + `cursor_position`'s config overrides. + + - `defer_loading: optional boolean or null` + + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. + + - `enabled: optional boolean or null` + + Whether this member is offered to the model. Default is per member, per the toolset's documentation. A member whose enabled resolves false is withheld from the served schema. + + - `double_click: optional BetaComputerDoubleClickConfig or null` + + `double_click`'s config overrides. + + - `defer_loading: optional boolean or null` + + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. + + - `enabled: optional boolean or null` + + Whether this member is offered to the model. Default is per member, per the toolset's documentation. A member whose enabled resolves false is withheld from the served schema. + + - `hold_key: optional BetaComputerHoldKeyConfig or null` + + `hold_key`'s config overrides. + + - `defer_loading: optional boolean or null` + + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. + + - `enabled: optional boolean or null` + + Whether this member is offered to the model. Default is per member, per the toolset's documentation. A member whose enabled resolves false is withheld from the served schema. + + - `key: optional BetaComputerKeyConfig or null` + + `key`'s config overrides. + + - `defer_loading: optional boolean or null` + + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. + + - `enabled: optional boolean or null` + + Whether this member is offered to the model. Default is per member, per the toolset's documentation. A member whose enabled resolves false is withheld from the served schema. + + - `left_click: optional BetaComputerLeftClickConfig or null` + + `left_click`'s config overrides. + + - `defer_loading: optional boolean or null` + + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. + + - `enabled: optional boolean or null` + + Whether this member is offered to the model. Default is per member, per the toolset's documentation. A member whose enabled resolves false is withheld from the served schema. + + - `left_click_drag: optional BetaComputerLeftClickDragConfig or null` + + `left_click_drag`'s config overrides. + + - `defer_loading: optional boolean or null` + + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. + + - `enabled: optional boolean or null` + + Whether this member is offered to the model. Default is per member, per the toolset's documentation. A member whose enabled resolves false is withheld from the served schema. + + - `left_mouse_down: optional BetaComputerLeftMouseDownConfig or null` + + `left_mouse_down`'s config overrides. + + - `defer_loading: optional boolean or null` + + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. + + - `enabled: optional boolean or null` + + Whether this member is offered to the model. Default is per member, per the toolset's documentation. A member whose enabled resolves false is withheld from the served schema. + + - `left_mouse_up: optional BetaComputerLeftMouseUpConfig or null` + + `left_mouse_up`'s config overrides. + + - `defer_loading: optional boolean or null` + + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. + + - `enabled: optional boolean or null` + + Whether this member is offered to the model. Default is per member, per the toolset's documentation. A member whose enabled resolves false is withheld from the served schema. + + - `middle_click: optional BetaComputerMiddleClickConfig or null` + + `middle_click`'s config overrides. + + - `defer_loading: optional boolean or null` + + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. + + - `enabled: optional boolean or null` + + Whether this member is offered to the model. Default is per member, per the toolset's documentation. A member whose enabled resolves false is withheld from the served schema. + + - `mouse_move: optional BetaComputerMouseMoveConfig or null` + + `mouse_move`'s config overrides. + + - `defer_loading: optional boolean or null` + + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. + + - `enabled: optional boolean or null` + + Whether this member is offered to the model. Default is per member, per the toolset's documentation. A member whose enabled resolves false is withheld from the served schema. + + - `right_click: optional BetaComputerRightClickConfig or null` + + `right_click`'s config overrides. + + - `defer_loading: optional boolean or null` + + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. + + - `enabled: optional boolean or null` + + Whether this member is offered to the model. Default is per member, per the toolset's documentation. A member whose enabled resolves false is withheld from the served schema. + + - `screenshot: optional BetaComputerScreenshotConfig or null` + + `screenshot`'s config overrides. + + - `defer_loading: optional boolean or null` + + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. + + - `enabled: optional boolean or null` + + Whether this member is offered to the model. Default is per member, per the toolset's documentation. A member whose enabled resolves false is withheld from the served schema. + + - `scroll: optional BetaComputerScrollConfig or null` + + `scroll`'s config overrides. + + - `defer_loading: optional boolean or null` + + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. + + - `enabled: optional boolean or null` + + Whether this member is offered to the model. Default is per member, per the toolset's documentation. A member whose enabled resolves false is withheld from the served schema. + + - `triple_click: optional BetaComputerTripleClickConfig or null` + + `triple_click`'s config overrides. + + - `defer_loading: optional boolean or null` + + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. + + - `enabled: optional boolean or null` + + Whether this member is offered to the model. Default is per member, per the toolset's documentation. A member whose enabled resolves false is withheld from the served schema. + + - `type: optional BetaComputerTypeConfig or null` + + `type`'s config overrides. + + - `defer_loading: optional boolean or null` + + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. + + - `enabled: optional boolean or null` + + Whether this member is offered to the model. Default is per member, per the toolset's documentation. A member whose enabled resolves false is withheld from the served schema. + + - `wait: optional BetaComputerWaitConfig or null` + + `wait`'s config overrides. + + - `defer_loading: optional boolean or null` + + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. + + - `enabled: optional boolean or null` + + Whether this member is offered to the model. Default is per member, per the toolset's documentation. A member whose enabled resolves false is withheld from the served schema. + + - `zoom: optional BetaComputerZoomConfig or null` + + `zoom`'s config overrides. + + - `defer_loading: optional boolean or null` + + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. + + - `enabled: optional boolean or null` + + Whether this member is offered to the model. Default is per member, per the toolset's documentation. A member whose enabled resolves false is withheld from the served schema. - `BetaToolTextEditor20250124 object { name, type, allowed_callers, 4 more }`
"role": "user" } ], - "model": "claude-opus-4-6", + "model": "claude-opus-5", "system": [ { "text": "Today'\''s date is 2024-06-01.",
api/beta/messages/create Changed · +891 / -131 lines
The two sides of this change are too far apart to line up, so this is the differ's own diff of it.
- `string` - - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 30 more` + - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 31 more` - `"message-batches-2024-09-24"`
- `"output-300k-2026-03-24"` - `"user-profiles-2026-03-24"` + + - `"user-profiles-2026-08-18"` - `"advisor-tool-2026-03-01"`
- `"search_result_location"` - - `BetaImageBlockParam object { source, type, cache_control }` + - `BetaImageBlockParam object { source, type, cache_control, transformations }` - `source: BetaBase64ImageSource or BetaURLImageSource or BetaFileImageSource`
Create a cache control breakpoint at this content block. + - `transformations: optional BetaImageTransformationsParam or null` + + Configures the transformations the server applies to this image before the model observes it. Each key names a condition the server transforms images for; its value selects the transformation applied. Omitted keys keep their default behavior, and an empty object is equivalent to omitting the field. + + - `oversized_image: optional "downsize" or "error"` + + What the server does when this image exceeds the model's maximum image size. `"downsize"` (the default) scales the image down to fit, which changes the dimensions the model observes without telling you. `"error"` instead rejects the request with a 400 error naming the image's dimensions and the largest dimensions that fit, so you can scale the image deliberately โ your image is never silently scaled down. + + - `"downsize"` + + - `"error"` + - `BetaRequestDocumentBlock object { source, type, cache_control, 3 more }` - `source: BetaBase64PDFSource or BetaPlainTextSource or BetaContentBlockSource or 2 more`
- `BetaTextBlockParam object { text, type, cache_control, citations }` - - `BetaImageBlockParam object { source, type, cache_control }` + - `BetaImageBlockParam object { source, type, cache_control, transformations }` - `type: "content"`
- `"redacted_thinking"` - - `BetaToolUseBlockParam object { id, input, name, 3 more }` + - `BetaToolUseBlockParam object { id, input, name, 4 more }` - `id: string`
- `"code_execution_20260120"` - - `BetaToolResultBlockParam object { tool_use_id, type, cache_control, 2 more }` + - `toolset_name: optional string or null` + + For a toolset member tool_use, the toolset family this member belongs to. + + - `BetaToolResultBlockParam object { tool_use_id, type, cache_control, 3 more }` - `tool_use_id: string`
Create a cache control breakpoint at this content block. - - `content: optional string or array of BetaTextBlockParam or BetaImageBlockParam or BetaSearchResultBlockParam or 2 more` + - `content: optional string or array of BetaTextBlockParam or BetaImageBlockParam or BetaSearchResultBlockParam or 3 more` - `string` - - `array of BetaTextBlockParam or BetaImageBlockParam or BetaSearchResultBlockParam or 2 more` + - `array of BetaTextBlockParam or BetaImageBlockParam or BetaSearchResultBlockParam or 3 more` - `BetaTextBlockParam object { text, type, cache_control, citations }` - - `BetaImageBlockParam object { source, type, cache_control }` + - `BetaImageBlockParam object { source, type, cache_control, transformations }` - `BetaSearchResultBlockParam object { content, source, title, 3 more }`
Create a cache control breakpoint at this content block. + - `BetaBrowserStateBlockParam object { tabs, type, cache_control, state_changes }` + + The caller's browser state after a browser toolset member call โ + the full inventory of open tabs, which tab is active, and any side + effects (tabs opened, download state changes) the call produced. + + At most one per `tool_result`, only on a non-error result answering a + browser toolset member `tool_use`. The server renders the + model-visible text from it; the model never sees the raw fields. + + - `tabs: array of BetaBrowserStateTabEntry` + + All tabs open in the browser after this call โ the full inventory, not a delta. May be empty. Whenever non-empty, exactly one entry carries `active: true`. + + - `tab_id: string` + + The caller-assigned identifier for this tab, unique within the inventory. + + - `title: string` + + The title of the page the tab is showing. May be empty. + + - `url: string` + + The URL of the page the tab is showing. May be empty. + + - `active: optional boolean` + + Whether this tab is the active tab after this call. Whenever `tabs` is non-empty, exactly one entry is marked `active: true`. + + - `type: "browser_state"` + + - `"browser_state"` + + - `cache_control: optional BetaCacheControlEphemeral or null` + + Create a cache control breakpoint at this content block. + + - `state_changes: optional array of BetaBrowserStateChange or null` + + Tabs opened and download state changes during this call. "Nothing to report" is expressed by omitting the field, never by an empty list. + + - `BetaBrowserStateChangeTabOpened object { tab_id, type }` + + A tab this call's execution opened that remains open at its end โ + the creation delta of the `tabs` inventory, not an event log. + + Carries only the `tab_id`; the tab's `title` and `url` live on its + `tabs` entry, which must include the same `tab_id`. A tab opened + during a failed call gets no deferred `tab_opened`; it simply appears + in the next result's `tabs` inventory. + + - `tab_id: string` + + The `tab_id` of the opened tab, present in `tabs`. + + - `type: "tab_opened"` + + - `"tab_opened"` + + - `BetaBrowserStateChangeDownloadStarted object { download_id, type, url }` + + A file download that started during this call. + + - `download_id: string` + + The caller-assigned identifier for this download, stable across the state changes reporting it. + + - `type: "download_started"` + + - `"download_started"` + + - `url: string` + + The final post-redirect URL the download was served from. + + - `BetaBrowserStateChangeDownloadCompleted object { download_id, type, url, 2 more }` + + A file download that finished during this call, reported with the + same `download_id` as its `download_started` โ or without a prior + `download_started`, when the download finished during the call that + started it (at most one state change per `download_id` per result). + + - `download_id: string` + + The caller-assigned identifier for this download, stable across the state changes reporting it. + + - `type: "download_completed"` + + - `"download_completed"` + + - `url: string` + + The final post-redirect URL the download was served from. + + - `path: optional string or null` + + Where the executor saved the file, on the executor's filesystem. Only included when another tool in the same environment can read the file at that path. + + - `size_bytes: optional number or null` + + The completed download's size. + + - `BetaBrowserStateChangeDownloadFailed object { download_id, type, url, error }` + + A file download that failed โ or was cancelled โ during this call. + + - `download_id: string` + + The caller-assigned identifier for this download, stable across the state changes reporting it. + + - `type: "download_failed"` + + - `"download_failed"` + + - `url: string` + + The final post-redirect URL the download was served from. + + - `error: optional string or null` + + The failure or cancellation detail, when known. + - `is_error: optional boolean` + + - `toolset_name: optional string or null` + + For a toolset member tool_result, the toolset family of the paired tool_use. - `BetaServerToolUseBlockParam object { id, input, name, 3 more }`
- `encrypted_content: optional string or null` Opaque metadata from prior compaction, to be round-tripped verbatim - - - `BetaMidConversationSystemBlockParam object { content, type, cache_control }` - - System instructions that appear mid-conversation. - - Use this block to provide or update system-level instructions at a specific - point in the conversation, rather than only via the top-level `system` parameter. - - - `content: array of BetaTextBlockParam or BetaRequestToolAdditionBlock or BetaRequestToolRemovalBlock` - - System instruction text blocks. - - - `BetaTextBlockParam object { text, type, cache_control, citations }` - - - `BetaRequestToolAdditionBlock object { tool, type, cache_control }` - - Mid-conversation directive to surface a declared tool. - - `tool` references a tool (or MCP toolset) by name from the request's - `tools`; it is offered to the model from this point in the - conversation onward. - - - `tool: BetaToolChangeToolReference or BetaToolChangeMCPToolReference or BetaToolChangeMCPToolsetReference` - - Reference to a single tool the caller declared directly in - `tools[]`. Does not accept the composed `{server}_{name}` form the - server assigns to MCP-resolved tools โ use `mcp_tool_reference` or - `mcp_toolset_reference` for those. - - - `BetaToolChangeToolReference object { name, type }` - - Reference to a single tool the caller declared directly in - `tools[]`. Does not accept the composed `{server}_{name}` form the - server assigns to MCP-resolved tools โ use `mcp_tool_reference` or - `mcp_toolset_reference` for those. - - - `name: string` - - - `type: "tool_reference"` - - - `"tool_reference"` - - - `BetaToolChangeMCPToolReference object { name, server_name, type }` - - Reference to a single MCP tool by its server and remote name โ the - same `server_name`/`name` pair `mcp_tool_use` carries. - - - `name: string` - - - `server_name: string` - - - `type: "mcp_tool_reference"` - - - `"mcp_tool_reference"` - - - `BetaToolChangeMCPToolsetReference object { server_name, type }` - - Reference to every tool in the named MCP server's toolset. - - - `server_name: string` - - - `type: "mcp_toolset_reference"` - - - `"mcp_toolset_reference"` - - - `type: "tool_addition"` - - - `"tool_addition"` - - - `cache_control: optional BetaCacheControlEphemeral or null` - - Create a cache control breakpoint at this content block. - - - `BetaRequestToolRemovalBlock object { tool, type, cache_control }` - - Mid-conversation directive to withdraw a tool. - - `tool` references a tool (or MCP toolset) by name from the request's - `tools`; it is no longer offered to the model from this point in the - conversation onward. - - - `tool: BetaToolChangeToolReference or BetaToolChangeMCPToolReference or BetaToolChangeMCPToolsetReference` - - Reference to a single tool the caller declared directly in - `tools[]`. Does not accept the composed `{server}_{name}` form the - server assigns to MCP-resolved tools โ use `mcp_tool_reference` or - `mcp_toolset_reference` for those. - - - `BetaToolChangeToolReference object { name, type }` - - Reference to a single tool the caller declared directly in - `tools[]`. Does not accept the composed `{server}_{name}` form the - server assigns to MCP-resolved tools โ use `mcp_tool_reference` or - `mcp_toolset_reference` for those. - - - `BetaToolChangeMCPToolReference object { name, server_name, type }` - - Reference to a single MCP tool by its server and remote name โ the - same `server_name`/`name` pair `mcp_tool_use` carries. - - - `BetaToolChangeMCPToolsetReference object { server_name, type }` - - Reference to every tool in the named MCP server's toolset. - - - `type: "tool_removal"` - - - `"tool_removal"` - - - `cache_control: optional BetaCacheControlEphemeral or null` - - Create a cache control breakpoint at this content block. - - - `type: "mid_conv_system"` - - - `"mid_conv_system"` - - - `cache_control: optional BetaCacheControlEphemeral or null` - - Create a cache control breakpoint at this content block. - `BetaRequestToolAdditionBlock object { tool, type, cache_control }`
`tools`; it is offered to the model from this point in the conversation onward. + - `tool: BetaToolChangeToolReference or BetaToolChangeMCPToolReference or BetaToolChangeMCPToolsetReference` + + Reference to a single tool the caller declared directly in + `tools[]`. Does not accept the composed `{server}_{name}` form the + server assigns to MCP-resolved tools โ use `mcp_tool_reference` or + `mcp_toolset_reference` for those. + + - `BetaToolChangeToolReference object { name, type }` + + Reference to a single tool the caller declared directly in + `tools[]`. Does not accept the composed `{server}_{name}` form the + server assigns to MCP-resolved tools โ use `mcp_tool_reference` or + `mcp_toolset_reference` for those. + + - `name: string` + + - `type: "tool_reference"` + + - `"tool_reference"` + + - `BetaToolChangeMCPToolReference object { name, server_name, type }` + + Reference to a single MCP tool by its server and remote name โ the + same `server_name`/`name` pair `mcp_tool_use` carries. + + - `name: string` + + - `server_name: string` + + - `type: "mcp_tool_reference"` + + - `"mcp_tool_reference"` + + - `BetaToolChangeMCPToolsetReference object { server_name, type }` + + Reference to every tool in the named MCP server's toolset. + + - `server_name: string` + + - `type: "mcp_toolset_reference"` + + - `"mcp_toolset_reference"` + + - `type: "tool_addition"` + + - `"tool_addition"` + + - `cache_control: optional BetaCacheControlEphemeral or null` + + Create a cache control breakpoint at this content block. + - `BetaRequestToolRemovalBlock object { tool, type, cache_control }` Mid-conversation directive to withdraw a tool.
`tool` references a tool (or MCP toolset) by name from the request's `tools`; it is no longer offered to the model from this point in the conversation onward. + + - `tool: BetaToolChangeToolReference or BetaToolChangeMCPToolReference or BetaToolChangeMCPToolsetReference` + + Reference to a single tool the caller declared directly in + `tools[]`. Does not accept the composed `{server}_{name}` form the + server assigns to MCP-resolved tools โ use `mcp_tool_reference` or + `mcp_toolset_reference` for those. + + - `BetaToolChangeToolReference object { name, type }` + + Reference to a single tool the caller declared directly in + `tools[]`. Does not accept the composed `{server}_{name}` form the + server assigns to MCP-resolved tools โ use `mcp_tool_reference` or + `mcp_toolset_reference` for those. + + - `BetaToolChangeMCPToolReference object { name, server_name, type }` + + Reference to a single MCP tool by its server and remote name โ the + same `server_name`/`name` pair `mcp_tool_use` carries. + + - `BetaToolChangeMCPToolsetReference object { server_name, type }` + + Reference to every tool in the named MCP server's toolset. + + - `type: "tool_removal"` + + - `"tool_removal"` + + - `cache_control: optional BetaCacheControlEphemeral or null` + + Create a cache control breakpoint at this content block. - `BetaFallbackBlockParam object { from, to, type, trigger }`
When true, guarantees schema validation on tool names and inputs + - `BetaBrowserToolset20260801 object { type, allowed_callers, cache_control, configs }` + + The browser toolset: a single `tools[]` entry (carrying no + `name`) that declares the browser tool family. The model is served + the family's tool with any members disabled via `configs` removed + from its schema. + + - `type: "browser_toolset_20260801"` + + - `"browser_toolset_20260801"` + + - `allowed_callers: optional array of "direct" or "code_execution_20250825" or "code_execution_20260120" or "code_execution_20260521"` + + - `"direct"` + + - `"code_execution_20250825"` + + - `"code_execution_20260120"` + + - `"code_execution_20260521"` + + - `cache_control: optional BetaCacheControlEphemeral or null` + + Create a cache control breakpoint at this content block. + + - `configs: optional BetaBrowserToolsetConfigs or null` + + Per-member configuration for `browser_toolset_20260801`: one + optional field per member tool, keyed by the member name โ the same + name the member's `tool_use` blocks carry. Every member is an + accepted key, and a member's defaults apply wherever its key is + absent. Unknown keys are rejected: the field set is this toolset + version's complete member set. + + - `close_tab: optional BetaBrowserCloseTabConfig or null` + + `close_tab`'s config overrides. + + - `defer_loading: optional boolean or null` + + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. + + - `enabled: optional boolean or null` + + Whether this member is offered to the model. Default is per member, per the toolset's documentation. A member whose enabled resolves false is withheld from the served schema. + + - `double_click: optional BetaBrowserDoubleClickConfig or null` + + `double_click`'s config overrides. + + - `defer_loading: optional boolean or null` + + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. + + - `enabled: optional boolean or null` + + Whether this member is offered to the model. Default is per member, per the toolset's documentation. A member whose enabled resolves false is withheld from the served schema. + + - `file_upload: optional BetaBrowserFileUploadConfig or null` + + `file_upload`'s config overrides. + + - `defer_loading: optional boolean or null` + + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. + + - `enabled: optional boolean or null` + + Whether this member is offered to the model. Default is per member, per the toolset's documentation. A member whose enabled resolves false is withheld from the served schema. + + - `find: optional BetaBrowserFindConfig or null` + + `find`'s config overrides. + + - `defer_loading: optional boolean or null` + + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. + + - `enabled: optional boolean or null` + + Whether this member is offered to the model. Default is per member, per the toolset's documentation. A member whose enabled resolves false is withheld from the served schema. + + - `form_input: optional BetaBrowserFormInputConfig or null` + + `form_input`'s config overrides. + + - `defer_loading: optional boolean or null` + + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. + + - `enabled: optional boolean or null` + + Whether this member is offered to the model. Default is per member, per the toolset's documentation. A member whose enabled resolves false is withheld from the served schema. + + - `get_page_text: optional BetaBrowserGetPageTextConfig or null` + + `get_page_text`'s config overrides. + + - `defer_loading: optional boolean or null` + + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. + + - `enabled: optional boolean or null` + + Whether this member is offered to the model. Default is per member, per the toolset's documentation. A member whose enabled resolves false is withheld from the served schema. + + - `hold_key: optional BetaBrowserHoldKeyConfig or null` + + `hold_key`'s config overrides. + + - `defer_loading: optional boolean or null` + + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. + + - `enabled: optional boolean or null` + + Whether this member is offered to the model. Default is per member, per the toolset's documentation. A member whose enabled resolves false is withheld from the served schema. + + - `hover: optional BetaBrowserHoverConfig or null` + + `hover`'s config overrides. + + - `defer_loading: optional boolean or null` + + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. + + - `enabled: optional boolean or null` + + Whether this member is offered to the model. Default is per member, per the toolset's documentation. A member whose enabled resolves false is withheld from the served schema. + + - `javascript_exec: optional BetaBrowserJavascriptExecConfig or null` + + `javascript_exec`'s config overrides. + + - `defer_loading: optional boolean or null` + + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. + + - `enabled: optional boolean or null` + + Whether this member is offered to the model. Default is per member, per the toolset's documentation. A member whose enabled resolves false is withheld from the served schema. + + - `key: optional BetaBrowserKeyConfig or null` + + `key`'s config overrides. + + - `defer_loading: optional boolean or null` + + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. + + - `enabled: optional boolean or null` + + Whether this member is offered to the model. Default is per member, per the toolset's documentation. A member whose enabled resolves false is withheld from the served schema. + + - `left_click: optional BetaBrowserLeftClickConfig or null` + + `left_click`'s config overrides. + + - `defer_loading: optional boolean or null` + + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. + + - `enabled: optional boolean or null` + + Whether this member is offered to the model. Default is per member, per the toolset's documentation. A member whose enabled resolves false is withheld from the served schema. + + - `left_click_drag: optional BetaBrowserLeftClickDragConfig or null` + + `left_click_drag`'s config overrides. + + - `defer_loading: optional boolean or null` + + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. + + - `enabled: optional boolean or null` + + Whether this member is offered to the model. Default is per member, per the toolset's documentation. A member whose enabled resolves false is withheld from the served schema. + + - `left_mouse_down: optional BetaBrowserLeftMouseDownConfig or null` + + `left_mouse_down`'s config overrides. + + - `defer_loading: optional boolean or null` + + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. + + - `enabled: optional boolean or null` + + Whether this member is offered to the model. Default is per member, per the toolset's documentation. A member whose enabled resolves false is withheld from the served schema. + + - `left_mouse_up: optional BetaBrowserLeftMouseUpConfig or null` + + `left_mouse_up`'s config overrides. + + - `defer_loading: optional boolean or null` + + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. + + - `enabled: optional boolean or null` + + Whether this member is offered to the model. Default is per member, per the toolset's documentation. A member whose enabled resolves false is withheld from the served schema. + + - `list_tabs: optional BetaBrowserListTabsConfig or null` + + `list_tabs`'s config overrides. + + - `defer_loading: optional boolean or null` + + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. + + - `enabled: optional boolean or null` + + Whether this member is offered to the model. Default is per member, per the toolset's documentation. A member whose enabled resolves false is withheld from the served schema. + + - `middle_click: optional BetaBrowserMiddleClickConfig or null` + + `middle_click`'s config overrides. + + - `defer_loading: optional boolean or null` + + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. + + - `enabled: optional boolean or null` + + Whether this member is offered to the model. Default is per member, per the toolset's documentation. A member whose enabled resolves false is withheld from the served schema. + + - `mouse_move: optional BetaBrowserMouseMoveConfig or null` + + `mouse_move`'s config overrides. + + - `defer_loading: optional boolean or null` + + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. + + - `enabled: optional boolean or null` + + Whether this member is offered to the model. Default is per member, per the toolset's documentation. A member whose enabled resolves false is withheld from the served schema. + + - `navigate: optional BetaBrowserNavigateConfig or null` + + `navigate`'s config overrides. + + - `defer_loading: optional boolean or null` + + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. + + - `enabled: optional boolean or null` + + Whether this member is offered to the model. Default is per member, per the toolset's documentation. A member whose enabled resolves false is withheld from the served schema. + + - `new_tab: optional BetaBrowserNewTabConfig or null` + + `new_tab`'s config overrides. + + - `defer_loading: optional boolean or null` + + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. + + - `enabled: optional boolean or null` + + Whether this member is offered to the model. Default is per member, per the toolset's documentation. A member whose enabled resolves false is withheld from the served schema. + + - `read_console: optional BetaBrowserReadConsoleConfig or null` + + `read_console`'s config overrides. + + - `defer_loading: optional boolean or null` + + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. + + - `enabled: optional boolean or null` + + Whether this member is offered to the model. Default is per member, per the toolset's documentation. A member whose enabled resolves false is withheld from the served schema. + + - `read_network: optional BetaBrowserReadNetworkConfig or null` + + `read_network`'s config overrides. + + - `defer_loading: optional boolean or null` + + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. + + - `enabled: optional boolean or null` + + Whether this member is offered to the model. Default is per member, per the toolset's documentation. A member whose enabled resolves false is withheld from the served schema. + + - `read_page: optional BetaBrowserReadPageConfig or null` + + `read_page`'s config overrides. + + - `defer_loading: optional boolean or null` + + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. + + - `enabled: optional boolean or null` + + Whether this member is offered to the model. Default is per member, per the toolset's documentation. A member whose enabled resolves false is withheld from the served schema. + + - `right_click: optional BetaBrowserRightClickConfig or null` + + `right_click`'s config overrides. + + - `defer_loading: optional boolean or null` + + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. + + - `enabled: optional boolean or null` + + Whether this member is offered to the model. Default is per member, per the toolset's documentation. A member whose enabled resolves false is withheld from the served schema. + + - `screenshot: optional BetaBrowserScreenshotConfig or null` + + `screenshot`'s config overrides. + + - `defer_loading: optional boolean or null` + + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. + + - `enabled: optional boolean or null` + + Whether this member is offered to the model. Default is per member, per the toolset's documentation. A member whose enabled resolves false is withheld from the served schema. + + - `scroll: optional BetaBrowserScrollConfig or null` + + `scroll`'s config overrides. + + - `defer_loading: optional boolean or null` + + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. + + - `enabled: optional boolean or null` + + Whether this member is offered to the model. Default is per member, per the toolset's documentation. A member whose enabled resolves false is withheld from the served schema. + + - `scroll_to: optional BetaBrowserScrollToConfig or null` + + `scroll_to`'s config overrides. + + - `defer_loading: optional boolean or null` + + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. + + - `enabled: optional boolean or null` + + Whether this member is offered to the model. Default is per member, per the toolset's documentation. A member whose enabled resolves false is withheld from the served schema. + + - `switch_tab: optional BetaBrowserSwitchTabConfig or null` + + `switch_tab`'s config overrides. + + - `defer_loading: optional boolean or null` + + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. + + - `enabled: optional boolean or null` + + Whether this member is offered to the model. Default is per member, per the toolset's documentation. A member whose enabled resolves false is withheld from the served schema. + + - `triple_click: optional BetaBrowserTripleClickConfig or null` + + `triple_click`'s config overrides. + + - `defer_loading: optional boolean or null` + + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. + + - `enabled: optional boolean or null` + + Whether this member is offered to the model. Default is per member, per the toolset's documentation. A member whose enabled resolves false is withheld from the served schema. + + - `type: optional BetaBrowserTypeConfig or null` + + `type`'s config overrides. + + - `defer_loading: optional boolean or null` + + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. + + - `enabled: optional boolean or null` + + Whether this member is offered to the model. Default is per member, per the toolset's documentation. A member whose enabled resolves false is withheld from the served schema. + + - `wait: optional BetaBrowserWaitConfig or null` + + `wait`'s config overrides. + + - `defer_loading: optional boolean or null` + + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. + + - `enabled: optional boolean or null` + + Whether this member is offered to the model. Default is per member, per the toolset's documentation. A member whose enabled resolves false is withheld from the served schema. + + - `zoom: optional BetaBrowserZoomConfig or null` + + `zoom`'s config overrides. + + - `defer_loading: optional boolean or null` + + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. + + - `enabled: optional boolean or null` + + Whether this member is offered to the model. Default is per member, per the toolset's documentation. A member whose enabled resolves false is withheld from the served schema. + - `BetaToolComputerUse20241022 object { display_height_px, display_width_px, name, 7 more }` - `display_height_px: number`
- `strict: optional boolean` When true, guarantees schema validation on tool names and inputs + + - `BetaComputerToolset20260801 object { type, allowed_callers, cache_control, configs }` + + The computer toolset: a single `tools[]` entry (carrying no + `name`) that declares the computer tool family. The model is + served the family's tool with any members disabled via `configs` + removed from its schema. Every member is enabled by default, zoom + included. The single-tool options `display_number` and + `enable_zoom` are not fields of a toolset entry โ it carries only + `type`, `configs`, and `cache_control`; zoom is controlled + via `configs.zoom.enabled`. + + - `type: "computer_toolset_20260801"` + + - `"computer_toolset_20260801"` + + - `allowed_callers: optional array of "direct" or "code_execution_20250825" or "code_execution_20260120" or "code_execution_20260521"` + + - `"direct"` + + - `"code_execution_20250825"` + + - `"code_execution_20260120"` + + - `"code_execution_20260521"` + + - `cache_control: optional BetaCacheControlEphemeral or null` + + Create a cache control breakpoint at this content block. + + - `configs: optional BetaComputerToolsetConfigs or null` + + Per-member configuration for `computer_toolset_20260801`: one + optional field per member tool, keyed by the member name โ the same + name the member's `tool_use` blocks carry. Every member is an + accepted key, and a member's defaults apply wherever its key is + absent. Unknown keys are rejected: the field set is this toolset + version's complete member set. + + - `cursor_position: optional BetaComputerCursorPositionConfig or null` + + `cursor_position`'s config overrides. + + - `defer_loading: optional boolean or null` + + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. + + - `enabled: optional boolean or null` + + Whether this member is offered to the model. Default is per member, per the toolset's documentation. A member whose enabled resolves false is withheld from the served schema. + + - `double_click: optional BetaComputerDoubleClickConfig or null` + + `double_click`'s config overrides. + + - `defer_loading: optional boolean or null` + + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. + + - `enabled: optional boolean or null` + + Whether this member is offered to the model. Default is per member, per the toolset's documentation. A member whose enabled resolves false is withheld from the served schema. + + - `hold_key: optional BetaComputerHoldKeyConfig or null` + + `hold_key`'s config overrides. + + - `defer_loading: optional boolean or null` + + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. + + - `enabled: optional boolean or null` + + Whether this member is offered to the model. Default is per member, per the toolset's documentation. A member whose enabled resolves false is withheld from the served schema. + + - `key: optional BetaComputerKeyConfig or null` + + `key`'s config overrides. + + - `defer_loading: optional boolean or null` + + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. + + - `enabled: optional boolean or null` + + Whether this member is offered to the model. Default is per member, per the toolset's documentation. A member whose enabled resolves false is withheld from the served schema. + + - `left_click: optional BetaComputerLeftClickConfig or null` + + `left_click`'s config overrides. + + - `defer_loading: optional boolean or null` + + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. + + - `enabled: optional boolean or null` + + Whether this member is offered to the model. Default is per member, per the toolset's documentation. A member whose enabled resolves false is withheld from the served schema. + + - `left_click_drag: optional BetaComputerLeftClickDragConfig or null` + + `left_click_drag`'s config overrides. + + - `defer_loading: optional boolean or null` + + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. + + - `enabled: optional boolean or null` + + Whether this member is offered to the model. Default is per member, per the toolset's documentation. A member whose enabled resolves false is withheld from the served schema. + + - `left_mouse_down: optional BetaComputerLeftMouseDownConfig or null` + + `left_mouse_down`'s config overrides. + + - `defer_loading: optional boolean or null` + + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. + + - `enabled: optional boolean or null` + + Whether this member is offered to the model. Default is per member, per the toolset's documentation. A member whose enabled resolves false is withheld from the served schema. + + - `left_mouse_up: optional BetaComputerLeftMouseUpConfig or null` + + `left_mouse_up`'s config overrides. + + - `defer_loading: optional boolean or null` + + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. + + - `enabled: optional boolean or null` + + Whether this member is offered to the model. Default is per member, per the toolset's documentation. A member whose enabled resolves false is withheld from the served schema. + + - `middle_click: optional BetaComputerMiddleClickConfig or null` + + `middle_click`'s config overrides. + + - `defer_loading: optional boolean or null` + + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. + + - `enabled: optional boolean or null` + + Whether this member is offered to the model. Default is per member, per the toolset's documentation. A member whose enabled resolves false is withheld from the served schema. + + - `mouse_move: optional BetaComputerMouseMoveConfig or null` + + `mouse_move`'s config overrides. + + - `defer_loading: optional boolean or null` + + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. + + - `enabled: optional boolean or null` + + Whether this member is offered to the model. Default is per member, per the toolset's documentation. A member whose enabled resolves false is withheld from the served schema. + + - `right_click: optional BetaComputerRightClickConfig or null` + + `right_click`'s config overrides. + + - `defer_loading: optional boolean or null` + + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. + + - `enabled: optional boolean or null` + + Whether this member is offered to the model. Default is per member, per the toolset's documentation. A member whose enabled resolves false is withheld from the served schema. + + - `screenshot: optional BetaComputerScreenshotConfig or null` + + `screenshot`'s config overrides. + + - `defer_loading: optional boolean or null` + + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. + + - `enabled: optional boolean or null` + + Whether this member is offered to the model. Default is per member, per the toolset's documentation. A member whose enabled resolves false is withheld from the served schema. + + - `scroll: optional BetaComputerScrollConfig or null` + + `scroll`'s config overrides. + + - `defer_loading: optional boolean or null` + + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. + + - `enabled: optional boolean or null` + + Whether this member is offered to the model. Default is per member, per the toolset's documentation. A member whose enabled resolves false is withheld from the served schema. + + - `triple_click: optional BetaComputerTripleClickConfig or null` + + `triple_click`'s config overrides. + + - `defer_loading: optional boolean or null` + + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. + + - `enabled: optional boolean or null` + + Whether this member is offered to the model. Default is per member, per the toolset's documentation. A member whose enabled resolves false is withheld from the served schema. + + - `type: optional BetaComputerTypeConfig or null` + + `type`'s config overrides. + + - `defer_loading: optional boolean or null` + + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. + + - `enabled: optional boolean or null` + + Whether this member is offered to the model. Default is per member, per the toolset's documentation. A member whose enabled resolves false is withheld from the served schema. + + - `wait: optional BetaComputerWaitConfig or null` + + `wait`'s config overrides. + + - `defer_loading: optional boolean or null` + + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. + + - `enabled: optional boolean or null` + + Whether this member is offered to the model. Default is per member, per the toolset's documentation. A member whose enabled resolves false is withheld from the served schema. + + - `zoom: optional BetaComputerZoomConfig or null` + + `zoom`'s config overrides. + + - `defer_loading: optional boolean or null` + + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. + + - `enabled: optional boolean or null` + + Whether this member is offered to the model. Default is per member, per the toolset's documentation. A member whose enabled resolves false is withheld from the served schema. - `BetaToolTextEditor20250124 object { name, type, allowed_callers, 4 more }`
- `"redacted_thinking"` - - `BetaToolUseBlock object { id, input, name, 2 more }` + - `BetaToolUseBlock object { id, input, name, 3 more }` - `id: string`
- `type: "code_execution_20260120"` - `"code_execution_20260120"` + + - `toolset_name: optional string or null` + + For a toolset member tool_use, the toolset family. - `BetaServerToolUseBlock object { id, input, name, 2 more }`
"role": "user" } ], - "model": "claude-opus-4-6", + "model": "claude-opus-5", "stream": false, "system": [ {
"type": "model_changed" } }, - "model": "claude-opus-4-6", + "model": "claude-opus-5", "role": "assistant", "stop_details": { "category": "cyber", "explanation": "This request was declined because it conflicts with Anthropic's Usage Policy.", "fallback_credit_token": "QW50aHJvcGljL0NsYXVkZQ==", "fallback_has_prefill_claim": true, - "recommended_model": "claude-sonnet-4-6", + "recommended_model": "claude-opus-4-8", "type": "refusal" }, "stop_reason": "end_turn",
api/beta/models Changed · +12 / -8 lines
- `string` - - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 30 more` + - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 31 more` - `"message-batches-2024-09-24"`
- `"user-profiles-2026-03-24"` + - `"user-profiles-2026-08-18"` + - `"advisor-tool-2026-03-01"` - `"managed-agents-2026-04-01"`
{ "data": [ { - "id": "claude-opus-4-6", + "id": "claude-opus-5", "allowed_fallback_models": [ "string" ],
} } }, - "created_at": "2026-02-04T00:00:00Z", - "display_name": "Claude Opus 4.6", + "created_at": "2026-07-24T00:00:00Z", + "display_name": "Claude Opus 5", "max_input_tokens": 0, "max_tokens": 0, "type": "model"
- `string` - - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 30 more` + - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 31 more` - `"message-batches-2024-09-24"`
- `"user-profiles-2026-03-24"` + - `"user-profiles-2026-08-18"` + - `"advisor-tool-2026-03-01"` - `"managed-agents-2026-04-01"`
```json { - "id": "claude-opus-4-6", + "id": "claude-opus-5", "allowed_fallback_models": [ "string" ],
} } }, - "created_at": "2026-02-04T00:00:00Z", - "display_name": "Claude Opus 4.6", + "created_at": "2026-07-24T00:00:00Z", + "display_name": "Claude Opus 5", "max_input_tokens": 0, "max_tokens": 0, "type": "model"
api/beta/models/list Changed · +6 / -4 lines
- `string` - - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 30 more` + - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 31 more` - `"message-batches-2024-09-24"`
- `"user-profiles-2026-03-24"` + - `"user-profiles-2026-08-18"` + - `"advisor-tool-2026-03-01"` - `"managed-agents-2026-04-01"`
{ "data": [ { - "id": "claude-opus-4-6", + "id": "claude-opus-5", "allowed_fallback_models": [ "string" ],
} } }, - "created_at": "2026-02-04T00:00:00Z", - "display_name": "Claude Opus 4.6", + "created_at": "2026-07-24T00:00:00Z", + "display_name": "Claude Opus 5", "max_input_tokens": 0, "max_tokens": 0, "type": "model"
api/beta/models/retrieve Changed · +6 / -4 lines
- `string` - - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 30 more` + - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 31 more` - `"message-batches-2024-09-24"`
- `"user-profiles-2026-03-24"` + - `"user-profiles-2026-08-18"` + - `"advisor-tool-2026-03-01"` - `"managed-agents-2026-04-01"`
```json { - "id": "claude-opus-4-6", + "id": "claude-opus-5", "allowed_fallback_models": [ "string" ],
} } }, - "created_at": "2026-02-04T00:00:00Z", - "display_name": "Claude Opus 4.6", + "created_at": "2026-07-24T00:00:00Z", + "display_name": "Claude Opus 5", "max_input_tokens": 0, "max_tokens": 0, "type": "model"
api/beta/sessions Changed · +72 / -34 lines
This page is larger than the 256 KiB this site keeps, so one side of the diff below stops where the stored text does.
- `string` - - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 30 more` + - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 31 more` - `"message-batches-2024-09-24"`
- `"user-profiles-2026-03-24"` + - `"user-profiles-2026-08-18"` + - `"advisor-tool-2026-03-01"` - `"managed-agents-2026-04-01"`
- `model: optional BetaManagedAgentsModel or BetaManagedAgentsModelConfigParams` - Replacement model. Accepts the model string, e.g. `claude-opus-4-6`, or a `model_config` object. Omit to use the agent's model. + Replacement model. Accepts the model string, e.g. `claude-opus-5`, or a `model_config` object. Omit to use the agent's model. - `BetaManagedAgentsModel = "claude-sonnet-5" or "claude-fable-5" or "claude-opus-5" or 10 more or string`
} ], "model": { - "id": "claude-sonnet-4-6", + "id": "claude-opus-5", "effort": { "type": "low" },
} ], "model": { - "id": "claude-sonnet-4-6", + "id": "claude-opus-5", "effort": { "type": "low" },
- `string` - - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 30 more` + - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 31 more` - `"message-batches-2024-09-24"`
- `"user-profiles-2026-03-24"` + - `"user-profiles-2026-08-18"` + - `"advisor-tool-2026-03-01"` - `"managed-agents-2026-04-01"`
} ], "model": { - "id": "claude-sonnet-4-6", + "id": "claude-opus-5", "effort": { "type": "low" },
} ], "model": { - "id": "claude-sonnet-4-6", + "id": "claude-opus-5", "effort": { "type": "low" },
- `string` - - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 30 more` + - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 31 more` - `"message-batches-2024-09-24"`
- `"user-profiles-2026-03-24"` + - `"user-profiles-2026-08-18"` + - `"advisor-tool-2026-03-01"` - `"managed-agents-2026-04-01"`
} ], "model": { - "id": "claude-sonnet-4-6", + "id": "claude-opus-5", "effort": { "type": "low" },
} ], "model": { - "id": "claude-sonnet-4-6", + "id": "claude-opus-5", "effort": { "type": "low" },
- `string` - - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 30 more` + - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 31 more` - `"message-batches-2024-09-24"`
- `"user-profiles-2026-03-24"` + - `"user-profiles-2026-08-18"` + - `"advisor-tool-2026-03-01"` - `"managed-agents-2026-04-01"`
} ], "model": { - "id": "claude-sonnet-4-6", + "id": "claude-opus-5", "effort": { "type": "low" },
} ], "model": { - "id": "claude-sonnet-4-6", + "id": "claude-opus-5", "effort": { "type": "low" },
- `string` - - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 30 more` + - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 31 more` - `"message-batches-2024-09-24"`
- `"user-profiles-2026-03-24"` + - `"user-profiles-2026-08-18"` + - `"advisor-tool-2026-03-01"` - `"managed-agents-2026-04-01"`
- `string` - - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 30 more` + - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 31 more` - `"message-batches-2024-09-24"`
- `"user-profiles-2026-03-24"` + - `"user-profiles-2026-08-18"` + - `"advisor-tool-2026-03-01"` - `"managed-agents-2026-04-01"`
} ], "model": { - "id": "claude-sonnet-4-6", + "id": "claude-opus-5", "effort": { "type": "low" },
} ], "model": { - "id": "claude-sonnet-4-6", + "id": "claude-opus-5", "effort": { "type": "low" },
- `model: optional BetaManagedAgentsModel or BetaManagedAgentsModelConfigParams` - Replacement model. Accepts the model string, e.g. `claude-opus-4-6`, or a `model_config` object. Omit to use the agent's model. + Replacement model. Accepts the model string, e.g. `claude-opus-5`, or a `model_config` object. Omit to use the agent's model. - `BetaManagedAgentsModel = "claude-sonnet-5" or "claude-fable-5" or "claude-opus-5" or 10 more or string`
- `string` - - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 30 more` + - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 31 more` - `"message-batches-2024-09-24"`
- `"user-profiles-2026-03-24"` + - `"user-profiles-2026-08-18"` + - `"advisor-tool-2026-03-01"` - `"managed-agents-2026-04-01"`
- `type: "user.interrupt"` - - `"user.interrupt"` - - - `processed_at: optional string or null` - - A timestamp in RFC 3339 format - - - `session_thread_id: optional string or null` - - If absent, interrupts every non-archived thread + - `"u
api/beta/sessions/archive Changed · +5 / -3 lines
- `string` - - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 30 more` + - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 31 more` - `"message-batches-2024-09-24"`
- `"user-profiles-2026-03-24"` + - `"user-profiles-2026-08-18"` + - `"advisor-tool-2026-03-01"` - `"managed-agents-2026-04-01"`
} ], "model": { - "id": "claude-sonnet-4-6", + "id": "claude-opus-5", "effort": { "type": "low" },
} ], "model": { - "id": "claude-sonnet-4-6", + "id": "claude-opus-5", "effort": { "type": "low" },
api/beta/sessions/create Changed · +6 / -4 lines
- `string` - - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 30 more` + - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 31 more` - `"message-batches-2024-09-24"`
- `"user-profiles-2026-03-24"` + - `"user-profiles-2026-08-18"` + - `"advisor-tool-2026-03-01"` - `"managed-agents-2026-04-01"`
- `model: optional BetaManagedAgentsModel or BetaManagedAgentsModelConfigParams` - Replacement model. Accepts the model string, e.g. `claude-opus-4-6`, or a `model_config` object. Omit to use the agent's model. + Replacement model. Accepts the model string, e.g. `claude-opus-5`, or a `model_config` object. Omit to use the agent's model. - `BetaManagedAgentsModel = "claude-sonnet-5" or "claude-fable-5" or "claude-opus-5" or 10 more or string`
} ], "model": { - "id": "claude-sonnet-4-6", + "id": "claude-opus-5", "effort": { "type": "low" },
} ], "model": { - "id": "claude-sonnet-4-6", + "id": "claude-opus-5", "effort": { "type": "low" },
api/beta/sessions/events Changed · +9 / -3 lines
This page is larger than the 256 KiB this site keeps, so one side of the diff below stops where the stored text does.
- `string` - - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 30 more` + - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 31 more` - `"message-batches-2024-09-24"`
- `"user-profiles-2026-03-24"` + - `"user-profiles-2026-08-18"` + - `"advisor-tool-2026-03-01"` - `"managed-agents-2026-04-01"`
- `string` - - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 30 more` + - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 31 more` - `"message-batches-2024-09-24"`
- `"user-profiles-2026-03-24"` + - `"user-profiles-2026-08-18"` + - `"advisor-tool-2026-03-01"` - `"managed-agents-2026-04-01"`
- `string` - - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 30 more` + - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 31 more` - `"message-batches-2024-09-24"`
- `"user-profiles-2026-03-24"` + - `"user-profiles-2026-08-18"` + - `"advisor-tool-2026-03-01"` - `"managed-agents-2026-04-01"`
- `type: "credential_host_unreachable_error"` - - `"credential_host_unreachable_error"` - - - `vault_id: string` - - ID of the vault containing the affected credential. - - - `pr + - `"credential_host_unreachable_err
api/beta/sessions/list Changed · +5 / -3 lines
- `string` - - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 30 more` + - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 31 more` - `"message-batches-2024-09-24"`
- `"user-profiles-2026-03-24"` + - `"user-profiles-2026-08-18"` + - `"advisor-tool-2026-03-01"` - `"managed-agents-2026-04-01"`
} ], "model": { - "id": "claude-sonnet-4-6", + "id": "claude-opus-5", "effort": { "type": "low" },
} ], "model": { - "id": "claude-sonnet-4-6", + "id": "claude-opus-5", "effort": { "type": "low" },
api/beta/sessions/resources Changed · +15 / -5 lines
- `string` - - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 30 more` + - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 31 more` - `"message-batches-2024-09-24"`
- `"user-profiles-2026-03-24"` + - `"user-profiles-2026-08-18"` + - `"advisor-tool-2026-03-01"` - `"managed-agents-2026-04-01"`
- `string` - - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 30 more` + - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 31 more` - `"message-batches-2024-09-24"`
- `"user-profiles-2026-03-24"` + - `"user-profiles-2026-08-18"` + - `"advisor-tool-2026-03-01"` - `"managed-agents-2026-04-01"`
- `string` - - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 30 more` + - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 31 more` - `"message-batches-2024-09-24"`
- `"user-profiles-2026-03-24"` + - `"user-profiles-2026-08-18"` + - `"advisor-tool-2026-03-01"` - `"managed-agents-2026-04-01"`
- `string` - - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 30 more` + - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 31 more` - `"message-batches-2024-09-24"`
- `"user-profiles-2026-03-24"` + - `"user-profiles-2026-08-18"` + - `"advisor-tool-2026-03-01"` - `"managed-agents-2026-04-01"`
- `string` - - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 30 more` + - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 31 more` - `"message-batches-2024-09-24"`
- `"output-300k-2026-03-24"` - `"user-profiles-2026-03-24"` + + - `"user-profiles-2026-08-18"` - `"advisor-tool-2026-03-01"`
api/beta/sessions/retrieve Changed · +5 / -3 lines
- `string` - - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 30 more` + - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 31 more` - `"message-batches-2024-09-24"`
- `"user-profiles-2026-03-24"` + - `"user-profiles-2026-08-18"` + - `"advisor-tool-2026-03-01"` - `"managed-agents-2026-04-01"`
} ], "model": { - "id": "claude-sonnet-4-6", + "id": "claude-opus-5", "effort": { "type": "low" },
} ], "model": { - "id": "claude-sonnet-4-6", + "id": "claude-opus-5", "effort": { "type": "low" },
api/beta/sessions/threads Changed · +18 / -8 lines
- `string` - - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 30 more` + - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 31 more` - `"message-batches-2024-09-24"`
- `"user-profiles-2026-03-24"` + - `"user-profiles-2026-08-18"` + - `"advisor-tool-2026-03-01"` - `"managed-agents-2026-04-01"`
} ], "model": { - "id": "claude-sonnet-4-6", + "id": "claude-opus-5", "effort": { "type": "low" },
- `string` - - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 30 more` + - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 31 more` - `"message-batches-2024-09-24"`
- `"user-profiles-2026-03-24"` + - `"user-profiles-2026-08-18"` + - `"advisor-tool-2026-03-01"` - `"managed-agents-2026-04-01"`
} ], "model": { - "id": "claude-sonnet-4-6", + "id": "claude-opus-5", "effort": { "type": "low" },
- `string` - - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 30 more` + - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 31 more` - `"message-batches-2024-09-24"`
- `"user-profiles-2026-03-24"` + - `"user-profiles-2026-08-18"` + - `"advisor-tool-2026-03-01"` - `"managed-agents-2026-04-01"`
} ], "model": { - "id": "claude-sonnet-4-6", + "id": "claude-opus-5", "effort": { "type": "low" },
- `string` - - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 30 more` + - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 31 more` - `"message-batches-2024-09-24"`
- `"user-profiles-2026-03-24"` + - `"user-profiles-2026-08-18"` + - `"advisor-tool-2026-03-01"` - `"managed-agents-2026-04-01"`
- `string` - - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 30 more` + - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 31 more` - `"message-batches-2024-09-24"`
- `"output-300k-2026-03-24"` - `"user-profiles-2026-03-24"` + + - `"user-profiles-2026-08-18"` - `"advisor-tool-2026-03-01"`
api/beta/sessions/threads/archive Changed · +4 / -2 lines
- `string` - - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 30 more` + - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 31 more` - `"message-batches-2024-09-24"`
- `"user-profiles-2026-03-24"` + - `"user-profiles-2026-08-18"` + - `"advisor-tool-2026-03-01"` - `"managed-agents-2026-04-01"`
} ], "model": { - "id": "claude-sonnet-4-6", + "id": "claude-opus-5", "effort": { "type": "low" },
api/beta/sessions/threads/events Changed · +6 / -2 lines
- `string` - - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 30 more` + - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 31 more` - `"message-batches-2024-09-24"`
- `"user-profiles-2026-03-24"` + - `"user-profiles-2026-08-18"` + - `"advisor-tool-2026-03-01"` - `"managed-agents-2026-04-01"`
- `string` - - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 30 more` + - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 31 more` - `"message-batches-2024-09-24"`
- `"output-300k-2026-03-24"` - `"user-profiles-2026-03-24"` + + - `"user-profiles-2026-08-18"` - `"advisor-tool-2026-03-01"`
api/beta/sessions/threads/list Changed · +4 / -2 lines
- `string` - - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 30 more` + - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 31 more` - `"message-batches-2024-09-24"`
- `"user-profiles-2026-03-24"` + - `"user-profiles-2026-08-18"` + - `"advisor-tool-2026-03-01"` - `"managed-agents-2026-04-01"`
} ], "model": { - "id": "claude-sonnet-4-6", + "id": "claude-opus-5", "effort": { "type": "low" },
api/beta/sessions/threads/retrieve Changed · +4 / -2 lines
- `string` - - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 30 more` + - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 31 more` - `"message-batches-2024-09-24"`
- `"user-profiles-2026-03-24"` + - `"user-profiles-2026-08-18"` + - `"advisor-tool-2026-03-01"` - `"managed-agents-2026-04-01"`
} ], "model": { - "id": "claude-sonnet-4-6", + "id": "claude-opus-5", "effort": { "type": "low" },
api/beta/sessions/update Changed · +5 / -3 lines
- `string` - - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 30 more` + - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 31 more` - `"message-batches-2024-09-24"`
- `"user-profiles-2026-03-24"` + - `"user-profiles-2026-08-18"` + - `"advisor-tool-2026-03-01"` - `"managed-agents-2026-04-01"`
} ], "model": { - "id": "claude-sonnet-4-6", + "id": "claude-opus-5", "effort": { "type": "low" },
} ], "model": { - "id": "claude-sonnet-4-6", + "id": "claude-opus-5", "effort": { "type": "low" },
api/beta/skills Changed · +27 / -9 lines
- `string` - - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 30 more` + - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 31 more` - `"message-batches-2024-09-24"`
- `"user-profiles-2026-03-24"` + - `"user-profiles-2026-08-18"` + - `"advisor-tool-2026-03-01"` - `"managed-agents-2026-04-01"`
- `string` - - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 30 more` + - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 31 more` - `"message-batches-2024-09-24"`
- `"user-profiles-2026-03-24"` + - `"user-profiles-2026-08-18"` + - `"advisor-tool-2026-03-01"` - `"managed-agents-2026-04-01"`
- `string` - - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 30 more` + - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 31 more` - `"message-batches-2024-09-24"`
- `"user-profiles-2026-03-24"` + - `"user-profiles-2026-08-18"` + - `"advisor-tool-2026-03-01"` - `"managed-agents-2026-04-01"`
- `string` - - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 30 more` + - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 31 more` - `"message-batches-2024-09-24"`
- `"user-profiles-2026-03-24"` + - `"user-profiles-2026-08-18"` + - `"advisor-tool-2026-03-01"` - `"managed-agents-2026-04-01"`
- `string` - - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 30 more` + - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 31 more` - `"message-batches-2024-09-24"`
- `"user-profiles-2026-03-24"` + - `"user-profiles-2026-08-18"` + - `"advisor-tool-2026-03-01"` - `"managed-agents-2026-04-01"`
- `string` - - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 30 more` + - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 31 more` - `"message-batches-2024-09-24"`
- `"user-profiles-2026-03-24"` + - `"user-profiles-2026-08-18"` + - `"advisor-tool-2026-03-01"` - `"managed-agents-2026-04-01"`
- `string` - - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 30 more` + - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 31 more` - `"message-batches-2024-09-24"`
- `"user-profiles-2026-03-24"` + - `"user-profiles-2026-08-18"` + - `"advisor-tool-2026-03-01"` - `"managed-agents-2026-04-01"`
- `string` - - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 30 more` + - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 31 more` - `"message-batches-2024-09-24"`
- `"user-profiles-2026-03-24"` + - `"user-profiles-2026-08-18"` + - `"advisor-tool-2026-03-01"` - `"managed-agents-2026-04-01"`
- `string` - - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 30 more` + - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 31 more` - `"message-batches-2024-09-24"`
- `"output-300k-2026-03-24"` - `"user-profiles-2026-03-24"` + + - `"user-profiles-2026-08-18"` - `"advisor-tool-2026-03-01"`
api/beta/skills/versions Changed · +15 / -5 lines
- `string` - - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 30 more` + - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 31 more` - `"message-batches-2024-09-24"`
- `"user-profiles-2026-03-24"` + - `"user-profiles-2026-08-18"` + - `"advisor-tool-2026-03-01"` - `"managed-agents-2026-04-01"`
- `string` - - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 30 more` + - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 31 more` - `"message-batches-2024-09-24"`
- `"user-profiles-2026-03-24"` + - `"user-profiles-2026-08-18"` + - `"advisor-tool-2026-03-01"` - `"managed-agents-2026-04-01"`
- `string` - - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 30 more` + - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 31 more` - `"message-batches-2024-09-24"`
- `"user-profiles-2026-03-24"` + - `"user-profiles-2026-08-18"` + - `"advisor-tool-2026-03-01"` - `"managed-agents-2026-04-01"`
- `string` - - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 30 more` + - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 31 more` - `"message-batches-2024-09-24"`
- `"user-profiles-2026-03-24"` + - `"user-profiles-2026-08-18"` + - `"advisor-tool-2026-03-01"` - `"managed-agents-2026-04-01"`
- `string` - - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 30 more` + - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 31 more` - `"message-batches-2024-09-24"`
- `"output-300k-2026-03-24"` - `"user-profiles-2026-03-24"` + + - `"user-profiles-2026-08-18"` - `"advisor-tool-2026-03-01"`
api/beta/tunnels Changed · +30 / -10 lines
- `string` - - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 30 more` + - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 31 more` - `"message-batches-2024-09-24"`
- `"user-profiles-2026-03-24"` + - `"user-profiles-2026-08-18"` + - `"advisor-tool-2026-03-01"` - `"managed-agents-2026-04-01"`
- `string` - - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 30 more` + - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 31 more` - `"message-batches-2024-09-24"`
- `"user-profiles-2026-03-24"` + - `"user-profiles-2026-08-18"` + - `"advisor-tool-2026-03-01"` - `"managed-agents-2026-04-01"`
- `string` - - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 30 more` + - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 31 more` - `"message-batches-2024-09-24"`
- `"user-profiles-2026-03-24"` + - `"user-profiles-2026-08-18"` + - `"advisor-tool-2026-03-01"` - `"managed-agents-2026-04-01"`
- `string` - - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 30 more` + - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 31 more` - `"message-batches-2024-09-24"`
- `"user-profiles-2026-03-24"` + - `"user-profiles-2026-08-18"` + - `"advisor-tool-2026-03-01"` - `"managed-agents-2026-04-01"`
- `string` - - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 30 more` + - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 31 more` - `"message-batches-2024-09-24"`
- `"user-profiles-2026-03-24"` + - `"user-profiles-2026-08-18"` + - `"advisor-tool-2026-03-01"` - `"managed-agents-2026-04-01"`
- `string` - - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 30 more` + - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 31 more` - `"message-batches-2024-09-24"`
- `"user-profiles-2026-03-24"` + - `"user-profiles-2026-08-18"` + - `"advisor-tool-2026-03-01"` - `"managed-agents-2026-04-01"`
- `string` - - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 30 more` + - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 31 more` - `"message-batches-2024-09-24"`
- `"user-profiles-2026-03-24"` + - `"user-profiles-2026-08-18"` + - `"advisor-tool-2026-03-01"` - `"managed-agents-2026-04-01"`
- `string` - - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 30 more` + - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 31 more` - `"message-batches-2024-09-24"`
- `"user-profiles-2026-03-24"` + - `"user-profiles-2026-08-18"` + - `"advisor-tool-2026-03-01"` - `"managed-agents-2026-04-01"`
- `string` - - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 30 more` + - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 31 more` - `"message-batches-2024-09-24"`
- `"user-profiles-2026-03-24"` + - `"user-profiles-2026-08-18"` + - `"advisor-tool-2026-03-01"` - `"managed-agents-2026-04-01"`
- `string` - - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 30 more` + - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 31 more` - `"message-batches-2024-09-24"`
- `"output-300k-2026-03-24"` - `"user-profiles-2026-03-24"` + + - `"user-profiles-2026-08-18"` - `"advisor-tool-2026-03-01"`
api/beta/tunnels/certificates Changed · +12 / -4 lines
- `string` - - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 30 more` + - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 31 more` - `"message-batches-2024-09-24"`
- `"user-profiles-2026-03-24"` + - `"user-profiles-2026-08-18"` + - `"advisor-tool-2026-03-01"` - `"managed-agents-2026-04-01"`
- `string` - - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 30 more` + - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 31 more` - `"message-batches-2024-09-24"`
- `"user-profiles-2026-03-24"` + - `"user-profiles-2026-08-18"` + - `"advisor-tool-2026-03-01"` - `"managed-agents-2026-04-01"`
- `string` - - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 30 more` + - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 31 more` - `"message-batches-2024-09-24"`
- `"user-profiles-2026-03-24"` + - `"user-profiles-2026-08-18"` + - `"advisor-tool-2026-03-01"` - `"managed-agents-2026-04-01"`
- `string` - - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 30 more` + - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 31 more` - `"message-batches-2024-09-24"`
- `"output-300k-2026-03-24"` - `"user-profiles-2026-03-24"` + + - `"user-profiles-2026-08-18"` - `"advisor-tool-2026-03-01"`
api/beta/user_profiles Changed · +258 / -188 lines
- `string` - - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 30 more` + - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 31 more` - `"message-batches-2024-09-24"`
- `"user-profiles-2026-03-24"` + - `"user-profiles-2026-08-18"` + - `"advisor-tool-2026-03-01"` - `"managed-agents-2026-04-01"`
### Body Parameters +- `access_type: optional "application" or "passthrough"` + + How the platform uses the API on behalf of the entity this profile represents. `application`: the platform sells a product that uses the API behind the scenes, and the profile represents an individual end-user of that product. `passthrough`: the platform resells raw inference, and the profile identifies the resold-to company. + + - `"application"` + + - `"passthrough"` + - `external_id: optional string or null` Platform's own identifier for this user. Not enforced unique. Maximum 255 characters.
- `name: optional string or null` - Display name of the entity this profile represents. Required when relationship is `resold` (the resold-to company's name); optional otherwise. Maximum 255 characters. + Optional for all profiles. Real-world name of the entity this profile represents (company or individual); for a resold-to company (`relationship` `resold` / `access_type` `passthrough`), that company's name where known. Maximum 255 characters. - `relationship: optional "external" or "resold" or "internal"`
### Returns -- `BetaUserProfile object { id, created_at, metadata, 6 more }` +- `BetaUserProfile object { id, created_at, metadata, 7 more }` - `id: string`
Arbitrary key-value metadata. Maximum 16 pairs, keys up to 64 chars, values up to 512 chars. - - `relationship: "external" or "resold" or "internal"` - - How the entity behind a user profile relates to the platform that owns the API key. `external`: an individual end-user of the platform. `resold`: a company the platform resells Claude access to. `internal`: the platform's own usage. - - - `"external"` - - - `"resold"` - - - `"internal"` - - `trust_grants: map[BetaUserProfileTrustGrant]` Trust grants for this profile, keyed by grant name. Key omitted when no grant is active or in flight.
A timestamp in RFC 3339 format + - `access_type: optional "application" or "passthrough"` + + How the platform uses the API on behalf of the entity this profile represents. `application`: the platform sells a product that uses the API behind the scenes, and the profile represents an individual end-user of that product. `passthrough`: the platform resells raw inference, and the profile identifies the resold-to company. + + - `"application"` + + - `"passthrough"` + - `external_id: optional string or null` Platform's own identifier for this user. Not enforced unique.
- `name: optional string or null` - Display name of the entity this profile represents. For `resold` this is the resold-to company's name. + Real-world name of the entity this profile represents (company or individual). For a resold-to company (`access_type` `passthrough`, or `relationship` `resold` under the `user-profiles-2026-03-24` header) this is that company's name. + - `relationship: optional "external" or "resold" or "internal"` + + How the entity behind a user profile relates to the platform that owns the API key. `external`: an individual end-user of the platform. `resold`: a company the platform resells Claude access to. `internal`: the platform's own usage. + + - `"external"` + + - `"resold"` + + - `"internal"` + ### Example ```http
curl https://api.anthropic.com/v1/user_profiles \ -H 'Content-Type: application/json' \ -H 'anthropic-version: 2023-06-01' \ - -H 'anthropic-beta: user-profiles-2026-03-24' \ + -H 'anthropic-beta: user-profiles-2026-08-18' \ -H "X-Api-Key: $ANTHROPIC_API_KEY" \ -d '{ "external_id": "user_12345",
"id": "uprof_011CZkZCu8hGbp5mYRQgUmz9", "created_at": "2026-03-15T10:00:00Z", "metadata": {}, - "relationship": "external", "trust_grants": { "cyber": { "status": "active"
}, "type": "user_profile", "updated_at": "2026-03-15T10:00:00Z", + "access_type": "application", "external_id": "user_12345", - "name": "Example User" + "name": "Example User", + "relationship": "external" } ```
- `string` - - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 30 more` + - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 31 more` - `"message-batches-2024-09-24"`
- `"user-profiles-2026-03-24"` + - `"user-profiles-2026-08-18"` + - `"advisor-tool-2026-03-01"` - `"managed-agents-2026-04-01"`
Arbitrary key-value metadata. Maximum 16 pairs, keys up to 64 chars, values up to 512 chars. - - `relationship: "external" or "resold" or "internal"` - - How the entity behind a user profile relates to the platform that owns the API key. `external`: an individual end-user of the platform. `resold`: a company the platform resells Claude access to. `internal`: the platform's own usage. - - - `"external"` - - - `"resold"` - - - `"internal"` - - `trust_grants: map[BetaUserProfileTrustGrant]` Trust grants for this profile, keyed by grant name. Key omitted when no grant is active or in flight.
A timestamp in RFC 3339 format + - `access_type: optional "application" or "passthrough"` + + How the platform uses the API on behalf of the entity this profile represents. `application`: the platform sells a product that uses the API behind the scenes, and the profile represents an individual end-user of that product. `passthrough`: the platform resells raw inference, and the profile identifies the resold-to company. + + - `"application"` + + - `"passthrough"` + - `external_id: optional string or null` Platform's own identifier for this user. Not enforced unique.
- `name: optional string or null` - Display name of the entity this profile represents. For `resold` this is the resold-to company's name. + Real-world name of the entity this profile represents (company or individual). For a resold-to company (`access_type` `passthrough`, or `relationship` `resold` under the `user-profiles-2026-03-24` header) this is that company's name. + - `relationship: optional "external" or "resold" or "internal"` + + How the entity behind a user profile relates to the platform that owns the API key. `external`: an individual end-user of the platform. `resold`: a company the platform resells Claude access to. `internal`: the platform's own usage. + + - `"external"` + + - `"resold"` + + - `"internal"` + - `next_page: string or null` Cursor for the next page, or `null` when there are no more results.
```http curl https://api.anthropic.com/v1/user_profiles \ -H 'anthropic-version: 2023-06-01' \ - -H 'anthropic-beta: user-profiles-2026-03-24' \ + -H 'anthropic-beta: user-profiles-2026-08-18' \ -H "X-Api-Key: $ANTHROPIC_API_KEY" ```
"id": "uprof_011CZkZCu8hGbp5mYRQgUmz9", "created_at": "2026-03-15T10:00:00Z", "metadata": {}, - "relationship": "external", "trust_grants": { "cyber": { "status": "active"
}, "type": "user_profile", "updated_at": "2026-03-15T10:00:00Z", + "access_type": "application", "external_id": "user_12345", - "name": "Example User" + "name": "Example User", + "relationship": "external" } ], "next_page": "page_MjAyNS0wNS0xNFQwMDowMDowMFo="
- `string` - - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 30 more` + - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 31 more` - `"message-batches-2024-09-24"`
- `"user-profiles-2026-03-24"` + - `"user-profiles-2026-08-18"` + - `"advisor-tool-2026-03-01"` - `"managed-agents-2026-04-01"`
### Returns -- `BetaUserProfile object { id, created_at, metadata, 6 more }` +- `BetaUserProfile object { id, created_at, metadata, 7 more }` - `id: string`
Arbitrary key-value metadata. Maximum 16 pairs, keys up to 64 chars, values up to 512 chars. - - `relationship: "external" or "resold" or "internal"` - - How the entity behind a user profile relates to the platform that owns the API key. `external`: an individual end-user of the platform. `resold`: a company the platform resells Claude access to. `internal`: the platform's own usage. - - - `"external"` - - - `"resold"` - - - `"internal"` - - `trust_grants: map[BetaUserProfileTrustGrant]` Trust grants for this profile, keyed by grant name. Key omitted when no grant is active or in flight.
A timestamp in RFC 3339 format + - `access_type: optional "application" or "passthrough"` + + How the platform uses the API on behalf of the entity this profile represents. `application`: the platform sells a product that uses the API behind the scenes, and the profile represents an individual end-user of that product. `passthrough`: the platform resells raw inference, and the profile identifies the resold-to company. + + - `"application"` + + - `"passthrough"` + - `external_id: optional string or null` Platform's own identifier for this user. Not enforced unique.
- `name: optional string or null` - Display name of the entity this profile represents. For `resold` this is the resold-to company's name. + Real-world name of the entity this profile represents (company or individual). For a resold-to company (`access_type` `passthrough`, or `relationship` `resold` under the `user-profiles-2026-03-24` header) this is that company's name. + - `relationship: optional "external" or "resold" or "internal"` + + How the entity behind a user profile relates to the platform that owns the API key. `external`: an individual end-user of the platform. `resold`: a company the platform resells Claude access to. `internal`: the platform's own usage. + + - `"external"` + + - `"resold"` + + - `"internal"` + ### Example ```http curl https://api.anthropic.com/v1/user_profiles/$USER_PROFILE_ID \ -H 'anthropic-version: 2023-06-01' \ - -H 'anthropic-beta: user-profiles-2026-03-24' \ + -H 'anthropic-beta: user-profiles-2026-08-18' \ -H "X-Api-Key: $ANTHROPIC_API_KEY" ```
"id": "uprof_011CZkZCu8hGbp5mYRQgUmz9", "created_at": "2026-03-15T10:00:00Z", "metadata": {}, - "relationship": "external", "trust_grants": { "cyber": { "status": "active"
}, "type": "user_profile", "updated_at": "2026-03-15T10:00:00Z", + "access_type": "application", "external_id": "user_12345", - "name": "Example User" + "name": "Example User", + "relationship": "external" } ```
- `string` - - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 30 more` + - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 31 more` - `"message-batches-2024-09-24"`
- `"user-profiles-2026-03-24"` + - `"user-profiles-2026-08-18"` + - `"advisor-tool-2026-03-01"` - `"managed-agents-2026-04-01"`
### Body Parameters +- `access_type: optional "application" or "passthrough" or null` + + How the platform uses the API on behalf of the entity this profile represents. `application`: the platform sells a product that uses the API behind the scenes, and the profile represents an individual end-user of that product. `passthrough`: the platform resells raw inference, and the profile identifies the resold-to company. + + - `"application"` + + - `"passthrough"` + - `external_id: optional string or null` If present, replaces the stored external_id. Omit to leave unchanged. Maximum 255 characters.
### Returns -- `BetaUserProfile object { id, created_at, metadata, 6 more }` +- `BetaUserProfile object { id, created_at, metadata, 7 more }` - `id: string`
Arbitrary key-value metadata. Maximum 16 pairs, keys up to 64 chars, values up to 512 chars. - - `relationship: "external" or "resold" or "internal"` - - How the entity behind a user profile relates to the platform that owns the API key. `external`: an individual end-user of the platform. `resold`: a company the platform resells Claude access to. `internal`: the platform's own usage. - - - `"external"` - - - `"resold"` - - - `"internal"` - - `trust_grants: map[BetaUserProfileTrustGrant]` Trust grants for this profile, keyed by grant name. Key omitted when no grant is active or in flight.
A timestamp in RFC 3339 format + - `access_type: optional "application" or "passthrough"` + + How the platform uses the API on behalf of the entity this profile represents. `application`: the platform sells a product that uses the API behind the scenes, and the profile represents an individual end-user of that product. `passthrough`: the platform resells raw inference, and the profile identifies the resold-to company. + + - `"application"` + + - `"passthrough"` + - `external_id: optional string or null` Platform's own identifier for this user. Not enforced unique.
- `name: optional string or null` - Display name of the entity this profile represents. For `resold` this is the resold-to company's name. + Real-world name of the entity this profile represents (company or individual). For a resold-to company (`access_type` `passthrough`, or `relationship` `resold` under the `user-profiles-2026-03-24` header) this is that company's name. + - `relationship: optional "external" or "resold" or "internal"` + + How the entity behind a user profile relates to the platform that owns the API key. `external`: an individual end-user of the platform. `resold`: a company the platform resells Claude access to. `internal`: the platform's own usage. + + - `"external"` + + - `"resold"` + + - `"internal"` + ### Example ```http
curl https://api.anthropic.com/v1/user_profiles/$USER_PROFILE_ID \ -H 'Content-Type: application/json' \ -H 'anthropic-version: 2023-06-01' \ - -H 'anthropic-beta: user-profiles-2026-03-24' \ + -H 'anthropic-beta: user-profiles-2026-08-18' \ -H "X-Api-Key: $ANTHROPIC_API_KEY" \ -d '{ "external_id": "user_12345"
"id": "uprof_011CZkZCu8hGbp5mYRQgUmz9", "created_at": "2026-03-15T10:00:00Z", "metadata": {}, - "relationship": "external", "trust_grants": { "cyber": { "status": "active"
}, "type": "user_profile", "updated_at": "2026-03-15T10:00:00Z", + "access_type": "application", "external_id": "user_12345", - "name": "Example User" + "name": "Example User", + "relationship": "external" } ```
- `string` - - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 30 more` + - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 31 more` - `"message-batches-2024-09-24"`
- `"user-profiles-2026-03-24"` + - `"user-profiles-2026-08-18"` + - `"advisor-tool-2026-03-01"` - `"managed-agents-2026-04-01"`
curl https://api.anthropic.com/v1/user_profiles/$USER_PROFILE_ID/enrollment_url \ -X POST \ -H 'anthropic-version: 2023-06-01' \ - -H 'anthropic-beta: user-profiles-2026-03-24' \ + -H 'anthropic-beta: user-profiles-2026-08-18' \ -H "X-Api-Key: $ANTHROPIC_API_KEY" ```
### Beta User Profile -- `BetaUserProfile object { id, created_at, metadata, 6 more }` +- `BetaUserProfile object { id, created_at, metadata, 7 more }` - `id: string`
Arbitrary key-value metadata. Maximum 16 pairs, keys up to 64 chars, values up to 512 chars. - - `relationship: "external" or "resold" or "internal"` - - How the entity behind a user profile relates to the platform that owns the API key. `external`: an individual end-user of the platform. `resold`: a company the platform resells Claude access to. `internal`: the platform's own usage. - - - `"external"` - - - `"resold"` - - - `"internal"` - - `trust_grants: map[BetaUserProfileTrustGrant]` Trust grants for this profile, keyed by grant name. Key omitted when no grant is active or in flight.
A timestamp in RFC 3339 format + - `access_type: optional "application" or "passthrough"` + + How the platform uses the API on behalf of the entity this profile represents. `application`: the platform sells a product that uses the API behind the scenes, and the profile represents an individual end-user of that product. `passthrough`: the platform resells raw inference, and the profile identifies the resold-to company. + + - `"application"` + + - `"passthrough"` + - `external_id: optional string or null` Platform's own identifier for this user. Not enforced unique.
- `name: optional string or null` - Display name of the entity this profile represents. For `resold` this is the resold-to company's name. + Real-world name of the entity this profile represents (company or individual). For a resold-to company (`access_type` `passthrough`, or `relationship` `resold` under the `user-profiles-2026-03-24` header) this is that company's name. + + - `relationship: optional "external" or "resold" or "internal"` + + How the entity behind a user profile relates to the platform that owns the API key. `external`: an individual end-user of the platform. `resold`: a company the platform resells Claude access to. `internal`: the platform's own usage. + + - `"external"` + + - `"resold"` + + - `"internal"` ### Beta User Profile Enrollment URL
api/beta/user_profiles/create Changed · +58 / -39 lines
- `string` - - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 30 more` + - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 31 more` - `"message-batches-2024-09-24"`
- `"user-profiles-2026-03-24"` + - `"user-profiles-2026-08-18"` + - `"advisor-tool-2026-03-01"` - `"managed-agents-2026-04-01"`
### Body Parameters +- `access_type: optional "application" or "passthrough"` + + How the platform uses the API on behalf of the entity this profile represents. `application`: the platform sells a product that uses the API behind the scenes, and the profile represents an individual end-user of that product. `passthrough`: the platform resells raw inference, and the profile identifies the resold-to company. + + - `"application"` + + - `"passthrough"` + - `external_id: optional string or null` Platform's own identifier for this user. Not enforced unique. Maximum 255 characters.
- `name: optional string or null` - Display name of the entity this profile represents. Required when relationship is `resold` (the resold-to company's name); optional otherwise. Maximum 255 characters. + Optional for all profiles. Real-world name of the entity this profile represents (company or individual); for a resold-to company (`relationship` `resold` / `access_type` `passthrough`), that company's name where known. Maximum 255 characters. - `relationship: optional "external" or "resold" or "internal"`
### Returns -- `BetaUserProfile object { id, created_at, metadata, 6 more }` +- `BetaUserProfile object { id, created_at, metadata, 7 more }` - `id: string`
Arbitrary key-value metadata. Maximum 16 pairs, keys up to 64 chars, values up to 512 chars. - - `relationship: "external" or "resold" or "internal"` - - How the entity behind a user profile relates to the platform that owns the API key. `external`: an individual end-user of the platform. `resold`: a company the platform resells Claude access to. `internal`: the platform's own usage. - - - `"external"` - - - `"resold"` - - - `"internal"` - - `trust_grants: map[BetaUserProfileTrustGrant]` Trust grants for this profile, keyed by grant name. Key omitted when no grant is active or in flight.
A timestamp in RFC 3339 format + - `access_type: optional "application" or "passthrough"` + + How the platform uses the API on behalf of the entity this profile represents. `application`: the platform sells a product that uses the API behind the scenes, and the profile represents an individual end-user of that product. `passthrough`: the platform resells raw inference, and the profile identifies the resold-to company. + + - `"application"` + + - `"passthrough"` + - `external_id: optional string or null` Platform's own identifier for this user. Not enforced unique.
- `name: optional string or null` - Display name of the entity this profile represents. For `resold` this is the resold-to company's name. + Real-world name of the entity this profile represents (company or individual). For a resold-to company (`access_type` `passthrough`, or `relationship` `resold` under the `user-profiles-2026-03-24` header) this is that company's name. + - `relationship: optional "external" or "resold" or "internal"` + + How the entity behind a user profile relates to the platform that owns the API key. `external`: an individual end-user of the platform. `resold`: a company the platform resells Claude access to. `internal`: the platform's own usage. + + - `"external"` + + - `"resold"` + + - `"internal"` + ### Example ```http
curl https://api.anthropic.com/v1/user_profiles \ -H 'Content-Type: application/json' \ -H 'anthropic-version: 2023-06-01' \ - -H 'anthropic-beta: user-profiles-2026-03-24' \ + -H 'anthropic-beta: user-profiles-2026-08-18' \ -H "X-Api-Key: $ANTHROPIC_API_KEY" \ -d '{ "external_id": "user_12345",
"id": "uprof_011CZkZCu8hGbp5mYRQgUmz9", "created_at": "2026-03-15T10:00:00Z", "metadata": {}, - "relationship": "external", "trust_grants": { "cyber": { "status": "active"
}, "type": "user_profile", "updated_at": "2026-03-15T10:00:00Z", + "access_type": "application", "external_id": "user_12345", - "name": "Example User" + "name": "Example User", + "relationship": "external" } ```
api/beta/user_profiles/create_enrollment_url Changed · +4 / -2 lines
- `string` - - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 30 more` + - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 31 more` - `"message-batches-2024-09-24"`
- `"user-profiles-2026-03-24"` + - `"user-profiles-2026-08-18"` + - `"advisor-tool-2026-03-01"` - `"managed-agents-2026-04-01"`
curl https://api.anthropic.com/v1/user_profiles/$USER_PROFILE_ID/enrollment_url \ -X POST \ -H 'anthropic-version: 2023-06-01' \ - -H 'anthropic-beta: user-profiles-2026-03-24' \ + -H 'anthropic-beta: user-profiles-2026-08-18' \ -H "X-Api-Key: $ANTHROPIC_API_KEY" ```
api/beta/user_profiles/list Changed · +48 / -37 lines
- `string` - - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 30 more` + - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 31 more` - `"message-batches-2024-09-24"`
- `"user-profiles-2026-03-24"` + - `"user-profiles-2026-08-18"` + - `"advisor-tool-2026-03-01"` - `"managed-agents-2026-04-01"`
Arbitrary key-value metadata. Maximum 16 pairs, keys up to 64 chars, values up to 512 chars. - - `relationship: "external" or "resold" or "internal"` - - How the entity behind a user profile relates to the platform that owns the API key. `external`: an individual end-user of the platform. `resold`: a company the platform resells Claude access to. `internal`: the platform's own usage. - - - `"external"` - - - `"resold"` - - - `"internal"` - - `trust_grants: map[BetaUserProfileTrustGrant]` Trust grants for this profile, keyed by grant name. Key omitted when no grant is active or in flight.
A timestamp in RFC 3339 format + - `access_type: optional "application" or "passthrough"` + + How the platform uses the API on behalf of the entity this profile represents. `application`: the platform sells a product that uses the API behind the scenes, and the profile represents an individual end-user of that product. `passthrough`: the platform resells raw inference, and the profile identifies the resold-to company. + + - `"application"` + + - `"passthrough"` + - `external_id: optional string or null` Platform's own identifier for this user. Not enforced unique.
- `name: optional string or null` - Display name of the entity this profile represents. For `resold` this is the resold-to company's name. + Real-world name of the entity this profile represents (company or individual). For a resold-to company (`access_type` `passthrough`, or `relationship` `resold` under the `user-profiles-2026-03-24` header) this is that company's name. + - `relationship: optional "external" or "resold" or "internal"` + + How the entity behind a user profile relates to the platform that owns the API key. `external`: an individual end-user of the platform. `resold`: a company the platform resells Claude access to. `internal`: the platform's own usage. + + - `"external"` + + - `"resold"` + + - `"internal"` + - `next_page: string or null` Cursor for the next page, or `null` when there are no more results.
```http curl https://api.anthropic.com/v1/user_profiles \ -H 'anthropic-version: 2023-06-01' \ - -H 'anthropic-beta: user-profiles-2026-03-24' \ + -H 'anthropic-beta: user-profiles-2026-08-18' \ -H "X-Api-Key: $ANTHROPIC_API_KEY" ```
"id": "uprof_011CZkZCu8hGbp5mYRQgUmz9", "created_at": "2026-03-15T10:00:00Z", "metadata": {}, - "relationship": "external", "trust_grants": { "cyber": { "status": "active"
}, "type": "user_profile", "updated_at": "2026-03-15T10:00:00Z", + "access_type": "application", "external_id": "user_12345", - "name": "Example User" + "name": "Example User", + "relationship": "external" } ], "next_page": "page_MjAyNS0wNS0xNFQwMDowMDowMFo="
api/beta/user_profiles/retrieve Changed · +27 / -16 lines
- `string` - - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 30 more` + - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 31 more` - `"message-batches-2024-09-24"`
- `"user-profiles-2026-03-24"` + - `"user-profiles-2026-08-18"` + - `"advisor-tool-2026-03-01"` - `"managed-agents-2026-04-01"`
### Returns -- `BetaUserProfile object { id, created_at, metadata, 6 more }` +- `BetaUserProfile object { id, created_at, metadata, 7 more }` - `id: string`
Arbitrary key-value metadata. Maximum 16 pairs, keys up to 64 chars, values up to 512 chars. - - `relationship: "external" or "resold" or "internal"` - - How the entity behind a user profile relates to the platform that owns the API key. `external`: an individual end-user of the platform. `resold`: a company the platform resells Claude access to. `internal`: the platform's own usage. - - - `"external"` - - - `"resold"` - - - `"internal"` - - `trust_grants: map[BetaUserProfileTrustGrant]` Trust grants for this profile, keyed by grant name. Key omitted when no grant is active or in flight.
A timestamp in RFC 3339 format + - `access_type: optional "application" or "passthrough"` + + How the platform uses the API on behalf of the entity this profile represents. `application`: the platform sells a product that uses the API behind the scenes, and the profile represents an individual end-user of that product. `passthrough`: the platform resells raw inference, and the profile identifies the resold-to company. + + - `"application"` + + - `"passthrough"` + - `external_id: optional string or null` Platform's own identifier for this user. Not enforced unique.
- `name: optional string or null` - Display name of the entity this profile represents. For `resold` this is the resold-to company's name. + Real-world name of the entity this profile represents (company or individual). For a resold-to company (`access_type` `passthrough`, or `relationship` `resold` under the `user-profiles-2026-03-24` header) this is that company's name. + - `relationship: optional "external" or "resold" or "internal"` + + How the entity behind a user profile relates to the platform that owns the API key. `external`: an individual end-user of the platform. `resold`: a company the platform resells Claude access to. `internal`: the platform's own usage. + + - `"external"` + + - `"resold"` + + - `"internal"` + ### Example ```http curl https://api.anthropic.com/v1/user_profiles/$USER_PROFILE_ID \ -H 'anthropic-version: 2023-06-01' \ - -H 'anthropic-beta: user-profiles-2026-03-24' \ + -H 'anthropic-beta: user-profiles-2026-08-18' \ -H "X-Api-Key: $ANTHROPIC_API_KEY" ```
"id": "uprof_011CZkZCu8hGbp5mYRQgUmz9", "created_at": "2026-03-15T10:00:00Z", "metadata": {}, - "relationship": "external", "trust_grants": { "cyber": { "status": "active"
}, "type": "user_profile", "updated_at": "2026-03-15T10:00:00Z", + "access_type": "application", "external_id": "user_12345", - "name": "Example User" + "name": "Example User", + "relationship": "external" } ```
api/beta/user_profiles/update Changed · +57 / -38 lines
- `string` - - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 30 more` + - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 31 more` - `"message-batches-2024-09-24"`
- `"user-profiles-2026-03-24"` + - `"user-profiles-2026-08-18"` + - `"advisor-tool-2026-03-01"` - `"managed-agents-2026-04-01"`
### Body Parameters +- `access_type: optional "application" or "passthrough" or null` + + How the platform uses the API on behalf of the entity this profile represents. `application`: the platform sells a product that uses the API behind the scenes, and the profile represents an individual end-user of that product. `passthrough`: the platform resells raw inference, and the profile identifies the resold-to company. + + - `"application"` + + - `"passthrough"` + - `external_id: optional string or null` If present, replaces the stored external_id. Omit to leave unchanged. Maximum 255 characters.
### Returns -- `BetaUserProfile object { id, created_at, metadata, 6 more }` +- `BetaUserProfile object { id, created_at, metadata, 7 more }` - `id: string`
Arbitrary key-value metadata. Maximum 16 pairs, keys up to 64 chars, values up to 512 chars. - - `relationship: "external" or "resold" or "internal"` - - How the entity behind a user profile relates to the platform that owns the API key. `external`: an individual end-user of the platform. `resold`: a company the platform resells Claude access to. `internal`: the platform's own usage. - - - `"external"` - - - `"resold"` - - - `"internal"` - - `trust_grants: map[BetaUserProfileTrustGrant]` Trust grants for this profile, keyed by grant name. Key omitted when no grant is active or in flight.
A timestamp in RFC 3339 format + - `access_type: optional "application" or "passthrough"` + + How the platform uses the API on behalf of the entity this profile represents. `application`: the platform sells a product that uses the API behind the scenes, and the profile represents an individual end-user of that product. `passthrough`: the platform resells raw inference, and the profile identifies the resold-to company. + + - `"application"` + + - `"passthrough"` + - `external_id: optional string or null` Platform's own identifier for this user. Not enforced unique.
- `name: optional string or null` - Display name of the entity this profile represents. For `resold` this is the resold-to company's name. + Real-world name of the entity this profile represents (company or individual). For a resold-to company (`access_type` `passthrough`, or `relationship` `resold` under the `user-profiles-2026-03-24` header) this is that company's name. + - `relationship: optional "external" or "resold" or "internal"` + + How the entity behind a user profile relates to the platform that owns the API key. `external`: an individual end-user of the platform. `resold`: a company the platform resells Claude access to. `internal`: the platform's own usage. + + - `"external"` + + - `"resold"` + + - `"internal"` + ### Example ```http
curl https://api.anthropic.com/v1/user_profiles/$USER_PROFILE_ID \ -H 'Content-Type: application/json' \ -H 'anthropic-version: 2023-06-01' \ - -H 'anthropic-beta: user-profiles-2026-03-24' \ + -H 'anthropic-beta: user-profiles-2026-08-18' \ -H "X-Api-Key: $ANTHROPIC_API_KEY" \ -d '{ "external_id": "user_12345"
"id": "uprof_011CZkZCu8hGbp5mYRQgUmz9", "created_at": "2026-03-15T10:00:00Z", "metadata": {}, - "relationship": "external", "trust_grants": { "cyber": { "status": "active"
}, "type": "user_profile", "updated_at": "2026-03-15T10:00:00Z", + "access_type": "application", "external_id": "user_12345", - "name": "Example User" + "name": "Example User", + "relationship": "external" } ```
api/beta/vaults Changed · +39 / -13 lines
- `string` - - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 30 more` + - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 31 more` - `"message-batches-2024-09-24"`
- `"user-profiles-2026-03-24"` + - `"user-profiles-2026-08-18"` + - `"advisor-tool-2026-03-01"` - `"managed-agents-2026-04-01"`
- `string` - - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 30 more` + - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 31 more` - `"message-batches-2024-09-24"`
- `"user-profiles-2026-03-24"` + - `"user-profiles-2026-08-18"` + - `"advisor-tool-2026-03-01"` - `"managed-agents-2026-04-01"`
- `string` - - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 30 more` + - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 31 more` - `"message-batches-2024-09-24"`
- `"user-profiles-2026-03-24"` + - `"user-profiles-2026-08-18"` + - `"advisor-tool-2026-03-01"` - `"managed-agents-2026-04-01"`
- `string` - - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 30 more` + - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 31 more` - `"message-batches-2024-09-24"`
- `"user-profiles-2026-03-24"` + - `"user-profiles-2026-08-18"` + - `"advisor-tool-2026-03-01"` - `"managed-agents-2026-04-01"`
- `string` - - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 30 more` + - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 31 more` - `"message-batches-2024-09-24"`
- `"user-profiles-2026-03-24"` + - `"user-profiles-2026-08-18"` + - `"advisor-tool-2026-03-01"` - `"managed-agents-2026-04-01"`
- `string` - - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 30 more` + - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 31 more` - `"message-batches-2024-09-24"`
- `"user-profiles-2026-03-24"` + - `"user-profiles-2026-08-18"` + - `"advisor-tool-2026-03-01"` - `"managed-agents-2026-04-01"`
- `string` - - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 30 more` + - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 31 more` - `"message-batches-2024-09-24"`
- `"user-profiles-2026-03-24"` + - `"user-profiles-2026-08-18"` + - `"advisor-tool-2026-03-01"` - `"managed-agents-2026-04-01"`
- `string` - - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 30 more` + - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 31 more` - `"message-batches-2024-09-24"`
- `"user-profiles-2026-03-24"` + - `"user-profiles-2026-08-18"` + - `"advisor-tool-2026-03-01"` - `"managed-agents-2026-04-01"`
- `string` - - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 30 more` + - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 31 more` - `"message-batches-2024-09-24"`
- `"user-profiles-2026-03-24"` + - `"user-profiles-2026-08-18"` + - `"advisor-tool-2026-03-01"` - `"managed-agents-2026-04-01"`
- `string` - - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 30 more` + - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 31 more` - `"message-batches-2024-09-24"`
- `"user-profiles-2026-03-24"` + - `"user-profiles-2026-08-18"` + - `"advisor-tool-2026-03-01"` - `"managed-agents-2026-04-01"`
- `string` - - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 30 more` + - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 31 more` - `"message-batches-2024-09-24"`
- `"user-profiles-2026-03-24"` + - `"user-profiles-2026-08-18"` + - `"advisor-tool-2026-03-01"` - `"managed-agents-2026-04-01"`
- `string` - - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 30 more` + - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 31 more` - `"message-batches-2024-09-24"`
- `"user-profiles-2026-03-24"` + - `"user-profiles-2026-08-18"` + - `"advisor-tool-2026-03-01"` - `"managed-agents-2026-04-01"`
- `string` - - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 30 more` + - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 31 more` - `"message-batches-2024-09-24"`
- `"output-300k-2026-03-24"` - `"user-profiles-2026-03-24"` + + - `"user-profiles-2026-08-18"` - `"advisor-tool-2026-03-01"`
api/beta/vaults/credentials Changed · +21 / -7 lines
- `string` - - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 30 more` + - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 31 more` - `"message-batches-2024-09-24"`
- `"user-profiles-2026-03-24"` + - `"user-profiles-2026-08-18"` + - `"advisor-tool-2026-03-01"` - `"managed-agents-2026-04-01"`
- `string` - - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 30 more` + - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 31 more` - `"message-batches-2024-09-24"`
- `"user-profiles-2026-03-24"` + - `"user-profiles-2026-08-18"` + - `"advisor-tool-2026-03-01"` - `"managed-agents-2026-04-01"`
- `string` - - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 30 more` + - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 31 more` - `"message-batches-2024-09-24"`
- `"user-profiles-2026-03-24"` + - `"user-profiles-2026-08-18"` + - `"advisor-tool-2026-03-01"` - `"managed-agents-2026-04-01"`
- `string` - - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 30 more` + - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 31 more` - `"message-batches-2024-09-24"`
- `"user-profiles-2026-03-24"` + - `"user-profiles-2026-08-18"` + - `"advisor-tool-2026-03-01"` - `"managed-agents-2026-04-01"`
- `string` - - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 30 more` + - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 31 more` - `"message-batches-2024-09-24"`
- `"user-profiles-2026-03-24"` + - `"user-profiles-2026-08-18"` + - `"advisor-tool-2026-03-01"` - `"managed-agents-2026-04-01"`
- `string` - - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 30 more` + - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 31 more` - `"message-batches-2024-09-24"`
- `"user-profiles-2026-03-24"` + - `"user-profiles-2026-08-18"` + - `"advisor-tool-2026-03-01"` - `"managed-agents-2026-04-01"`
- `string` - - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 30 more` + - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 31 more` - `"message-batches-2024-09-24"`
- `"output-300k-2026-03-24"` - `"user-profiles-2026-03-24"` + + - `"user-profiles-2026-08-18"` - `"advisor-tool-2026-03-01"`
api/files New page · 380 lines, new page
# Files ## Upload File ### Returns ### Example #### Response ## List Files ### Query Parameters ### Returns ### Example #### Response ## Download File ### Path Parameters ### Example ## Get File Metadata ### Path Parameters ### Returns ### Example #### Response ## Delete File ### Path Parameters ### Returns ### Example #### Response ## Domain Types ### Deleted File ### File Metadata
A whole new page. There's nothing to diff it against, so here is what it says.
---
title: Files
url: https://platform.claude.com/docs/en/api/files
---
# Files
## Upload File
**post** `/v1/files`
Upload File
### Returns
- `FileMetadata object { id, created_at, filename, 5 more }`
- `id: string`
Unique object identifier.
The format and length of IDs may change over time.
- `created_at: string`
RFC 3339 datetime string representing when the file was created.
- `filename: string`
Original filename of the uploaded file.
- `mime_type: string`
MIME type of the file.
- `size_bytes: number`
Size of the file in bytes.
- `type: "file"`
Object type.
For files, this is always `"file"`.
- `"file"`
- `downloadable: optional boolean`
Whether the file can be downloaded.
- `expires_at: optional string or null`
RFC 3339 datetime string representing when the file will expire and become unavailable for download. Null if the file does not expire. For files uploaded with `expires_in_seconds`, this is the upload time plus that value.
### Example
```http
curl https://api.anthropic.com/v1/files \
-H 'Content-Type: multipart/form-data' \
-H 'anthropic-version: 2023-06-01' \
-H "X-Api-Key: $ANTHROPIC_API_KEY" \
-F 'file=@/path/to/file'
```
#### Response
```json
{
"id": "file_011CNha8iCJcU1wXNR6q4V8w",
"created_at": "2025-04-15T18:37:24.100435Z",
"filename": "document.pdf",
"mime_type": "application/pdf",
"size_bytes": 102400,
"type": "file",
"downloadable": false,
"expires_at": "2025-05-15T18:37:24.100435Z"
}
```
## List Files
**get** `/v1/files`
List Files
### Query Parameters
- `ids: optional array of string`
Restrict the result set to Files whose `id` is in this list. At most 100 entries (after de-duplication). Mutually exclusive with `page` and `limit`. When supplied, the response is always a single page (`next_page` is null). IDs that do not resolve to a visible File โ including deleted Files โ are silently omitted.
- `limit: optional number`
Number of items to return per page.
Defaults to `20`. Ranges from `1` to `1000`.
- `page: optional string`
Opaque page cursor returned in a prior list response's `next_page`. Prefixed `page_`.
### Returns
- `data: array of FileMetadata`
List of file metadata objects.
- `id: string`
Unique object identifier.
The format and length of IDs may change over time.
- `created_at: string`
RFC 3339 datetime string representing when the file was created.
- `filename: string`
Original filename of the uploaded file.
- `mime_type: string`
MIME type of the file.
- `size_bytes: number`
Size of the file in bytes.
- `type: "file"`
Object type.
For files, this is always `"file"`.
- `"file"`
- `downloadable: optional boolean`
Whether the file can be downloaded.
- `expires_at: optional string or null`
RFC 3339 datetime string representing when the file will expire and become unavailable for download. Null if the file does not expire. For files uploaded with `expires_in_seconds`, this is the upload time plus that value.
- `next_page: optional string or null`
Opaque cursor for the next page. Supply as `?page=` to fetch the next page; null when there are no more results.
### Example
```http
curl https://api.anthropic.com/v1/files \
-H 'anthropic-version: 2023-06-01' \
-H "X-Api-Key: $ANTHROPIC_API_KEY"
```
#### Response
```json
{
"data": [
{
"id": "file_011CNha8iCJcU1wXNR6q4V8w",
"created_at": "2025-04-15T18:37:24.100435Z",
"filename": "document.pdf",
"mime_type": "application/pdf",
"size_bytes": 102400,
"type": "file",
"downloadable": false,
"expires_at": "2025-05-15T18:37:24.100435Z"
}
],
"next_page": "next_page"
}
```
## Download File
**get** `/v1/files/{file_id}/content`
Download File
### Path Parameters
- `file_id: string`
ID of the File.
### Example
```http
curl https://api.anthropic.com/v1/files/$FILE_ID/content \
-H 'anthropic-version: 2023-06-01' \
-H "X-Api-Key: $ANTHROPIC_API_KEY"
```
## Get File Metadata
**get** `/v1/files/{file_id}`
Get File Metadata
### Path Parameters
- `file_id: string`
ID of the File.
### Returns
- `FileMetadata object { id, created_at, filename, 5 more }`
- `id: string`
Unique object identifier.
The format and length of IDs may change over time.
- `created_at: string`
RFC 3339 datetime string representing when the file was created.
- `filename: string`
Original filename of the uploaded file.
- `mime_type: string`
MIME type of the file.
- `size_bytes: number`
Size of the file in bytes.
- `type: "file"`
Object type.
For files, this is always `"file"`.
- `"file"`
- `downloadable: optional boolean`
Whether the file can be downloaded.
- `expires_at: optional string or null`
RFC 3339 datetime string representing when the file will expire and become unavailable for download. Null if the file does not expire. For files uploaded with `expires_in_seconds`, this is the upload time plus that value.
### Example
```http
curl https://api.anthropic.com/v1/files/$FILE_ID \
-H 'anthropic-version: 2023-06-01' \
-H "X-Api-Key: $ANTHROPIC_API_KEY"
```
#### Response
```json
{
"id": "file_011CNha8iCJcU1wXNR6q4V8w",
"created_at": "2025-04-15T18:37:24.100435Z",
"filename": "document.pdf",
"mime_type": "application/pdf",
"size_bytes": 102400,
"type": "file",
"downloadable": false,
"expires_at": "2025-05-15T18:37:24.100435Z"
}
```
## Delete File
**delete** `/v1/files/{file_id}`
Delete File
### Path Parameters
- `file_id: string`
ID of the File.
### Returns
- `DeletedFile object { id, type }`
- `id: string`
ID of the deleted file.
- `type: optional "file_deleted"`
Deleted object type.
For file deletion, this is always `"file_deleted"`.
Cut at 300 lines. The page has the rest.
api/files/delete New page · 50 lines, new page
## Delete File ### Path Parameters ### Returns ### Example #### Response
A whole new page. There's nothing to diff it against, so here is what it says.
---
title: Delete File
url: https://platform.claude.com/docs/en/api/files/delete
---
## Delete File
**delete** `/v1/files/{file_id}`
Delete File
### Path Parameters
- `file_id: string`
ID of the File.
### Returns
- `DeletedFile object { id, type }`
- `id: string`
ID of the deleted file.
- `type: optional "file_deleted"`
Deleted object type.
For file deletion, this is always `"file_deleted"`.
- `"file_deleted"`
### Example
```http
curl https://api.anthropic.com/v1/files/$FILE_ID \
-X DELETE \
-H 'anthropic-version: 2023-06-01' \
-H "X-Api-Key: $ANTHROPIC_API_KEY"
```
#### Response
```json
{
"id": "file_011CNha8iCJcU1wXNR6q4V8w",
"type": "file_deleted"
}
```
api/files/download New page · 24 lines, new page
## Download File ### Path Parameters ### Example
A whole new page. There's nothing to diff it against, so here is what it says.
---
title: Download File
url: https://platform.claude.com/docs/en/api/files/download
---
## Download File
**get** `/v1/files/{file_id}/content`
Download File
### Path Parameters
- `file_id: string`
ID of the File.
### Example
```http
curl https://api.anthropic.com/v1/files/$FILE_ID/content \
-H 'anthropic-version: 2023-06-01' \
-H "X-Api-Key: $ANTHROPIC_API_KEY"
```
api/files/list New page · 102 lines, new page
## List Files ### Query Parameters ### Returns ### Example #### Response
A whole new page. There's nothing to diff it against, so here is what it says.
---
title: List Files
url: https://platform.claude.com/docs/en/api/files/list
---
## List Files
**get** `/v1/files`
List Files
### Query Parameters
- `ids: optional array of string`
Restrict the result set to Files whose `id` is in this list. At most 100 entries (after de-duplication). Mutually exclusive with `page` and `limit`. When supplied, the response is always a single page (`next_page` is null). IDs that do not resolve to a visible File โ including deleted Files โ are silently omitted.
- `limit: optional number`
Number of items to return per page.
Defaults to `20`. Ranges from `1` to `1000`.
- `page: optional string`
Opaque page cursor returned in a prior list response's `next_page`. Prefixed `page_`.
### Returns
- `data: array of FileMetadata`
List of file metadata objects.
- `id: string`
Unique object identifier.
The format and length of IDs may change over time.
- `created_at: string`
RFC 3339 datetime string representing when the file was created.
- `filename: string`
Original filename of the uploaded file.
- `mime_type: string`
MIME type of the file.
- `size_bytes: number`
Size of the file in bytes.
- `type: "file"`
Object type.
For files, this is always `"file"`.
- `"file"`
- `downloadable: optional boolean`
Whether the file can be downloaded.
- `expires_at: optional string or null`
RFC 3339 datetime string representing when the file will expire and become unavailable for download. Null if the file does not expire. For files uploaded with `expires_in_seconds`, this is the upload time plus that value.
- `next_page: optional string or null`
Opaque cursor for the next page. Supply as `?page=` to fetch the next page; null when there are no more results.
### Example
```http
curl https://api.anthropic.com/v1/files \
-H 'anthropic-version: 2023-06-01' \
-H "X-Api-Key: $ANTHROPIC_API_KEY"
```
#### Response
```json
{
"data": [
{
"id": "file_011CNha8iCJcU1wXNR6q4V8w",
"created_at": "2025-04-15T18:37:24.100435Z",
"filename": "document.pdf",
"mime_type": "application/pdf",
"size_bytes": 102400,
"type": "file",
"downloadable": false,
"expires_at": "2025-05-15T18:37:24.100435Z"
}
],
"next_page": "next_page"
}
```
api/files/retrieve_metadata New page · 81 lines, new page
## Get File Metadata ### Path Parameters ### Returns ### Example #### Response
A whole new page. There's nothing to diff it against, so here is what it says.
---
title: Get File Metadata
url: https://platform.claude.com/docs/en/api/files/retrieve_metadata
---
## Get File Metadata
**get** `/v1/files/{file_id}`
Get File Metadata
### Path Parameters
- `file_id: string`
ID of the File.
### Returns
- `FileMetadata object { id, created_at, filename, 5 more }`
- `id: string`
Unique object identifier.
The format and length of IDs may change over time.
- `created_at: string`
RFC 3339 datetime string representing when the file was created.
- `filename: string`
Original filename of the uploaded file.
- `mime_type: string`
MIME type of the file.
- `size_bytes: number`
Size of the file in bytes.
- `type: "file"`
Object type.
For files, this is always `"file"`.
- `"file"`
- `downloadable: optional boolean`
Whether the file can be downloaded.
- `expires_at: optional string or null`
RFC 3339 datetime string representing when the file will expire and become unavailable for download. Null if the file does not expire. For files uploaded with `expires_in_seconds`, this is the upload time plus that value.
### Example
```http
curl https://api.anthropic.com/v1/files/$FILE_ID \
-H 'anthropic-version: 2023-06-01' \
-H "X-Api-Key: $ANTHROPIC_API_KEY"
```
#### Response
```json
{
"id": "file_011CNha8iCJcU1wXNR6q4V8w",
"created_at": "2025-04-15T18:37:24.100435Z",
"filename": "document.pdf",
"mime_type": "application/pdf",
"size_bytes": 102400,
"type": "file",
"downloadable": false,
"expires_at": "2025-05-15T18:37:24.100435Z"
}
```
api/files/upload New page · 77 lines, new page
## Upload File ### Returns ### Example #### Response
A whole new page. There's nothing to diff it against, so here is what it says.
---
title: Upload File
url: https://platform.claude.com/docs/en/api/files/upload
---
## Upload File
**post** `/v1/files`
Upload File
### Returns
- `FileMetadata object { id, created_at, filename, 5 more }`
- `id: string`
Unique object identifier.
The format and length of IDs may change over time.
- `created_at: string`
RFC 3339 datetime string representing when the file was created.
- `filename: string`
Original filename of the uploaded file.
- `mime_type: string`
MIME type of the file.
- `size_bytes: number`
Size of the file in bytes.
- `type: "file"`
Object type.
For files, this is always `"file"`.
- `"file"`
- `downloadable: optional boolean`
Whether the file can be downloaded.
- `expires_at: optional string or null`
RFC 3339 datetime string representing when the file will expire and become unavailable for download. Null if the file does not expire. For files uploaded with `expires_in_seconds`, this is the upload time plus that value.
### Example
```http
curl https://api.anthropic.com/v1/files \
-H 'Content-Type: multipart/form-data' \
-H 'anthropic-version: 2023-06-01' \
-H "X-Api-Key: $ANTHROPIC_API_KEY" \
-F 'file=@/path/to/file'
```
#### Response
```json
{
"id": "file_011CNha8iCJcU1wXNR6q4V8w",
"created_at": "2025-04-15T18:37:24.100435Z",
"filename": "document.pdf",
"mime_type": "application/pdf",
"size_bytes": 102400,
"type": "file",
"downloadable": false,
"expires_at": "2025-05-15T18:37:24.100435Z"
}
```
api/messages Changed · +7211 / -404 lines
### Browser Close Tab Config ### Browser Double Click Config ### Browser File Upload Config ### Browser Find Config ### Browser Form Input Config ### Browser Get Page Text Config ### Browser Hold Key Config ### Browser Hover Config ### Browser Javascript Exec Config ### Browser Key Config ### Browser Left Click Config ### Browser Left Click Drag Config ### Browser Left Mouse Down Config ### Browser Left Mouse Up Config ### Browser List Tabs Config ### Browser Middle Click Config ### Browser Mouse Move Config ### Browser Navigate Config ### Browser New Tab Config ### Browser Read Console Config ### Browser Read Network Config ### Browser Read Page Config ### Browser Right Click Config ### Browser Screenshot Config ### Browser Scroll Config ### Browser Scroll To Config ### Browser State Block Param ### Browser State Change ### Browser State Change Download Completed ### Browser State Change Download Failed ### Browser State Change Download Started ### Browser State Change Tab Opened ### Browser State Tab Entry ### Browser Switch Tab Config ### Browser Toolset 20260801 ### Browser Toolset Configs ### Browser Triple Click Config ### Browser Type Config ### Browser Wait Config ### Browser Zoom Config ### Computer Cursor Position Config ### Computer Double Click Config ### Computer Hold Key Config ### Computer Key Config ### Computer Left Click Config ### Computer Left Click Drag Config ### Computer Left Mouse Down Config ### Computer Left Mouse Up Config ### Computer Middle Click Config ### Computer Mouse Move Config ### Computer Right Click Config ### Computer Screenshot Config ### Computer Scroll Config ### Computer Toolset 20260801 ### Computer Toolset Configs ### Computer Triple Click Config ### Computer Type Config ### Computer Wait Config ### Computer Zoom Config ### Container Params ### Container Skill ### File Document Source ### File Image Source ### Image Transformations Param ### Message Create Params Container ### Skill Params ### Mid Conversation System Block Param
This page is larger than the 256 KiB this site keeps, so one side of the diff below stops where the stored text does.
api/messages/batches Changed · +949 / -45 lines
The two sides of this change are too far apart to line up, so this is the differ's own diff of it.
- `"search_result_location"` - - `ImageBlockParam object { source, type, cache_control }` - - - `source: Base64ImageSource or URLImageSource` + - `ImageBlockParam object { source, type, cache_control, transformations }` + + - `source: Base64ImageSource or URLImageSource or FileImageSource` - `Base64ImageSource object { data, media_type, type }`
- `url: string` + - `FileImageSource object { file_id, type }` + + - `file_id: string` + + - `type: "file"` + + - `"file"` + - `type: "image"` - `"image"`
Create a cache control breakpoint at this content block. + - `transformations: optional ImageTransformationsParam or null` + + Configures the transformations the server applies to this image before the model observes it. Each key names a condition the server transforms images for; its value selects the transformation applied. Omitted keys keep their default behavior, and an empty object is equivalent to omitting the field. + + - `oversized_image: optional "downsize" or "error"` + + What the server does when this image exceeds the model's maximum image size. `"downsize"` (the default) scales the image down to fit, which changes the dimensions the model observes without telling you. `"error"` instead rejects the request with a 400 error naming the image's dimensions and the largest dimensions that fit, so you can scale the image deliberately โ your image is never silently scaled down. + + - `"downsize"` + + - `"error"` + - `DocumentBlockParam object { source, type, cache_control, 3 more }` - - `source: Base64PDFSource or PlainTextSource or ContentBlockSource or URLPDFSource` + - `source: Base64PDFSource or PlainTextSource or ContentBlockSource or 2 more` - `Base64PDFSource object { data, media_type, type }`
- `TextBlockParam object { text, type, cache_control, citations }` - - `ImageBlockParam object { source, type, cache_control }` + - `ImageBlockParam object { source, type, cache_control, transformations }` - `type: "content"`
- `url: string` + - `FileDocumentSource object { file_id, type }` + + - `file_id: string` + + - `type: "file"` + + - `"file"` + - `type: "document"` - `"document"`
- `"redacted_thinking"` - - `ToolUseBlockParam object { id, input, name, 3 more }` + - `ToolUseBlockParam object { id, input, name, 4 more }` - `id: string`
- `"code_execution_20260120"` - - `ToolResultBlockParam object { tool_use_id, type, cache_control, 2 more }` + - `toolset_name: optional string or null` + + For a toolset member tool_use, the toolset family this member belongs to. + + - `ToolResultBlockParam object { tool_use_id, type, cache_control, 3 more }` - `tool_use_id: string`
Create a cache control breakpoint at this content block. - - `content: optional string or array of TextBlockParam or ImageBlockParam or SearchResultBlockParam or 2 more` + - `content: optional string or array of TextBlockParam or ImageBlockParam or SearchResultBlockParam or 3 more` - `string` - - `array of TextBlockParam or ImageBlockParam or SearchResultBlockParam or 2 more` + - `array of TextBlockParam or ImageBlockParam or SearchResultBlockParam or 3 more` - `TextBlockParam object { text, type, cache_control, citations }` - - `ImageBlockParam object { source, type, cache_control }` + - `ImageBlockParam object { source, type, cache_control, transformations }` - `SearchResultBlockParam object { content, source, title, 3 more }`
Create a cache control breakpoint at this content block. + - `BrowserStateBlockParam object { tabs, type, cache_control, state_changes }` + + The caller's browser state after a browser toolset member call โ + the full inventory of open tabs, which tab is active, and any side + effects (tabs opened, download state changes) the call produced. + + At most one per `tool_result`, only on a non-error result answering a + browser toolset member `tool_use`. The server renders the + model-visible text from it; the model never sees the raw fields. + + - `tabs: array of BrowserStateTabEntry` + + All tabs open in the browser after this call โ the full inventory, not a delta. May be empty. Whenever non-empty, exactly one entry carries `active: true`. + + - `tab_id: string` + + The caller-assigned identifier for this tab, unique within the inventory. + + - `title: string` + + The title of the page the tab is showing. May be empty. + + - `url: string` + + The URL of the page the tab is showing. May be empty. + + - `active: optional boolean` + + Whether this tab is the active tab after this call. Whenever `tabs` is non-empty, exactly one entry is marked `active: true`. + + - `type: "browser_state"` + + - `"browser_state"` + + - `cache_control: optional CacheControlEphemeral or null` + + Create a cache control breakpoint at this content block. + + - `state_changes: optional array of BrowserStateChange or null` + + Tabs opened and download state changes during this call. "Nothing to report" is expressed by omitting the field, never by an empty list. + + - `BrowserStateChangeTabOpened object { tab_id, type }` + + A tab this call's execution opened that remains open at its end โ + the creation delta of the `tabs` inventory, not an event log. + + Carries only the `tab_id`; the tab's `title` and `url` live on its + `tabs` entry, which must include the same `tab_id`. A tab opened + during a failed call gets no deferred `tab_opened`; it simply appears + in the next result's `tabs` inventory. + + - `tab_id: string` + + The `tab_id` of the opened tab, present in `tabs`. + + - `type: "tab_opened"` + + - `"tab_opened"` + + - `BrowserStateChangeDownloadStarted object { download_id, type, url }` + + A file download that started during this call. + + - `download_id: string` + + The caller-assigned identifier for this download, stable across the state changes reporting it. + + - `type: "download_started"` + + - `"download_started"` + + - `url: string` + + The final post-redirect URL the download was served from. + + - `BrowserStateChangeDownloadCompleted object { download_id, type, url, 2 more }` + + A file download that finished during this call, reported with the + same `download_id` as its `download_started` โ or without a prior + `download_started`, when the download finished during the call that + started it (at most one state change per `download_id` per result). + + - `download_id: string` + + The caller-assigned identifier for this download, stable across the state changes reporting it. + + - `type: "download_completed"` + + - `"download_completed"` + + - `url: string` + + The final post-redirect URL the download was served from. + + - `path: optional string or null` + + Where the executor saved the file, on the executor's filesystem. Only included when another tool in the same environment can read the file at that path. + + - `size_bytes: optional number or null` + + The completed download's size. + + - `BrowserStateChangeDownloadFailed object { download_id, type, url, error }` + + A file download that failed โ or was cancelled โ during this call. + + - `download_id: string` + + The caller-assigned identifier for this download, stable across the state changes reporting it. + + - `type: "download_failed"` + + - `"download_failed"` + + - `url: string` + + The final post-redirect URL the download was served from. + + - `error: optional string or null` + + The failure or cancellation detail, when known. + - `is_error: optional boolean` + + - `toolset_name: optional string or null` + + For a toolset member tool_result, the toolset family of the paired tool_use. - `ServerToolUseBlockParam object { id, input, name, 3 more }`
Create a cache control breakpoint at this content block. - - `MidConversationSystemBlockParam object { content, type, cache_control }` - - System instructions that appear mid-conversation. - - Use this block to provide or update system-level instructions at a specific - point in the conversation, rather than only via the top-level `system` parameter. - - - `content: array of TextBlockParam` - - System instruction text blocks. - - - `text: string` - - - `type: "text"` - - - `cache_control: optional CacheControlEphemeral or null` - - Create a cache control breakpoint at this content block. - - - `citations: optional array of TextCitationParam or null` - - - `type: "mid_conv_system"` - - - `"mid_conv_system"` - - - `cache_control: optional CacheControlEphemeral or null` - - Create a cache control breakpoint at this content block. - - `role: "user" or "assistant" or "system"` - `"user"`
Top-level cache control automatically applies a cache_control marker to the last cacheable block in the request. - - `container: optional string or null` + - `container: optional MessageCreateParamsContainer or null` Container identifier for reuse across requests. + + - `ContainerParams object { id, skills }` + + Container parameters with skills to be loaded. + + - `id: optional string or null` + + Container id + + - `skills: optional array of SkillParams or null` + + List of skills to load in the container + + - `skill_id: string` + + Skill ID + + - `type: "anthropic" or "custom"` + + Type of skill - either 'anthropic' (built-in) or 'custom' (user-defined) + + - `"anthropic"` + + - `"custom"` + + - `version: optional string` + + Skill version or 'latest' for most recent version + + - `string` - `inference_geo: optional string or null`
When true, guarantees schema validation on tool names and inputs + - `BrowserToolset20260801 object { type, allowed_callers, cache_control, configs }` + + The browser toolset: a single `tools[]` entry (carrying no + `name`) that declares the browser tool family. The model is served + the family's tool with any members disabled via `configs` removed + from its schema. + + - `type: "browser_toolset_20260801"` + + - `"browser_toolset_20260801"` + + - `allowed_callers: optional array of "direct" or "code_execution_20250825" or "code_execution_20260120" or "code_execution_20260521"` + + - `"direct"` + + - `"code_execution_20250825"` + + - `"code_execution_20260120"` + + - `"code_execution_20260521"` + + - `cache_control: optional CacheControlEphemeral or null` + + Create a cache control breakpoint at this content block. + + - `configs: optional BrowserToolsetConfigs or null` + + Per-member configuration for `browser_toolset_20260801`: one + optional field per member tool, keyed by the member name โ the same + name the member's `tool_use` blocks carry. Every member is an + accepted key, and a member's defaults apply wherever its key is + absent. Unknown keys are rejected: the field set is this toolset + version's complete member set. + + - `close_tab: optional BrowserCloseTabConfig or null` + + `close_tab`'s config overrides. + + - `defer_loading: optional boolean or null` + + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. + + - `enabled: optional boolean or null` + + Whether this member is offered to the model. Default is per member, per the toolset's documentation. A member whose enabled resolves false is withheld from the served schema. + + - `double_click: optional BrowserDoubleClickConfig or null` + + `double_click`'s config overrides. + + - `defer_loading: optional boolean or null` + + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. + + - `enabled: optional boolean or null` + + Whether this member is offered to the model. Default is per member, per the toolset's documentation. A member whose enabled resolves false is withheld from the served schema. + + - `file_upload: optional BrowserFileUploadConfig or null` + + `file_upload`'s config overrides. + + - `defer_loading: optional boolean or null` + + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. + + - `enabled: optional boolean or null` + + Whether this member is offered to the model. Default is per member, per the toolset's documentation. A member whose enabled resolves false is withheld from the served schema. + + - `find: optional BrowserFindConfig or null` + + `find`'s config overrides. + + - `defer_loading: optional boolean or null` + + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. + + - `enabled: optional boolean or null` + + Whether this member is offered to the model. Default is per member, per the toolset's documentation. A member whose enabled resolves false is withheld from the served schema. + + - `form_input: optional BrowserFormInputConfig or null` + + `form_input`'s config overrides. + + - `defer_loading: optional boolean or null` + + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. + + - `enabled: optional boolean or null` + + Whether this member is offered to the model. Default is per member, per the toolset's documentation. A member whose enabled resolves false is withheld from the served schema. + + - `get_page_text: optional BrowserGetPageTextConfig or null` + + `get_page_text`'s config overrides. + + - `defer_loading: optional boolean or null` + + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. + + - `enabled: optional boolean or null` + + Whether this member is offered to the model. Default is per member, per the toolset's documentation. A member whose enabled resolves false is withheld from the served schema. + + - `hold_key: optional BrowserHoldKeyConfig or null` + + `hold_key`'s config overrides. + + - `defer_loading: optional boolean or null` + + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. + + - `enabled: optional boolean or null` + + Whether this member is offered to the model. Default is per member, per the toolset's documentation. A member whose enabled resolves false is withheld from the served schema. + + - `hover: optional BrowserHoverConfig or null` + + `hover`'s config overrides. + + - `defer_loading: optional boolean or null` + + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. + + - `enabled: optional boolean or null` + + Whether this member is offered to the model. Default is per member, per the toolset's documentation. A member whose enabled resolves false is withheld from the served schema. + + - `javascript_exec: optional BrowserJavascriptExecConfig or null` + + `javascript_exec`'s config overrides. + + - `defer_loading: optional boolean or null` + + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. + + - `enabled: optional boolean or null` + + Whether this member is offered to the model. Default is per member, per the toolset's documentation. A member whose enabled resolves false is withheld from the served schema. + + - `key: optional BrowserKeyConfig or null` + + `key`'s config overrides. + + - `defer_loading: optional boolean or null` + + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. + + - `enabled: optional boolean or null` + + Whether this member is offered to the model. Default is per member, per the toolset's documentation. A member whose enabled resolves false is withheld from the served schema. + + - `left_click: optional BrowserLeftClickConfig or null` + + `left_click`'s config overrides. + + - `defer_loading: optional boolean or null` + + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. + + - `enabled: optional boolean or null` + + Whether this member is offered to the model. Default is per member, per the toolset's documentation. A member whose enabled resolves false is withheld from the served schema. + + - `left_click_drag: optional BrowserLeftClickDragConfig or null` + + `left_click_drag`'s config overrides. + + - `defer_loading: optional boolean or null` + + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. + + - `enabled: optional boolean or null` + + Whether this member is offered to the model. Default is per member, per the toolset's documentation. A member whose enabled resolves false is withheld from the served schema. + + - `left_mouse_down: optional BrowserLeftMouseDownConfig or null` + + `left_mouse_down`'s config overrides. + + - `defer_loading: optional boolean or null` + + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. + + - `enabled: optional boolean or null` + + Whether this member is offered to the model. Default is per member, per the toolset's documentation. A member whose enabled resolves false is withheld from the served schema. + + - `left_mouse_up: optional BrowserLeftMouseUpConfig or null` + + `left_mouse_up`'s config overrides. + + - `defer_loading: optional boolean or null` + + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. + + - `enabled: optional boolean or null` + + Whether this member is offered to the model. Default is per member, per the toolset's documentation. A member whose enabled resolves false is withheld from the served schema. + + - `list_tabs: optional BrowserListTabsConfig or null` + + `list_tabs`'s config overrides. + + - `defer_loading: optional boolean or null` + + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. + + - `enabled: optional boolean or null` + + Whether this member is offered to the model. Default is per member, per the toolset's documentation. A member whose enabled resolves false is withheld from the served schema. + + - `middle_click: optional BrowserMiddleClickConfig or null` + + `middle_click`'s config overrides. + + - `defer_loading: optional boolean or null` + + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. + + - `enabled: optional boolean or null` + + Whether this member is offered to the model. Default is per member, per the toolset's documentation. A member whose enabled resolves false is withheld from the served schema. + + - `mouse_move: optional BrowserMouseMoveConfig or null` + + `mouse_move`'s config overrides. + + - `defer_loading: optional boolean or null` + + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. + + - `enabled: optional boolean or null` + + Whether this member is offered to the model. Default is per member, per the toolset's documentation. A member whose enabled resolves false is withheld from the served schema. + + - `navigate: optional BrowserNavigateConfig or null` + + `navigate`'s config overrides. + + - `defer_loading: optional boolean or null` + + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. + + - `enabled: optional boolean or null` + + Whether this member is offered to the model. Default is per member, per the toolset's documentation. A member whose enabled resolves false is withheld from the served schema. + + - `new_tab: optional BrowserNewTabConfig or null` + + `new_tab`'s config overrides. + + - `defer_loading: optional boolean or null` + + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. + + - `enabled: optional boolean or null` + + Whether this member is offered to the model. Default is per member, per the toolset's documentation. A member whose enabled resolves false is withheld from the served schema. + + - `read_console: optional BrowserReadConsoleConfig or null` + + `read_console`'s config overrides. + + - `defer_loading: optional boolean or null` + + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. + + - `enabled: optional boolean or null` + + Whether this member is offered to the model. Default is per member, per the toolset's documentation. A member whose enabled resolves false is withheld from the served schema. + + - `read_network: optional BrowserReadNetworkConfig or null` + + `read_network`'s config overrides. + + - `defer_loading: optional boolean or null` + + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. + + - `enabled: optional boolean or null` + + Whether this member is offered to the model. Default is per member, per the toolset's documentation. A member whose enabled resolves false is withheld from the served schema. + + - `read_page: optional BrowserReadPageConfig or null` + + `read_page`'s config overrides. + + - `defer_loading: optional boolean or null` + + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. + + - `enabled: optional boolean or null` + + Whether this member is offered to the model. Default is per member, per the toolset's documentation. A member whose enabled resolves false is withheld from the served schema. + + - `right_click: optional BrowserRightClickConfig or null` + + `right_click`'s config overrides. + + - `defer_loading: optional boolean or null` + + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. + + - `enabled: optional boolean or null` + + Whether this member is offered to the model. Default is per member, per the toolset's documentation. A member whose enabled resolves false is withheld from the served schema. + + - `screenshot: optional BrowserScreenshotConfig or null` + + `screenshot`'s config overrides. + + - `defer_loading: optional boolean or null` + + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. + + - `enabled: optional boolean or null` + + Whether this member is offered to the model. Default is per member, per the toolset's documentation. A member whose enabled resolves false is withheld from the served schema. + + - `scroll: optional BrowserScrollConfig or null` + + `scroll`'s config overrides. + + - `defer_loading: optional boolean or null` + + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. + + - `enabled: optional boolean or null` + + Whether this member is offered to the model. Default is per member, per the toolset's documentation. A member whose enabled resolves false is withheld from the served schema. + + - `scroll_to: optional BrowserScrollToConfig or null` + + `scroll_to`'s config overrides. + + - `defer_loading: optional boolean or null` + + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. + + - `enabled: optional boolean or null` + + Whether this member is offered to the model. Default is per member, per the toolset's documentation. A member whose enabled resolves false is withheld from the served schema. + + - `switch_tab: optional BrowserSwitchTabConfig or null` + + `switch_tab`'s config overrides. + + - `defer_loading: optional boolean or null` + + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. + + - `enabled: optional boolean or null` + + Whether this member is offered to the model. Default is per member, per the toolset's documentation. A member whose enabled resolves false is withheld from the served schema. + + - `triple_click: optional BrowserTripleClickConfig or null` + + `triple_click`'s config overrides. + + - `defer_loading: optional boolean or null` + + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. + + - `enabled: optional boolean or null` + + Whether this member is offered to the model. Default is per member, per the toolset's documentation. A member whose enabled resolves false is withheld from the served schema. + + - `type: optional BrowserTypeConfig or null` + + `type`'s config overrides. + + - `defer_loading: optional boolean or null` + + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. + + - `enabled: optional boolean or null` + + Whether this member is offered to the model. Default is per member, per the toolset's documentation. A member whose enabled resolves false is withheld from the served schema. + + - `wait: optional BrowserWaitConfig or null` + + `wait`'s config overrides. + + - `defer_loading: optional boolean or null` + + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. + + - `enabled: optional boolean or null` + + Whether this member is offered to the model. Default is per member, per the toolset's documentation. A member whose enabled resolves false is withheld from the served schema. + + - `zoom: optional BrowserZoomConfig or null` + + `zoom`'s config overrides. + + - `defer_loading: optional boolean or null` + + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. + + - `enabled: optional boolean or null` + + Whether this member is offered to the model. Default is per member, per the toolset's documentation. A member whose enabled resolves false is withheld from the served schema. + - `MemoryTool20250818 object { name, type, allowed_callers, 4 more }` - `name: "memory"`
- `strict: optional boolean` When true, guarantees schema validation on tool names and inputs + + - `ComputerToolset20260801 object { type, allowed_callers, cache_control, configs }` + + The computer toolset: a single `tools[]` entry (carrying no + `name`) that declares the computer tool family. The model is + served the family's tool with any members disabled via `configs` + removed from its schema. Every member is enabled by default, zoom + included. The single-tool options `display_number` and + `enable_zoom` are not fields of a toolset entry โ it carries only + `type`, `configs`, and `cache_control`; zoom is controlled + via `configs.zoom.enabled`. + + - `type: "computer_toolset_20260801"` + + - `"computer_toolset_20260801"` + + - `allowed_callers: optional array of "direct" or "code_execution_20250825" or "code_execution_20260120" or "code_execution_20260521"` + + - `"direct"` + + - `"code_execution_20250825"` + + - `"code_execution_20260120"` + + - `"code_execution_20260521"` + + - `cache_control: optional CacheControlEphemeral or null` + + Create a cache control breakpoint at this content block. + + - `configs: optional ComputerToolsetConfigs or null` + + Per-member configuration for `computer_toolset_20260801`: one + optional field per member tool, keyed by the member name โ the same + name the member's `tool_use` blocks carry. Every member is an + accepted key, and a member's defaults apply wherever its key is + absent. Unknown keys are rejected: the field set is this toolset + version's complete member set. + + - `cursor_position: optional ComputerCursorPositionConfig or null` + + `cursor_position`'s config overrides. + + - `defer_loading: optional boolean or null` + + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. + + - `enabled: optional boolean or null` + + Whether this member is offered to the model. Default is per member, per the toolset's documentation. A member whose enabled resolves false is withheld from the served schema. + + - `double_click: optional ComputerDoubleClickConfig or null` + + `double_click`'s config overrides. + + - `defer_loading: optional boolean or null` + + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. + + - `enabled: optional boolean or null` + + Whether this member is offered to the model. Default is per member, per the toolset's documentation. A member whose enabled resolves false is withheld from the served schema. + + - `hold_key: optional ComputerHoldKeyConfig or null` + + `hold_key`'s config overrides. + + - `defer_loading: optional boolean or null` + + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. + + - `enabled: optional boolean or null` + + Whether this member is offered to the model. Default is per member, per the toolset's documentation. A member whose enabled resolves false is withheld from the served schema. + + - `key: optional ComputerKeyConfig or null` + + `key`'s config overrides. + + - `defer_loading: optional boolean or null` + + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. + + - `enabled: optional boolean or null` + + Whether this member is offered to the model. Default is per member, per the toolset's documentation. A member whose enabled resolves false is withheld from the served schema. + + - `left_click: optional ComputerLeftClickConfig or null` + + `left_click`'s config overrides. + + - `defer_loading: optional boolean or null` + + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. + + - `enabled: optional boolean or null` + + Whether this member is offered to the model. Default is per member, per the toolset's documentation. A member whose enabled resolves false is withheld from the served schema. + + - `left_click_drag: optional ComputerLeftClickDragConfig or null` + + `left_click_drag`'s config overrides. + + - `defer_loading: optional boolean or null` + + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. + + - `enabled: optional boolean or null` + + Whether this member is offered to the model. Default is per member, per the toolset's documentation. A member whose enabled resolves false is withheld from the served schema. + + - `left_mouse_down: optional ComputerLeftMouseDownConfig or null` + + `left_mouse_down`'s config overrides. + + - `defer_loading: optional boolean or null` + + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. + + - `enabled: optional boolean or null` + + Whether this member is offered to the model. Default is per member, per the toolset's documentation. A member whose enabled resolves false is withheld from the served schema. + + - `left_mouse_up: optional ComputerLeftMouseUpConfig or null` + + `left_mouse_up`'s config overrides. + + - `defer_loading: optional boolean or null` + + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. + + - `enabled: optional boolean or null` + + Whether this member is offered to the model. Default is per member, per the toolset's documentation. A member whose enabled resolves false is withheld from the served schema. + + - `middle_click: optional ComputerMiddleClickConfig or null` + + `middle_click`'s config overrides. + + - `defer_loading: optional boolean or null` + + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. + + - `enabled: optional boolean or null` + + Whether this member is offered to the model. Default is per member, per the toolset's documentation. A member whose enabled resolves false is withheld from the served schema. + + - `mouse_move: optional ComputerMouseMoveConfig or null` + + `mouse_move`'s config overrides. + + - `defer_loading: optional boolean or null` + + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. + + - `enabled: optional boolean or null` + + Whether this member is offered to the model. Default is per member, per the toolset's documentation. A member whose enabled resolves false is withheld from the served schema. + + - `right_click: optional ComputerRightClickConfig or null` + + `right_click`'s config overrides. + + - `defer_loading: optional boolean or null` + + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. + + - `enabled: optional boolean or null` + + Whether this member is offered to the model. Default is per member, per the toolset's documentation. A member whose enabled resolves false is withheld from the served schema. + + - `screenshot: optional ComputerScreenshotConfig or null` + + `screenshot`'s config overrides. + + - `defer_loading: optional boolean or null` + + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. + + - `enabled: optional boolean or null` + + Whether this member is offered to the model. Default is per member, per the toolset's documentation. A member whose enabled resolves false is withheld from the served schema. + + - `scroll: optional ComputerScrollConfig or null` + + `scroll`'s config overrides. + + - `defer_loading: optional boolean or null` + + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. + + - `enabled: optional boolean or null` + + Whether this member is offered to the model. Default is per member, per the toolset's documentation. A member whose enabled resolves false is withheld from the served schema. + + - `triple_click: optional ComputerTripleClickConfig or null` + + `triple_click`'s config overrides. + + - `defer_loading: optional boolean or null` + + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. + + - `enabled: optional boolean or null` + + Whether this member is offered to the model. Default is per member, per the toolset's documentation. A member whose enabled resolves false is withheld from the served schema. + + - `type: optional ComputerTypeConfig or null` + + `type`'s config overrides. + + - `defer_loading: optional boolean or null` + + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. + + - `enabled: optional boolean or null` + + Whether this member is offered to the model. Default is per member, per the toolset's documentation. A member whose enabled resolves false is withheld from the served schema. + + - `wait: optional ComputerWaitConfig or null` + + `wait`'s config overrides. + + - `defer_loading: optional boolean or null` + + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. + + - `enabled: optional boolean or null` + + Whether this member is offered to the model. Default is per member, per the toolset's documentation. A member whose enabled resolves false is withheld from the served schema. + + - `zoom: optional ComputerZoomConfig or null` + + `zoom`'s config overrides. + + - `defer_loading: optional boolean or null` + + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. + + - `enabled: optional boolean or null` + + Whether this member is offered to the model. Default is per member, per the toolset's documentation. A member whose enabled resolves false is withheld from the served schema. - `ToolTextEditor20250124 object { name, type, allowed_callers, 4 more }`
"role": "user" } ], - "model": "claude-opus-4-6" + "model": "claude-opus-5" } } ]
The time at which the container will expire. + - `skills: array of ContainerSkill or null` + + Skills loaded in the container + + - `skill_id: string` + + Skill ID + + - `type: "anthropic" or "custom"` + + Type of skill - either 'anthropic' (built-in) or 'custom' (user-defined) + + - `"anthropic"` + + - `"custom"` + + - `version: string` + + Skill version or 'latest' for most recent version + - `content: array of ContentBlock` Content generated by the model.
- `"redacted_thinking"` - - `ToolUseBlock object { id, caller, input, 2 more }` + - `ToolUseBlock object { id, caller, input, 3 more }` - `id: string`
- `type: "tool_use"` - `"tool_use"` + + - `toolset_name: optional string or null` + + For a toolset member tool_use, the toolset family. - `ServerToolUseBlock object { id, caller, input, 2 more }`
The time at which the container will expire. + - `skills: array of ContainerSkill or null` + + Skills loaded in the container + + - `skill_id: string` + + Skill ID + + - `type: "anthropic" or "custom"` + + Type of skill - either 'anthropic' (built-in) or 'custom' (user-defined) + + - `"anthropic"` + + - `"custom"` + + - `version: string` + + Skill version or 'latest' for most recent version + - `content: array of ContentBlock` Content generated by the model.
- `"redacted_thinking"` - - `ToolUseBlock object { id, caller, input, 2 more }` + - `ToolUseBlock object { id, caller, input, 3 more }` - `id: string`
- `type: "tool_use"` - `"tool_use"` + + - `toolset_name: optional string or null` + + For a toolset member tool_use, the toolset family. - `ServerToolUseBlock object { id, caller, input, 2 more }`
The time at which the container will expire. + - `skills: array of ContainerSkill or null` + + Skills loaded in the container + + - `skill_id: string` + + Skill ID + + - `type: "anthropic" or "custom"` + + Type of skill - either 'anthropic' (built-in) or 'custom' (user-defined) + + - `"anthropic"` + + - `"custom"` + + - `version: string` + + Skill version or 'latest' for most recent version + - `content: array of ContentBlock` Content generated by the model.
- `"redacted_thinking"` - - `ToolUseBlock object { id, caller, input, 2 more }` + - `ToolUseBlock object { id, caller, input, 3 more }` - `id: string`
- `type: "tool_use"` - `"tool_use"` + + - `toolset_name: optional string or null` + + For a toolset member tool_use, the toolset family. - `ServerToolUseBlock object { id, caller, input, 2 more }`
The time at which the container will expire. + - `skills: array of ContainerSkill or null` + + Skills loaded in the container + + - `skill_id: string` + + Skill ID + + - `type: "anthropic" or "custom"` + + Type of skill - either 'anthropic' (built-in) or 'custom' (user-defined) + + - `"anthropic"` + + - `"custom"` + + - `version: string` + + Skill version or 'latest' for most recent version + - `content: array of ContentBlock` Content generated by the model.
- `"redacted_thinking"` - - `ToolUseBlock object { id, caller, input, 2 more }` + - `ToolUseBlock object { id, caller, input, 3 more }` - `id: string`
- `type: "tool_use"` - `"tool_use"` + + - `toolset_name: optional string or null` + + For a toolset member tool_use, the toolset family. - `ServerToolUseBlock object { id, caller, input, 2 more }`
api/messages/batches/create Changed · +849 / -41 lines
The two sides of this change are too far apart to line up, so this is the differ's own diff of it.
- `"search_result_location"` - - `ImageBlockParam object { source, type, cache_control }` - - - `source: Base64ImageSource or URLImageSource` + - `ImageBlockParam object { source, type, cache_control, transformations }` + + - `source: Base64ImageSource or URLImageSource or FileImageSource` - `Base64ImageSource object { data, media_type, type }`
- `url: string` + - `FileImageSource object { file_id, type }` + + - `file_id: string` + + - `type: "file"` + + - `"file"` + - `type: "image"` - `"image"`
Create a cache control breakpoint at this content block. + - `transformations: optional ImageTransformationsParam or null` + + Configures the transformations the server applies to this image before the model observes it. Each key names a condition the server transforms images for; its value selects the transformation applied. Omitted keys keep their default behavior, and an empty object is equivalent to omitting the field. + + - `oversized_image: optional "downsize" or "error"` + + What the server does when this image exceeds the model's maximum image size. `"downsize"` (the default) scales the image down to fit, which changes the dimensions the model observes without telling you. `"error"` instead rejects the request with a 400 error naming the image's dimensions and the largest dimensions that fit, so you can scale the image deliberately โ your image is never silently scaled down. + + - `"downsize"` + + - `"error"` + - `DocumentBlockParam object { source, type, cache_control, 3 more }` - - `source: Base64PDFSource or PlainTextSource or ContentBlockSource or URLPDFSource` + - `source: Base64PDFSource or PlainTextSource or ContentBlockSource or 2 more` - `Base64PDFSource object { data, media_type, type }`
- `TextBlockParam object { text, type, cache_control, citations }` - - `ImageBlockParam object { source, type, cache_control }` + - `ImageBlockParam object { source, type, cache_control, transformations }` - `type: "content"`
- `url: string` + - `FileDocumentSource object { file_id, type }` + + - `file_id: string` + + - `type: "file"` + + - `"file"` + - `type: "document"` - `"document"`
- `"redacted_thinking"` - - `ToolUseBlockParam object { id, input, name, 3 more }` + - `ToolUseBlockParam object { id, input, name, 4 more }` - `id: string`
- `"code_execution_20260120"` - - `ToolResultBlockParam object { tool_use_id, type, cache_control, 2 more }` + - `toolset_name: optional string or null` + + For a toolset member tool_use, the toolset family this member belongs to. + + - `ToolResultBlockParam object { tool_use_id, type, cache_control, 3 more }` - `tool_use_id: string`
Create a cache control breakpoint at this content block. - - `content: optional string or array of TextBlockParam or ImageBlockParam or SearchResultBlockParam or 2 more` + - `content: optional string or array of TextBlockParam or ImageBlockParam or SearchResultBlockParam or 3 more` - `string` - - `array of TextBlockParam or ImageBlockParam or SearchResultBlockParam or 2 more` + - `array of TextBlockParam or ImageBlockParam or SearchResultBlockParam or 3 more` - `TextBlockParam object { text, type, cache_control, citations }` - - `ImageBlockParam object { source, type, cache_control }` + - `ImageBlockParam object { source, type, cache_control, transformations }` - `SearchResultBlockParam object { content, source, title, 3 more }`
Create a cache control breakpoint at this content block. + - `BrowserStateBlockParam object { tabs, type, cache_control, state_changes }` + + The caller's browser state after a browser toolset member call โ + the full inventory of open tabs, which tab is active, and any side + effects (tabs opened, download state changes) the call produced. + + At most one per `tool_result`, only on a non-error result answering a + browser toolset member `tool_use`. The server renders the + model-visible text from it; the model never sees the raw fields. + + - `tabs: array of BrowserStateTabEntry` + + All tabs open in the browser after this call โ the full inventory, not a delta. May be empty. Whenever non-empty, exactly one entry carries `active: true`. + + - `tab_id: string` + + The caller-assigned identifier for this tab, unique within the inventory. + + - `title: string` + + The title of the page the tab is showing. May be empty. + + - `url: string` + + The URL of the page the tab is showing. May be empty. + + - `active: optional boolean` + + Whether this tab is the active tab after this call. Whenever `tabs` is non-empty, exactly one entry is marked `active: true`. + + - `type: "browser_state"` + + - `"browser_state"` + + - `cache_control: optional CacheControlEphemeral or null` + + Create a cache control breakpoint at this content block. + + - `state_changes: optional array of BrowserStateChange or null` + + Tabs opened and download state changes during this call. "Nothing to report" is expressed by omitting the field, never by an empty list. + + - `BrowserStateChangeTabOpened object { tab_id, type }` + + A tab this call's execution opened that remains open at its end โ + the creation delta of the `tabs` inventory, not an event log. + + Carries only the `tab_id`; the tab's `title` and `url` live on its + `tabs` entry, which must include the same `tab_id`. A tab opened + during a failed call gets no deferred `tab_opened`; it simply appears + in the next result's `tabs` inventory. + + - `tab_id: string` + + The `tab_id` of the opened tab, present in `tabs`. + + - `type: "tab_opened"` + + - `"tab_opened"` + + - `BrowserStateChangeDownloadStarted object { download_id, type, url }` + + A file download that started during this call. + + - `download_id: string` + + The caller-assigned identifier for this download, stable across the state changes reporting it. + + - `type: "download_started"` + + - `"download_started"` + + - `url: string` + + The final post-redirect URL the download was served from. + + - `BrowserStateChangeDownloadCompleted object { download_id, type, url, 2 more }` + + A file download that finished during this call, reported with the + same `download_id` as its `download_started` โ or without a prior + `download_started`, when the download finished during the call that + started it (at most one state change per `download_id` per result). + + - `download_id: string` + + The caller-assigned identifier for this download, stable across the state changes reporting it. + + - `type: "download_completed"` + + - `"download_completed"` + + - `url: string` + + The final post-redirect URL the download was served from. + + - `path: optional string or null` + + Where the executor saved the file, on the executor's filesystem. Only included when another tool in the same environment can read the file at that path. + + - `size_bytes: optional number or null` + + The completed download's size. + + - `BrowserStateChangeDownloadFailed object { download_id, type, url, error }` + + A file download that failed โ or was cancelled โ during this call. + + - `download_id: string` + + The caller-assigned identifier for this download, stable across the state changes reporting it. + + - `type: "download_failed"` + + - `"download_failed"` + + - `url: string` + + The final post-redirect URL the download was served from. + + - `error: optional string or null` + + The failure or cancellation detail, when known. + - `is_error: optional boolean` + + - `toolset_name: optional string or null` + + For a toolset member tool_result, the toolset family of the paired tool_use. - `ServerToolUseBlockParam object { id, input, name, 3 more }`
Create a cache control breakpoint at this content block. - - `MidConversationSystemBlockParam object { content, type, cache_control }` - - System instructions that appear mid-conversation. - - Use this block to provide or update system-level instructions at a specific - point in the conversation, rather than only via the top-level `system` parameter. - - - `content: array of TextBlockParam` - - System instruction text blocks. - - - `text: string` - - - `type: "text"` - - - `cache_control: optional CacheControlEphemeral or null` - - Create a cache control breakpoint at this content block. - - - `citations: optional array of TextCitationParam or null` - - - `type: "mid_conv_system"` - - - `"mid_conv_system"` - - - `cache_control: optional CacheControlEphemeral or null` - - Create a cache control breakpoint at this content block. - - `role: "user" or "assistant" or "system"` - `"user"`
Top-level cache control automatically applies a cache_control marker to the last cacheable block in the request. - - `container: optional string or null` + - `container: optional MessageCreateParamsContainer or null` Container identifier for reuse across requests. + + - `ContainerParams object { id, skills }` + + Container parameters with skills to be loaded. + + - `id: optional string or null` + + Container id + + - `skills: optional array of SkillParams or null` + + List of skills to load in the container + + - `skill_id: string` + + Skill ID + + - `type: "anthropic" or "custom"` + + Type of skill - either 'anthropic' (built-in) or 'custom' (user-defined) + + - `"anthropic"` + + - `"custom"` + + - `version: optional string` + + Skill version or 'latest' for most recent version + + - `string` - `inference_geo: optional string or null`
When true, guarantees schema validation on tool names and inputs + - `BrowserToolset20260801 object { type, allowed_callers, cache_control, configs }` + + The browser toolset: a single `tools[]` entry (carrying no + `name`) that declares the browser tool family. The model is served + the family's tool with any members disabled via `configs` removed + from its schema. + + - `type: "browser_toolset_20260801"` + + - `"browser_toolset_20260801"` + + - `allowed_callers: optional array of "direct" or "code_execution_20250825" or "code_execution_20260120" or "code_execution_20260521"` + + - `"direct"` + + - `"code_execution_20250825"` + + - `"code_execution_20260120"` + + - `"code_execution_20260521"` + + - `cache_control: optional CacheControlEphemeral or null` + + Create a cache control breakpoint at this content block. + + - `configs: optional BrowserToolsetConfigs or null` + + Per-member configuration for `browser_toolset_20260801`: one + optional field per member tool, keyed by the member name โ the same + name the member's `tool_use` blocks carry. Every member is an + accepted key, and a member's defaults apply wherever its key is + absent. Unknown keys are rejected: the field set is this toolset + version's complete member set. + + - `close_tab: optional BrowserCloseTabConfig or null` + + `close_tab`'s config overrides. + + - `defer_loading: optional boolean or null` + + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. + + - `enabled: optional boolean or null` + + Whether this member is offered to the model. Default is per member, per the toolset's documentation. A member whose enabled resolves false is withheld from the served schema. + + - `double_click: optional BrowserDoubleClickConfig or null` + + `double_click`'s config overrides. + + - `defer_loading: optional boolean or null` + + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. + + - `enabled: optional boolean or null` + + Whether this member is offered to the model. Default is per member, per the toolset's documentation. A member whose enabled resolves false is withheld from the served schema. + + - `file_upload: optional BrowserFileUploadConfig or null` + + `file_upload`'s config overrides. + + - `defer_loading: optional boolean or null` + + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. + + - `enabled: optional boolean or null` + + Whether this member is offered to the model. Default is per member, per the toolset's documentation. A member whose enabled resolves false is withheld from the served schema. + + - `find: optional BrowserFindConfig or null` + + `find`'s config overrides. + + - `defer_loading: optional boolean or null` + + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. + + - `enabled: optional boolean or null` + + Whether this member is offered to the model. Default is per member, per the toolset's documentation. A member whose enabled resolves false is withheld from the served schema. + + - `form_input: optional BrowserFormInputConfig or null` + + `form_input`'s config overrides. + + - `defer_loading: optional boolean or null` + + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. + + - `enabled: optional boolean or null` + + Whether this member is offered to the model. Default is per member, per the toolset's documentation. A member whose enabled resolves false is withheld from the served schema. + + - `get_page_text: optional BrowserGetPageTextConfig or null` + + `get_page_text`'s config overrides. + + - `defer_loading: optional boolean or null` + + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. + + - `enabled: optional boolean or null` + + Whether this member is offered to the model. Default is per member, per the toolset's documentation. A member whose enabled resolves false is withheld from the served schema. + + - `hold_key: optional BrowserHoldKeyConfig or null` + + `hold_key`'s config overrides. + + - `defer_loading: optional boolean or null` + + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. + + - `enabled: optional boolean or null` + + Whether this member is offered to the model. Default is per member, per the toolset's documentation. A member whose enabled resolves false is withheld from the served schema. + + - `hover: optional BrowserHoverConfig or null` + + `hover`'s config overrides. + + - `defer_loading: optional boolean or null` + + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. + + - `enabled: optional boolean or null` + + Whether this member is offered to the model. Default is per member, per the toolset's documentation. A member whose enabled resolves false is withheld from the served schema. + + - `javascript_exec: optional BrowserJavascriptExecConfig or null` + + `javascript_exec`'s config overrides. + + - `defer_loading: optional boolean or null` + + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. + + - `enabled: optional boolean or null` + + Whether this member is offered to the model. Default is per member, per the toolset's documentation. A member whose enabled resolves false is withheld from the served schema. + + - `key: optional BrowserKeyConfig or null` + + `key`'s config overrides. + + - `defer_loading: optional boolean or null` + + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. + + - `enabled: optional boolean or null` + + Whether this member is offered to the model. Default is per member, per the toolset's documentation. A member whose enabled resolves false is withheld from the served schema. + + - `left_click: optional BrowserLeftClickConfig or null` + + `left_click`'s config overrides. + + - `defer_loading: optional boolean or null` + + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. + + - `enabled: optional boolean or null` + + Whether this member is offered to the model. Default is per member, per the toolset's documentation. A member whose enabled resolves false is withheld from the served schema. + + - `left_click_drag: optional BrowserLeftClickDragConfig or null` + + `left_click_drag`'s config overrides. + + - `defer_loading: optional boolean or null` + + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. + + - `enabled: optional boolean or null` + + Whether this member is offered to the model. Default is per member, per the toolset's documentation. A member whose enabled resolves false is withheld from the served schema. + + - `left_mouse_down: optional BrowserLeftMouseDownConfig or null` + + `left_mouse_down`'s config overrides. + + - `defer_loading: optional boolean or null` + + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. + + - `enabled: optional boolean or null` + + Whether this member is offered to the model. Default is per member, per the toolset's documentation. A member whose enabled resolves false is withheld from the served schema. + + - `left_mouse_up: optional BrowserLeftMouseUpConfig or null` + + `left_mouse_up`'s config overrides. + + - `defer_loading: optional boolean or null` + + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. + + - `enabled: optional boolean or null` + + Whether this member is offered to the model. Default is per member, per the toolset's documentation. A member whose enabled resolves false is withheld from the served schema. + + - `list_tabs: optional BrowserListTabsConfig or null` + + `list_tabs`'s config overrides. + + - `defer_loading: optional boolean or null` + + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. + + - `enabled: optional boolean or null` + + Whether this member is offered to the model. Default is per member, per the toolset's documentation. A member whose enabled resolves false is withheld from the served schema. + + - `middle_click: optional BrowserMiddleClickConfig or null` + + `middle_click`'s config overrides. + + - `defer_loading: optional boolean or null` + + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. + + - `enabled: optional boolean or null` + + Whether this member is offered to the model. Default is per member, per the toolset's documentation. A member whose enabled resolves false is withheld from the served schema. + + - `mouse_move: optional BrowserMouseMoveConfig or null` + + `mouse_move`'s config overrides. + + - `defer_loading: optional boolean or null` + + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. + + - `enabled: optional boolean or null` + + Whether this member is offered to the model. Default is per member, per the toolset's documentation. A member whose enabled resolves false is withheld from the served schema. + + - `navigate: optional BrowserNavigateConfig or null` + + `navigate`'s config overrides. + + - `defer_loading: optional boolean or null` + + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. + + - `enabled: optional boolean or null` + + Whether this member is offered to the model. Default is per member, per the toolset's documentation. A member whose enabled resolves false is withheld from the served schema. + + - `new_tab: optional BrowserNewTabConfig or null` + + `new_tab`'s config overrides. + + - `defer_loading: optional boolean or null` + + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. + + - `enabled: optional boolean or null` + + Whether this member is offered to the model. Default is per member, per the toolset's documentation. A member whose enabled resolves false is withheld from the served schema. + + - `read_console: optional BrowserReadConsoleConfig or null` + + `read_console`'s config overrides. + + - `defer_loading: optional boolean or null` + + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. + + - `enabled: optional boolean or null` + + Whether this member is offered to the model. Default is per member, per the toolset's documentation. A member whose enabled resolves false is withheld from the served schema. + + - `read_network: optional BrowserReadNetworkConfig or null` + + `read_network`'s config overrides. + + - `defer_loading: optional boolean or null` + + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. + + - `enabled: optional boolean or null` + + Whether this member is offered to the model. Default is per member, per the toolset's documentation. A member whose enabled resolves false is withheld from the served schema. + + - `read_page: optional BrowserReadPageConfig or null` + + `read_page`'s config overrides. + + - `defer_loading: optional boolean or null` + + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. + + - `enabled: optional boolean or null` + + Whether this member is offered to the model. Default is per member, per the toolset's documentation. A member whose enabled resolves false is withheld from the served schema. + + - `right_click: optional BrowserRightClickConfig or null` + + `right_click`'s config overrides. + + - `defer_loading: optional boolean or null` + + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. + + - `enabled: optional boolean or null` + + Whether this member is offered to the model. Default is per member, per the toolset's documentation. A member whose enabled resolves false is withheld from the served schema. + + - `screenshot: optional BrowserScreenshotConfig or null` + + `screenshot`'s config overrides. + + - `defer_loading: optional boolean or null` + + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. + + - `enabled: optional boolean or null` + + Whether this member is offered to the model. Default is per member, per the toolset's documentation. A member whose enabled resolves false is withheld from the served schema. + + - `scroll: optional BrowserScrollConfig or null` + + `scroll`'s config overrides. + + - `defer_loading: optional boolean or null` + + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. + + - `enabled: optional boolean or null` + + Whether this member is offered to the model. Default is per member, per the toolset's documentation. A member whose enabled resolves false is withheld from the served schema. + + - `scroll_to: optional BrowserScrollToConfig or null` + + `scroll_to`'s config overrides. + + - `defer_loading: optional boolean or null` + + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. + + - `enabled: optional boolean or null` + + Whether this member is offered to the model. Default is per member, per the toolset's documentation. A member whose enabled resolves false is withheld from the served schema. + + - `switch_tab: optional BrowserSwitchTabConfig or null` + + `switch_tab`'s config overrides. + + - `defer_loading: optional boolean or null` + + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. + + - `enabled: optional boolean or null` + + Whether this member is offered to the model. Default is per member, per the toolset's documentation. A member whose enabled resolves false is withheld from the served schema. + + - `triple_click: optional BrowserTripleClickConfig or null` + + `triple_click`'s config overrides. + + - `defer_loading: optional boolean or null` + + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. + + - `enabled: optional boolean or null` + + Whether this member is offered to the model. Default is per member, per the toolset's documentation. A member whose enabled resolves false is withheld from the served schema. + + - `type: optional BrowserTypeConfig or null` + + `type`'s config overrides. + + - `defer_loading: optional boolean or null` + + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. + + - `enabled: optional boolean or null` + + Whether this member is offered to the model. Default is per member, per the toolset's documentation. A member whose enabled resolves false is withheld from the served schema. + + - `wait: optional BrowserWaitConfig or null` + + `wait`'s config overrides. + + - `defer_loading: optional boolean or null` + + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. + + - `enabled: optional boolean or null` + + Whether this member is offered to the model. Default is per member, per the toolset's documentation. A member whose enabled resolves false is withheld from the served schema. + + - `zoom: optional BrowserZoomConfig or null` + + `zoom`'s config overrides. + + - `defer_loading: optional boolean or null` + + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. + + - `enabled: optional boolean or null` + + Whether this member is offered to the model. Default is per member, per the toolset's documentation. A member whose enabled resolves false is withheld from the served schema. + - `MemoryTool20250818 object { name, type, allowed_callers, 4 more }` - `name: "memory"`
- `strict: optional boolean` When true, guarantees schema validation on tool names and inputs + + - `ComputerToolset20260801 object { type, allowed_callers, cache_control, configs }` + + The computer toolset: a single `tools[]` entry (carrying no + `name`) that declares the computer tool family. The model is + served the family's tool with any members disabled via `configs` + removed from its schema. Every member is enabled by default, zoom + included. The single-tool options `display_number` and + `enable_zoom` are not fields of a toolset entry โ it carries only + `type`, `configs`, and `cache_control`; zoom is controlled + via `configs.zoom.enabled`. + + - `type: "computer_toolset_20260801"` + + - `"computer_toolset_20260801"` + + - `allowed_callers: optional array of "direct" or "code_execution_20250825" or "code_execution_20260120" or "code_execution_20260521"` + + - `"direct"` + + - `"code_execution_20250825"` + + - `"code_execution_20260120"` + + - `"code_execution_20260521"` + + - `cache_control: optional CacheControlEphemeral or null` + + Create a cache control breakpoint at this content block. + + - `configs: optional ComputerToolsetConfigs or null` + + Per-member configuration for `computer_toolset_20260801`: one + optional field per member tool, keyed by the member name โ the same + name the member's `tool_use` blocks carry. Every member is an + accepted key, and a member's defaults apply wherever its key is + absent. Unknown keys are rejected: the field set is this toolset + version's complete member set. + + - `cursor_position: optional ComputerCursorPositionConfig or null` + + `cursor_position`'s config overrides. + + - `defer_loading: optional boolean or null` + + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. + + - `enabled: optional boolean or null` + + Whether this member is offered to the model. Default is per member, per the toolset's documentation. A member whose enabled resolves false is withheld from the served schema. + + - `double_click: optional ComputerDoubleClickConfig or null` + + `double_click`'s config overrides. + + - `defer_loading: optional boolean or null` + + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. + + - `enabled: optional boolean or null` + + Whether this member is offered to the model. Default is per member, per the toolset's documentation. A member whose enabled resolves false is withheld from the served schema. + + - `hold_key: optional ComputerHoldKeyConfig or null` + + `hold_key`'s config overrides. + + - `defer_loading: optional boolean or null` + + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. + + - `enabled: optional boolean or null` + + Whether this member is offered to the model. Default is per member, per the toolset's documentation. A member whose enabled resolves false is withheld from the served schema. + + - `key: optional ComputerKeyConfig or null` + + `key`'s config overrides. + + - `defer_loading: optional boolean or null` + + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. + + - `enabled: optional boolean or null` + + Whether this member is offered to the model. Default is per member, per the toolset's documentation. A member whose enabled resolves false is withheld from the served schema. + + - `left_click: optional ComputerLeftClickConfig or null` + + `left_click`'s config overrides. + + - `defer_loading: optional boolean or null` + + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. + + - `enabled: optional boolean or null` + + Whether this member is offered to the model. Default is per member, per the toolset's documentation. A member whose enabled resolves false is withheld from the served schema. + + - `left_click_drag: optional ComputerLeftClickDragConfig or null` + + `left_click_drag`'s config overrides. + + - `defer_loading: optional boolean or null` + + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. + + - `enabled: optional boolean or null` + + Whether this member is offered to the model. Default is per member, per the toolset's documentation. A member whose enabled resolves false is withheld from the served schema. + + - `left_mouse_down: optional ComputerLeftMouseDownConfig or null` + + `left_mouse_down`'s config overrides. + + - `defer_loading: optional boolean or null` + + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. + + - `enabled: optional boolean or null` + + Whether this member is offered to the model. Default is per member, per the toolset's documentation. A member whose enabled resolves false is withheld from the served schema. + + - `left_mouse_up: optional ComputerLeftMouseUpConfig or null` + + `left_mouse_up`'s config overrides. + + - `defer_loading: optional boolean or null` + + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. + + - `enabled: optional boolean or null` + + Whether this member is offered to the model. Default is per member, per the toolset's documentation. A member whose enabled resolves false is withheld from the served schema. + + - `middle_click: optional ComputerMiddleClickConfig or null` + + `middle_click`'s config overrides. + + - `defer_loading: optional boolean or null` + + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. + + - `enabled: optional boolean or null` + + Whether this member is offered to the model. Default is per member, per the toolset's documentation. A member whose enabled resolves false is withheld from the served schema. + + - `mouse_move: optional ComputerMouseMoveConfig or null` + + `mouse_move`'s config overrides. + + - `defer_loading: optional boolean or null` + + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. + + - `enabled: optional boolean or null` + + Whether this member is offered to the model. Default is per member, per the toolset's documentation. A member whose enabled resolves false is withheld from the served schema. + + - `right_click: optional ComputerRightClickConfig or null` + + `right_click`'s config overrides. + + - `defer_loading: optional boolean or null` + + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. + + - `enabled: optional boolean or null` + + Whether this member is offered to the model. Default is per member, per the toolset's documentation. A member whose enabled resolves false is withheld from the served schema. + + - `screenshot: optional ComputerScreenshotConfig or null` + + `screenshot`'s config overrides. + + - `defer_loading: optional boolean or null` + + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. + + - `enabled: optional boolean or null` + + Whether this member is offered to the model. Default is per member, per the toolset's documentation. A member whose enabled resolves false is withheld from the served schema. + + - `scroll: optional ComputerScrollConfig or null` + + `scroll`'s config overrides. + + - `defer_loading: optional boolean or null` + + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. + + - `enabled: optional boolean or null` + + Whether this member is offered to the model. Default is per member, per the toolset's documentation. A member whose enabled resolves false is withheld from the served schema. + + - `triple_click: optional ComputerTripleClickConfig or null` + + `triple_click`'s config overrides. + + - `defer_loading: optional boolean or null` + + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. + + - `enabled: optional boolean or null` + + Whether this member is offered to the model. Default is per member, per the toolset's documentation. A member whose enabled resolves false is withheld from the served schema. + + - `type: optional ComputerTypeConfig or null` + + `type`'s config overrides. + + - `defer_loading: optional boolean or null` + + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. + + - `enabled: optional boolean or null` + + Whether this member is offered to the model. Default is per member, per the toolset's documentation. A member whose enabled resolves false is withheld from the served schema. + + - `wait: optional ComputerWaitConfig or null` + + `wait`'s config overrides. + + - `defer_loading: optional boolean or null` + + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. + + - `enabled: optional boolean or null` + + Whether this member is offered to the model. Default is per member, per the toolset's documentation. A member whose enabled resolves false is withheld from the served schema. + + - `zoom: optional ComputerZoomConfig or null` + + `zoom`'s config overrides. + + - `defer_loading: optional boolean or null` + + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. + + - `enabled: optional boolean or null` + + Whether this member is offered to the model. Default is per member, per the toolset's documentation. A member whose enabled resolves false is withheld from the served schema. - `ToolTextEditor20250124 object { name, type, allowed_callers, 4 more }`
"role": "user" } ], - "model": "claude-opus-4-6" + "model": "claude-opus-5" } } ]
api/messages/batches/results Changed · +25 / -1 lines
The time at which the container will expire. + - `skills: array of ContainerSkill or null` + + Skills loaded in the container + + - `skill_id: string` + + Skill ID + + - `type: "anthropic" or "custom"` + + Type of skill - either 'anthropic' (built-in) or 'custom' (user-defined) + + - `"anthropic"` + + - `"custom"` + + - `version: string` + + Skill version or 'latest' for most recent version + - `content: array of ContentBlock` Content generated by the model.
- `"redacted_thinking"` - - `ToolUseBlock object { id, caller, input, 2 more }` + - `ToolUseBlock object { id, caller, input, 3 more }` - `id: string`
- `type: "tool_use"` - `"tool_use"` + + - `toolset_name: optional string or null` + + For a toolset member tool_use, the toolset family. - `ServerToolUseBlock object { id, caller, input, 2 more }`
api/messages/count_tokens Changed · +818 / -40 lines
The two sides of this change are too far apart to line up, so this is the differ's own diff of it.
- `"search_result_location"` - - `ImageBlockParam object { source, type, cache_control }` - - - `source: Base64ImageSource or URLImageSource` + - `ImageBlockParam object { source, type, cache_control, transformations }` + + - `source: Base64ImageSource or URLImageSource or FileImageSource` - `Base64ImageSource object { data, media_type, type }`
- `url: string` + - `FileImageSource object { file_id, type }` + + - `file_id: string` + + - `type: "file"` + + - `"file"` + - `type: "image"` - `"image"`
Create a cache control breakpoint at this content block. + - `transformations: optional ImageTransformationsParam or null` + + Configures the transformations the server applies to this image before the model observes it. Each key names a condition the server transforms images for; its value selects the transformation applied. Omitted keys keep their default behavior, and an empty object is equivalent to omitting the field. + + - `oversized_image: optional "downsize" or "error"` + + What the server does when this image exceeds the model's maximum image size. `"downsize"` (the default) scales the image down to fit, which changes the dimensions the model observes without telling you. `"error"` instead rejects the request with a 400 error naming the image's dimensions and the largest dimensions that fit, so you can scale the image deliberately โ your image is never silently scaled down. + + - `"downsize"` + + - `"error"` + - `DocumentBlockParam object { source, type, cache_control, 3 more }` - - `source: Base64PDFSource or PlainTextSource or ContentBlockSource or URLPDFSource` + - `source: Base64PDFSource or PlainTextSource or ContentBlockSource or 2 more` - `Base64PDFSource object { data, media_type, type }`
- `TextBlockParam object { text, type, cache_control, citations }` - - `ImageBlockParam object { source, type, cache_control }` + - `ImageBlockParam object { source, type, cache_control, transformations }` - `type: "content"`
- `url: string` + - `FileDocumentSource object { file_id, type }` + + - `file_id: string` + + - `type: "file"` + + - `"file"` + - `type: "document"` - `"document"`
- `"redacted_thinking"` - - `ToolUseBlockParam object { id, input, name, 3 more }` + - `ToolUseBlockParam object { id, input, name, 4 more }` - `id: string`
- `"code_execution_20260120"` - - `ToolResultBlockParam object { tool_use_id, type, cache_control, 2 more }` + - `toolset_name: optional string or null` + + For a toolset member tool_use, the toolset family this member belongs to. + + - `ToolResultBlockParam object { tool_use_id, type, cache_control, 3 more }` - `tool_use_id: string`
Create a cache control breakpoint at this content block. - - `content: optional string or array of TextBlockParam or ImageBlockParam or SearchResultBlockParam or 2 more` + - `content: optional string or array of TextBlockParam or ImageBlockParam or SearchResultBlockParam or 3 more` - `string` - - `array of TextBlockParam or ImageBlockParam or SearchResultBlockParam or 2 more` + - `array of TextBlockParam or ImageBlockParam or SearchResultBlockParam or 3 more` - `TextBlockParam object { text, type, cache_control, citations }` - - `ImageBlockParam object { source, type, cache_control }` + - `ImageBlockParam object { source, type, cache_control, transformations }` - `SearchResultBlockParam object { content, source, title, 3 more }`
Create a cache control breakpoint at this content block. + - `BrowserStateBlockParam object { tabs, type, cache_control, state_changes }` + + The caller's browser state after a browser toolset member call โ + the full inventory of open tabs, which tab is active, and any side + effects (tabs opened, download state changes) the call produced. + + At most one per `tool_result`, only on a non-error result answering a + browser toolset member `tool_use`. The server renders the + model-visible text from it; the model never sees the raw fields. + + - `tabs: array of BrowserStateTabEntry` + + All tabs open in the browser after this call โ the full inventory, not a delta. May be empty. Whenever non-empty, exactly one entry carries `active: true`. + + - `tab_id: string` + + The caller-assigned identifier for this tab, unique within the inventory. + + - `title: string` + + The title of the page the tab is showing. May be empty. + + - `url: string` + + The URL of the page the tab is showing. May be empty. + + - `active: optional boolean` + + Whether this tab is the active tab after this call. Whenever `tabs` is non-empty, exactly one entry is marked `active: true`. + + - `type: "browser_state"` + + - `"browser_state"` + + - `cache_control: optional CacheControlEphemeral or null` + + Create a cache control breakpoint at this content block. + + - `state_changes: optional array of BrowserStateChange or null` + + Tabs opened and download state changes during this call. "Nothing to report" is expressed by omitting the field, never by an empty list. + + - `BrowserStateChangeTabOpened object { tab_id, type }` + + A tab this call's execution opened that remains open at its end โ + the creation delta of the `tabs` inventory, not an event log. + + Carries only the `tab_id`; the tab's `title` and `url` live on its + `tabs` entry, which must include the same `tab_id`. A tab opened + during a failed call gets no deferred `tab_opened`; it simply appears + in the next result's `tabs` inventory. + + - `tab_id: string` + + The `tab_id` of the opened tab, present in `tabs`. + + - `type: "tab_opened"` + + - `"tab_opened"` + + - `BrowserStateChangeDownloadStarted object { download_id, type, url }` + + A file download that started during this call. + + - `download_id: string` + + The caller-assigned identifier for this download, stable across the state changes reporting it. + + - `type: "download_started"` + + - `"download_started"` + + - `url: string` + + The final post-redirect URL the download was served from. + + - `BrowserStateChangeDownloadCompleted object { download_id, type, url, 2 more }` + + A file download that finished during this call, reported with the + same `download_id` as its `download_started` โ or without a prior + `download_started`, when the download finished during the call that + started it (at most one state change per `download_id` per result). + + - `download_id: string` + + The caller-assigned identifier for this download, stable across the state changes reporting it. + + - `type: "download_completed"` + + - `"download_completed"` + + - `url: string` + + The final post-redirect URL the download was served from. + + - `path: optional string or null` + + Where the executor saved the file, on the executor's filesystem. Only included when another tool in the same environment can read the file at that path. + + - `size_bytes: optional number or null` + + The completed download's size. + + - `BrowserStateChangeDownloadFailed object { download_id, type, url, error }` + + A file download that failed โ or was cancelled โ during this call. + + - `download_id: string` + + The caller-assigned identifier for this download, stable across the state changes reporting it. + + - `type: "download_failed"` + + - `"download_failed"` + + - `url: string` + + The final post-redirect URL the download was served from. + + - `error: optional string or null` + + The failure or cancellation detail, when known. + - `is_error: optional boolean` + + - `toolset_name: optional string or null` + + For a toolset member tool_result, the toolset family of the paired tool_use. - `ServerToolUseBlockParam object { id, input, name, 3 more }`
- `type: "container_upload"` - `"container_upload"` - - - `cache_control: optional CacheControlEphemeral or null` - - Create a cache control breakpoint at this content block. - - - `MidConversationSystemBlockParam object { content, type, cache_control }` - - System instructions that appear mid-conversation. - - Use this block to provide or update system-level instructions at a specific - point in the conversation, rather than only via the top-level `system` parameter. - - - `content: array of TextBlockParam` - - System instruction text blocks. - - - `text: string` - - - `type: "text"` - - - `cache_control: optional CacheControlEphemeral or null` - - Create a cache control breakpoint at this content block. - - - `citations: optional array of TextCitationParam or null` - - - `type: "mid_conv_system"` - - - `"mid_conv_system"` - `cache_control: optional CacheControlEphemeral or null`
When true, guarantees schema validation on tool names and inputs + - `BrowserToolset20260801 object { type, allowed_callers, cache_control, configs }` + + The browser toolset: a single `tools[]` entry (carrying no + `name`) that declares the browser tool family. The model is served + the family's tool with any members disabled via `configs` removed + from its schema. + + - `type: "browser_toolset_20260801"` + + - `"browser_toolset_20260801"` + + - `allowed_callers: optional array of "direct" or "code_execution_20250825" or "code_execution_20260120" or "code_execution_20260521"` + + - `"direct"` + + - `"code_execution_20250825"` + + - `"code_execution_20260120"` + + - `"code_execution_20260521"` + + - `cache_control: optional CacheControlEphemeral or null` + + Create a cache control breakpoint at this content block. + + - `configs: optional BrowserToolsetConfigs or null` + + Per-member configuration for `browser_toolset_20260801`: one + optional field per member tool, keyed by the member name โ the same + name the member's `tool_use` blocks carry. Every member is an + accepted key, and a member's defaults apply wherever its key is + absent. Unknown keys are rejected: the field set is this toolset + version's complete member set. + + - `close_tab: optional BrowserCloseTabConfig or null` + + `close_tab`'s config overrides. + + - `defer_loading: optional boolean or null` + + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. + + - `enabled: optional boolean or null` + + Whether this member is offered to the model. Default is per member, per the toolset's documentation. A member whose enabled resolves false is withheld from the served schema. + + - `double_click: optional BrowserDoubleClickConfig or null` + + `double_click`'s config overrides. + + - `defer_loading: optional boolean or null` + + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. + + - `enabled: optional boolean or null` + + Whether this member is offered to the model. Default is per member, per the toolset's documentation. A member whose enabled resolves false is withheld from the served schema. + + - `file_upload: optional BrowserFileUploadConfig or null` + + `file_upload`'s config overrides. + + - `defer_loading: optional boolean or null` + + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. + + - `enabled: optional boolean or null` + + Whether this member is offered to the model. Default is per member, per the toolset's documentation. A member whose enabled resolves false is withheld from the served schema. + + - `find: optional BrowserFindConfig or null` + + `find`'s config overrides. + + - `defer_loading: optional boolean or null` + + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. + + - `enabled: optional boolean or null` + + Whether this member is offered to the model. Default is per member, per the toolset's documentation. A member whose enabled resolves false is withheld from the served schema. + + - `form_input: optional BrowserFormInputConfig or null` + + `form_input`'s config overrides. + + - `defer_loading: optional boolean or null` + + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. + + - `enabled: optional boolean or null` + + Whether this member is offered to the model. Default is per member, per the toolset's documentation. A member whose enabled resolves false is withheld from the served schema. + + - `get_page_text: optional BrowserGetPageTextConfig or null` + + `get_page_text`'s config overrides. + + - `defer_loading: optional boolean or null` + + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. + + - `enabled: optional boolean or null` + + Whether this member is offered to the model. Default is per member, per the toolset's documentation. A member whose enabled resolves false is withheld from the served schema. + + - `hold_key: optional BrowserHoldKeyConfig or null` + + `hold_key`'s config overrides. + + - `defer_loading: optional boolean or null` + + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. + + - `enabled: optional boolean or null` + + Whether this member is offered to the model. Default is per member, per the toolset's documentation. A member whose enabled resolves false is withheld from the served schema. + + - `hover: optional BrowserHoverConfig or null` + + `hover`'s config overrides. + + - `defer_loading: optional boolean or null` + + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. + + - `enabled: optional boolean or null` + + Whether this member is offered to the model. Default is per member, per the toolset's documentation. A member whose enabled resolves false is withheld from the served schema. + + - `javascript_exec: optional BrowserJavascriptExecConfig or null` + + `javascript_exec`'s config overrides. + + - `defer_loading: optional boolean or null` + + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. + + - `enabled: optional boolean or null` + + Whether this member is offered to the model. Default is per member, per the toolset's documentation. A member whose enabled resolves false is withheld from the served schema. + + - `key: optional BrowserKeyConfig or null` + + `key`'s config overrides. + + - `defer_loading: optional boolean or null` + + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. + + - `enabled: optional boolean or null` + + Whether this member is offered to the model. Default is per member, per the toolset's documentation. A member whose enabled resolves false is withheld from the served schema. + + - `left_click: optional BrowserLeftClickConfig or null` + + `left_click`'s config overrides. + + - `defer_loading: optional boolean or null` + + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. + + - `enabled: optional boolean or null` + + Whether this member is offered to the model. Default is per member, per the toolset's documentation. A member whose enabled resolves false is withheld from the served schema. + + - `left_click_drag: optional BrowserLeftClickDragConfig or null` + + `left_click_drag`'s config overrides. + + - `defer_loading: optional boolean or null` + + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. + + - `enabled: optional boolean or null` + + Whether this member is offered to the model. Default is per member, per the toolset's documentation. A member whose enabled resolves false is withheld from the served schema. + + - `left_mouse_down: optional BrowserLeftMouseDownConfig or null` + + `left_mouse_down`'s config overrides. + + - `defer_loading: optional boolean or null` + + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. + + - `enabled: optional boolean or null` + + Whether this member is offered to the model. Default is per member, per the toolset's documentation. A member whose enabled resolves false is withheld from the served schema. + + - `left_mouse_up: optional BrowserLeftMouseUpConfig or null` + + `left_mouse_up`'s config overrides. + + - `defer_loading: optional boolean or null` + + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. + + - `enabled: optional boolean or null` + + Whether this member is offered to the model. Default is per member, per the toolset's documentation. A member whose enabled resolves false is withheld from the served schema. + + - `list_tabs: optional BrowserListTabsConfig or null` + + `list_tabs`'s config overrides. + + - `defer_loading: optional boolean or null` + + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. + + - `enabled: optional boolean or null` + + Whether this member is offered to the model. Default is per member, per the toolset's documentation. A member whose enabled resolves false is withheld from the served schema. + + - `middle_click: optional BrowserMiddleClickConfig or null` + + `middle_click`'s config overrides. + + - `defer_loading: optional boolean or null` + + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. + + - `enabled: optional boolean or null` + + Whether this member is offered to the model. Default is per member, per the toolset's documentation. A member whose enabled resolves false is withheld from the served schema. + + - `mouse_move: optional BrowserMouseMoveConfig or null` + + `mouse_move`'s config overrides. + + - `defer_loading: optional boolean or null` + + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. + + - `enabled: optional boolean or null` + + Whether this member is offered to the model. Default is per member, per the toolset's documentation. A member whose enabled resolves false is withheld from the served schema. + + - `navigate: optional BrowserNavigateConfig or null` + + `navigate`'s config overrides. + + - `defer_loading: optional boolean or null` + + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. + + - `enabled: optional boolean or null` + + Whether this member is offered to the model. Default is per member, per the toolset's documentation. A member whose enabled resolves false is withheld from the served schema. + + - `new_tab: optional BrowserNewTabConfig or null` + + `new_tab`'s config overrides. + + - `defer_loading: optional boolean or null` + + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. + + - `enabled: optional boolean or null` + + Whether this member is offered to the model. Default is per member, per the toolset's documentation. A member whose enabled resolves false is withheld from the served schema. + + - `read_console: optional BrowserReadConsoleConfig or null` + + `read_console`'s config overrides. + + - `defer_loading: optional boolean or null` + + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. + + - `enabled: optional boolean or null` + + Whether this member is offered to the model. Default is per member, per the toolset's documentation. A member whose enabled resolves false is withheld from the served schema. + + - `read_network: optional BrowserReadNetworkConfig or null` + + `read_network`'s config overrides. + + - `defer_loading: optional boolean or null` + + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. + + - `enabled: optional boolean or null` + + Whether this member is offered to the model. Default is per member, per the toolset's documentation. A member whose enabled resolves false is withheld from the served schema. + + - `read_page: optional BrowserReadPageConfig or null` + + `read_page`'s config overrides. + + - `defer_loading: optional boolean or null` + + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. + + - `enabled: optional boolean or null` + + Whether this member is offered to the model. Default is per member, per the toolset's documentation. A member whose enabled resolves false is withheld from the served schema. + + - `right_click: optional BrowserRightClickConfig or null` + + `right_click`'s config overrides. + + - `defer_loading: optional boolean or null` + + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. + + - `enabled: optional boolean or null` + + Whether this member is offered to the model. Default is per member, per the toolset's documentation. A member whose enabled resolves false is withheld from the served schema. + + - `screenshot: optional BrowserScreenshotConfig or null` + + `screenshot`'s config overrides. + + - `defer_loading: optional boolean or null` + + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. + + - `enabled: optional boolean or null` + + Whether this member is offered to the model. Default is per member, per the toolset's documentation. A member whose enabled resolves false is withheld from the served schema. + + - `scroll: optional BrowserScrollConfig or null` + + `scroll`'s config overrides. + + - `defer_loading: optional boolean or null` + + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. + + - `enabled: optional boolean or null` + + Whether this member is offered to the model. Default is per member, per the toolset's documentation. A member whose enabled resolves false is withheld from the served schema. + + - `scroll_to: optional BrowserScrollToConfig or null` + + `scroll_to`'s config overrides. + + - `defer_loading: optional boolean or null` + + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. + + - `enabled: optional boolean or null` + + Whether this member is offered to the model. Default is per member, per the toolset's documentation. A member whose enabled resolves false is withheld from the served schema. + + - `switch_tab: optional BrowserSwitchTabConfig or null` + + `switch_tab`'s config overrides. + + - `defer_loading: optional boolean or null` + + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. + + - `enabled: optional boolean or null` + + Whether this member is offered to the model. Default is per member, per the toolset's documentation. A member whose enabled resolves false is withheld from the served schema. + + - `triple_click: optional BrowserTripleClickConfig or null` + + `triple_click`'s config overrides. + + - `defer_loading: optional boolean or null` + + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. + + - `enabled: optional boolean or null` + + Whether this member is offered to the model. Default is per member, per the toolset's documentation. A member whose enabled resolves false is withheld from the served schema. + + - `type: optional BrowserTypeConfig or null` + + `type`'s config overrides. + + - `defer_loading: optional boolean or null` + + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. + + - `enabled: optional boolean or null` + + Whether this member is offered to the model. Default is per member, per the toolset's documentation. A member whose enabled resolves false is withheld from the served schema. + + - `wait: optional BrowserWaitConfig or null` + + `wait`'s config overrides. + + - `defer_loading: optional boolean or null` + + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. + + - `enabled: optional boolean or null` + + Whether this member is offered to the model. Default is per member, per the toolset's documentation. A member whose enabled resolves false is withheld from the served schema. + + - `zoom: optional BrowserZoomConfig or null` + + `zoom`'s config overrides. + + - `defer_loading: optional boolean or null` + + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. + + - `enabled: optional boolean or null` + + Whether this member is offered to the model. Default is per member, per the toolset's documentation. A member whose enabled resolves false is withheld from the served schema. + - `MemoryTool20250818 object { name, type, allowed_callers, 4 more }` - `name: "memory"`
- `strict: optional boolean` When true, guarantees schema validation on tool names and inputs + + - `ComputerToolset20260801 object { type, allowed_callers, cache_control, configs }` + + The computer toolset: a single `tools[]` entry (carrying no + `name`) that declares the computer tool family. The model is + served the family's tool with any members disabled via `configs` + removed from its schema. Every member is enabled by default, zoom + included. The single-tool options `display_number` and + `enable_zoom` are not fields of a toolset entry โ it carries only + `type`, `configs`, and `cache_control`; zoom is controlled + via `configs.zoom.enabled`. + + - `type: "computer_toolset_20260801"` + + - `"computer_toolset_20260801"` + + - `allowed_callers: optional array of "direct" or "code_execution_20250825" or "code_execution_20260120" or "code_execution_20260521"` + + - `"direct"` + + - `"code_execution_20250825"` + + - `"code_execution_20260120"` + + - `"code_execution_20260521"` + + - `cache_control: optional CacheControlEphemeral or null` + + Create a cache control breakpoint at this content block. + + - `configs: optional ComputerToolsetConfigs or null` + + Per-member configuration for `computer_toolset_20260801`: one + optional field per member tool, keyed by the member name โ the same + name the member's `tool_use` blocks carry. Every member is an + accepted key, and a member's defaults apply wherever its key is + absent. Unknown keys are rejected: the field set is this toolset + version's complete member set. + + - `cursor_position: optional ComputerCursorPositionConfig or null` + + `cursor_position`'s config overrides. + + - `defer_loading: optional boolean or null` + + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. + + - `enabled: optional boolean or null` + + Whether this member is offered to the model. Default is per member, per the toolset's documentation. A member whose enabled resolves false is withheld from the served schema. + + - `double_click: optional ComputerDoubleClickConfig or null` + + `double_click`'s config overrides. + + - `defer_loading: optional boolean or null` + + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. + + - `enabled: optional boolean or null` + + Whether this member is offered to the model. Default is per member, per the toolset's documentation. A member whose enabled resolves false is withheld from the served schema. + + - `hold_key: optional ComputerHoldKeyConfig or null` + + `hold_key`'s config overrides. + + - `defer_loading: optional boolean or null` + + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. + + - `enabled: optional boolean or null` + + Whether this member is offered to the model. Default is per member, per the toolset's documentation. A member whose enabled resolves false is withheld from the served schema. + + - `key: optional ComputerKeyConfig or null` + + `key`'s config overrides. + + - `defer_loading: optional boolean or null` + + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. + + - `enabled: optional boolean or null` + + Whether this member is offered to the model. Default is per member, per the toolset's documentation. A member whose enabled resolves false is withheld from the served schema. + + - `left_click: optional ComputerLeftClickConfig or null` + + `left_click`'s config overrides. + + - `defer_loading: optional boolean or null` + + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. + + - `enabled: optional boolean or null` + + Whether this member is offered to the model. Default is per member, per the toolset's documentation. A member whose enabled resolves false is withheld from the served schema. + + - `left_click_drag: optional ComputerLeftClickDragConfig or null` + + `left_click_drag`'s config overrides. + + - `defer_loading: optional boolean or null` + + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. + + - `enabled: optional boolean or null` + + Whether this member is offered to the model. Default is per member, per the toolset's documentation. A member whose enabled resolves false is withheld from the served schema. + + - `left_mouse_down: optional ComputerLeftMouseDownConfig or null` + + `left_mouse_down`'s config overrides. + + - `defer_loading: optional boolean or null` + + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. + + - `enabled: optional boolean or null` + + Whether this member is offered to the model. Default is per member, per the toolset's documentation. A member whose enabled resolves false is withheld from the served schema. + + - `left_mouse_up: optional ComputerLeftMouseUpConfig or null` + + `left_mouse_up`'s config overrides. + + - `defer_loading: optional boolean or null` + + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. + + - `enabled: optional boolean or null` + + Whether this member is offered to the model. Default is per member, per the toolset's documentation. A member whose enabled resolves false is withheld from the served schema. + + - `middle_click: optional ComputerMiddleClickConfig or null` + + `middle_click`'s config overrides. + + - `defer_loading: optional boolean or null` + + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. + + - `enabled: optional boolean or null` + + Whether this member is offered to the model. Default is per member, per the toolset's documentation. A member whose enabled resolves false is withheld from the served schema. + + - `mouse_move: optional ComputerMouseMoveConfig or null` + + `mouse_move`'s config overrides. + + - `defer_loading: optional boolean or null` + + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. + + - `enabled: optional boolean or null` + + Whether this member is offered to the model. Default is per member, per the toolset's documentation. A member whose enabled resolves false is withheld from the served schema. + + - `right_click: optional ComputerRightClickConfig or null` + + `right_click`'s config overrides. + + - `defer_loading: optional boolean or null` + + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. + + - `enabled: optional boolean or null` + + Whether this member is offered to the model. Default is per member, per the toolset's documentation. A member whose enabled resolves false is withheld from the served schema. + + - `screenshot: optional ComputerScreenshotConfig or null` + + `screenshot`'s config overrides. + + - `defer_loading: optional boolean or null` + + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. + + - `enabled: optional boolean or null` + + Whether this member is offered to the model. Default is per member, per the toolset's documentation. A member whose enabled resolves false is withheld from the served schema. + + - `scroll: optional ComputerScrollConfig or null` + + `scroll`'s config overrides. + + - `defer_loading: optional boolean or null` + + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. + + - `enabled: optional boolean or null` + + Whether this member is offered to the model. Default is per member, per the toolset's documentation. A member whose enabled resolves false is withheld from the served schema. + + - `triple_click: optional ComputerTripleClickConfig or null` + + `triple_click`'s config overrides. + + - `defer_loading: optional boolean or null` + + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. + + - `enabled: optional boolean or null` + + Whether this member is offered to the model. Default is per member, per the toolset's documentation. A member whose enabled resolves false is withheld from the served schema. + + - `type: optional ComputerTypeConfig or null` + + `type`'s config overrides. + + - `defer_loading: optional boolean or null` + + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. + + - `enabled: optional boolean or null` + + Whether this member is offered to the model. Default is per member, per the toolset's documentation. A member whose enabled resolves false is withheld from the served schema. + + - `wait: optional ComputerWaitConfig or null` + + `wait`'s config overrides. + + - `defer_loading: optional boolean or null` + + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. + + - `enabled: optional boolean or null` + + Whether this member is offered to the model. Default is per member, per the toolset's documentation. A member whose enabled resolves false is withheld from the served schema. + + - `zoom: optional ComputerZoomConfig or null` + + `zoom`'s config overrides. + + - `defer_loading: optional boolean or null` + + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. + + - `enabled: optional boolean or null` + + Whether this member is offered to the model. Default is per member, per the toolset's documentation. A member whose enabled resolves false is withheld from the served schema. - `ToolTextEditor20250124 object { name, type, allowed_callers, 4 more }`
"role": "user" } ], - "model": "claude-opus-4-6", + "model": "claude-opus-5", "system": [ { "text": "Today'\''s date is 2024-06-01.",
api/messages/create Changed · +883 / -44 lines
The two sides of this change are too far apart to line up, so this is the differ's own diff of it.
- `"search_result_location"` - - `ImageBlockParam object { source, type, cache_control }` - - - `source: Base64ImageSource or URLImageSource` + - `ImageBlockParam object { source, type, cache_control, transformations }` + + - `source: Base64ImageSource or URLImageSource or FileImageSource` - `Base64ImageSource object { data, media_type, type }`
- `url: string` + - `FileImageSource object { file_id, type }` + + - `file_id: string` + + - `type: "file"` + + - `"file"` + - `type: "image"` - `"image"`
Create a cache control breakpoint at this content block. + - `transformations: optional ImageTransformationsParam or null` + + Configures the transformations the server applies to this image before the model observes it. Each key names a condition the server transforms images for; its value selects the transformation applied. Omitted keys keep their default behavior, and an empty object is equivalent to omitting the field. + + - `oversized_image: optional "downsize" or "error"` + + What the server does when this image exceeds the model's maximum image size. `"downsize"` (the default) scales the image down to fit, which changes the dimensions the model observes without telling you. `"error"` instead rejects the request with a 400 error naming the image's dimensions and the largest dimensions that fit, so you can scale the image deliberately โ your image is never silently scaled down. + + - `"downsize"` + + - `"error"` + - `DocumentBlockParam object { source, type, cache_control, 3 more }` - - `source: Base64PDFSource or PlainTextSource or ContentBlockSource or URLPDFSource` + - `source: Base64PDFSource or PlainTextSource or ContentBlockSource or 2 more` - `Base64PDFSource object { data, media_type, type }`
- `TextBlockParam object { text, type, cache_control, citations }` - - `ImageBlockParam object { source, type, cache_control }` + - `ImageBlockParam object { source, type, cache_control, transformations }` - `type: "content"`
- `url: string` + - `FileDocumentSource object { file_id, type }` + + - `file_id: string` + + - `type: "file"` + + - `"file"` + - `type: "document"` - `"document"`
- `"redacted_thinking"` - - `ToolUseBlockParam object { id, input, name, 3 more }` + - `ToolUseBlockParam object { id, input, name, 4 more }` - `id: string`
- `"code_execution_20260120"` - - `ToolResultBlockParam object { tool_use_id, type, cache_control, 2 more }` + - `toolset_name: optional string or null` + + For a toolset member tool_use, the toolset family this member belongs to. + + - `ToolResultBlockParam object { tool_use_id, type, cache_control, 3 more }` - `tool_use_id: string`
Create a cache control breakpoint at this content block. - - `content: optional string or array of TextBlockParam or ImageBlockParam or SearchResultBlockParam or 2 more` + - `content: optional string or array of TextBlockParam or ImageBlockParam or SearchResultBlockParam or 3 more` - `string` - - `array of TextBlockParam or ImageBlockParam or SearchResultBlockParam or 2 more` + - `array of TextBlockParam or ImageBlockParam or SearchResultBlockParam or 3 more` - `TextBlockParam object { text, type, cache_control, citations }` - - `ImageBlockParam object { source, type, cache_control }` + - `ImageBlockParam object { source, type, cache_control, transformations }` - `SearchResultBlockParam object { content, source, title, 3 more }`
Create a cache control breakpoint at this content block. + - `BrowserStateBlockParam object { tabs, type, cache_control, state_changes }` + + The caller's browser state after a browser toolset member call โ + the full inventory of open tabs, which tab is active, and any side + effects (tabs opened, download state changes) the call produced. + + At most one per `tool_result`, only on a non-error result answering a + browser toolset member `tool_use`. The server renders the + model-visible text from it; the model never sees the raw fields. + + - `tabs: array of BrowserStateTabEntry` + + All tabs open in the browser after this call โ the full inventory, not a delta. May be empty. Whenever non-empty, exactly one entry carries `active: true`. + + - `tab_id: string` + + The caller-assigned identifier for this tab, unique within the inventory. + + - `title: string` + + The title of the page the tab is showing. May be empty. + + - `url: string` + + The URL of the page the tab is showing. May be empty. + + - `active: optional boolean` + + Whether this tab is the active tab after this call. Whenever `tabs` is non-empty, exactly one entry is marked `active: true`. + + - `type: "browser_state"` + + - `"browser_state"` + + - `cache_control: optional CacheControlEphemeral or null` + + Create a cache control breakpoint at this content block. + + - `state_changes: optional array of BrowserStateChange or null` + + Tabs opened and download state changes during this call. "Nothing to report" is expressed by omitting the field, never by an empty list. + + - `BrowserStateChangeTabOpened object { tab_id, type }` + + A tab this call's execution opened that remains open at its end โ + the creation delta of the `tabs` inventory, not an event log. + + Carries only the `tab_id`; the tab's `title` and `url` live on its + `tabs` entry, which must include the same `tab_id`. A tab opened + during a failed call gets no deferred `tab_opened`; it simply appears + in the next result's `tabs` inventory. + + - `tab_id: string` + + The `tab_id` of the opened tab, present in `tabs`. + + - `type: "tab_opened"` + + - `"tab_opened"` + + - `BrowserStateChangeDownloadStarted object { download_id, type, url }` + + A file download that started during this call. + + - `download_id: string` + + The caller-assigned identifier for this download, stable across the state changes reporting it. + + - `type: "download_started"` + + - `"download_started"` + + - `url: string` + + The final post-redirect URL the download was served from. + + - `BrowserStateChangeDownloadCompleted object { download_id, type, url, 2 more }` + + A file download that finished during this call, reported with the + same `download_id` as its `download_started` โ or without a prior + `download_started`, when the download finished during the call that + started it (at most one state change per `download_id` per result). + + - `download_id: string` + + The caller-assigned identifier for this download, stable across the state changes reporting it. + + - `type: "download_completed"` + + - `"download_completed"` + + - `url: string` + + The final post-redirect URL the download was served from. + + - `path: optional string or null` + + Where the executor saved the file, on the executor's filesystem. Only included when another tool in the same environment can read the file at that path. + + - `size_bytes: optional number or null` + + The completed download's size. + + - `BrowserStateChangeDownloadFailed object { download_id, type, url, error }` + + A file download that failed โ or was cancelled โ during this call. + + - `download_id: string` + + The caller-assigned identifier for this download, stable across the state changes reporting it. + + - `type: "download_failed"` + + - `"download_failed"` + + - `url: string` + + The final post-redirect URL the download was served from. + + - `error: optional string or null` + + The failure or cancellation detail, when known. + - `is_error: optional boolean` + + - `toolset_name: optional string or null` + + For a toolset member tool_result, the toolset family of the paired tool_use. - `ServerToolUseBlockParam object { id, input, name, 3 more }`
Create a cache control breakpoint at this content block. - - `MidConversationSystemBlockParam object { content, type, cache_control }` - - System instructions that appear mid-conversation. - - Use this block to provide or update system-level instructions at a specific - point in the conversation, rather than only via the top-level `system` parameter. - - - `content: array of TextBlockParam` - - System instruction text blocks. - - - `text: string` - - - `type: "text"` - - - `cache_control: optional CacheControlEphemeral or null` - - Create a cache control breakpoint at this content block. - - - `citations: optional array of TextCitationParam or null` - - - `type: "mid_conv_system"` - - - `"mid_conv_system"` - - - `cache_control: optional CacheControlEphemeral or null` - - Create a cache control breakpoint at this content block. - - `role: "user" or "assistant" or "system"` - `"user"`
Top-level cache control automatically applies a cache_control marker to the last cacheable block in the request. -- `container: optional string or null` +- `container: optional MessageCreateParamsContainer or null` Container identifier for reuse across requests. + + - `ContainerParams object { id, skills }` + + Container parameters with skills to be loaded. + + - `id: optional string or null` + + Container id + + - `skills: optional array of SkillParams or null` + + List of skills to load in the container + + - `skill_id: string` + + Skill ID + + - `type: "anthropic" or "custom"` + + Type of skill - either 'anthropic' (built-in) or 'custom' (user-defined) + + - `"anthropic"` + + - `"custom"` + + - `version: optional string` + + Skill version or 'latest' for most recent version + + - `string` - `inference_geo: optional string or null`
When true, guarantees schema validation on tool names and inputs + - `BrowserToolset20260801 object { type, allowed_callers, cache_control, configs }` + + The browser toolset: a single `tools[]` entry (carrying no + `name`) that declares the browser tool family. The model is served + the family's tool with any members disabled via `configs` removed + from its schema. + + - `type: "browser_toolset_20260801"` + + - `"browser_toolset_20260801"` + + - `allowed_callers: optional array of "direct" or "code_execution_20250825" or "code_execution_20260120" or "code_execution_20260521"` + + - `"direct"` + + - `"code_execution_20250825"` + + - `"code_execution_20260120"` + + - `"code_execution_20260521"` + + - `cache_control: optional CacheControlEphemeral or null` + + Create a cache control breakpoint at this content block. + + - `configs: optional BrowserToolsetConfigs or null` + + Per-member configuration for `browser_toolset_20260801`: one + optional field per member tool, keyed by the member name โ the same + name the member's `tool_use` blocks carry. Every member is an + accepted key, and a member's defaults apply wherever its key is + absent. Unknown keys are rejected: the field set is this toolset + version's complete member set. + + - `close_tab: optional BrowserCloseTabConfig or null` + + `close_tab`'s config overrides. + + - `defer_loading: optional boolean or null` + + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. + + - `enabled: optional boolean or null` + + Whether this member is offered to the model. Default is per member, per the toolset's documentation. A member whose enabled resolves false is withheld from the served schema. + + - `double_click: optional BrowserDoubleClickConfig or null` + + `double_click`'s config overrides. + + - `defer_loading: optional boolean or null` + + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. + + - `enabled: optional boolean or null` + + Whether this member is offered to the model. Default is per member, per the toolset's documentation. A member whose enabled resolves false is withheld from the served schema. + + - `file_upload: optional BrowserFileUploadConfig or null` + + `file_upload`'s config overrides. + + - `defer_loading: optional boolean or null` + + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. + + - `enabled: optional boolean or null` + + Whether this member is offered to the model. Default is per member, per the toolset's documentation. A member whose enabled resolves false is withheld from the served schema. + + - `find: optional BrowserFindConfig or null` + + `find`'s config overrides. + + - `defer_loading: optional boolean or null` + + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. + + - `enabled: optional boolean or null` + + Whether this member is offered to the model. Default is per member, per the toolset's documentation. A member whose enabled resolves false is withheld from the served schema. + + - `form_input: optional BrowserFormInputConfig or null` + + `form_input`'s config overrides. + + - `defer_loading: optional boolean or null` + + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. + + - `enabled: optional boolean or null` + + Whether this member is offered to the model. Default is per member, per the toolset's documentation. A member whose enabled resolves false is withheld from the served schema. + + - `get_page_text: optional BrowserGetPageTextConfig or null` + + `get_page_text`'s config overrides. + + - `defer_loading: optional boolean or null` + + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. + + - `enabled: optional boolean or null` + + Whether this member is offered to the model. Default is per member, per the toolset's documentation. A member whose enabled resolves false is withheld from the served schema. + + - `hold_key: optional BrowserHoldKeyConfig or null` + + `hold_key`'s config overrides. + + - `defer_loading: optional boolean or null` + + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. + + - `enabled: optional boolean or null` + + Whether this member is offered to the model. Default is per member, per the toolset's documentation. A member whose enabled resolves false is withheld from the served schema. + + - `hover: optional BrowserHoverConfig or null` + + `hover`'s config overrides. + + - `defer_loading: optional boolean or null` + + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. + + - `enabled: optional boolean or null` + + Whether this member is offered to the model. Default is per member, per the toolset's documentation. A member whose enabled resolves false is withheld from the served schema. + + - `javascript_exec: optional BrowserJavascriptExecConfig or null` + + `javascript_exec`'s config overrides. + + - `defer_loading: optional boolean or null` + + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. + + - `enabled: optional boolean or null` + + Whether this member is offered to the model. Default is per member, per the toolset's documentation. A member whose enabled resolves false is withheld from the served schema. + + - `key: optional BrowserKeyConfig or null` + + `key`'s config overrides. + + - `defer_loading: optional boolean or null` + + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. + + - `enabled: optional boolean or null` + + Whether this member is offered to the model. Default is per member, per the toolset's documentation. A member whose enabled resolves false is withheld from the served schema. + + - `left_click: optional BrowserLeftClickConfig or null` + + `left_click`'s config overrides. + + - `defer_loading: optional boolean or null` + + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. + + - `enabled: optional boolean or null` + + Whether this member is offered to the model. Default is per member, per the toolset's documentation. A member whose enabled resolves false is withheld from the served schema. + + - `left_click_drag: optional BrowserLeftClickDragConfig or null` + + `left_click_drag`'s config overrides. + + - `defer_loading: optional boolean or null` + + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. + + - `enabled: optional boolean or null` + + Whether this member is offered to the model. Default is per member, per the toolset's documentation. A member whose enabled resolves false is withheld from the served schema. + + - `left_mouse_down: optional BrowserLeftMouseDownConfig or null` + + `left_mouse_down`'s config overrides. + + - `defer_loading: optional boolean or null` + + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. + + - `enabled: optional boolean or null` + + Whether this member is offered to the model. Default is per member, per the toolset's documentation. A member whose enabled resolves false is withheld from the served schema. + + - `left_mouse_up: optional BrowserLeftMouseUpConfig or null` + + `left_mouse_up`'s config overrides. + + - `defer_loading: optional boolean or null` + + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. + + - `enabled: optional boolean or null` + + Whether this member is offered to the model. Default is per member, per the toolset's documentation. A member whose enabled resolves false is withheld from the served schema. + + - `list_tabs: optional BrowserListTabsConfig or null` + + `list_tabs`'s config overrides. + + - `defer_loading: optional boolean or null` + + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. + + - `enabled: optional boolean or null` + + Whether this member is offered to the model. Default is per member, per the toolset's documentation. A member whose enabled resolves false is withheld from the served schema. + + - `middle_click: optional BrowserMiddleClickConfig or null` + + `middle_click`'s config overrides. + + - `defer_loading: optional boolean or null` + + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. + + - `enabled: optional boolean or null` + + Whether this member is offered to the model. Default is per member, per the toolset's documentation. A member whose enabled resolves false is withheld from the served schema. + + - `mouse_move: optional BrowserMouseMoveConfig or null` + + `mouse_move`'s config overrides. + + - `defer_loading: optional boolean or null` + + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. + + - `enabled: optional boolean or null` + + Whether this member is offered to the model. Default is per member, per the toolset's documentation. A member whose enabled resolves false is withheld from the served schema. + + - `navigate: optional BrowserNavigateConfig or null` + + `navigate`'s config overrides. + + - `defer_loading: optional boolean or null` + + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. + + - `enabled: optional boolean or null` + + Whether this member is offered to the model. Default is per member, per the toolset's documentation. A member whose enabled resolves false is withheld from the served schema. + + - `new_tab: optional BrowserNewTabConfig or null` + + `new_tab`'s config overrides. + + - `defer_loading: optional boolean or null` + + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. + + - `enabled: optional boolean or null` + + Whether this member is offered to the model. Default is per member, per the toolset's documentation. A member whose enabled resolves false is withheld from the served schema. + + - `read_console: optional BrowserReadConsoleConfig or null` + + `read_console`'s config overrides. + + - `defer_loading: optional boolean or null` + + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. + + - `enabled: optional boolean or null` + + Whether this member is offered to the model. Default is per member, per the toolset's documentation. A member whose enabled resolves false is withheld from the served schema. + + - `read_network: optional BrowserReadNetworkConfig or null` + + `read_network`'s config overrides. + + - `defer_loading: optional boolean or null` + + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. + + - `enabled: optional boolean or null` + + Whether this member is offered to the model. Default is per member, per the toolset's documentation. A member whose enabled resolves false is withheld from the served schema. + + - `read_page: optional BrowserReadPageConfig or null` + + `read_page`'s config overrides. + + - `defer_loading: optional boolean or null` + + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. + + - `enabled: optional boolean or null` + + Whether this member is offered to the model. Default is per member, per the toolset's documentation. A member whose enabled resolves false is withheld from the served schema. + + - `right_click: optional BrowserRightClickConfig or null` + + `right_click`'s config overrides. + + - `defer_loading: optional boolean or null` + + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. + + - `enabled: optional boolean or null` + + Whether this member is offered to the model. Default is per member, per the toolset's documentation. A member whose enabled resolves false is withheld from the served schema. + + - `screenshot: optional BrowserScreenshotConfig or null` + + `screenshot`'s config overrides. + + - `defer_loading: optional boolean or null` + + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. + + - `enabled: optional boolean or null` + + Whether this member is offered to the model. Default is per member, per the toolset's documentation. A member whose enabled resolves false is withheld from the served schema. + + - `scroll: optional BrowserScrollConfig or null` + + `scroll`'s config overrides. + + - `defer_loading: optional boolean or null` + + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. + + - `enabled: optional boolean or null` + + Whether this member is offered to the model. Default is per member, per the toolset's documentation. A member whose enabled resolves false is withheld from the served schema. + + - `scroll_to: optional BrowserScrollToConfig or null` + + `scroll_to`'s config overrides. + + - `defer_loading: optional boolean or null` + + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. + + - `enabled: optional boolean or null` + + Whether this member is offered to the model. Default is per member, per the toolset's documentation. A member whose enabled resolves false is withheld from the served schema. + + - `switch_tab: optional BrowserSwitchTabConfig or null` + + `switch_tab`'s config overrides. + + - `defer_loading: optional boolean or null` + + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. + + - `enabled: optional boolean or null` + + Whether this member is offered to the model. Default is per member, per the toolset's documentation. A member whose enabled resolves false is withheld from the served schema. + + - `triple_click: optional BrowserTripleClickConfig or null` + + `triple_click`'s config overrides. + + - `defer_loading: optional boolean or null` + + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. + + - `enabled: optional boolean or null` + + Whether this member is offered to the model. Default is per member, per the toolset's documentation. A member whose enabled resolves false is withheld from the served schema. + + - `type: optional BrowserTypeConfig or null` + + `type`'s config overrides. + + - `defer_loading: optional boolean or null` + + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. + + - `enabled: optional boolean or null` + + Whether this member is offered to the model. Default is per member, per the toolset's documentation. A member whose enabled resolves false is withheld from the served schema. + + - `wait: optional BrowserWaitConfig or null` + + `wait`'s config overrides. + + - `defer_loading: optional boolean or null` + + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. + + - `enabled: optional boolean or null` + + Whether this member is offered to the model. Default is per member, per the toolset's documentation. A member whose enabled resolves false is withheld from the served schema. + + - `zoom: optional BrowserZoomConfig or null` + + `zoom`'s config overrides. + + - `defer_loading: optional boolean or null` + + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. + + - `enabled: optional boolean or null` + + Whether this member is offered to the model. Default is per member, per the toolset's documentation. A member whose enabled resolves false is withheld from the served schema. + - `MemoryTool20250818 object { name, type, allowed_callers, 4 more }` - `name: "memory"`
When true, guarantees schema validation on tool names and inputs + - `ComputerToolset20260801 object { type, allowed_callers, cache_control, configs }` + + The computer toolset: a single `tools[]` entry (carrying no + `name`) that declares the computer tool family. The model is + served the family's tool with any members disabled via `configs` + removed from its schema. Every member is enabled by default, zoom + included. The single-tool options `display_number` and + `enable_zoom` are not fields of a toolset entry โ it carries only + `type`, `configs`, and `cache_control`; zoom is controlled + via `configs.zoom.enabled`. + + - `type: "computer_toolset_20260801"` + + - `"computer_toolset_20260801"` + + - `allowed_callers: optional array of "direct" or "code_execution_20250825" or "code_execution_20260120" or "code_execution_20260521"` + + - `"direct"` + + - `"code_execution_20250825"` + + - `"code_execution_20260120"` + + - `"code_execution_20260521"` + + - `cache_control: optional CacheControlEphemeral or null` + + Create a cache control breakpoint at this content block. + + - `configs: optional ComputerToolsetConfigs or null` + + Per-member configuration for `computer_toolset_20260801`: one + optional field per member tool, keyed by the member name โ the same + name the member's `tool_use` blocks carry. Every member is an + accepted key, and a member's defaults apply wherever its key is + absent. Unknown keys are rejected: the field set is this toolset + version's complete member set. + + - `cursor_position: optional ComputerCursorPositionConfig or null` + + `cursor_position`'s config overrides. + + - `defer_loading: optional boolean or null` + + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. + + - `enabled: optional boolean or null` + + Whether this member is offered to the model. Default is per member, per the toolset's documentation. A member whose enabled resolves false is withheld from the served schema. + + - `double_click: optional ComputerDoubleClickConfig or null` + + `double_click`'s config overrides. + + - `defer_loading: optional boolean or null` + + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. + + - `enabled: optional boolean or null` + + Whether this member is offered to the model. Default is per member, per the toolset's documentation. A member whose enabled resolves false is withheld from the served schema. + + - `hold_key: optional ComputerHoldKeyConfig or null` + + `hold_key`'s config overrides. + + - `defer_loading: optional boolean or null` + + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. + + - `enabled: optional boolean or null` + + Whether this member is offered to the model. Default is per member, per the toolset's documentation. A member whose enabled resolves false is withheld from the served schema. + + - `key: optional ComputerKeyConfig or null` + + `key`'s config overrides. + + - `defer_loading: optional boolean or null` + + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. + + - `enabled: optional boolean or null` + + Whether this member is offered to the model. Default is per member, per the toolset's documentation. A member whose enabled resolves false is withheld from the served schema. + + - `left_click: optional ComputerLeftClickConfig or null` + + `left_click`'s config overrides. + + - `defer_loading: optional boolean or null` + + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. + + - `enabled: optional boolean or null` + + Whether this member is offered to the model. Default is per member, per the toolset's documentation. A member whose enabled resolves false is withheld from the served schema. + + - `left_click_drag: optional ComputerLeftClickDragConfig or null` + + `left_click_drag`'s config overrides. + + - `defer_loading: optional boolean or null` + + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. + + - `enabled: optional boolean or null` + + Whether this member is offered to the model. Default is per member, per the toolset's documentation. A member whose enabled resolves false is withheld from the served schema. + + - `left_mouse_down: optional ComputerLeftMouseDownConfig or null` + + `left_mouse_down`'s config overrides. + + - `defer_loading: optional boolean or null` + + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. + + - `enabled: optional boolean or null` + + Whether this member is offered to the model. Default is per member, per the toolset's documentation. A member whose enabled resolves false is withheld from the served schema. + + - `left_mouse_up: optional ComputerLeftMouseUpConfig or null` + + `left_mouse_up`'s config overrides. + + - `defer_loading: optional boolean or null` + + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. + + - `enabled: optional boolean or null` + + Whether this member is offered to the model. Default is per member, per the toolset's documentation. A member whose enabled resolves false is withheld from the served schema. + + - `middle_click: optional ComputerMiddleClickConfig or null` + + `middle_click`'s config overrides. + + - `defer_loading: optional boolean or null` + + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. + + - `enabled: optional boolean or null` + + Whether this member is offered to the model. Default is per member, per the toolset's documentation. A member whose enabled resolves false is withheld from the served schema. + + - `mouse_move: optional ComputerMouseMoveConfig or null` + + `mouse_move`'s config overrides. + + - `defer_loading: optional boolean or null` + + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. + + - `enabled: optional boolean or null` + + Whether this member is offered to the model. Default is per member, per the toolset's documentation. A member whose enabled resolves false is withheld from the served schema. + + - `right_click: optional ComputerRightClickConfig or null` + + `right_click`'s config overrides. + + - `defer_loading: optional boolean or null` + + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. + + - `enabled: optional boolean or null` + + Whether this member is offered to the model. Default is per member, per the toolset's documentation. A member whose enabled resolves false is withheld from the served schema. + + - `screenshot: optional ComputerScreenshotConfig or null` + + `screenshot`'s config overrides. + + - `defer_loading: optional boolean or null` + + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. + + - `enabled: optional boolean or null` + + Whether this member is offered to the model. Default is per member, per the toolset's documentation. A member whose enabled resolves false is withheld from the served schema. + + - `scroll: optional ComputerScrollConfig or null` + + `scroll`'s config overrides. + + - `defer_loading: optional boolean or null` + + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. + + - `enabled: optional boolean or null` + + Whether this member is offered to the model. Default is per member, per the toolset's documentation. A member whose enabled resolves false is withheld from the served schema. + + - `triple_click: optional ComputerTripleClickConfig or null` + + `triple_click`'s config overrides. + + - `defer_loading: optional boolean or null` + + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. + + - `enabled: optional boolean or null` + + Whether this member is offered to the model. Default is per member, per the toolset's documentation. A member whose enabled resolves false is withheld from the served schema. + + - `type: optional ComputerTypeConfig or null` + + `type`'s config overrides. + + - `defer_loading: optional boolean or null` + + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. + + - `enabled: optional boolean or null` + + Whether this member is offered to the model. Default is per member, per the toolset's documentation. A member whose enabled resolves false is withheld from the served schema. + + - `wait: optional ComputerWaitConfig or null` + + `wait`'s config overrides. + + - `defer_loading: optional boolean or null` + + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. + + - `enabled: optional boolean or null` + + Whether this member is offered to the model. Default is per member, per the toolset's documentation. A member whose enabled resolves false is withheld from the served schema. + + - `zoom: optional ComputerZoomConfig or null` + + `zoom`'s config overrides. + + - `defer_loading: optional boolean or null` + + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. + + - `enabled: optional boolean or null` + + Whether this member is offered to the model. Default is per member, per the toolset's documentation. A member whose enabled resolves false is withheld from the served schema. + - `ToolTextEditor20250124 object { name, type, allowed_callers, 4 more }` - `name: "str_replace_editor"`
- `expires_at: string` The time at which the container will expire. + + - `skills: array of ContainerSkill or null` + + Skills loaded in the container + + - `skill_id: string` + + Skill ID + + - `type: "anthropic" or "custom"` + + Type of skill - either 'anthropic' (built-in) or 'custom' (user-defined) + + - `"anthropic"` + + - `"custom"` + + - `version: string` + + Skill version or 'latest' for most recent version - `content: array of ContentBlock`
- `"redacted_thinking"` - - `ToolUseBlock object { id, caller, input, 2 more }` + - `ToolUseBlock object { id, caller, input, 3 more }` - `id: string`
- `type: "tool_use"` - `"tool_use"` + + - `toolset_name: optional string or null` + + For a toolset member tool_use, the toolset family. - `ServerToolUseBlock object { id, caller, input, 2 more }`
"role": "user" } ], - "model": "claude-opus-4-6", + "model": "claude-opus-5", "stream": false, "system": [ {
"id": "msg_013Zva2CMHLNnXjNJJKqJ2EF", "container": { "id": "container_011CpZohnwH4vuy7gazohgSP", - "expires_at": "2019-12-27T18:11:19.117Z" + "expires_at": "2019-12-27T18:11:19.117Z", + "skills": [ + { + "skill_id": "pdf", + "type": "anthropic", + "version": "latest" + } + ] }, "content": [ {
"type": "text" } ], - "model": "claude-opus-4-6", + "model": "claude-opus-5", "role": "assistant", "stop_details": { "category": "cyber",
api/models Changed · +12 / -8 lines
- `string` - - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 30 more` + - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 31 more` - `"message-batches-2024-09-24"`
- `"user-profiles-2026-03-24"` + - `"user-profiles-2026-08-18"` + - `"advisor-tool-2026-03-01"` - `"managed-agents-2026-04-01"`
{ "data": [ { - "id": "claude-opus-4-6", + "id": "claude-opus-5", "capabilities": { "batch": { "supported": true
} } }, - "created_at": "2026-02-04T00:00:00Z", - "display_name": "Claude Opus 4.6", + "created_at": "2026-07-24T00:00:00Z", + "display_name": "Claude Opus 5", "max_input_tokens": 0, "max_tokens": 0, "type": "model"
- `string` - - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 30 more` + - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 31 more` - `"message-batches-2024-09-24"`
- `"user-profiles-2026-03-24"` + - `"user-profiles-2026-08-18"` + - `"advisor-tool-2026-03-01"` - `"managed-agents-2026-04-01"`
```json { - "id": "claude-opus-4-6", + "id": "claude-opus-5", "capabilities": { "batch": { "supported": true
} } }, - "created_at": "2026-02-04T00:00:00Z", - "display_name": "Claude Opus 4.6", + "created_at": "2026-07-24T00:00:00Z", + "display_name": "Claude Opus 5", "max_input_tokens": 0, "max_tokens": 0, "type": "model"
api/models/list Changed · +6 / -4 lines
- `string` - - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 30 more` + - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 31 more` - `"message-batches-2024-09-24"`
- `"user-profiles-2026-03-24"` + - `"user-profiles-2026-08-18"` + - `"advisor-tool-2026-03-01"` - `"managed-agents-2026-04-01"`
{ "data": [ { - "id": "claude-opus-4-6", + "id": "claude-opus-5", "capabilities": { "batch": { "supported": true
} } }, - "created_at": "2026-02-04T00:00:00Z", - "display_name": "Claude Opus 4.6", + "created_at": "2026-07-24T00:00:00Z", + "display_name": "Claude Opus 5", "max_input_tokens": 0, "max_tokens": 0, "type": "model"
api/models/retrieve Changed · +6 / -4 lines
- `string` - - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 30 more` + - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 31 more` - `"message-batches-2024-09-24"`
- `"user-profiles-2026-03-24"` + - `"user-profiles-2026-08-18"` + - `"advisor-tool-2026-03-01"` - `"managed-agents-2026-04-01"`
```json { - "id": "claude-opus-4-6", + "id": "claude-opus-5", "capabilities": { "batch": { "supported": true
} } }, - "created_at": "2026-02-04T00:00:00Z", - "display_name": "Claude Opus 4.6", + "created_at": "2026-07-24T00:00:00Z", + "display_name": "Claude Opus 5", "max_input_tokens": 0, "max_tokens": 0, "type": "model"
api/overview Changed · +3 / -3 lines
* **[Message Batches API](https://platform.claude.com/docs/en/api/messages/batches/create)**: Process large volumes of Messages requests asynchronously with 50% cost reduction (`POST /v1/messages/batches`) * **[Token Counting API](https://platform.claude.com/docs/en/api/messages-count-tokens)**: Count tokens in a message before sending to manage costs and rate limits (`POST /v1/messages/count_tokens`) * **[Models API](https://platform.claude.com/docs/en/api/models/list)**: List available Claude models and their details (`GET /v1/models`) -* **[Files API](https://platform.claude.com/docs/en/api/beta/files/upload)**: Upload and manage files for use across multiple API calls (`POST /v1/files`, `GET /v1/files`) -* **[Skills API](https://platform.claude.com/docs/en/api/skills/create-skill)**: Create and manage custom agent skills (`POST /v1/skills`, `GET /v1/skills`) +* **[Files API](https://platform.claude.com/docs/en/api/files/upload)**: Upload and manage files for use across multiple API calls (`POST /v1/files`, `GET /v1/files`) +* **[Skills API](https://platform.claude.com/docs/en/api/skills/create)**: Create and manage custom agent skills (`POST /v1/skills`, `GET /v1/skills`) **Beta:**
Every SDK provides an auto-paginating iterator that follows `next_page` for you. In Python and TypeScript, you get it by iterating the list result directly. The other SDKs provide the iterator through a separate method. SDK auto-pagination is forward-only; to go back a page, read `prev_page` from the response and pass it back as the `page` parameter yourself. See [client SDKs](https://platform.claude.com/docs/en/cli-sdks-libraries/overview) for language-specific details. <Note> - Some list endpoints use a different cursor scheme. The [Message Batches API](https://platform.claude.com/docs/en/build-with-claude/batch-processing), the [Models API](https://platform.claude.com/docs/en/api/models/list), and several [Admin API](https://platform.claude.com/docs/en/manage-claude/admin-api) endpoints take `after_id` and `before_id` query parameters instead of `page`. Their responses return `has_more`, `first_id`, and `last_id` instead of `next_page`. The [Files API](https://platform.claude.com/docs/en/build-with-claude/files) also uses that scheme when a request includes the `files-api-2025-04-14` beta header; without the header, `GET /v1/files` takes `page` and returns `next_page`. Some endpoints that use the `page` scheme, such as `GET /v1/skills`, also return a `has_more` Boolean alongside `next_page`. See the reference page for each endpoint for its exact pagination fields. + Some list endpoints use a different cursor scheme. The [Message Batches API](https://platform.claude.com/docs/en/build-with-claude/batch-processing), the [Models API](https://platform.claude.com/docs/en/api/models/list), and several [Admin API](https://platform.claude.com/docs/en/manage-claude/admin-api) endpoints take `after_id` and `before_id` query parameters instead of `page`. Their responses return `has_more`, `first_id`, and `last_id` instead of `next_page`. The [Files API](https://platform.claude.com/docs/en/build-with-claude/files) also uses that scheme when a request includes the `files-api-2025-04-14` beta header; without the header, `GET /v1/files` takes `page` and returns `next_page`. The [Skills API](https://platform.claude.com/docs/en/build-with-claude/skills-guide) list endpoints, `GET /v1/skills` and `GET /v1/skills/{skill_id}/versions`, take `page` and return `next_page`; requests that include the `skills-2025-10-02` beta header also receive a `has_more` Boolean alongside `next_page`. See the reference page for each endpoint for its exact pagination fields. </Note> ## Rate limits and availability
api/rate-limits Changed · +51 / -25 lines
### Reaching your spend cap ### Setting your own spend limit
## Spend limits <Note> - **[Claude Platform on AWS](https://platform.claude.com/docs/en/build-with-claude/claude-platform-on-aws):** Spend limits work differently on Claude Platform on AWS. See [Spend limits on Claude Platform on AWS](https://platform.claude.com/docs/en/build-with-claude/claude-platform-on-aws#spend-limits) for how spend caps and self-set spend limits apply to your organization. + **[Claude Platform on AWS](https://platform.claude.com/docs/en/build-with-claude/claude-platform-on-aws):** The same monthly spend caps apply, and requests stop at the cap in the same way. Billing and tier increases work differently; see [Spend limits on Claude Platform on AWS](https://platform.claude.com/docs/en/build-with-claude/claude-platform-on-aws#spend-limits). </Note> -Each of the Start, Build, and Scale tiers carries a monthly spend cap, which is the maximum your organization can spend on the API each calendar month. Once you reach your tier's spend cap, API usage pauses until the next month unless you request a higher limit. You can view your organization's monthly spend cap and set your own limit on the [Billing](https://platform.claude.com/settings/billing) page. +Each of the Start, Build, and Scale tiers carries a monthly spend cap, which is the maximum your organization can spend on the API each calendar month. You can view your organization's monthly spend cap and set your own limit on the [Billing](https://platform.claude.com/settings/billing) page. | Usage tier | Monthly spend cap | | ---------- | ----------------- |
Organizations on the Custom tier have no monthly spend cap; limits are arranged with their account team. +### Reaching your spend cap + +Once you reach your tier's spend cap, API usage pauses until 00UTC on the first day of the next month, unless you request a higher limit sooner. While usage is paused, API requests return HTTP 429: + +```json +{ + "type": "error", + "error": { + "type": "rate_limit_error", + "message": "You have reached your API usage limits: your organization has crossed its monthly API usage threshold, set based on your organization's API tier. You will regain access on 2026-09-01 at 00:00 UTC.", + "details": { "error_code": "enforced_spend_limit_reached" } + }, + "request_id": "req_018EeWyXxfu5pfWkrYcMdjWG" +} +``` + +* The error type is `rate_limit_error`, the same as for a rate limit, but the response has no `retry-after` header. Retrying, including the SDKs' automatic retries, fails until access resumes. +* On the Messages API, `error.details.error_code` is `enforced_spend_limit_reached`. Use it to tell this response apart from a rate limit. +* Moving to a higher tier restores access; see [Requesting higher limits](https://platform.claude.com/docs/en/api/rate-limits#requesting-higher-limits). + +### Setting your own spend limit + You can also set your own spend limit below your tier's cap to control costs: <Steps>
</Step> </Steps> +When usage reaches a spend limit you set, requests return HTTP 400 with error type `invalid_request_error`. The message begins `You have reached your specified API usage limits`, or `You have reached your specified workspace API usage limits` for a workspace limit, and states when access resumes. Raise or remove the limit to restore access sooner. + +Limits on the [Claude Code workspace](https://platform.claude.com/docs/en/manage-claude/workspaces#claude-code-workspace) are checked separately: Claude Code requests over that workspace's limit can instead receive a 429 that carries a `retry-after` header. + ## Rate limits The rate limits for the Messages API are measured in requests per minute (RPM), input tokens per minute (ITPM), and output tokens per minute (OTPM) for each model class. If you exceed any of the rate limits you will get a [429 error](https://platform.claude.com/docs/en/api/errors) describing which rate limit was exceeded, along with a `retry-after` header indicating how long to wait.
The following headers are returned: -| Header | Description | -| --------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------- | -| `retry-after` | The number of seconds to wait until you can retry the request. Earlier retries will fail. | -| `anthropic-ratelimit-requests-limit` | The maximum number of requests allowed within any rate limit period. | -| `anthropic-ratelimit-requests-remaining` | The number of requests remaining before being rate limited. | -| `anthropic-ratelimit-requests-reset` | The time when the request rate limit will be fully replenished, provided in RFC 3339 format. | -| `anthropic-ratelimit-tokens-limit` | The maximum number of tokens allowed within any rate limit period. | -| `anthropic-ratelimit-tokens-remaining` | The number of tokens remaining (rounded to the nearest thousand) before being rate limited. | -| `anthropic-ratelimit-tokens-reset` | The time when the token rate limit will be fully replenished, provided in RFC 3339 format. | -| `anthropic-ratelimit-input-tokens-limit` | The maximum number of input tokens allowed within any rate limit period. | -| `anthropic-ratelimit-input-tokens-remaining` | The number of input tokens remaining (rounded to the nearest thousand) before being rate limited. | -| `anthropic-ratelimit-input-tokens-reset` | The time when the input token rate limit will be fully replenished, provided in RFC 3339 format. | -| `anthropic-ratelimit-output-tokens-limit` | The maximum number of output tokens allowed within any rate limit period. | -| `anthropic-ratelimit-output-tokens-remaining` | The number of output tokens remaining (rounded to the nearest thousand) before being rate limited. | -| `anthropic-ratelimit-output-tokens-reset` | The time when the output token rate limit will be fully replenished, provided in RFC 3339 format. | -| `anthropic-priority-input-tokens-limit` | The maximum number of Priority Tier input tokens allowed within any rate limit period. (Priority Tier only) | -| `anthropic-priority-input-tokens-remaining` | The number of Priority Tier input tokens remaining (rounded to the nearest thousand) before being rate limited. (Priority Tier only) | -| `anthropic-priority-input-tokens-reset` | The time when the Priority Tier input token rate limit will be fully replenished, provided in RFC 3339 format. (Priority Tier only) | -| `anthropic-priority-output-tokens-limit` | The maximum number of Priority Tier output tokens allowed within any rate limit period. (Priority Tier only) | -| `anthropic-priority-output-tokens-remaining` | The number of Priority Tier output tokens remaining (rounded to the nearest thousand) before being rate limited. (Priority Tier only) | -| `anthropic-priority-output-tokens-reset` | The time when the Priority Tier output token rate limit will be fully replenished, provided in RFC 3339 format. (Priority Tier only) | +| Header | Description | +| --------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `retry-after` | The number of seconds to wait until you can retry the request. Earlier retries will fail. Not sent with the spend-cap 429 (see [Reaching your spend cap](https://platform.claude.com/docs/en/api/rate-limits#reaching-your-spend-cap)). | +| `anthropic-ratelimit-requests-limit` | The maximum number of requests allowed within any rate limit period. | +| `anthropic-ratelimit-requests-remaining` | The number of requests remaining before being rate limited. | +| `anthropic-ratelimit-requests-reset` | The time when the request rate limit will be fully replenished, provided in RFC 3339 format. | +| `anthropic-ratelimit-tokens-limit` | The maximum number of tokens allowed within any rate limit period. | +| `anthropic-ratelimit-tokens-remaining` | The number of tokens remaining (rounded to the nearest thousand) before being rate limited. | +| `anthropic-ratelimit-tokens-reset` | The time when the token rate limit will be fully replenished, provided in RFC 3339 format. | +| `anthropic-ratelimit-input-tokens-limit` | The maximum number of input tokens allowed within any rate limit period. | +| `anthropic-ratelimit-input-tokens-remaining` | The number of input tokens remaining (rounded to the nearest thousand) before being rate limited. | +| `anthropic-ratelimit-input-tokens-reset` | The time when the input token rate limit will be fully replenished, provided in RFC 3339 format. | +| `anthropic-ratelimit-output-tokens-limit` | The maximum number of output tokens allowed within any rate limit period. | +| `anthropic-ratelimit-output-tokens-remaining` | The number of output tokens remaining (rounded to the nearest thousand) before being rate limited. | +| `anthropic-ratelimit-output-tokens-reset` | The time when the output token rate limit will be fully replenished, provided in RFC 3339 format. | +| `anthropic-priority-input-tokens-limit` | The maximum number of Priority Tier input tokens allowed within any rate limit period. (Priority Tier only) | +| `anthropic-priority-input-tokens-remaining` | The number of Priority Tier input tokens remaining (rounded to the nearest thousand) before being rate limited. (Priority Tier only) | +| `anthropic-priority-input-tokens-reset` | The time when the Priority Tier input token rate limit will be fully replenished, provided in RFC 3339 format. (Priority Tier only) | +| `anthropic-priority-output-tokens-limit` | The maximum number of Priority Tier output tokens allowed within any rate limit period. (Priority Tier only) | +| `anthropic-priority-output-tokens-remaining` | The number of Priority Tier output tokens remaining (rounded to the nearest thousand) before being rate limited. (Priority Tier only) | +| `anthropic-priority-output-tokens-reset` | The time when the Priority Tier output token rate limit will be fully replenished, provided in RFC 3339 format. (Priority Tier only) | The `anthropic-ratelimit-tokens-*` headers display the values for the most restrictive limit currently in effect. For instance, if you have exceeded the Workspace per-minute token limit, the headers will contain the Workspace per-minute token rate limit values. If Workspace limits do not apply, the headers will return the total tokens remaining, where total is the sum of input and output tokens. This approach ensures that you have visibility into the most relevant constraint on your current API usage. To see which Workspace a request counted against, read the `anthropic-workspace-id` [response header](https://platform.claude.com/docs/en/api/overview#response-headers), which carries the ID of the Workspace that your API key or access token resolved to.
api/skills New page · 873 lines, new page
# Skills ## Create Skill ### Returns ### Example #### Response ## List Skills ### Query Parameters ### Returns ### Example #### Response ## Get Skill ### Path Parameters ### Returns ### Example #### Response ## Delete Skill ### Path Parameters ### Returns ### Example #### Response ## Domain Types ### Deleted Skill ### Skill ### Skill Source # Versions ## Create Skill Version ### Path Parameters ### Returns ### Example #### Response ## List Skill Versions ### Path Parameters ### Query Parameters ### Returns ### Example #### Response ## Get Skill Version ### Path Parameters ### Returns ### Example #### Response ## Delete Skill Version ### Path Parameters ### Returns ### Example #### Response ## Domain Types ### Deleted Skill Version ### Skill Version
A whole new page. There's nothing to diff it against, so here is what it says.
---
title: Skills
url: https://platform.claude.com/docs/en/api/skills
---
# Skills
## Create Skill
**post** `/v1/skills`
Create Skill
### Returns
- `Skill object { id, created_at, display_name, 4 more }`
- `id: string`
Unique identifier for the skill.
The format and length of IDs may change over time.
- `created_at: string`
ISO 8601 timestamp of when the skill was created.
- `display_name: string`
Human-readable, single-line label for the Skill. Maximum 255 characters.
Always set: derived from the SKILL.md frontmatter `name` when omitted at
creation. Not unique.
- `latest_version_id: string`
ID of the newest Skill Version โ what `latest` references resolve to. Always set: a Skill holds at least one version.
- `source: SkillSource`
Where the Skill comes from.
Possible values:
* `"custom"`: authored by the platform user; private to their workspace
* `"anthropic"`: published by Anthropic; shared and read-only
* `"anthropic_example"`: Anthropic-published sample Skill
* `"plugin"`: resolved from an installed plugin
- `type: "custom" or "anthropic" or "anthropic_example" or "plugin"`
Where the Skill comes from.
Possible values:
* `"custom"`: authored by the platform user; private to their workspace
* `"anthropic"`: published by Anthropic; shared and read-only
* `"anthropic_example"`: Anthropic-published sample Skill
* `"plugin"`: resolved from an installed plugin
- `"custom"`
- `"anthropic"`
- `"anthropic_example"`
- `"plugin"`
- `type: "skill"`
Object type.
For Skills, this is always `"skill"`.
- `"skill"`
- `updated_at: string`
ISO 8601 timestamp of when the skill was last updated.
### Example
```http
curl https://api.anthropic.com/v1/skills \
-H 'Content-Type: multipart/form-data' \
-H 'anthropic-version: 2023-06-01' \
-H "X-Api-Key: $ANTHROPIC_API_KEY" \
-F files='["Example data"]'
```
#### Response
```json
{
"id": "skill_01JAbcdefghijklmnopqrstuvw",
"created_at": "2024-10-30T23:58:27.427722Z",
"display_name": "display_name",
"latest_version_id": "latest_version_id",
"source": {
"type": "custom"
},
"type": "skill",
"updated_at": "2024-10-30T23:58:27.427722Z"
}
```
## List Skills
**get** `/v1/skills`
List Skills
### Query Parameters
- `limit: optional number`
Number of results to return per page.
Ranges from `1` to `1000`. Defaults to `20`.
- `page: optional string`
Pagination token for fetching a specific page of results.
Pass the value from a previous response's `next_page` field to get the next page of results.
- `source: optional string`
Filter skills by source.
If provided, only skills from the specified source will be returned:
* `"custom"`: only return user-created skills
* `"anthropic"`: only return Anthropic-created skills
### Returns
- `data: array of Skill`
List of skills.
- `id: string`
Unique identifier for the skill.
The format and length of IDs may change over time.
- `created_at: string`
ISO 8601 timestamp of when the skill was created.
- `display_name: string`
Human-readable, single-line label for the Skill. Maximum 255 characters.
Always set: derived from the SKILL.md frontmatter `name` when omitted at
creation. Not unique.
- `latest_version_id: string`
ID of the newest Skill Version โ what `latest` references resolve to. Always set: a Skill holds at least one version.
- `source: SkillSource`
Where the Skill comes from.
Possible values:
* `"custom"`: authored by the platform user; private to their workspace
* `"anthropic"`: published by Anthropic; shared and read-only
* `"anthropic_example"`: Anthropic-published sample Skill
* `"plugin"`: resolved from an installed plugin
- `type: "custom" or "anthropic" or "anthropic_example" or "plugin"`
Where the Skill comes from.
Possible values:
* `"custom"`: authored by the platform user; private to their workspace
* `"anthropic"`: published by Anthropic; shared and read-only
* `"anthropic_example"`: Anthropic-published sample Skill
* `"plugin"`: resolved from an installed plugin
- `"custom"`
- `"anthropic"`
- `"anthropic_example"`
- `"plugin"`
- `type: "skill"`
Object type.
For Skills, this is always `"skill"`.
- `"skill"`
- `updated_at: string`
ISO 8601 timestamp of when the skill was last updated.
- `next_page: string or null`
Token for fetching the next page of results.
If `null`, there are no more results available. Pass this value to the `page` parameter in the next request to get the next page.
### Example
```http
curl https://api.anthropic.com/v1/skills \
-H 'anthropic-version: 2023-06-01' \
-H "X-Api-Key: $ANTHROPIC_API_KEY"
```
#### Response
```json
{
"data": [
{
"id": "skill_01JAbcdefghijklmnopqrstuvw",
"created_at": "2024-10-30T23:58:27.427722Z",
"display_name": "display_name",
"latest_version_id": "latest_version_id",
"source": {
"type": "custom"
},
"type": "skill",
"updated_at": "2024-10-30T23:58:27.427722Z"
}
],
"next_page": "next_page"
}
```
## Get Skill
**get** `/v1/skills/{skill_id}`
Get Skill
### Path Parameters
- `skill_id: string`
Unique identifier for the skill.
The format and length of IDs may change over time.
### Returns
- `Skill object { id, created_at, display_name, 4 more }`
- `id: string`
Unique identifier for the skill.
The format and length of IDs may change over time.
- `created_at: string`
ISO 8601 timestamp of when the skill was created.
- `display_name: string`
Human-readable, single-line label for the Skill. Maximum 255 characters.
Always set: derived from the SKILL.md frontmatter `name` when omitted at
creation. Not unique.
- `latest_version_id: string`
ID of the newest Skill Version โ what `latest` references resolve to. Always set: a Skill holds at least one version.
- `source: SkillSource`
Where the Skill comes from.
Possible values:
* `"custom"`: authored by the platform user; private to their workspace
* `"anthropic"`: published by Anthropic; shared and read-only
* `"anthropic_example"`: Anthropic-published sample Skill
* `"plugin"`: resolved from an installed plugin
- `type: "custom" or "anthropic" or "anthropic_example" or "plugin"`
Where the Skill comes from.
Possible values:
* `"custom"`: authored by the platform user; private to their workspace
* `"anthropic"`: published by Anthropic; shared and read-only
* `"anthropic_example"`: Anthropic-published sample Skill
* `"plugin"`: resolved from an installed plugin
- `"custom"`
- `"anthropic"`
Cut at 300 lines. The page has the rest.
api/skills/create New page · 102 lines, new page
## Create Skill ### Returns ### Example #### Response
A whole new page. There's nothing to diff it against, so here is what it says.
---
title: Create Skill
url: https://platform.claude.com/docs/en/api/skills/create
---
## Create Skill
**post** `/v1/skills`
Create Skill
### Returns
- `Skill object { id, created_at, display_name, 4 more }`
- `id: string`
Unique identifier for the skill.
The format and length of IDs may change over time.
- `created_at: string`
ISO 8601 timestamp of when the skill was created.
- `display_name: string`
Human-readable, single-line label for the Skill. Maximum 255 characters.
Always set: derived from the SKILL.md frontmatter `name` when omitted at
creation. Not unique.
- `latest_version_id: string`
ID of the newest Skill Version โ what `latest` references resolve to. Always set: a Skill holds at least one version.
- `source: SkillSource`
Where the Skill comes from.
Possible values:
* `"custom"`: authored by the platform user; private to their workspace
* `"anthropic"`: published by Anthropic; shared and read-only
* `"anthropic_example"`: Anthropic-published sample Skill
* `"plugin"`: resolved from an installed plugin
- `type: "custom" or "anthropic" or "anthropic_example" or "plugin"`
Where the Skill comes from.
Possible values:
* `"custom"`: authored by the platform user; private to their workspace
* `"anthropic"`: published by Anthropic; shared and read-only
* `"anthropic_example"`: Anthropic-published sample Skill
* `"plugin"`: resolved from an installed plugin
- `"custom"`
- `"anthropic"`
- `"anthropic_example"`
- `"plugin"`
- `type: "skill"`
Object type.
For Skills, this is always `"skill"`.
- `"skill"`
- `updated_at: string`
ISO 8601 timestamp of when the skill was last updated.
### Example
```http
curl https://api.anthropic.com/v1/skills \
-H 'Content-Type: multipart/form-data' \
-H 'anthropic-version: 2023-06-01' \
-H "X-Api-Key: $ANTHROPIC_API_KEY" \
-F files='["Example data"]'
```
#### Response
```json
{
"id": "skill_01JAbcdefghijklmnopqrstuvw",
"created_at": "2024-10-30T23:58:27.427722Z",
"display_name": "display_name",
"latest_version_id": "latest_version_id",
"source": {
"type": "custom"
},
"type": "skill",
"updated_at": "2024-10-30T23:58:27.427722Z"
}
```
api/skills/delete New page · 54 lines, new page
## Delete Skill ### Path Parameters ### Returns ### Example #### Response
A whole new page. There's nothing to diff it against, so here is what it says.
---
title: Delete Skill
url: https://platform.claude.com/docs/en/api/skills/delete
---
## Delete Skill
**delete** `/v1/skills/{skill_id}`
Delete Skill
### Path Parameters
- `skill_id: string`
Unique identifier for the skill.
The format and length of IDs may change over time.
### Returns
- `DeletedSkill object { id, type }`
- `id: string`
Unique identifier for the skill.
The format and length of IDs may change over time.
- `type: "skill_deleted"`
Deleted object type.
For Skills, this is always `"skill_deleted"`.
- `"skill_deleted"`
### Example
```http
curl https://api.anthropic.com/v1/skills/$SKILL_ID \
-X DELETE \
-H 'anthropic-version: 2023-06-01' \
-H "X-Api-Key: $ANTHROPIC_API_KEY"
```
#### Response
```json
{
"id": "skill_01JAbcdefghijklmnopqrstuvw",
"type": "skill_deleted"
}
```
api/skills/list New page · 136 lines, new page
## List Skills ### Query Parameters ### Returns ### Example #### Response
A whole new page. There's nothing to diff it against, so here is what it says.
---
title: List Skills
url: https://platform.claude.com/docs/en/api/skills/list
---
## List Skills
**get** `/v1/skills`
List Skills
### Query Parameters
- `limit: optional number`
Number of results to return per page.
Ranges from `1` to `1000`. Defaults to `20`.
- `page: optional string`
Pagination token for fetching a specific page of results.
Pass the value from a previous response's `next_page` field to get the next page of results.
- `source: optional string`
Filter skills by source.
If provided, only skills from the specified source will be returned:
* `"custom"`: only return user-created skills
* `"anthropic"`: only return Anthropic-created skills
### Returns
- `data: array of Skill`
List of skills.
- `id: string`
Unique identifier for the skill.
The format and length of IDs may change over time.
- `created_at: string`
ISO 8601 timestamp of when the skill was created.
- `display_name: string`
Human-readable, single-line label for the Skill. Maximum 255 characters.
Always set: derived from the SKILL.md frontmatter `name` when omitted at
creation. Not unique.
- `latest_version_id: string`
ID of the newest Skill Version โ what `latest` references resolve to. Always set: a Skill holds at least one version.
- `source: SkillSource`
Where the Skill comes from.
Possible values:
* `"custom"`: authored by the platform user; private to their workspace
* `"anthropic"`: published by Anthropic; shared and read-only
* `"anthropic_example"`: Anthropic-published sample Skill
* `"plugin"`: resolved from an installed plugin
- `type: "custom" or "anthropic" or "anthropic_example" or "plugin"`
Where the Skill comes from.
Possible values:
* `"custom"`: authored by the platform user; private to their workspace
* `"anthropic"`: published by Anthropic; shared and read-only
* `"anthropic_example"`: Anthropic-published sample Skill
* `"plugin"`: resolved from an installed plugin
- `"custom"`
- `"anthropic"`
- `"anthropic_example"`
- `"plugin"`
- `type: "skill"`
Object type.
For Skills, this is always `"skill"`.
- `"skill"`
- `updated_at: string`
ISO 8601 timestamp of when the skill was last updated.
- `next_page: string or null`
Token for fetching the next page of results.
If `null`, there are no more results available. Pass this value to the `page` parameter in the next request to get the next page.
### Example
```http
curl https://api.anthropic.com/v1/skills \
-H 'anthropic-version: 2023-06-01' \
-H "X-Api-Key: $ANTHROPIC_API_KEY"
```
#### Response
```json
{
"data": [
{
"id": "skill_01JAbcdefghijklmnopqrstuvw",
"created_at": "2024-10-30T23:58:27.427722Z",
"display_name": "display_name",
"latest_version_id": "latest_version_id",
"source": {
"type": "custom"
},
"type": "skill",
"updated_at": "2024-10-30T23:58:27.427722Z"
}
],
"next_page": "next_page"
}
```
api/skills/retrieve New page · 108 lines, new page
## Get Skill ### Path Parameters ### Returns ### Example #### Response
A whole new page. There's nothing to diff it against, so here is what it says.
---
title: Get Skill
url: https://platform.claude.com/docs/en/api/skills/retrieve
---
## Get Skill
**get** `/v1/skills/{skill_id}`
Get Skill
### Path Parameters
- `skill_id: string`
Unique identifier for the skill.
The format and length of IDs may change over time.
### Returns
- `Skill object { id, created_at, display_name, 4 more }`
- `id: string`
Unique identifier for the skill.
The format and length of IDs may change over time.
- `created_at: string`
ISO 8601 timestamp of when the skill was created.
- `display_name: string`
Human-readable, single-line label for the Skill. Maximum 255 characters.
Always set: derived from the SKILL.md frontmatter `name` when omitted at
creation. Not unique.
- `latest_version_id: string`
ID of the newest Skill Version โ what `latest` references resolve to. Always set: a Skill holds at least one version.
- `source: SkillSource`
Where the Skill comes from.
Possible values:
* `"custom"`: authored by the platform user; private to their workspace
* `"anthropic"`: published by Anthropic; shared and read-only
* `"anthropic_example"`: Anthropic-published sample Skill
* `"plugin"`: resolved from an installed plugin
- `type: "custom" or "anthropic" or "anthropic_example" or "plugin"`
Where the Skill comes from.
Possible values:
* `"custom"`: authored by the platform user; private to their workspace
* `"anthropic"`: published by Anthropic; shared and read-only
* `"anthropic_example"`: Anthropic-published sample Skill
* `"plugin"`: resolved from an installed plugin
- `"custom"`
- `"anthropic"`
- `"anthropic_example"`
- `"plugin"`
- `type: "skill"`
Object type.
For Skills, this is always `"skill"`.
- `"skill"`
- `updated_at: string`
ISO 8601 timestamp of when the skill was last updated.
### Example
```http
curl https://api.anthropic.com/v1/skills/$SKILL_ID \
-H 'anthropic-version: 2023-06-01' \
-H "X-Api-Key: $ANTHROPIC_API_KEY"
```
#### Response
```json
{
"id": "skill_01JAbcdefghijklmnopqrstuvw",
"created_at": "2024-10-30T23:58:27.427722Z",
"display_name": "display_name",
"latest_version_id": "latest_version_id",
"source": {
"type": "custom"
},
"type": "skill",
"updated_at": "2024-10-30T23:58:27.427722Z"
}
```
api/skills/versions New page · 378 lines, new page
# Versions ## Create Skill Version ### Path Parameters ### Returns ### Example #### Response ## List Skill Versions ### Path Parameters ### Query Parameters ### Returns ### Example #### Response ## Get Skill Version ### Path Parameters ### Returns ### Example #### Response ## Delete Skill Version ### Path Parameters ### Returns ### Example #### Response ## Domain Types ### Deleted Skill Version ### Skill Version
A whole new page. There's nothing to diff it against, so here is what it says.
---
title: Versions
url: https://platform.claude.com/docs/en/api/skills/versions
---
# Versions
## Create Skill Version
**post** `/v1/skills/{skill_id}/versions`
Create Skill Version
### Path Parameters
- `skill_id: string`
Unique identifier for the skill.
The format and length of IDs may change over time.
### Returns
- `SkillVersion object { id, created_at, description, 3 more }`
- `id: string`
Unique identifier for this Skill Version. The id addresses the version in
paths and pins it in references.
- `created_at: string`
ISO 8601 timestamp of when the skill was created.
- `description: string`
Description of the skill version.
This is extracted from the SKILL.md file in the skill upload.
- `name: string`
The Skill's immutable kebab-case slug, set at creation from the first
upload's SKILL.md frontmatter `name` (or its enclosing directory). Every
later upload must resolve to the same value. Also the top-level directory
of the Skill's mounted files and the base name of a downloaded archive.
- `skill_id: string`
Unique identifier for the skill.
The format and length of IDs may change over time.
- `type: "skill_version"`
Object type.
For Skill Versions, this is always `"skill_version"`.
- `"skill_version"`
### Example
```http
curl https://api.anthropic.com/v1/skills/$SKILL_ID/versions \
-H 'Content-Type: multipart/form-data' \
-H 'anthropic-version: 2023-06-01' \
-H "X-Api-Key: $ANTHROPIC_API_KEY" \
-F files='["Example data"]'
```
#### Response
```json
{
"id": "id",
"created_at": "2024-10-30T23:58:27.427722Z",
"description": "description",
"name": "name",
"skill_id": "skill_01JAbcdefghijklmnopqrstuvw",
"type": "skill_version"
}
```
## List Skill Versions
**get** `/v1/skills/{skill_id}/versions`
List Skill Versions
### Path Parameters
- `skill_id: string`
Unique identifier for the skill.
The format and length of IDs may change over time.
### Query Parameters
- `limit: optional number`
Number of results to return per page.
Ranges from `1` to `1000`. Defaults to `20`.
- `page: optional string`
Optionally set to the `next_page` token from the previous response.
### Returns
- `data: array of SkillVersion`
List of skills.
- `id: string`
Unique identifier for this Skill Version. The id addresses the version in
paths and pins it in references.
- `created_at: string`
ISO 8601 timestamp of when the skill was created.
- `description: string`
Description of the skill version.
This is extracted from the SKILL.md file in the skill upload.
- `name: string`
The Skill's immutable kebab-case slug, set at creation from the first
upload's SKILL.md frontmatter `name` (or its enclosing directory). Every
later upload must resolve to the same value. Also the top-level directory
of the Skill's mounted files and the base name of a downloaded archive.
- `skill_id: string`
Unique identifier for the skill.
The format and length of IDs may change over time.
- `type: "skill_version"`
Object type.
For Skill Versions, this is always `"skill_version"`.
- `"skill_version"`
- `next_page: string or null`
Token for fetching the next page of results.
If `null`, there are no more results available. Pass this value to the `page` parameter in the next request to get the next page.
### Example
```http
curl https://api.anthropic.com/v1/skills/$SKILL_ID/versions \
-H 'anthropic-version: 2023-06-01' \
-H "X-Api-Key: $ANTHROPIC_API_KEY"
```
#### Response
```json
{
"data": [
{
"id": "id",
"created_at": "2024-10-30T23:58:27.427722Z",
"description": "description",
"name": "name",
"skill_id": "skill_01JAbcdefghijklmnopqrstuvw",
"type": "skill_version"
}
],
"next_page": "next_page"
}
```
## Get Skill Version
**get** `/v1/skills/{skill_id}/versions/{version}`
Get Skill Version
### Path Parameters
- `skill_id: string`
Unique identifier for the skill.
The format and length of IDs may change over time.
- `version: string`
Identifies the skill version: a version ID, or โ where the endpoint accepts it โ the literal `latest` for the skill's most recent version.
Requests carrying the `skills-2025-10-02` beta header address versions by their Unix epoch timestamp instead (e.g., "1759178010641129").
### Returns
- `SkillVersion object { id, created_at, description, 3 more }`
- `id: string`
Unique identifier for this Skill Version. The id addresses the version in
paths and pins it in references.
- `created_at: string`
ISO 8601 timestamp of when the skill was created.
- `description: string`
Description of the skill version.
This is extracted from the SKILL.md file in the skill upload.
- `name: string`
The Skill's immutable kebab-case slug, set at creation from the first
upload's SKILL.md frontmatter `name` (or its enclosing directory). Every
later upload must resolve to the same value. Also the top-level directory
of the Skill's mounted files and the base name of a downloaded archive.
- `skill_id: string`
Unique identifier for the skill.
The format and length of IDs may change over time.
- `type: "skill_version"`
Object type.
For Skill Versions, this is always `"skill_version"`.
- `"skill_version"`
### Example
```http
curl https://api.anthropic.com/v1/skills/$SKILL_ID/versions/$VERSION \
-H 'anthropic-version: 2023-06-01' \
-H "X-Api-Key: $ANTHROPIC_API_KEY"
```
#### Response
```json
{
"id": "id",
"created_at": "2024-10-30T23:58:27.427722Z",
"description": "description",
"name": "name",
"skill_id": "skill_01JAbcdefghijklmnopqrstuvw",
"type": "skill_version"
}
```
## Delete Skill Version
**delete** `/v1/skills/{skill_id}/versions/{version}`
Delete Skill Version
### Path Parameters
- `skill_id: string`
Unique identifier for the skill.
The format and length of IDs may change over time.
- `version: string`
Identifies the skill version: a version ID, or โ where the endpoint accepts it โ the literal `latest` for the skill's most recent version.
Requests carrying the `skills-2025-10-02` beta header address versions by their Unix epoch timestamp instead (e.g., "1759178010641129").
### Returns
- `DeletedSkillVersion object { id, type }`
- `id: string`
Unique identifier for this Skill Version. The id addresses the version in
paths and pins it in references.
- `type: "skill_version_deleted"`
Deleted object type.
For Skill Versions, this is always `"skill_version_deleted"`.
Cut at 300 lines. The page has the rest.
api/skills/versions/create New page · 81 lines, new page
## Create Skill Version ### Path Parameters ### Returns ### Example #### Response
A whole new page. There's nothing to diff it against, so here is what it says.
---
title: Create Skill Version
url: https://platform.claude.com/docs/en/api/skills/versions/create
---
## Create Skill Version
**post** `/v1/skills/{skill_id}/versions`
Create Skill Version
### Path Parameters
- `skill_id: string`
Unique identifier for the skill.
The format and length of IDs may change over time.
### Returns
- `SkillVersion object { id, created_at, description, 3 more }`
- `id: string`
Unique identifier for this Skill Version. The id addresses the version in
paths and pins it in references.
- `created_at: string`
ISO 8601 timestamp of when the skill was created.
- `description: string`
Description of the skill version.
This is extracted from the SKILL.md file in the skill upload.
- `name: string`
The Skill's immutable kebab-case slug, set at creation from the first
upload's SKILL.md frontmatter `name` (or its enclosing directory). Every
later upload must resolve to the same value. Also the top-level directory
of the Skill's mounted files and the base name of a downloaded archive.
- `skill_id: string`
Unique identifier for the skill.
The format and length of IDs may change over time.
- `type: "skill_version"`
Object type.
For Skill Versions, this is always `"skill_version"`.
- `"skill_version"`
### Example
```http
curl https://api.anthropic.com/v1/skills/$SKILL_ID/versions \
-H 'Content-Type: multipart/form-data' \
-H 'anthropic-version: 2023-06-01' \
-H "X-Api-Key: $ANTHROPIC_API_KEY" \
-F files='["Example data"]'
```
#### Response
```json
{
"id": "id",
"created_at": "2024-10-30T23:58:27.427722Z",
"description": "description",
"name": "name",
"skill_id": "skill_01JAbcdefghijklmnopqrstuvw",
"type": "skill_version"
}
```
api/skills/versions/delete New page · 59 lines, new page
## Delete Skill Version ### Path Parameters ### Returns ### Example #### Response
A whole new page. There's nothing to diff it against, so here is what it says.
---
title: Delete Skill Version
url: https://platform.claude.com/docs/en/api/skills/versions/delete
---
## Delete Skill Version
**delete** `/v1/skills/{skill_id}/versions/{version}`
Delete Skill Version
### Path Parameters
- `skill_id: string`
Unique identifier for the skill.
The format and length of IDs may change over time.
- `version: string`
Identifies the skill version: a version ID, or โ where the endpoint accepts it โ the literal `latest` for the skill's most recent version.
Requests carrying the `skills-2025-10-02` beta header address versions by their Unix epoch timestamp instead (e.g., "1759178010641129").
### Returns
- `DeletedSkillVersion object { id, type }`
- `id: string`
Unique identifier for this Skill Version. The id addresses the version in
paths and pins it in references.
- `type: "skill_version_deleted"`
Deleted object type.
For Skill Versions, this is always `"skill_version_deleted"`.
- `"skill_version_deleted"`
### Example
```http
curl https://api.anthropic.com/v1/skills/$SKILL_ID/versions/$VERSION \
-X DELETE \
-H 'anthropic-version: 2023-06-01' \
-H "X-Api-Key: $ANTHROPIC_API_KEY"
```
#### Response
```json
{
"id": "id",
"type": "skill_version_deleted"
}
```
api/skills/versions/list New page · 104 lines, new page
## List Skill Versions ### Path Parameters ### Query Parameters ### Returns ### Example #### Response
A whole new page. There's nothing to diff it against, so here is what it says.
---
title: List Skill Versions
url: https://platform.claude.com/docs/en/api/skills/versions/list
---
## List Skill Versions
**get** `/v1/skills/{skill_id}/versions`
List Skill Versions
### Path Parameters
- `skill_id: string`
Unique identifier for the skill.
The format and length of IDs may change over time.
### Query Parameters
- `limit: optional number`
Number of results to return per page.
Ranges from `1` to `1000`. Defaults to `20`.
- `page: optional string`
Optionally set to the `next_page` token from the previous response.
### Returns
- `data: array of SkillVersion`
List of skills.
- `id: string`
Unique identifier for this Skill Version. The id addresses the version in
paths and pins it in references.
- `created_at: string`
ISO 8601 timestamp of when the skill was created.
- `description: string`
Description of the skill version.
This is extracted from the SKILL.md file in the skill upload.
- `name: string`
The Skill's immutable kebab-case slug, set at creation from the first
upload's SKILL.md frontmatter `name` (or its enclosing directory). Every
later upload must resolve to the same value. Also the top-level directory
of the Skill's mounted files and the base name of a downloaded archive.
- `skill_id: string`
Unique identifier for the skill.
The format and length of IDs may change over time.
- `type: "skill_version"`
Object type.
For Skill Versions, this is always `"skill_version"`.
- `"skill_version"`
- `next_page: string or null`
Token for fetching the next page of results.
If `null`, there are no more results available. Pass this value to the `page` parameter in the next request to get the next page.
### Example
```http
curl https://api.anthropic.com/v1/skills/$SKILL_ID/versions \
-H 'anthropic-version: 2023-06-01' \
-H "X-Api-Key: $ANTHROPIC_API_KEY"
```
#### Response
```json
{
"data": [
{
"id": "id",
"created_at": "2024-10-30T23:58:27.427722Z",
"description": "description",
"name": "name",
"skill_id": "skill_01JAbcdefghijklmnopqrstuvw",
"type": "skill_version"
}
],
"next_page": "next_page"
}
```
api/skills/versions/retrieve New page · 85 lines, new page
## Get Skill Version ### Path Parameters ### Returns ### Example #### Response
A whole new page. There's nothing to diff it against, so here is what it says.
---
title: Get Skill Version
url: https://platform.claude.com/docs/en/api/skills/versions/retrieve
---
## Get Skill Version
**get** `/v1/skills/{skill_id}/versions/{version}`
Get Skill Version
### Path Parameters
- `skill_id: string`
Unique identifier for the skill.
The format and length of IDs may change over time.
- `version: string`
Identifies the skill version: a version ID, or โ where the endpoint accepts it โ the literal `latest` for the skill's most recent version.
Requests carrying the `skills-2025-10-02` beta header address versions by their Unix epoch timestamp instead (e.g., "1759178010641129").
### Returns
- `SkillVersion object { id, created_at, description, 3 more }`
- `id: string`
Unique identifier for this Skill Version. The id addresses the version in
paths and pins it in references.
- `created_at: string`
ISO 8601 timestamp of when the skill was created.
- `description: string`
Description of the skill version.
This is extracted from the SKILL.md file in the skill upload.
- `name: string`
The Skill's immutable kebab-case slug, set at creation from the first
upload's SKILL.md frontmatter `name` (or its enclosing directory). Every
later upload must resolve to the same value. Also the top-level directory
of the Skill's mounted files and the base name of a downloaded archive.
- `skill_id: string`
Unique identifier for the skill.
The format and length of IDs may change over time.
- `type: "skill_version"`
Object type.
For Skill Versions, this is always `"skill_version"`.
- `"skill_version"`
### Example
```http
curl https://api.anthropic.com/v1/skills/$SKILL_ID/versions/$VERSION \
-H 'anthropic-version: 2023-06-01' \
-H "X-Api-Key: $ANTHROPIC_API_KEY"
```
#### Response
```json
{
"id": "id",
"created_at": "2024-10-30T23:58:27.427722Z",
"description": "description",
"name": "name",
"skill_id": "skill_01JAbcdefghijklmnopqrstuvw",
"type": "skill_version"
}
```
build-with-claude/citations Changed · +58 / -72 lines
<Tab title="Files API"> <Note> - These examples reference the uploaded file as a `document` source. They use the SDK `beta` client path and send the `anthropic-beta: files-api-2025-04-14` header, which the API accepts but does not require. See [Files API](https://platform.claude.com/docs/en/build-with-claude/files) for upload details. + These examples reference the uploaded file as a `document` source, and no beta header is required. See [Files API](https://platform.claude.com/docs/en/build-with-claude/files) for upload details. </Note> <CodeGroup>
curl -X POST https://api.anthropic.com/v1/messages \ -H "x-api-key: $ANTHROPIC_API_KEY" \ -H "anthropic-version: 2023-06-01" \ - -H "anthropic-beta: files-api-2025-04-14" \ -H "content-type: application/json" \ -d @- <<EOF {
``` ```bash CLI - ant beta:messages create --beta files-api-2025-04-14 <<YAML + ant messages create <<YAML model: claude-opus-5 max_tokens: 1024 messages:
``` ```python Python - cited_response = client.beta.messages.create( + cited_response = client.messages.create( model="claude-opus-5", max_tokens=1024, messages=[
], } ], - betas=["files-api-2025-04-14"], ) print(cited_response) ``` ```typescript TypeScript - const citedResponse = await client.beta.messages.create({ + const citedResponse = await client.messages.create({ model: "claude-opus-5", max_tokens: 1024, messages: [
], }, ], - betas: ["files-api-2025-04-14"], }); console.log(citedResponse); ``` ```csharp C# - var citedResponse = await client.Beta.Messages.Create( + var citedResponse = await client.Messages.Create( new MessageCreateParams { - Model = Messages::Model.ClaudeOpus5, + Model = Model.ClaudeOpus5, MaxTokens = 1024, - Betas = [AnthropicBeta.FilesApi2025_04_14], Messages = [ - new BetaMessageParam + new MessageParam { Role = Role.User, - Content = new List<BetaContentBlockParam> + Content = new List<ContentBlockParam> { - new BetaRequestDocumentBlock + new DocumentBlockParam { - Source = new BetaFileDocumentSource { FileID = fileId }, + Source = new FileDocumentSource { FileID = fileId }, Title = "Document Title", Context = "Context about the document that will not be cited from", - Citations = new BetaCitationsConfigParam { Enabled = true }, + Citations = new CitationsConfigParam { Enabled = true }, }, - new BetaTextBlockParam { Text = "Summarize this document." }, + new TextBlockParam { Text = "Summarize this document." }, } } ]
``` ```go Go - citedMsg, err := client.Beta.Messages.New(context.Background(), - anthropic.BetaMessageNewParams{ + citedMsg, err := client.Messages.New(context.Background(), + anthropic.MessageNewParams{ Model: anthropic.ModelClaudeOpus5, MaxTokens: 1024, - Betas: []anthropic.AnthropicBeta{anthropic.AnthropicBetaFilesAPI2025_04_14}, - Messages: []anthropic.BetaMessageParam{ - anthropic.NewBetaUserMessage( - anthropic.BetaContentBlockParamUnion{ - OfDocument: &anthropic.BetaRequestDocumentBlockParam{ - Source: anthropic.BetaRequestDocumentBlockSourceUnionParam{ - OfFile: &anthropic.BetaFileDocumentSourceParam{FileID: fileID}, + Messages: []anthropic.MessageParam{ + anthropic.NewUserMessage( + anthropic.ContentBlockParamUnion{ + OfDocument: &anthropic.DocumentBlockParam{ + Source: anthropic.DocumentBlockParamSourceUnion{ + OfFile: &anthropic.FileDocumentSourceParam{FileID: fileID}, }, Title: anthropic.String("Document Title"), Context: anthropic.String("Context about the document that will not be cited from"), - Citations: anthropic.BetaCitationsConfigParam{Enabled: anthropic.Bool(true)}, + Citations: anthropic.CitationsConfigParam{Enabled: anthropic.Bool(true)}, }, }, - anthropic.NewBetaTextBlock("Summarize this document."), + anthropic.NewTextBlock("Summarize this document."), ), }, })
```java Java MessageCreateParams citedParams = MessageCreateParams.builder() .model(Model.CLAUDE_OPUS_5) - .addBeta("files-api-2025-04-14") .maxTokens(1024) - .addUserMessageOfBetaContentBlockParams(List.of( - BetaContentBlockParam.ofDocument(BetaRequestDocumentBlock.builder() - .source(BetaFileDocumentSource.builder().fileId(fileId).build()) + .addUserMessageOfBlockParams(List.of( + ContentBlockParam.ofDocument(DocumentBlockParam.builder() + .fileSource(fileId) .title("Document Title") .context("Context about the document that will not be cited from") - .citations(BetaCitationsConfigParam.builder().enabled(true).build()) + .citations(CitationsConfigParam.builder().enabled(true).build()) .build()), - BetaContentBlockParam.ofText(BetaTextBlockParam.builder() + ContentBlockParam.ofText(TextBlockParam.builder() .text("Summarize this document.") .build()) )) .build(); - BetaMessage citedMessage = client.beta().messages().create(citedParams); + Message citedMessage = client.messages().create(citedParams); System.out.println(citedMessage); ```
``` ```ruby Ruby - cited_response = client.beta.messages.create( + cited_response = client.messages.create( model: "claude-opus-5", max_tokens: 1024, - betas: ["files-api-2025-04-14"], messages: [ { role: "user",
<Tab title="Files API"> <Note> - These examples reference the uploaded file as a `document` source. They use the SDK `beta` client path and send the `anthropic-beta: files-api-2025-04-14` header, which the API accepts but does not require. See [Files API](https://platform.claude.com/docs/en/build-with-claude/files) for upload details. + These examples reference the uploaded file as a `document` source, and no beta header is required. See [Files API](https://platform.claude.com/docs/en/build-with-claude/files) for upload details. </Note> <CodeGroup>
curl -X POST https://api.anthropic.com/v1/messages \ -H "x-api-key: $ANTHROPIC_API_KEY" \ -H "anthropic-version: 2023-06-01" \ - -H "anthropic-beta: files-api-2025-04-14" \ -H "content-type: application/json" \ -d @- <<EOF {
``` ```bash CLI - ant beta:messages create --beta files-api-2025-04-14 <<YAML + ant messages create <<YAML model: claude-opus-5 max_tokens: 1024 messages:
``` ```python Python - cited_response = client.beta.messages.create( + cited_response = client.messages.create( model="claude-opus-5", max_tokens=1024, messages=[
], } ], - betas=["files-api-2025-04-14"], ) print(cited_response) ``` ```typescript TypeScript - const citedResponse = await client.beta.messages.create({ + const citedResponse = await client.messages.create({ model: "claude-opus-5", max_tokens: 1024, messages: [
], }, ], - betas: ["files-api-2025-04-14"], }); console.log(citedResponse); ``` ```csharp C# - var citedResponse = await client.Beta.Messages.Create( + var citedResponse = await client.Messages.Create( new MessageCreateParams { - Model = Messages::Model.ClaudeOpus5, + Model = Model.ClaudeOpus5, MaxTokens = 1024, - Betas = [AnthropicBeta.FilesApi2025_04_14], Messages = [ - new BetaMessageParam + new MessageParam { Role = Role.User, - Content = new List<BetaContentBlockParam> + Content = new List<ContentBlockParam> { - new BetaRequestDocumentBlock + new DocumentBlockParam { - Source = new BetaFileDocumentSource { FileID = fileId }, + Source = new FileDocumentSource { FileID = fileId }, Title = "Document Title", Context = "Context about the document that will not be cited from", - Citations = new BetaCitationsConfigParam { Enabled = true }, + Citations = new CitationsConfigParam { Enabled = true }, }, - new BetaTextBlockParam { Text = "Summarize this document." }, + new TextBlockParam { Text = "Summarize this document." }, } } ]
``` ```go Go - citedMsg, err := client.Beta.Messages.New(context.Background(), - anthropic.BetaMessageNewParams{ + citedMsg, err := client.Messages.New(context.Background(), + anthropic.MessageNewParams{ Model: anthropic.ModelClaudeOpus5, MaxTokens: 1024, - Betas: []anthropic.AnthropicBeta{anthropic.AnthropicBetaFilesAPI2025_04_14}, - Messages: []anthropic.BetaMessageParam{ - anthropic.NewBetaUserMessage( - anthropic.BetaContentBlockParamUnion{ - OfDocument: &anthropic.BetaRequestDocumentBlockParam{ - Source: anthropic.BetaRequestDocumentBlockSourceUnionParam{ - OfFile: &anthropic.BetaFileDocumentSourceParam{FileID: fileID}, + Messages: []anthropic.MessageParam{ + anthropic.NewUserMessage( + anthropic.ContentBlockParamUnion{ + OfDocument: &anthropic.DocumentBlockParam{ + Source: anthropic.DocumentBlockParamSourceUnion{ + OfFile: &anthropic.FileDocumentSourceParam{FileID: fileID}, }, Title: anthropic.String("Document Title"), Context: anthropic.String("Context about the document that will not be cited from"), - Citations: anthropic.BetaCitationsConfigParam{Enabled: anthropic.Bool(true)}, + Citations: anthropic.CitationsConfigParam{Enabled: anthropic.Bool(true)}, }, }, - anthropic.NewBetaTextBlock("Summarize this document."), + anthropic.NewTextBlock("Summarize this document."), ), }, })
```java Java MessageCreateParams citedParams = MessageCreateParams.builder() .model(Model.CLAUDE_OPUS_5) - .addBeta("files-api-2025-04-14") .maxTokens(1024) - .addUserMessageOfBetaContentBlockParams(List.of( - BetaContentBlockParam.ofDocument(BetaRequestDocumentBlock.builder() - .source(BetaFileDocumentSource.builder().fileId(fileId).build()) + .addUserMessageOfBlockParams(List.of( + ContentBlockParam.ofDocument(DocumentBlockParam.builder() + .fileSource(fileId) .title("Document Title") .context("Context about the document that will not be cited from") - .citations(BetaCitationsConfigParam.builder().enabled(true).build()) + .citations(CitationsConfigParam.builder().enabled(true).build()) .build()), - BetaContentBlockParam.ofText(BetaTextBlockParam.builder() + ContentBlockParam.ofText(TextBlockParam.builder() .text("Summarize this document.") .build()) )) .build(); - BetaMessage citedMessage = client.beta().messages().create(citedParams); + Message citedMessage = client.messages().create(citedParams); System.out.println(citedMessage); ```
``` ```ruby Ruby - cited_response = client.beta.messages.create( + cited_response = client.messages.create( model: "claude-opus-5", max_tokens: 1024, - betas: ["files-api-2025-04-14"], messages: [ { role: "user",
build-with-claude/claude-on-vertex-ai Changed · +4 / -4 lines
<Tab title="Java"> <CodeGroup exclude="shell, python, typescript, csharp, go, php, ruby"> ```groovy Gradle - implementation("com.anthropic:anthropic-java:2.53.0") - implementation("com.anthropic:anthropic-java-vertex:2.53.0") + implementation("com.anthropic:anthropic-java:2.57.0") + implementation("com.anthropic:anthropic-java-vertex:2.57.0") ``` ```xml Maven
<dependency> <groupId>com.anthropic</groupId> <artifactId>anthropic-java</artifactId> - <version>2.53.0</version> + <version>2.57.0</version> </dependency> <dependency> <groupId>com.anthropic</groupId> <artifactId>anthropic-java-vertex</artifactId> - <version>2.53.0</version> + <version>2.57.0</version> </dependency> ```
build-with-claude/claude-platform-on-aws Changed · +13 / -11 lines
Once the new organization is running, the differences are concentrated in billing and authentication, which are handled through AWS: -* **Billing** moves to AWS Marketplace: usage is billed in Claude Consumption Units rather than prepaid credits (see [Billing](https://platform.claude.com/docs/en/build-with-claude/claude-platform-on-aws#billing)), and spend limits are managed on the Billing page rather than the Limits page (see [Spend limits](https://platform.claude.com/docs/en/build-with-claude/claude-platform-on-aws#spend-limits)). During the transition, billing stays separate: the existing organization continues to be billed as it is today. +* **Billing** moves to AWS Marketplace: usage is billed in Claude Consumption Units rather than prepaid credits (see [Billing](https://platform.claude.com/docs/en/build-with-claude/claude-platform-on-aws#billing)), and you set spend limits on the Billing page (see [Spend limits](https://platform.claude.com/docs/en/build-with-claude/claude-platform-on-aws#spend-limits)). During the transition, billing stays separate: the existing organization continues to be billed as it is today. * **Authentication and access** move to AWS: requests authenticate with AWS credentials or with API keys generated in the AWS Console, not the Claude Console (see [Authentication](https://platform.claude.com/docs/en/build-with-claude/claude-platform-on-aws#authentication)). Organization membership is managed through AWS IAM rather than the Claude Console (see [Available pages](https://platform.claude.com/docs/en/build-with-claude/claude-platform-on-aws#available-pages)), and Anthropic's client SDKs provide platform-specific client classes (see [Install an SDK](https://platform.claude.com/docs/en/build-with-claude/claude-platform-on-aws#install-an-sdk)). * **Day-to-day API usage** works the way it does on the first-party Claude API, except where noted in the [feature limitations](https://platform.claude.com/docs/en/build-with-claude/claude-platform-on-aws#features-not-supported). Before shifting production traffic, check your rate limits: new organizations are placed on the Start tier, and limit increases go through your Anthropic account representative (see [Rate limits and quotas](https://platform.claude.com/docs/en/build-with-claude/claude-platform-on-aws#rate-limits-and-quotas)).
<Tab title="Java"> ```kotlin Gradle - implementation("com.anthropic:anthropic-java-aws:2.53.0") + implementation("com.anthropic:anthropic-java-aws:2.57.0") ``` ```xml Maven
<dependency> <groupId>com.anthropic</groupId> <artifactId>anthropic-java-aws</artifactId> - <version>2.53.0</version> + <version>2.57.0</version> </dependency> ``` </Tab>
* **Feature access:** Because Anthropic operates both platforms, most new features and beta headers become available on Claude Platform on AWS without a separate integration step. See [feature limitations](https://platform.claude.com/docs/en/build-with-claude/claude-platform-on-aws#features-not-supported) for exceptions. * **Beta features:** Pass the standard `anthropic-beta` header to access beta features, just as you would with the Claude API. -* **Agent Skills:** Use pre-built and custom [Agent Skills](https://platform.claude.com/docs/en/agents-and-tools/agent-skills/overview) with the same `container.skills` parameter and beta headers as the Claude API. All pre-built Skills (PowerPoint, Excel, Word, PDF) work out of the box. +* **Agent Skills:** Use pre-built and custom [Agent Skills](https://platform.claude.com/docs/en/agents-and-tools/agent-skills/overview) with the same `container.skills` parameter as the Claude API. All pre-built Skills (PowerPoint, Excel, Word, PDF) work out of the box. * **Code execution:** Run code in Anthropic's managed sandbox using the [code execution tool](https://platform.claude.com/docs/en/agents-and-tools/tool-use/code-execution-tool). * **Tool use:** Computer use and all other [tool use capabilities](https://platform.claude.com/docs/en/agents-and-tools/tool-use/overview) are available. * **Extended thinking:** Enable extended thinking with the same parameters as the Claude API.
| **Usage** | Yes | No | View token usage by model, workspace, and dimension. Data can take a few minutes to appear after a request. | | **Cost** | Yes | No | View cost breakdowns by model and workspace. AWS Cost Explorer shows the aggregated [Claude Consumption Unit (CCU)](https://platform.claude.com/docs/en/build-with-claude/claude-platform-on-aws#billing) line item. | | **Rate limits** | Yes | No | View rate limits (read-only). Tier increases go through your Anthropic account representative; see [Rate limits and quotas](https://platform.claude.com/docs/en/build-with-claude/claude-platform-on-aws#rate-limits-and-quotas). | -| **Workspaces** | Yes | No | View per-region workspaces (read-only). | +| **Workspaces** | Yes | No | View per-region workspaces (read-only) and set per-workspace [spend limits](https://platform.claude.com/docs/en/build-with-claude/claude-platform-on-aws#spend-limits). | | **Files** | Yes | Yes | View and manage uploaded files. | | **Skills** | Yes | Yes | View and manage Agent Skills. | | **Batches** | Yes | Yes | View and manage batch processing jobs. |
### Spend limits -The Start, Build, and Scale usage tiers each carry a monthly spend cap; see [the per-tier spend caps](https://platform.claude.com/docs/en/api/rate-limits#spend-limits) for current values. The spend cap and rate limits belong to the same tier, so to raise the cap, request a tier increase through your Anthropic account representative or [support](https://support.claude.com) (see [Rate limits and quotas](https://platform.claude.com/docs/en/build-with-claude/claude-platform-on-aws#rate-limits-and-quotas)). +The Start, Build, and Scale usage tiers each carry a monthly spend cap; see the [per-tier spend caps](https://platform.claude.com/docs/en/api/rate-limits#spend-limits) for current values. When your organization's usage for the calendar month reaches its tier's cap, API requests fail with the [spend-cap error](https://platform.claude.com/docs/en/api/rate-limits#reaching-your-spend-cap) until 00UTC on the first day of the next month, and retrying sooner doesn't succeed. The spend cap and rate limits belong to the same tier. To raise the cap, or to restore access after reaching it, request a tier increase through your Anthropic account representative or [Anthropic support](https://support.claude.com) (see [Rate limits and quotas](https://platform.claude.com/docs/en/build-with-claude/claude-platform-on-aws#rate-limits-and-quotas)). -You can also set your own monthly spend limit to cap what your organization spends: +You can also set your own monthly spend limits below the cap, after adding at least one recipient under **Email notifications** on the Billing page: * **Organization spend limit:** Go to [Settings > Billing](https://platform.claude.com/settings/billing) in the [Claude Console](https://platform.claude.com/docs/en/build-with-claude/claude-platform-on-aws#using-the-claude-console) to set a monthly spend limit. -* **Workspace spend limits:** Set monthly spend limits for individual workspaces from each workspace's **Spend limits** settings. +* **Workspace spend limits:** Select a workspace under [Settings > Workspaces](https://platform.claude.com/settings/workspaces) and open its **Spend limits** page. Workspace details are otherwise read-only in the Claude Console on Claude Platform on AWS. -The spend limits you set are soft limits: spend is calculated at list prices and can take about two hours to reflect recent usage. +When usage reaches a limit you set, requests fail with HTTP 400 (see the [spend limit error](https://platform.claude.com/docs/en/api/rate-limits#setting-your-own-spend-limit)) until 00UTC on the first day of the next month, or until you raise or remove the limit. + +Spend is calculated at list prices and can take about 2 hours to reflect recent usage, so usage can exceed the cap or a limit before requests start failing. The overshoot is billed. When the tier cap or an organization spend limit stops your requests, an email notice goes to the recipients listed under **Email notifications** on the Billing page. Role-based recipients, such as all admins, aren't available on Claude Platform on AWS. The tier-cap notice also goes to the email address used at AWS Marketplace sign-up. ## Monitoring and logging
build-with-claude/files Changed · +66 / -95 lines
- Platforms: Claude API, Claude Platform on AWS (beta), Microsoft Foundry (beta) [1]; not available on Amazon Bedrock, Google Cloud 1. On [Microsoft Foundry](https://platform.claude.com/docs/en/build-with-claude/claude-in-microsoft-foundry), the Files API requires a [Hosted on Anthropic deployment](https://platform.claude.com/docs/en/build-with-claude/claude-in-microsoft-foundry#additional-features-not-supported-when-hosted-on-azure). -The Files API lets you upload and manage files to use with the Claude API without re-uploading content with each request. This is particularly useful when using the [code execution tool](https://platform.claude.com/docs/en/agents-and-tools/tool-use/code-execution-tool) to provide inputs (for example, datasets and documents) and then download outputs (for example, charts). You can [explore the API reference directly](https://platform.claude.com/docs/en/api/beta/files/upload), in addition to this guide. +The Files API lets you upload and manage files to use with the Claude API without re-uploading content with each request. This is particularly useful when using the [code execution tool](https://platform.claude.com/docs/en/agents-and-tools/tool-use/code-execution-tool) to provide inputs (for example, datasets and documents) and then download outputs (for example, charts). You can [explore the API reference directly](https://platform.claude.com/docs/en/api/files/upload), in addition to this guide. ## File type support
## How to use the Files API <Note> - Requests to the Files API endpoints (`/v1/files`) don't need a beta header, and neither do Messages or Message Batches requests that reference an uploaded file. Two things to know about the `anthropic-beta: files-api-2025-04-14` header the examples on this page still send: - - * **Referencing a file from the Messages API.** Requests that use an uploaded file as a `document` or `image` source, or in a `container_upload` block for the code execution tool, work with or without the header. The SDK examples on this page still pass it through their `betas` parameter, which continues to work. - * **Sending the header on Files API requests.** The SDK `beta.files` methods and the CLI `ant beta:files` commands add the header automatically, and the cURL examples on this page include it. Those requests keep working and return the earlier response format: the list endpoint paginates with `before_id` and `after_id`, returns `has_more`, `first_id`, and `last_id` instead of `next_page`, and rejects the `page` and `ids[]` parameters as unknown fields. File objects returned under the header omit `expires_at` instead of returning `null` when no expiration is set. To use `page` and `ids[]` as described under [List files](https://platform.claude.com/docs/en/build-with-claude/files#list-files), send the request without the beta header. + Requests to the Files API endpoints (`/v1/files`) don't need a beta header. Neither do Messages or Message Batches requests that reference an uploaded file as a `document` or `image` source, or in a `container_upload` block for the code execution tool. Requests that still send the `anthropic-beta: files-api-2025-04-14` header keep working. On Files API requests, that header also selects the earlier response format: the list endpoint paginates with `before_id` and `after_id`, returns `has_more`, `first_id`, and `last_id` instead of `next_page`, and rejects the `page` and `ids[]` parameters as unknown fields. File objects returned under the header omit `expires_at` instead of returning `null` when no expiration is set. To use `page` and `ids[]` as described under [List files](https://platform.claude.com/docs/en/build-with-claude/files#list-files), send the request without the header. The PHP tabs on this page still call the SDK's `beta` namespace, which sends the header, so their list output uses the earlier format. </Note> ### Uploading a file
FILE_ID=$(curl -X POST https://api.anthropic.com/v1/files \ -H "x-api-key: $ANTHROPIC_API_KEY" \ -H "anthropic-version: 2023-06-01" \ - -H "anthropic-beta: files-api-2025-04-14" \ -F "file=@/path/to/document.pdf" | jq -r '.id') echo "$FILE_ID" ``` ```bash CLI - FILE_ID=$(ant beta:files upload \ + FILE_ID=$(ant files upload \ --file /path/to/document.pdf \ --transform id \ --raw-output)
``` ```python Python - uploaded = client.beta.files.upload( + uploaded = client.files.upload( file=("document.pdf", open("/path/to/document.pdf", "rb"), "application/pdf"), ) file_id = uploaded.id
``` ```typescript TypeScript - const uploaded = await client.beta.files.upload({ + const uploaded = await client.files.upload({ file: await toFile( fs.createReadStream("/path/to/document.pdf"), undefined,
``` ```csharp C# - var uploaded = await client.Beta.Files.Upload( + var uploaded = await client.Files.Upload( new FileUploadParams { File = new BinaryContent
} defer f.Close() - response, err := client.Beta.Files.Upload(context.Background(), - anthropic.BetaFileUploadParams{ + response, err := client.Files.Upload(context.Background(), + anthropic.FileUploadParams{ File: anthropic.File(f, "document.pdf", "application/pdf"), }) if err != nil {
``` ```java Java - FileMetadata file = client.beta().files().upload( + FileMetadata file = client.files().upload( FileUploadParams.builder() .file(MultipartField.<InputStream>builder() .value(Files.newInputStream(Path.of("/path/to/document.pdf")))
``` ```ruby Ruby - file = client.beta.files.upload( + file = client.files.upload( file: Anthropic::FilePart.new( Pathname("/path/to/document.pdf"), content_type: "application/pdf"
curl -X POST https://api.anthropic.com/v1/messages \ -H "x-api-key: $ANTHROPIC_API_KEY" \ -H "anthropic-version: 2023-06-01" \ - -H "anthropic-beta: files-api-2025-04-14" \ -H "content-type: application/json" \ -d @- <<EOF {
``` ```bash CLI - ant beta:messages create --beta files-api-2025-04-14 <<YAML + ant messages create <<YAML model: claude-opus-5 max_tokens: 1024 messages:
``` ```python Python - response = client.beta.messages.create( + response = client.messages.create( model="claude-opus-5", max_tokens=1024, messages=[
], } ], - betas=["files-api-2025-04-14"], ) print(response) ``` ```typescript TypeScript - const response = await client.beta.messages.create({ + const response = await client.messages.create({ model: "claude-opus-5", max_tokens: 1024, messages: [
], }, ], - betas: ["files-api-2025-04-14"], }); console.log(response);
``` ```csharp C# - var response = await client.Beta.Messages.Create( + var response = await client.Messages.Create( new MessageCreateParams { - Model = Messages::Model.ClaudeOpus5, + Model = Model.ClaudeOpus5, MaxTokens = 1024, - Betas = [AnthropicBeta.FilesApi2025_04_14], Messages = [ - new BetaMessageParam + new MessageParam { Role = Role.User, - Content = new List<BetaContentBlockParam> + Content = new List<ContentBlockParam> { - new BetaTextBlockParam { Text = "Please summarize this document for me." }, - new BetaRequestDocumentBlock + new TextBlockParam { Text = "Please summarize this document for me." }, + new DocumentBlockParam { - Source = new BetaFileDocumentSource { FileID = fileId } + Source = new FileDocumentSource { FileID = fileId } } } }
``` ```go Go - msg, err := client.Beta.Messages.New(context.Background(), - anthropic.BetaMessageNewParams{ + msg, err := client.Messages.New(context.Background(), + anthropic.MessageNewParams{ Model: anthropic.ModelClaudeOpus5, MaxTokens: 1024, - Betas: []anthropic.AnthropicBeta{anthropic.AnthropicBetaFilesAPI2025_04_14}, - Messages: []anthropic.BetaMessageParam{ - anthropic.NewBetaUserMessage( - anthropic.NewBetaTextBlock("Please summarize this document for me."), - anthropic.NewBetaDocumentBlock(anthropic.BetaFileDocumentSourceParam{ + Messages: []anthropic.MessageParam{ + anthropic.NewUserMessage( + anthropic.NewTextBlock("Please summarize this document for me."), + anthropic.NewDocumentBlock(anthropic.FileDocumentSourceParam{ FileID: fileID, }), ),
```java Java MessageCreateParams params = MessageCreateParams.builder() .model(Model.CLAUDE_OPUS_5) - .addBeta("files-api-2025-04-14") .maxTokens(1024) - .addUserMessageOfBetaContentBlockParams(List.of( - BetaContentBlockParam.ofText(BetaTextBlockParam.builder() + .addUserMessageOfBlockParams(List.of( + ContentBlockParam.ofText(TextBlockParam.builder() .text("Please summarize this document for me.") .build()), - BetaContentBlockParam.ofDocument(BetaRequestDocumentBlock.builder() - .source(BetaFileDocumentSource.builder() - .fileId(fileId) - .build()) + ContentBlockParam.ofDocument(DocumentBlockParam.builder() + .fileSource(fileId) .build()) )) .build(); - BetaMessage message = client.beta().messages().create(params); + Message message = client.messages().create(params); System.out.println(message); ```
``` ```ruby Ruby - response = client.beta.messages.create( + response = client.messages.create( model: "claude-opus-5", max_tokens: 1024, - betas: ["files-api-2025-04-14"], messages: [ { role: "user",
#### List files -Retrieve a list of your uploaded files. The endpoint is paginated: each request returns up to `limit` files (20 by default, and at most 1,000), and the response's `next_page` cursor fetches the next page when passed back as the `page` parameter. Files are ordered newest first. See the [List Files API reference](https://platform.claude.com/docs/en/api/beta/files/list). The SDKs return the first page and provide auto-pagination helpers. The CLI example bounds the total with `--max-items`: +Retrieve a list of your uploaded files. The endpoint is paginated: each request returns up to `limit` files (20 by default, and at most 1,000), and the response's `next_page` cursor fetches the next page when passed back as the `page` parameter. Files are ordered newest first. See the [List Files API reference](https://platform.claude.com/docs/en/api/files/list). The SDKs return the first page and provide auto-pagination helpers. The CLI example bounds the total with `--max-items`: <CodeGroup> ```bash cURL curl https://api.anthropic.com/v1/files \ -H "x-api-key: $ANTHROPIC_API_KEY" \ - -H "anthropic-version: 2023-06-01" \ - -H "anthropic-beta: files-api-2025-04-14" + -H "anthropic-version: 2023-06-01" ``` ```bash CLI - ant beta:files list \ + ant files list \ --max-items 10 ``` ```python Python client = anthropic.Anthropic() - files = client.beta.files.list() + files = client.files.list() print(files) ``` ```typescript TypeScript const client = new Anthropic(); - const files = await client.beta.files.list(); + const files = await client.files.list(); console.log(files); ```
```csharp C# AnthropicClient client = new(); - var files = await client.Beta.Files.List(); + var files = await client.Files.List(); Console.WriteLine(files); ```
```go Go client := anthropic.NewClient() - files, err := client.Beta.Files.List(context.TODO(), anthropic.BetaFileListParams{}) + files, err := client.Files.List(context.TODO(), anthropic.FileListParams{}) if err != nil { log.Fatal(err) }
``` ```java Java - import com.anthropic.models.beta.files.FileListPage; + import com.anthropic.models.files.FileListPage; // ... void main() { AnthropicClient client = AnthropicOkHttpClient.fromEnv(); - FileListPage files = client.beta().files().list(); + FileListPage files = client.files().list(); System.out.println(files); } ```
```ruby Ruby client = Anthropic::Client.new - files = client.beta.files.list + files = client.files.list puts files ``` </CodeGroup>
To check a known set of files in one request instead of paging, pass up to 100 file IDs as `ids[]` query parameters. An `ids[]` request always returns a single page (`next_page` is `null`), and any ID that does not resolve to a file in your workspace is silently omitted from `data`; compare the returned IDs against the requested IDs to detect misses. `ids[]` cannot be combined with `page` or `limit`. -The `page` parameter, the `next_page` cursor, and the `ids[]` filter apply to requests sent without the `anthropic-beta: files-api-2025-04-14` header. The preceding examples send it (the SDKs and CLI add it for `beta.files` calls), so they receive the earlier list format described in the note under [How to use the Files API](https://platform.claude.com/docs/en/build-with-claude/files#how-to-use-the-files-api). +The `page` parameter, the `next_page` cursor, and the `ids[]` filter apply to requests sent without the `anthropic-beta: files-api-2025-04-14` header. Requests that send the header receive the earlier list format described in the note under [How to use the Files API](https://platform.claude.com/docs/en/build-with-claude/files#how-to-use-the-files-api). #### Get file metadata
```bash cURL curl "https://api.anthropic.com/v1/files/$FILE_ID" \ -H "x-api-key: $ANTHROPIC_API_KEY" \ - -H "anthropic-version: 2023-06-01" \ - -H "anthropic-beta: files-api-2025-04-14" + -H "anthropic-version: 2023-06-01" ``` ```bash CLI - ant beta:files retrieve-metadata \ + ant files retrieve-metadata \ --file-id "$FILE_ID" ``` ```python Python - file = client.beta.files.retrieve_metadata(file_id) + file = client.files.retrieve_metadata(file_id) print(file) ``` ```typescript TypeScript - const file = await client.beta.files.retrieveMetadata(uploaded.id); + const file = await client.files.retrieveMetadata(uploaded.id); console.log(file); ``` ```csharp C# - var file = await client.Beta.Files.RetrieveMetadata(fileId); + var file = await client.Files.RetrieveMetadata(fileId); Console.WriteLine(file); ``` ```go Go - metadata, err := client.Beta.Files.GetMetadata( - context.TODO(), - fileID, - anthropic.BetaFileGetMetadataParams{}, - ) + metadata, err := client.Files.GetMetadata(context.TODO(), fileID) if err != nil { log.Fatal(err) }
``` ```java Java - FileMetadata metadata = client.beta().files().retrieveMetadata(fileId); + FileMetadata metadata = client.files().retrieveMetadata(fileId); System.out.println(metadata); ```
``` ```ruby Ruby - file = client.beta.files.retrieve_metadata(file_id) + file = client.files.retrieve_metadata(file_id) puts file ``` </CodeGroup>
```bash cURL curl -X DELETE "https://api.anthropic.com/v1/files/$FILE_ID" \ -H "x-api-key: $ANTHROPIC_API_KEY" \ - -H "anthropic-version: 2023-06-01" \ - -H "anthropic-beta: files-api-2025-04-14" + -H "anthropic-version: 2023-06-01" ``` ```bash CLI - ant beta:files delete \ + ant files delete \ --file-id "$FILE_ID" ``` ```python Python - client.beta.files.delete(file_id) + client.files.delete(file_id) ``` ```typescript TypeScript - await client.beta.files.delete(uploaded.id); + await client.files.delete(uploaded.id); ``` ```csharp C# - await client.Beta.Files.Delete(fileId); + await client.Files.Delete(fileId); ``` ```go Go - _, err = client.Beta.Files.Delete( - context.TODO(), - fileID, - anthropic.BetaFileDeleteParams{}, - ) + _, err = client.Files.Delete(context.TODO(), fileID) if err != nil { log.Fatal(err) }
``` ```java Java - client.beta().files().delete(fileId); + client.files().delete(fileId); ``` ```php PHP
``` ```ruby Ruby - client.beta.files.delete(file_id) + client.files.delete(file_id) ``` </CodeGroup>
curl -X GET "https://api.anthropic.com/v1/files/$FILE_ID/content" \ -H "x-api-key: $ANTHROPIC_API_KEY" \ -H "anthropic-version: 2023-06-01" \ - -H "anthropic-beta: files-api-2025-04-14" \ --output downloaded_file.txt ``` ```bash CLI - ant beta:files download \ + ant files download \ --file-id "$FILE_ID" \ --output downloaded_file.txt ``` ```python Python - file_content = client.beta.files.download(file_id) + file_content = client.files.download(file_id) file_content.write_to_file("downloaded_file.txt") ``` ```typescript TypeScript - const content = await client.beta.files.download(uploaded.id); + const content = await client.files.download(uploaded.id); const bytes = Buffer.from(await content.arrayBuffer()); await fsp.writeFile("downloaded_file.txt", bytes);
``` ```csharp C# - using var fileContent = await client.Beta.Files.Download(fileId); + using var fileContent = await client.Files.Download(fileId); await using var source = await fileContent.ReadAsStream(); await using var destination = File.Create("downloaded_file.txt"); await source.CopyToAsync(destination);
```go Go func downloadFile(client anthropic.Client, fileID string) error { - resp, err := client.Beta.Files.Download( - context.TODO(), - fileID, - anthropic.BetaFileDownloadParams{}, - ) + resp, err := client.Files.Download(context.TODO(), fileID) if err != nil { return err }
``` ```java Java - try (HttpResponse response = client.beta().files().download(fileId)) { + try (HttpResponse response = client.files().download(fileId)) { try (InputStream body = response.body()) { Files.copy(body, Path.of("downloaded_file.txt"), StandardCopyOption.REPLACE_EXISTING);
``` ```ruby Ruby - file_content = client.beta.files.download(file_id) + file_content = client.files.download(file_id) File.binwrite("downloaded_file.txt", file_content.read) ```
build-with-claude/pdf-support Changed · +28 / -46 lines
#### Option 3: Files API -For PDFs you'll use repeatedly, or when you want to avoid encoding overhead, use the [Files API](https://platform.claude.com/docs/en/build-with-claude/files). These examples send the `anthropic-beta: files-api-2025-04-14` header, which the API accepts but doesn't require: +For PDFs you'll use repeatedly, or when you want to avoid encoding overhead, use the [Files API](https://platform.claude.com/docs/en/build-with-claude/files): <CodeGroup> ```bash cURL
FILE_ID=$(curl -sS -X POST https://api.anthropic.com/v1/files \ -H "x-api-key: $ANTHROPIC_API_KEY" \ -H "anthropic-version: 2023-06-01" \ - -H "anthropic-beta: files-api-2025-04-14" \ -F "[email protected]" | jq -r '.id') # Then use the returned file_id in your message
-H "content-type: application/json" \ -H "x-api-key: $ANTHROPIC_API_KEY" \ -H "anthropic-version: 2023-06-01" \ - -H "anthropic-beta: files-api-2025-04-14" \ -d @- <<EOF { "model": "claude-opus-5",
```bash CLI # First, upload your PDF to the Files API - FILE_ID=$(ant beta:files upload \ + FILE_ID=$(ant files upload \ --file ./document.pdf \ --transform id \ --raw-output) # Then use the returned file_id in your message - ant beta:messages create \ - --beta files-api-2025-04-14 \ + ant messages create \ --transform content \ --format yaml <<YAML model: claude-opus-5
# Upload the PDF file with open("/path/to/document.pdf", "rb") as f: - file_upload = client.beta.files.upload(file=("document.pdf", f, "application/pdf")) + file_upload = client.files.upload(file=("document.pdf", f, "application/pdf")) # Use the uploaded file in a message - message = client.beta.messages.create( + message = client.messages.create( model="claude-opus-5", max_tokens=1024, - betas=["files-api-2025-04-14"], messages=[ { "role": "user",
const anthropic = new Anthropic(); // Upload the PDF file - const fileUpload = await anthropic.beta.files.upload({ + const fileUpload = await anthropic.files.upload({ file: await toFile(fs.createReadStream("/path/to/document.pdf"), undefined, { type: "application/pdf" })
}); // Use the uploaded file in a message - const response = await anthropic.beta.messages.create({ + const response = await anthropic.messages.create({ model: "claude-opus-5", max_tokens: 1024, - betas: ["files-api-2025-04-14"], messages: [ { role: "user",
``` ```csharp C# - using Messages = Anthropic.Models.Messages; - var client = new AnthropicClient(); // Upload the PDF file - var fileUpload = await client.Beta.Files.Upload(new FileUploadParams + var fileUpload = await client.Files.Upload(new FileUploadParams { File = new BinaryContent {
}); // Use the uploaded file in a message - var message = await client.Beta.Messages.Create(new MessageCreateParams + var message = await client.Messages.Create(new MessageCreateParams { - Model = Messages::Model.ClaudeOpus5, + Model = Model.ClaudeOpus5, MaxTokens = 1024, - Betas = [AnthropicBeta.FilesApi2025_04_14], Messages = [ new() { Role = Role.User, - Content = new List<BetaContentBlockParam> + Content = new List<ContentBlockParam> { - new BetaRequestDocumentBlock + new DocumentBlockParam { - Source = new BetaFileDocumentSource { FileID = fileUpload.ID }, + Source = new FileDocumentSource { FileID = fileUpload.ID }, }, - new BetaTextBlockParam("What are the key findings in this document?"), + new TextBlockParam("What are the key findings in this document?"), }, }, ],
} defer pdfFile.Close() - fileUpload, err := client.Beta.Files.Upload(context.TODO(), anthropic.BetaFileUploadParams{ + fileUpload, err := client.Files.Upload(context.TODO(), anthropic.FileUploadParams{ File: anthropic.File(pdfFile, "document.pdf", "application/pdf"), }) if err != nil {
} // Use the uploaded file in a message - message, err := client.Beta.Messages.New(context.TODO(), anthropic.BetaMessageNewParams{ + message, err := client.Messages.New(context.TODO(), anthropic.MessageNewParams{ Model: anthropic.ModelClaudeOpus5, MaxTokens: 1024, - Betas: []anthropic.AnthropicBeta{anthropic.AnthropicBetaFilesAPI2025_04_14}, - Messages: []anthropic.BetaMessageParam{ - anthropic.NewBetaUserMessage( - anthropic.NewBetaDocumentBlock(anthropic.BetaFileDocumentSourceParam{ + Messages: []anthropic.MessageParam{ + anthropic.NewUserMessage( + anthropic.NewDocumentBlock(anthropic.FileDocumentSourceParam{ FileID: fileUpload.ID, }), - anthropic.NewBetaTextBlock("What are the key findings in this document?"), + anthropic.NewTextBlock("What are the key findings in this document?"), ), }, })
// Upload the PDF file FileMetadata file = client - .beta() .files() .upload(FileUploadParams.builder().file(Path.of("/path/to/document.pdf")).build());
// Use the uploaded file in a message MessageCreateParams params = MessageCreateParams.builder() .model(Model.CLAUDE_OPUS_5) - .addBeta(AnthropicBeta.FILES_API_2025_04_14) .maxTokens(1024) - .addUserMessageOfBetaContentBlockParams( + .addUserMessageOfBlockParams( List.of( - BetaContentBlockParam.ofDocument( - BetaRequestDocumentBlock.builder() - .source( - BetaFileDocumentSource.builder() - .fileId(file.id()) - .build() - ) - .build() + ContentBlockParam.ofDocument( + DocumentBlockParam.builder().fileSource(file.id()).build() ), - BetaContentBlockParam.ofText( - BetaTextBlockParam.builder() + ContentBlockParam.ofText( + TextBlockParam.builder() .text("What are the key findings in this document?") .build() )
) .build(); - BetaMessage message = client.beta().messages().create(params); + Message message = client.messages().create(params); System.out.println(message.content()); ```
# Upload the PDF file file_upload = File.open("/path/to/document.pdf", "rb") do |f| - anthropic.beta.files.upload( + anthropic.files.upload( file: Anthropic::FilePart.new(f, filename: "document.pdf", content_type: "application/pdf") ) end # Use the uploaded file in a message - message = anthropic.beta.messages.create( + message = anthropic.messages.create( model: "claude-opus-5", max_tokens: 1024, - betas: ["files-api-2025-04-14"], messages: [ { role: "user",
build-with-claude/skills-guide Changed · +597 / -738 lines
The two sides of this change are too far apart to line up, so this is the differ's own diff of it.
<Note> For complete API reference including request/response schemas and all parameters, see: - * [Skill Management API Reference](https://platform.claude.com/docs/en/api/beta/skills/list) - CRUD operations for Skills - * [Skill Versions API Reference](https://platform.claude.com/docs/en/api/beta/skills/versions/list) - Version management + * [Skill Management API Reference](https://platform.claude.com/docs/en/api/skills/list) - CRUD operations for Skills + * [Skill Versions API Reference](https://platform.claude.com/docs/en/api/skills/versions/list) - Version management </Note> <Note>
You can use Skills from two sources: -| Aspect | Anthropic Skills | Custom Skills | -| ------------------ | ------------------------------------------ | ------------------------------------------------------------------------------------------------------ | -| **Type value** | `anthropic` | `custom` | -| **Skill IDs** | Short names: `pptx`, `xlsx`, `docx`, `pdf` | Generated: `skill_01AbCdEfGhIjKlMnOpQrStUv` | -| **Version format** | Date-based: `20251013` or `latest` | Version ID: `skver_01AbCdEfGhIjKlMnOpQrStUv` or `latest` | -| **Management** | Pre-built and maintained by Anthropic | Upload and manage through the [Skills API](https://platform.claude.com/docs/en/api/beta/skills/create) | -| **Availability** | Available to all users | Private to your workspace | - -Both skill sources are returned by the [List Skills endpoint](https://platform.claude.com/docs/en/api/beta/skills/list) (use the `source` parameter to filter). The integration shape and execution environment are identical. The only difference is where the Skills come from and how they're managed. +| Aspect | Anthropic Skills | Custom Skills | +| ------------------ | ------------------------------------------ | ------------------------------------------------------------------------------------------------- | +| **Type value** | `anthropic` | `custom` | +| **Skill IDs** | Short names: `pptx`, `xlsx`, `docx`, `pdf` | Generated: `skill_01AbCdEfGhIjKlMnOpQrStUv` | +| **Version format** | Date-based: `20251013` or `latest` | Version ID: `skver_01AbCdEfGhIjKlMnOpQrStUv` or `latest` | +| **Management** | Pre-built and maintained by Anthropic | Upload and manage through the [Skills API](https://platform.claude.com/docs/en/api/skills/create) | +| **Availability** | Available to all users | Private to your workspace | + +Both skill sources are returned by the [List Skills endpoint](https://platform.claude.com/docs/en/api/skills/list) (use the `source` parameter to filter). The integration shape and execution environment are identical. The only difference is where the Skills come from and how they're managed. ### Prerequisites
1. **Claude API key** from the [Claude Console](https://platform.claude.com/settings/keys) 2. **[Code execution tool](https://platform.claude.com/docs/en/agents-and-tools/tool-use/code-execution-tool)** enabled in your requests -Skills are generally available on the Claude API and don't require an `anthropic-beta` header, either for the Skills API or for `container.skills` in Messages requests. The examples in this guide still send the `skills-2025-10-02` beta header (plus `code-execution-2025-08-25` in Messages requests) and use the SDKs' `beta` namespace. Both headers remain valid opt-ins, so the examples work as written, and you can omit them in your own requests. +Skills are generally available on the Claude API and don't require an `anthropic-beta` header, either for the Skills API or for `container.skills` in Messages requests. Requests that still send the `skills-2025-10-02` beta header keep working, and Skills API requests that send it keep the earlier beta response format. The PHP tabs on this page still call the SDK's `beta` namespace and send that header, so their printed output shows the earlier response fields. Skills require the code execution tool, so use a model from its [model compatibility list](https://platform.claude.com/docs/en/agents-and-tools/tool-use/code-execution-tool#model-compatibility).
curl https://api.anthropic.com/v1/messages \ -H "x-api-key: $ANTHROPIC_API_KEY" \ -H "anthropic-version: 2023-06-01" \ - -H "anthropic-beta: code-execution-2025-08-25,skills-2025-10-02" \ -H "content-type: application/json" \ -d '{ "model": "claude-opus-5",
``` ```bash CLI - ant beta:messages create \ - --beta code-execution-2025-08-25,skills-2025-10-02 <<'YAML' + ant messages create <<'YAML' model: claude-opus-5 max_tokens: 4096 container:
```python Python client = anthropic.Anthropic() - response = client.beta.messages.create( + response = client.messages.create( model="claude-opus-5", max_tokens=4096, - betas=["code-execution-2025-08-25", "skills-2025-10-02"], container={ "skills": [{"type": "anthropic", "skill_id": "pptx", "version": "latest"}] },
```typescript TypeScript const client = new Anthropic(); - const response = await client.beta.messages.create({ + const response = await client.messages.create({ model: "claude-opus-5", max_tokens: 4096, - betas: ["code-execution-2025-08-25", "skills-2025-10-02"], container: { skills: [ {
{ Model = "claude-opus-5", MaxTokens = 4096, - Betas = ["code-execution-2025-08-25", "skills-2025-10-02"], - Container = new BetaContainerParams + Container = new ContainerParams { Skills = [ - new BetaSkillParams + new SkillParams { - Type = BetaSkillParamsType.Anthropic, + Type = SkillParamsType.Anthropic, SkillID = "pptx", Version = "latest", }, ], }, Messages = [new() { Role = Role.User, Content = "Create a presentation about renewable energy" }], - Tools = [new BetaCodeExecutionTool20250825()], + Tools = [new CodeExecutionTool20250825()], }; - var message = await client.Beta.Messages.Create(parameters); + var message = await client.Messages.Create(parameters); Console.WriteLine(message); ``` ```go Go client := anthropic.NewClient() - response, err := client.Beta.Messages.New(context.TODO(), anthropic.BetaMessageNewParams{ + response, err := client.Messages.New(context.TODO(), anthropic.MessageNewParams{ Model: "claude-opus-5", MaxTokens: 4096, - Betas: []anthropic.AnthropicBeta{ - "code-execution-2025-08-25", - anthropic.AnthropicBetaSkills2025_10_02, - }, - Container: anthropic.BetaMessageNewParamsContainerUnion{ - OfContainers: &anthropic.BetaContainerParams{ - Skills: []anthropic.BetaSkillParams{ + Container: anthropic.MessageCreateParamsContainerUnion{ + OfContainers: &anthropic.ContainerParams{ + Skills: []anthropic.SkillParams{ { - Type: anthropic.BetaSkillParamsTypeAnthropic, + Type: anthropic.SkillParamsTypeAnthropic, SkillID: "pptx", Version: anthropic.String("latest"), }, }, }, }, - Messages: []anthropic.BetaMessageParam{ - anthropic.NewBetaUserMessage(anthropic.NewBetaTextBlock("Create a presentation about renewable energy")), + Messages: []anthropic.MessageParam{ + anthropic.NewUserMessage(anthropic.NewTextBlock("Create a presentation about renewable energy")), }, - Tools: []anthropic.BetaToolUnionParam{ - {OfCodeExecutionTool20250825: &anthropic.BetaCodeExecutionTool20250825Param{}}, + Tools: []anthropic.ToolUnionParam{ + {OfCodeExecutionTool20250825: &anthropic.CodeExecutionTool20250825Param{}}, }, }) if err != nil {
``` ```java Java - import com.anthropic.models.beta.messages.BetaContainerParams; - import com.anthropic.models.beta.messages.BetaSkillParams; - import com.anthropic.models.beta.messages.BetaCodeExecutionTool20250825; + import com.anthropic.models.messages.ContainerParams; + import com.anthropic.models.messages.SkillParams; + import com.anthropic.models.messages.CodeExecutionTool20250825; // ... void main() { AnthropicClient client = AnthropicOkHttpClient.fromEnv();
MessageCreateParams params = MessageCreateParams.builder() .model(Model.CLAUDE_OPUS_5) .maxTokens(4096L) - .addBeta("code-execution-2025-08-25") - .addBeta("skills-2025-10-02") - .container(BetaContainerParams.builder() - .addSkill(BetaSkillParams.builder() - .type(BetaSkillParams.Type.ANTHROPIC) + .container(ContainerParams.builder() + .addSkill(SkillParams.builder() + .type(SkillParams.Type.ANTHROPIC) .skillId("pptx") .version("latest") .build()) .build()) .addUserMessage("Create a presentation about renewable energy") - .addTool(BetaCodeExecutionTool20250825.builder().build()) + .addTool(CodeExecutionTool20250825.builder().build()) .build(); - BetaMessage response = client.beta().messages().create(params); + Message response = client.messages().create(params); System.out.println(response); } ```
```ruby Ruby client = Anthropic::Client.new - message = client.beta.messages.create( + message = client.messages.create( model: "claude-opus-5", max_tokens: 4096, - betas: ["code-execution-2025-08-25", "skills-2025-10-02"], container: { skills: [ {
RESPONSE=$(curl https://api.anthropic.com/v1/messages \ -H "x-api-key: $ANTHROPIC_API_KEY" \ -H "anthropic-version: 2023-06-01" \ - -H "anthropic-beta: code-execution-2025-08-25,skills-2025-10-02" \ -H "content-type: application/json" \ -d '{ "model": "claude-opus-5",
# Step 3: Get filename from metadata FILENAME=$(curl "https://api.anthropic.com/v1/files/$FILE_ID" \ -H "x-api-key: $ANTHROPIC_API_KEY" \ - -H "anthropic-version: 2023-06-01" \ - -H "anthropic-beta: files-api-2025-04-14" | jq -r '.filename') + -H "anthropic-version: 2023-06-01" | jq -r '.filename') # Step 4: Download the file using Files API curl "https://api.anthropic.com/v1/files/$FILE_ID/content" \ -H "x-api-key: $ANTHROPIC_API_KEY" \ -H "anthropic-version: 2023-06-01" \ - -H "anthropic-beta: files-api-2025-04-14" \ --output "$FILENAME" echo "Downloaded: $FILENAME"
```bash CLI # Step 1: Use the xlsx Skill to create a file # Step 2: Extract file_id from the response with --transform (GJSON path) - FILE_ID=$(ant beta:messages create \ - --beta code-execution-2025-08-25,skills-2025-10-02 \ + FILE_ID=$(ant messages create \ --transform 'content.#.content.content.#.file_id|@flatten|0' \ --raw-output <<'YAML' model: claude-opus-5
) # Step 3: Get the filename from file metadata - FILENAME=$(ant beta:files retrieve-metadata \ + FILENAME=$(ant files retrieve-metadata \ --file-id "$FILE_ID" \ --transform filename \ --raw-output) # Step 4: Download the file using Files API - ant beta:files download \ + ant files download \ --file-id "$FILE_ID" \ --output "$FILENAME" > /dev/null
client = anthropic.Anthropic() # Step 1: Use a Skill to create a file - response = client.beta.messages.create( + response = client.messages.create( model="claude-opus-5", max_tokens=4096, - betas=["code-execution-2025-08-25", "skills-2025-10-02"], container={ "skills": [{"type": "anthropic", "skill_id": "xlsx", "version": "latest"}] },
# Step 3: Download the file using Files API for file_id in extract_file_ids(response): - file_metadata = client.beta.files.retrieve_metadata(file_id=file_id) - file_content = client.beta.files.download(file_id=file_id) + file_metadata = client.files.retrieve_metadata(file_id=file_id) + file_content = client.files.download(file_id=file_id) # Step 4: Save to disk file_content.write_to_file(file_metadata.filename)
const client = new Anthropic(); // Step 1: Use a Skill to create a file - const response = await client.beta.messages.create({ + const response = await client.messages.create({ model: "claude-opus-5", max_tokens: 4096, - betas: ["code-execution-2025-08-25", "skills-2025-10-02"], container: { skills: [{ type: "anthropic", skill_id: "xlsx", version: "latest" }] },
// Step 3: Download each file and save to disk for (const fileId of fileIds) { - const fileMetadata = await client.beta.files.retrieveMetadata(fileId); - const fileResponse = await client.beta.files.download(fileId); + const fileMetadata = await client.files.retrieveMetadata(fileId); + const fileResponse = await client.files.download(fileId); await writeFile(fileMetadata.filename, Buffer.from(await fileResponse.arrayBuffer())); console.log(`Downloaded: ${fileMetadata.filename}`);
{ Model = "claude-opus-5", MaxTokens = 4096, - Betas = ["code-execution-2025-08-25", "skills-2025-10-02"], - Container = new BetaContainerParams + Container = new ContainerParams { Skills = [ - new BetaSkillParams + new SkillParams { - Type = BetaSkillParamsType.Anthropic, + Type = SkillParamsType.Anthropic, SkillID = "xlsx", Version = "latest", }, ], }, Messages = [new() { Role = Role.User, Content = "Create an Excel file with a simple budget spreadsheet" }], - Tools = [new BetaCodeExecutionTool20250825()], + Tools = [new CodeExecutionTool20250825()], }; - var response = await client.Beta.Messages.Create(parameters); + var response = await client.Messages.Create(parameters); // Step 2: Extract file IDs from the response List<string> fileIds = []; foreach (var block in response.Content) { if (block.TryPickBashCodeExecutionToolResult(out var toolResult) - && toolResult.Content.TryPickBetaBashCodeExecutionResultBlock(out var result)) + && toolResult.Content.TryPickBashCodeExecutionResultBlock(out var result)) { foreach (var output in result.Content) {
// Step 3: Download each file and save to disk foreach (var fileId in fileIds) { - var fileMetadata = await client.Beta.Files.RetrieveMetadata(fileId); - using var download = await client.Beta.Files.Download(fileId); + var fileMetadata = await client.Files.RetrieveMetadata(fileId); + using var download = await client.Files.Download(fileId); using var downloadStream = await download.ReadAsStream(); using var outputFile = File.Create(fileMetadata.Filename); await downloadStream.CopyToAsync(outputFile);
client := anthropic.NewClient() // Step 1: Use a Skill to create a file - response, err := client.Beta.Messages.New(context.TODO(), anthropic.BetaMessageNewParams{ + response, err := client.Messages.New(context.TODO(), anthropic.MessageNewParams{ Model: "claude-opus-5", MaxTokens: 4096, - Betas: []anthropic.AnthropicBeta{"code-execution-2025-08-25", anthropic.AnthropicBetaSkills2025_10_02}, - Container: anthropic.BetaMessageNewParamsContainerUnion{ - OfContainers: &anthropic.BetaContainerParams{ - Skills: []anthropic.BetaSkillParams{ + Container: anthropic.MessageCreateParamsContainerUnion{ + OfContainers: &anthropic.ContainerParams{ + Skills: []anthropic.SkillParams{ { - Type: anthropic.BetaSkillParamsTypeAnthropic, + Type: anthropic.SkillParamsTypeAnthropic, SkillID: "xlsx", Version: anthropic.String("latest"), }, }, }, }, - Messages: []anthropic.BetaMessageParam{ - anthropic.NewBetaUserMessage(anthropic.NewBetaTextBlock("Create an Excel file with a simple budget spreadsheet")), + Messages: []anthropic.MessageParam{ + anthropic.NewUserMessage(anthropic.NewTextBlock("Create an Excel file with a simple budget spreadsheet")), }, - Tools: []anthropic.BetaToolUnionParam{ - {OfCodeExecutionTool20250825: &anthropic.BetaCodeExecutionTool20250825Param{}}, + Tools: []anthropic.ToolUnionParam{ + {OfCodeExecutionTool20250825: &anthropic.CodeExecutionTool20250825Param{}}, }, }) if err != nil {
// Step 3: Download the file using Files API for _, fileID := range fileIDs { - fileMetadata, err := client.Beta.Files.GetMetadata(context.TODO(), fileID, anthropic.BetaFileGetMetadataParams{}) + fileMetadata, err := client.Files.GetMetadata(context.TODO(), fileID) if err != nil { log.Fatal(err) } - fileContent, err := client.Beta.Files.Download(context.TODO(), fileID, anthropic.BetaFileDownloadParams{}) + fileContent, err := client.Files.Download(context.TODO(), fileID) if err != nil { log.Fatal(err) }
} } - func extractFileIDs(response *anthropic.BetaMessage) []string { + func extractFileIDs(response *anthropic.Message) []string { var fileIDs []string for _, item := range response.Content { switch v := item.AsAny().(type) { - case anthropic.BetaBashCodeExecutionToolResultBlock: + case anthropic.BashCodeExecutionToolResultBlock: if v.Content.Type == "bash_code_execution_result" { for _, output := range v.Content.Content { fileIDs = append(fileIDs, output.FileID)
``` ```java Java - import com.anthropic.models.beta.messages.BetaContainerParams; - import com.anthropic.models.beta.messages.BetaSkillParams; - import com.anthropic.models.beta.messages.BetaCodeExecutionTool20250825; - import com.anthropic.models.beta.messages.BetaContentBlock; - import com.anthropic.models.beta.files.FileMetadata; + import com.anthropic.models.messages.ContainerParams; + import com.anthropic.models.messages.SkillParams; + import com.anthropic.models.messages.CodeExecutionTool20250825; + import com.anthropic.models.messages.ContentBlock; + import com.anthropic.models.files.FileMetadata; import com.anthropic.core.http.HttpResponse; // ... void main() throws Exception {
MessageCreateParams params = MessageCreateParams.builder() .model(Model.CLAUDE_OPUS_5) .maxTokens(4096L) - .addBeta("code-execution-2025-08-25") - .addBeta("skills-2025-10-02") - .container(BetaContainerParams.builder() - .addSkill(BetaSkillParams.builder() - .type(BetaSkillParams.Type.ANTHROPIC) + .container(ContainerParams.builder() + .addSkill(SkillParams.builder() + .type(SkillParams.Type.ANTHROPIC) .skillId("xlsx") .version("latest") .build()) .build()) .addUserMessage("Create an Excel file with a simple budget spreadsheet") - .addTool(BetaCodeExecutionTool20250825.builder().build()) + .addTool(CodeExecutionTool20250825.builder().build()) .build(); - BetaMessage response = client.beta().messages().create(params); + Message response = client.messages().create(params); // Step 2: Extract file IDs from the response List<String> fileIds = new ArrayList<>(); - for (BetaContentBlock block : response.content()) { + for (ContentBlock block : response.content()) { if (block.isBashCodeExecutionToolResult()) { var content = block.asBashCodeExecutionToolResult().content(); - if (content.isBetaBashCodeExecutionResultBlock()) { - for (var outputBlock : content.asBetaBashCodeExecutionResultBlock().content()) { + if (content.isBashCodeExecutionResultBlock()) { + for (var outputBlock : content.asBashCodeExecutionResultBlock().content()) { fileIds.add(outputBlock.fileId()); } }
// Step 3: Download the file using Files API for (String fileId : fileIds) { - FileMetadata fileMetadata = client.beta().files().retrieveMetadata(fileId); - HttpResponse fileContent = client.beta().files().download(fileId); + FileMetadata fileMetadata = client.files().retrieveMetadata(fileId); + HttpResponse fileContent = client.files().download(fileId); // Step 4: Save to disk try (InputStream is = fileContent.body();
client = Anthropic::Client.new # Step 1: Use a Skill to create a file - response = client.beta.messages.create( + response = client.messages.create( model: "claude-opus-5", max_tokens: 4096, - betas: ["code-execution-2025-08-25", "skills-2025-10-02"], container: { skills: [{ type: "anthropic", skill_id: "xlsx", version: "latest" }] },
# Step 3: Download the file using Files API extract_file_ids(response).each do |file_id| - file_metadata = client.beta.files.retrieve_metadata(file_id) - - file_content = client.beta.files.download(file_id) + file_metadata = client.files.retrieve_metadata(file_id) + + file_content = client.files.download(file_id) # Step 4: Save to disk File.binwrite(file_metadata.filename, file_content.read)
# Get file metadata curl "https://api.anthropic.com/v1/files/$FILE_ID" \ -H "x-api-key: $ANTHROPIC_API_KEY" \ - -H "anthropic-version: 2023-06-01" \ - -H "anthropic-beta: files-api-2025-04-14" + -H "anthropic-version: 2023-06-01" # List all files curl "https://api.anthropic.com/v1/files" \ -H "x-api-key: $ANTHROPIC_API_KEY" \ - -H "anthropic-version: 2023-06-01" \ - -H "anthropic-beta: files-api-2025-04-14" + -H "anthropic-version: 2023-06-01" # Delete a file curl -X DELETE "https://api.anthropic.com/v1/files/$FILE_ID" \ -H "x-api-key: $ANTHROPIC_API_KEY" \ - -H "anthropic-version: 2023-06-01" \ - -H "anthropic-beta: files-api-2025-04-14" + -H "anthropic-version: 2023-06-01" ``` ```bash CLI # Get file metadata - ant beta:files retrieve-metadata \ + ant files retrieve-metadata \ --file-id "$FILE_ID" \ --transform '{filename,size_bytes}' \ --format yaml # List all files - ant beta:files list \ + ant files list \ --transform '{filename,created_at}' \ --format yaml # Delete a file - ant beta:files delete --file-id "$FILE_ID" >/dev/null + ant files delete --file-id "$FILE_ID" >/dev/null ``` ```python Python client = anthropic.Anthropic() file_id = "file_011CNha8iCJcU1wXNR6q4V8w" # Get file metadata - file_info = client.beta.files.retrieve_metadata(file_id=file_id) + file_info = client.files.retrieve_metadata(file_id=file_id) print(f"Filename: {file_info.filename}, Size: {file_info.size_bytes} bytes") # List all files - for file in client.beta.files.list(): + for file in client.files.list(): print(f"{file.filename} - {file.created_at}") # Delete a file - client.beta.files.delete(file_id=file_id) + client.files.delete(file_id=file_id) ``` ```typescript TypeScript
const fileId = "file_011CNha8iCJcU1wXNR6q4V8w"; // Get file metadata - const fileInfo = await client.beta.files.retrieveMetadata(fileId); + const fileInfo = await client.files.retrieveMetadata(fileId); console.log(`Filename: ${fileInfo.filename}, Size: ${fileInfo.size_bytes} bytes`); // List all files - for await (const file of client.beta.files.list()) { + for await (const file of client.files.list()) { console.log(`${file.filename} - ${file.created_at}`); } // Delete a file - await client.beta.files.delete(fileId); + await client.files.delete(fileId); ``` ```csharp C#
var fileId = "file_011CNha8iCJcU1wXNR6q4V8w"; // Get file metadata - var fileInfo = await client.Beta.Files.RetrieveMetadata(fileId); + var fileInfo = await client.Files.RetrieveMetadata(fileId); Console.WriteLine($"Filename: {fileInfo.Filename}, Size: {fileInfo.SizeBytes} bytes"); // List files - await foreach (var file in (await client.Beta.Files.List()).Paginate()) + await foreach (var file in (await client.Files.List()).Paginate()) { Console.WriteLine($"{file.Filename} - {file.CreatedAt}"); } // Delete the file - await client.Beta.Files.Delete(fileId); + await client.Files.Delete(fileId); ``` ```go Go
fileID := "file_011CNha8iCJcU1wXNR6q4V8w" // Get file metadata - fileInfo, err := client.Beta.Files.GetMetadata(context.TODO(), fileID, anthropic.BetaFileGetMetadataParams{}) + fileInfo, err := client.Files.GetMetadata(context.TODO(), fileID) if err != nil { log.Fatal(err) } fmt.Printf("Filename: %s, Size: %d bytes\n", fileInfo.Filename, fileInfo.SizeBytes) // List all files - files := client.Beta.Files.ListAutoPaging(context.TODO(), anthropic.BetaFileListParams{}) + files := client.Files.ListAutoPaging(context.TODO(), anthropic.FileListParams{}) for files.Next() { file := files.Current() fmt.Printf("%s - %s\n", file.Filename, file.CreatedAt)
} // Delete a file - _, err = client.Beta.Files.Delete(context.TODO(), fileID, anthropic.BetaFileDeleteParams{}) + _, err = client.Files.Delete(context.TODO(), fileID) if err != nil { log.Fatal(err) } ``` ```java Java - import com.anthropic.models.beta.files.FileMetadata; - import com.anthropic.models.beta.files.FileListPage; + import com.anthropic.models.files.FileMetadata; + import com.anthropic.models.files.FileListPage; // ... void main() { AnthropicClient client = AnthropicOkHttpClient.fromEnv(); String fileId = "file_011CNha8iCJcU1wXNR6q4V8w"; // Get file metadata - FileMetadata fileInfo = client.beta().files().retrieveMetadata(fileId); + FileMetadata fileInfo = client.files().retrieveMetadata(fileId); System.out.println("Filename: " + fileInfo.filename() + ", Size: " + fileInfo.sizeBytes() + " bytes"); // List files (first page) - FileListPage files = client.beta().files().list(); + FileListPage files = client.files().list(); for (var file : files.data()) { System.out.println(file.filename() + " - " + file.createdAt()); } // Delete a file - client.beta().files().delete(fileId); + client.files().delete(fileId); } ```
file_id = "file_011CNha8iCJcU1wXNR6q4V8w" # Get file metadata - file_info = client.beta.files.retrieve_metadata(file_id) + file_info = client.files.retrieve_metadata(file_id) puts "Filename: #{file_info.filename}, Size: #{file_info.size_bytes} bytes" # List all files - client.beta.files.list.auto_paging_each do |file| + client.files.list.auto_paging_each do |file| puts "#{file.filename} - #{file.created_at}" end # Delete a file - client.beta.files.delete(file_id) + client.files.delete(file_id) ``` </CodeGroup>
```bash CLI # First request creates container - CONTAINER_ID=$(ant beta:messages create \ - --beta code-execution-2025-08-25,skills-2025-10-02 \ + CONTAINER_ID=$(ant messages create \ --transform container.id \ --raw-output <<'YAML' model: claude-opus-5
) # Continue conversation with same container - ant beta:messages create \ - --beta code-execution-2025-08-25,skills-2025-10-02 <<YAML + ant messages create <<YAML model: claude-opus-5 max_tokens: 4096 container:
client = anthropic.Anthropic() # First request creates container - response1 = client.beta.messages.create( + response1 = client.messages.create( model="claude-opus-5", max_tokens=4096, - betas=["code-execution-2025-08-25", "skills-2025-10-02"], container={ "skills": [{"type": "anthropic", "skill_id": "xlsx", "version": "latest"}] },
{"role": "user", "content": "What was the total revenue?"}, ] - response2 = client.beta.messages.create( + response2 = client.messages.create( model="claude-opus-5", max_tokens=4096, - betas=["code-execution-2025-08-25", "skills-2025-10-02"], container={ "id": response1.container.id, # Reuse container "skills": [{"type": "anthropic", "skill_id": "xlsx", "version": "latest"}],
const client = new Anthropic(); // First request creates container - const response1 = await client.beta.messages.create({ + const response1 = await client.messages.create({ model: "claude-opus-5", max_tokens: 4096, - betas: ["code-execution-2025-08-25", "skills-2025-10-02"], container: { skills: [{ type: "anthropic", skill_id: "xlsx", version: "latest" }] },
}); // Continue conversation with same container - const messages: Anthropic.Beta.Messages.BetaMessageParam[] = [ + const messages: Anthropic.MessageParam[] = [ { role: "user", content: "Create a sample sales dataset and analyze it" }, { role: "assistant",
{ role: "user", content: "What was the total revenue?" } ]; - const response2 = await client.beta.messages.create({ + const response2 = await client.messages.create({ model: "claude-opus-5", max_tokens: 4096, - betas: ["code-execution-2025-08-25", "skills-2025-10-02"], container: { id: response1.container!.id, // Reuse container skills: [{ type: "anthropic", skill_id: "xlsx", version: "latest" }]
{ Model = "claude-opus-5", MaxTokens = 4096, - Betas = ["code-execution-2025-08-25", "skills-2025-10-02"], - Container = new BetaContainerParams + Container = new ContainerParams { Skills = [ - new BetaSkillParams + new SkillParams { - Type = BetaSkillParamsType.Anthropic, + Type = SkillParamsType.Anthropic, SkillID = "xlsx", Version = "latest", }, ], }, Messages = [new() { Role = Role.User, Content = "Create a sample sales dataset and analyze it" }], - Tools = [new BetaCodeExecutionTool20250825()], + Tools = [new CodeExecutionTool20250825()], }; - var response1 = await client.Beta.Messages.Create(parameters1); + var response1 = await client.Messages.Create(parameters1); // Continue the conversation in the same container // Carry the assistant's text forward; container.id carries the execution state
{ Model = "claude-opus-5", MaxTokens = 4096, - Betas = ["code-execution-2025-08-25", "skills-2025-10-02"], - Container = new BetaContainerParams + Container = new ContainerParams { ID = response1.Container!.ID, Skills = [ - new BetaSkillParams + new SkillParams { - Type = BetaSkillParamsType.Anthropic, + Type = SkillParamsType.Anthropic, SkillID = "xlsx", Version = "latest", },
new() { Role = Role.Assistant, Content = assistantText }, new() { Role = Role.User, Content = "What was the total revenue?" }, ], - Tools = [new BetaCodeExecutionTool20250825()], + Tools = [new CodeExecutionTool20250825()], }; - var response2 = await client.Beta.Messages.Create(parameters2); + var response2 = await client.Messages.Create(parameters2); Console.WriteLine(response2); ``` ```go Go client := anthropic.NewClient() - response1, err := client.Beta.Messages.New(context.TODO(), anthropic.BetaMessageNewParams{ + response1, err := client.Messages.New(context.TODO(), anthropic.MessageNewParams{ Model: "claude-opus-5", MaxTokens: 4096, - Betas: []anthropic.AnthropicBeta{"code-execution-2025-08-25", anthropic.AnthropicBetaSkills2025_10_02}, - Container: anthropic.BetaMessageNewParamsContainerUnion{ - OfContainers: &anthropic.BetaContainerParams{ - Skills: []anthropic.BetaSkillParams{ + Container: anthropic.MessageCreateParamsContainerUnion{ + OfContainers: &anthropic.ContainerParams{ + Skills: []anthropic.SkillParams{ { - Type: anthropic.BetaSkillParamsTypeAnthropic, + Type: anthropic.SkillParamsTypeAnthropic, SkillID: "xlsx", Version: anthropic.String("latest"), }, }, }, }, - Messages: []anthropic.BetaMessageParam{ - anthropic.NewBetaUserMessage(anthropic.NewBetaTextBlock("Create a sample sales dataset and analyze it")), + Messages: []anthropic.MessageParam{ + anthropic.NewUserMessage(anthropic.NewTextBlock("Create a sample sales dataset and analyze it")), }, - Tools: []anthropic.BetaToolUnionParam{ - {OfCodeExecutionTool20250825: &anthropic.BetaCodeExecutionTool20250825Param{}}, + Tools: []anthropic.ToolUnionParam{ + {OfCodeExecutionTool20250825: &anthropic.CodeExecutionTool20250825Param{}}, }, }) if err != nil {
} assistantText := strings.Join(textParts, "\n") - response2, err := client.Beta.Messages.New(context.TODO(), anthropic.BetaMessageNewParams{ + response2, err := client.Messages.New(context.TODO(), anthropic.MessageNewParams{ Model: "claude-opus-5", MaxTokens: 4096, - Betas: []anthropic.AnthropicBeta{"code-execution-2025-08-25", anthropic.AnthropicBetaSkills2025_10_02}, - Container: anthropic.BetaMessageNewParamsContainerUnion{ - OfContainers: &anthropic.BetaContainerParams{ + Container: anthropic.MessageCreateParamsContainerUnion{ + OfContainers: &anthropic.ContainerParams{ ID: anthropic.String(response1.Container.ID), // Reuse container - Skills: []anthropic.BetaSkillParams{ + Skills: []anthropic.SkillParams{ { - Type: anthropic.BetaSkillParamsTypeAnthropic, + Type: anthropic.SkillParamsTypeAnthropic, SkillID: "xlsx", Version: anthropic.String("latest"), }, }, }, }, - Messages: []anthropic.BetaMessageParam{ - anthropic.NewBetaUserMessage(anthropic.NewBetaTextBlock("Create a sample sales dataset and analyze it")), + Messages: []anthropic.MessageParam{ + anthropic.NewUserMessage(anthropic.NewTextBlock("Create a sample sales dataset and analyze it")), { - Role: anthropic.BetaMessageParamRoleAssistant, - Content: []anthropic.BetaContentBlockParamUnion{anthropic.NewBetaTextBlock(assistantText)}, + Role: anthropic.MessageParamRoleAssistant, + Content: []anthropic.ContentBlockParamUnion{anthropic.NewTextBlock(assistantText)}, }, - anthropic.NewBetaUserMessage(anthropic.NewBetaTextBlock("What was the total revenue?")), + anthropic.NewUserMessage(anthropic.NewTextBlock("What was the total revenue?")), }, - Tools: []anthropic.BetaToolUnionParam{ - {OfCodeExecutionTool20250825: &anthropic.BetaCodeExecutionTool20250825Param{}}, + Tools: []anthropic.ToolUnionParam{ + {OfCodeExecutionTool20250825: &anthropic.CodeExecutionTool20250825Param{}}, }, }) if err != nil {
``` ```java Java - import com.anthropic.models.beta.messages.BetaContainerParams; - import com.anthropic.models.beta.messages.BetaSkillParams; - import com.anthropic.models.beta.messages.BetaCodeExecutionTool20250825; - import com.anthropic.models.beta.messages.BetaContentBlock; + import com.anthropic.models.messages.ContainerParams; + import com.anthropic.models.messages.SkillParams; + import com.anthropic.models.messages.CodeExecutionTool20250825; + import com.anthropic.models.messages.ContentBlock; // ... void main() { AnthropicClient client = AnthropicOkHttpClient.fromEnv();
MessageCreateParams params1 = MessageCreateParams.builder() .model(Model.CLAUDE_OPUS_5) .maxTokens(4096L) - .addBeta("code-execution-2025-08-25") - .addBeta("skills-2025-10-02") - .container(BetaContainerParams.builder() - .addSkill(BetaSkillParams.builder() - .type(BetaSkillParams.Type.ANTHROPIC) + .container(ContainerParams.builder() + .addSkill(SkillParams.builder() + .type(SkillParams.Type.ANTHROPIC) .skillId("xlsx") .version("latest") .build()) .build()) .addUserMessage("Create a sample sales dataset and analyze it") - .addTool(BetaCodeExecutionTool20250825.builder().build()) + .addTool(CodeExecutionTool20250825.builder().build()) .build(); - BetaMessage response1 = client.beta().messages().create(params1); + Message response1 = client.messages().create(params1); MessageCreateParams params2 = MessageCreateParams.builder() .model(Model.CLAUDE_OPUS_5) .maxTokens(4096L) - .addBeta("code-execution-2025-08-25") - .addBeta("skills-2025-10-02") - .container(BetaContainerParams.builder() + .container(ContainerParams.builder() .id(response1.container().get().id()) - .addSkill(BetaSkillParams.builder() - .type(BetaSkillParams.Type.ANTHROPIC) + .addSkill(SkillParams.builder() + .type(SkillParams.Type.ANTHROPIC) .skillId("xlsx") .version("latest") .build())
.addUserMessage("Create a sample sales dataset and analyze it") // Carry the assistant's text forward; container.id carries the execution state .addAssistantMessage(response1.content().stream() - .filter(BetaContentBlock::isText) + .filter(ContentBlock::isText) .map(block -> block.asText().text()) .collect(Collectors.joining("\n"))) .addUserMessage("What was the total revenue?") - .addTool(BetaCodeExecutionTool20250825.builder().build()) + .addTool(CodeExecutionTool20250825.builder().build()) .build(); - BetaMessage response2 = client.beta().messages().create(params2); + Message response2 = client.messages().create(params2); System.out.println(response2); } ```
```ruby Ruby client = Anthropic::Client.new - response1 = client.beta.messages.create( + response1 = client.messages.create( model: "claude-opus-5", max_tokens: 4096, - betas: ["code-execution-2025-08-25", "skills-2025-10-02"], container: { skills: [{ type: "anthropic", skill_id: "xlsx", version: "latest" }] },
{ role: "user", content: "What was the total revenue?" } ] - response2 = client.beta.messages.create( + response2 = client.messages.create( model: "claude-opus-5", max_tokens: 4096, - betas: ["code-execution-2025-08-25", "skills-2025-10-02"], container: { id: response1.container.id, skills: [
RESPONSE=$(curl https://api.anthropic.com/v1/messages \ -H "x-api-key: $ANTHROPIC_API_KEY" \ -H "anthropic-version: 2023-06-01" \ - -H "anthropic-beta: code-execution-2025-08-25,skills-2025-10-02" \ -H "content-type: application/json" \ -d '{ "model": "claude-opus-5",
RESPONSE=$(curl https://api.anthropic.com/v1/messages \ -H "x-api-key: $ANTHROPIC_API_KEY" \ -H "anthropic-version: 2023-06-01" \ - -H "anthropic-beta: code-execution-2025-08-25,skills-2025-10-02" \ -H "content-type: application/json" \ -d "{ \"model\": \"claude-opus-5\",
RESP=$(mktemp) # Initial request: capture the full JSON response to a temp file - ant beta:messages create \ - --beta code-execution-2025-08-25,skills-2025-10-02 \ - > "$RESP" <<'YAML' + ant messages create > "$RESP" <<'YAML' model: claude-opus-5 max_tokens: 4096 container:
# assistant turn. Repeat until stop_reason is no longer "pause_turn". CONTAINER_ID=$(jq -r '.container.id' "$RESP") - ant beta:messages create \ - --beta code-execution-2025-08-25,skills-2025-10-02 \ - > "$RESP" <<YAML + ant messages create > "$RESP" <<YAML model: claude-opus-5 max_tokens: 4096 container:
messages = [{"role": "user", "content": "Generate and process a large sample dataset"}] max_retries = 10 - response = client.beta.messages.create( + response = client.messages.create( model="claude-opus-5", max_tokens=4096, - betas=["code-execution-2025-08-25", "skills-2025-10-02"], container={ "skills": [ {
break messages.append({"role": "assistant", "content": response.content}) - response = client.beta.messages.create( + response = client.messages.create( model="claude-opus-5", max_tokens=4096, - betas=["code-execution-2025-08-25", "skills-2025-10-02"], container={ "id": response.container.id, "skills": [
```typescript TypeScript const client = new Anthropic(); - const messages: Anthropic.Beta.Messages.BetaMessageParam[] = [ + const messages: Anthropic.MessageParam[] = [ { role: "user", content: "Generate and process a large sample dataset" } ]; const maxRetries = 10; - let response = await client.beta.messages.create({ + let response = await client.messages.create({ model: "claude-opus-5", max_tokens: 4096, - betas: ["code-execution-2025-08-25", "skills-2025-10-02"], container: { skills: [{ type: "custom", skill_id: "skill_01AbCdEfGhIjKlMnOpQrStUv", version: "latest" }] },
messages.push({ role: "assistant", - content: response.content as Anthropic.Beta.Messages.BetaContentBlockParam[] + content: response.content as Anthropic.ContentBlockParam[] }); - response = await client.beta.messages.create({ + response = await client.messages.create({ model: "claude-opus-5", max_tokens: 4096, - betas: ["code-execution-2025-08-25", "skills-2025-10-02"], container: { id: response.container!.id, skills: [
// ... AnthropicClient client = new(); - List<BetaMessageParam> messages = + List<MessageParam> messages = [ new() { Role = Role.User, Content = "Generate and process a large sample dataset" }, ]; var maxRetries = 10; string? containerId = null; - BetaMessage? response = null; + Message? response = null; for (var i = 0; i < maxRetries; i++) {
{ Model = "claude-opus-5", MaxTokens = 4096, - Betas = ["code-execution-2025-08-25", "skills-2025-10-02"], Container = containerId is null - ? new BetaContainerParams + ? new ContainerParams { Skills = [ - new BetaSkillParams + new SkillParams { - Type = BetaSkillParamsType.Custom, + Type = SkillParamsType.Custom, SkillID = "skill_01AbCdEfGhIjKlMnOpQrStUv", Version = "latest", }, ], } - : new BetaContainerParams + : new ContainerParams { ID = containerId, Skills = [ - new BetaSkillParams + new SkillParams { - Type = BetaSkillParamsType.Custom, + Type = SkillParamsType.Custom, SkillID = "skill_01AbCdEfGhIjKlMnOpQrStUv", Version = "latest", }, ], }, Messages = messages, - Tools = [new BetaCodeExecutionTool20250825()], + Tools = [new CodeExecutionTool20250825()], }; - response = await client.Beta.Messages.Create(parameters); + response = await client.Messages.Create(parameters); containerId = response.Container!.ID; - if (response.StopReason != BetaStopReason.PauseTurn) + if (response.StopReason != StopReason.PauseTurn) { break; }
var assistantContent = JsonSerializer.SerializeToElement( response.Content.Select(block => block.Json).ToArray() ); - messages.Add(new() { Role = Role.Assistant, Content = new BetaMessageParamContent(assistantContent) }); + messages.Add(new() { Role = Role.Assistant, Content = new MessageParamContent(assistantContent) }); } ``` ```go Go client := anthropic.NewClient() - messages := []anthropic.BetaMessageParam{ - anthropic.NewBetaUserMessage(anthropic.NewBetaTextBlock("Generate and process a large sample dataset")), + messages := []anthropic.MessageParam{ + anthropic.NewUserMessage(anthropic.NewTextBlock("Generate and process a large sample dataset")), } maxRetries := 10 - response, err := client.Beta.Messages.New(context.TODO(), anthropic.BetaMessageNewParams{ + response, err := client.Messages.New(context.TODO(), anthropic.MessageNewParams{ Model: "claude-opus-5", MaxTokens: 4096, - Betas: []anthropic.AnthropicBeta{"code-execution-2025-08-25", anthropic.AnthropicBetaSkills2025_10_02}, - Container: anthropic.BetaMessageNewParamsContainerUnion{ - OfContainers: &anthropic.BetaContainerParams{ - Skills: []anthropic.BetaSkillParams{ + Container: anthropic.MessageCreateParamsContainerUnion{ + OfContainers: &anthropic.ContainerParams{ + Skills: []anthropic.SkillParams{ { - Type: anthropic.BetaSkillParamsTypeCustom, + Type: anthropic.SkillParamsTypeCustom, SkillID: "skill_01AbCdEfGhIjKlMnOpQrStUv", Version: anthropic.String("latest"), },
}, }, Messages: messages, - Tools: []anthropic.BetaToolUnionParam{ - {OfCodeExecutionTool20250825: &anthropic.BetaCodeExecutionTool20250825Param{}}, + Tools: []anthropic.ToolUnionParam{ + {OfCodeExecutionTool20250825: &anthropic.CodeExecutionTool20250825Param{}}, }, }) if err != nil {
} for i := 0; i < maxRetries; i++ { - if response.StopReason != anthropic.BetaStopReasonPauseTurn { + if response.StopReason != anthropic.StopReasonPauseTurn { break } messages = append(messages, response.ToParam()) - response, err = client.Beta.Messages.New(context.TODO(), anthropic.BetaMessageNewParams{ + response, err = client.Messages.New(context.TODO(), anthropic.MessageNewParams{ Model: "claude-opus-5", MaxTokens: 4096, - Betas: []anthropic.AnthropicBeta{"code-execution-2025-08-25", anthropic.AnthropicBetaSkills2025_10_02}, - Container: anthropic.BetaMessageNewParamsContainerUnion{ - OfContainers: &anthropic.BetaContainerParams{ + Container: anthropic.MessageCreateParamsContainerUnion{ + OfContainers: &anthropic.ContainerParams{ ID: anthropic.String(response.Container.ID), // Reuse container - Skills: []anthropic.BetaSkillParams{ + Skills: []anthropic.SkillParams{ { - Type: anthropic.BetaSkillParamsTypeCustom, + Type: anthropic.SkillParamsTypeCustom, SkillID: "skill_01AbCdEfGhIjKlMnOpQrStUv", Version: anthropic.String("latest"), },
}, }, Messages: messages, - Tools: []anthropic.BetaToolUnionParam{ - {OfCodeExecutionTool20250825: &anthropic.BetaCodeExecutionTool20250825Param{}}, + Tools: []anthropic.ToolUnionParam{ + {OfCodeExecutionTool20250825: &anthropic.CodeExecutionTool20250825Param{}}, }, }) if err != nil {
``` ```java Java - import com.anthropic.models.beta.messages.BetaContainerParams; - import com.anthropic.models.beta.messages.BetaSkillParams; - import com.anthropic.models.beta.messages.BetaCodeExecutionTool20250825; - import com.anthropic.models.beta.messages.BetaStopReason; + import com.anthropic.models.messages.ContainerParams; + import com.anthropic.models.messages.SkillParams; + import com.anthropic.models.messages.CodeExecutionTool20250825; + import com.anthropic.models.messages.StopReason; // ... void main() { AnthropicClient client = AnthropicOkHttpClient.fromEnv(); - List<BetaMessageParam> messages = new ArrayList<>(); + List<MessageParam> messages = new ArrayList<>(); messages.add( - BetaMessageParam.builder() - .role(BetaMessageParam.Role.USER) + MessageParam.builder() + .role(MessageParam.Role.USER) .content("Generate and process a large sample dataset") .build() ); int maxRetries = 10; - BetaMessage response = client.beta().messages().create( + Message response = client.messages().create( MessageCreateParams.builder() .model(Model.CLAUDE_OPUS_5) .maxTokens(4096L) - .addBeta("code-execution-2025-08-25") - .addBeta("skills-2025-10-02") - .container(BetaContainerParams.builder() - .addSkill(BetaSkillParams.builder() - .type(BetaSkillParams.Type.CUSTOM) + .container(ContainerParams.builder() + .addSkill(SkillParams.builder() + .type(SkillParams.Type.CUSTOM) .skillId("skill_01AbCdEfGhIjKlMnOpQrStUv") .version("latest") .build()) .build()) .messages(messages) - .addTool(BetaCodeExecutionTool20250825.builder().build()) + .addTool(CodeExecutionTool20250825.builder().build()) .build()); for (int i = 0; i < maxRetries; i++) { if (!response.stopReason().isPresent() - || !response.stopReason().get().equals(BetaStopReason.PAUSE_TURN)) { + || !response.stopReason().get().equals(StopReason.PAUSE_TURN)) { break; } messages.add(response.toParam()); - response = client.beta().messages().create( + response = client.messages().create( MessageCreateParams.builder() .model(Model.CLAUDE_OPUS_5) .maxTokens(4096L) - .addBeta("code-execution-2025-08-25") - .addBeta("skills-2025-10-02") - .container(BetaContainerParams.builder() + .container(ContainerParams.builder() .id(response.container().get().id()) - .addSkill(BetaSkillParams.builder() - .type(BetaSkillParams.Type.CUSTOM) + .addSkill(SkillParams.builder() + .type(SkillParams.Type.CUSTOM) .skillId("skill_01AbCdEfGhIjKlMnOpQrStUv") .version("latest") .build()) .build()) .messages(messages) - .addTool(BetaCodeExecutionTool20250825.builder().build()) + .addTool(CodeExecutionTool20250825.builder().build()) .build()); } }
] max_retries = 10 - response = client.beta.messages.create( + response = client.messages.create( model: "claude-opus-5", max_tokens: 4096, - betas: ["code-execution-2025-08-25", "skills-2025-10-02"], container: { skills: [ {
messages << { role: "assistant", content: response.content } - response = client.beta.messages.create( + response = client.messages.create( model: "claude-opus-5", max_tokens: 4096, - betas: ["code-execution-2025-08-25", "skills-2025-10-02"], container: { id: response.container.id, skills: [
curl https://api.anthropic.com/v1/messages \ -H "x-api-key: $ANTHROPIC_API_KEY" \ -H "anthropic-version: 2023-06-01" \ - -H "anthropic-beta: code-execution-2025-08-25,skills-2025-10-02" \ -H "content-type: application/json" \ -d '{ "model": "claude-opus-5",
``` ```bash CLI - ant beta:messages create \ - --beta code-execution-2025-08-25,skills-2025-10-02 <<'YAML' + ant messages create <<'YAML' model: claude-opus-5 max_tokens: 4096 container:
```python Python client = anthropic.Anthropic() - response = client.beta.messages.create( + response = client.messages.create( model="claude-opus-5", max_tokens=4096, - betas=["code-execution-2025-08-25", "skills-2025-10-02"], container={ "skills": [ {"type": "anthropic", "skill_id": "xlsx", "version": "latest"},
```typescript TypeScript const client = new Anthropic(); - const response = await client.beta.messages.create({ + const response = await client.messages.create({ model: "claude-opus-5", max_tokens: 4096, - betas: ["code-execution-2025-08-25", "skills-2025-10-02"], container: { skills: [ {
{ Model = "claude-opus-5", MaxTokens = 4096, - Betas = ["code-execution-2025-08-25", "skills-2025-10-02"], - Container = new BetaContainerParams + Container = new ContainerParams { Skills = [ - new BetaSkillParams + new SkillParams { - Type = BetaSkillParamsType.Anthropic, + Type = SkillParamsType.Anthropic, SkillID = "xlsx", Version = "latest", }, - new BetaSkillParams + new SkillParams { - Type = BetaSkillParamsType.Anthropic, + Type = SkillParamsType.Anthropic, SkillID = "pptx", Version = "latest", }, - new BetaSkillParams + new SkillParams { - Type = BetaSkillParamsType.Custom, + Type = SkillParamsType.Custom, SkillID = "skill_01AbCdEfGhIjKlMnOpQrStUv", Version = "latest", }, ], }, Messages = [new() { Role = Role.User, Content = "Analyze sales data and create a presentation" }], - Tools = [new BetaCodeExecutionTool20250825()], + Tools = [new CodeExecutionTool20250825()], }; - var message = await client.Beta.Messages.Create(parameters); + var message = await client.Messages.Create(parameters); Console.WriteLine(message); ``` ```go Go client := anthropic.NewClient() - response, err := client.Beta.Messages.New(context.TODO(), anthropic.BetaMessageNewParams{ + response, err := client.Messages.New(context.TODO(), anthropic.MessageNewParams{ Model: "claude-opus-5", MaxTokens: 4096, - Betas: []anthropic.AnthropicBeta{ - "code-execution-2025-08-25", - anthropic.AnthropicBetaSkills2025_10_02, - }, - Container: anthropic.BetaMessageNewParamsContainerUnion{ - OfContainers: &anthropic.BetaContainerParams{ - Skills: []anthropic.BetaSkillParams{ + Container: anthropic.MessageCreateParamsContainerUnion{ + OfContainers: &anthropic.ContainerParams{ + Skills: []anthropic.SkillParams{ { - Type: anthropic.BetaSkillParamsTypeAnthropic, + Type: anthropic.SkillParamsTypeAnthropic, SkillID: "xlsx", Version: anthropic.String("latest"), }, { - Type: anthropic.BetaSkillParamsTypeAnthropic, + Type: anthropic.SkillParamsTypeAnthropic, SkillID: "pptx", Version: anthropic.String("latest"), }, { - Type: anthropic.BetaSkillParamsTypeCustom, + Type: anthropic.SkillParamsTypeCustom, SkillID: "skill_01AbCdEfGhIjKlMnOpQrStUv", Version: anthropic.String("latest"), }, }, }, }, - Messages: []anthropic.BetaMessageParam{ - anthropic.NewBetaUserMessage(anthropic.NewBetaTextBlock("Analyze sales data and create a presentation")), + Messages: []anthropic.MessageParam{ + anthropic.NewUserMessage(anthropic.NewTextBlock("Analyze sales data and create a presentation")), }, - Tools: []anthropic.BetaToolUnionParam{ - {OfCodeExecutionTool20250825: &anthropic.BetaCodeExecutionTool20250825Param{}}, + Tools: []anthropic.ToolUnionParam{ + {OfCodeExecutionTool20250825: &anthropic.CodeExecutionTool20250825Param{}}, }, }) if err != nil {
``` ```java Java - import com.anthropic.models.beta.messages.BetaContainerParams; - import com.anthropic.models.beta.messages.BetaSkillParams; - import com.anthropic.models.beta.messages.BetaCodeExecutionTool20250825; + import com.anthropic.models.messages.ContainerParams; + import com.anthropic.models.messages.SkillParams; + import com.anthropic.models.messages.CodeExecutionTool20250825; // ... void main() { AnthropicClient client = AnthropicOkHttpClient.fromEnv();
MessageCreateParams params = MessageCreateParams.builder() .model(Model.CLAUDE_OPUS_5) .maxTokens(4096L) - .addBeta("code-execution-2025-08-25") - .addBeta("skills-2025-10-02") - .container(BetaContainerParams.builder() + .container(ContainerParams.builder() .skills(List.of( - BetaSkillParams.builder() - .type(BetaSkillParams.Type.ANTHROPIC) + SkillParams.builder() + .type(SkillParams.Type.ANTHROPIC) .skillId("xlsx") .version("latest") .build(), - BetaSkillParams.builder() - .type(BetaSkillParams.Type.ANTHROPIC) + SkillParams.builder() + .type(SkillParams.Type.ANTHROPIC) .skillId("pptx") .version("latest") .build(), - BetaSkillParams.builder() - .type(BetaSkillParams.Type.CUSTOM) + SkillParams.builder() + .type(SkillParams.Type.CUSTOM) .skillId("skill_01AbCdEfGhIjKlMnOpQrStUv") .version("latest") .build() )) .build()) .addUserMessage("Analyze sales data and create a presentation") - .addTool(BetaCodeExecutionTool20250825.builder().build()) + .addTool(CodeExecutionTool20250825.builder().build()) .build(); - BetaMessage response = client.beta().messages().create(params); + Message response = client.messages().create(params); System.out.println(response); } ```
```ruby Ruby client = Anthropic::Client.new - message = client.beta.messages.create( + message = client.messages.create( model: "claude-opus-5", max_tokens: 4096, - betas: ["code-execution-2025-08-25", "skills-2025-10-02"], container: { skills: [ {
curl -X POST "https://api.anthropic.com/v1/skills" \ -H "x-api-key: $ANTHROPIC_API_KEY" \ -H "anthropic-version: 2023-06-01" \ - -H "anthropic-beta: skills-2025-10-02" \ -F "files[]=@financial_skill/SKILL.md;filename=financial_skill/SKILL.md" \ -F "files[]=@financial_skill/analyze.py;filename=financial_skill/analyze.py" ``` - ```bash CLI - ant beta:skills create \ - --file example_skill.zip \ - --beta skills-2025-10-02 - - # Per-file upload requires path-qualified filenames, which the CLI - # can't currently set. Upload a zip archive instead. - ``` + <MultiFileExample language="cli" label="CLI"> + ```bash CLI + zip -r financial_skill.zip financial_skill/ + ant skills create --file financial_skill.zip + ``` + + <File filename="financial_skill/SKILL.md"> + ```markdown + --- + name: financial-skill + description: Docs example skill. + --- + ``` + </File> + + <File filename="financial_skill/analyze.py"> + ```python + print("financial analysis helper") + ``` + </File> + </MultiFileExample> ```python Python from anthropic.lib import files_from_dir
client = anthropic.Anthropic() # Option 1: Using a zip file - skill = client.beta.skills.create( + skill = client.skills.create( files=[open("example_skill.zip", "rb")], ) # Option 2: Using file tuples (filename, file_content, mime_type) - skill = client.beta.skills.create( + skill = client.skills.create( files=[ ( "financial_skill/SKILL.md",
) # Option 3: Using the files_from_dir helper (Python only) - skill = client.beta.skills.create( + skill = client.skills.create( files=files_from_dir("financial_skill"), ) print(f"Created skill: {skill.id}") - print(f"Latest version: {skill.latest_version}") + print(f"Latest version: {skill.latest_version_id}") ``` ```typescript TypeScript
const client = new Anthropic(); // Option 1: Using a zip file - const skillFromZip = await client.beta.skills.create({ + const skillFromZip = await client.skills.create({ files: [await toFile(fs.createReadStream("example_skill.zip"), "example_skill.zip")] }); // Option 2: Using individual file objects - const skill = await client.beta.skills.create({ + const skill = await client.skills.create({ files: [ await toFile(fs.createReadStream("financial_skill/SKILL.md"), "financial_skill/SKILL.md", { type: "text/markdown"
}); console.log(`Created skill: ${skill.id}`); - console.log(`Latest version: ${skill.latest_version}`); + console.log(`Latest version: ${skill.latest_version_id}`); ``` ```csharp C#
Files = [File.OpenRead("example_skill.zip")], }; - var skill = await client.Beta.Skills.Create(parameters); + var skill = await client.Skills.Create(parameters); // Option 2: Using individual files (path-qualified filenames preserve the Skill's directory layout) var parameters2 = new SkillCreateParams
], }; - var skill2 = await client.Beta.Skills.Create(parameters2); + var skill2 = await client.Skills.Create(parameters2); Console.WriteLine($"Created skill: {skill.ID}"); - Console.WriteLine($"Latest version: {skill.LatestVersion}"); + Console.WriteLine($"Latest version: {skill.LatestVersionID}"); Console.WriteLine($"Created skill 2: {skill2.ID}"); ```
} defer zipFile.Close() - skill, err := client.Beta.Skills.New(context.TODO(), anthropic.BetaSkillNewParams{ + skill, err := client.Skills.New(context.TODO(), anthropic.SkillNewParams{ Files: []io.Reader{zipFile}, }) if err != nil {
} defer analyzePy.Close() - skill2, err := client.Beta.Skills.New(context.TODO(), anthropic.BetaSkillNewParams{ + skill2, err := client.Skills.New(context.TODO(), anthropic.SkillNewParams{ Files: []io.Reader{ anthropic.File(skillMd, "financial_skill/SKILL.md", "text/markdown"), anthropic.File(analyzePy, "financial_skill/analyze.py", "text/x-python"),
} fmt.Printf("Created skill: %s\n", skill.ID) - fmt.Printf("Latest version: %s\n", skill.LatestVersion) + fmt.Printf("Latest version: %s\n", skill.LatestVersionID) fmt.Printf("Created skill 2: %s\n", skill2.ID) ``` ```java Java import com.anthropic.core.MultipartField; - import com.anthropic.models.beta.skills.SkillCreateParams; - import com.anthropic.models.beta.skills.SkillCreateResponse; + import com.anthropic.models.skills.SkillCreateParams; + import com.anthropic.models.skills.Skill; // ... void main() throws Exception { // ...
.build()) .build(); - SkillCreateResponse skill = client.beta().skills().create(params); + Skill skill = client.skills().create(params); // Option 2: Using individual files (path-qualified filenames preserve the Skill's directory layout) SkillCreateParams params2 = SkillCreateParams.builder()
.build()) .build(); - SkillCreateResponse skill2 = client.beta().skills().create(params2); + Skill skill2 = client.skills().create(params2); System.out.println("Created skill: " + skill.id()); - System.out.println("Latest version: " + skill.latestVersion().orElseThrow()); + System.out.println("Latest version: " + skill.latestVersionId()); System.out.println("Created skill 2: " + skill2.id()); } ```
client = Anthropic::Client.new # Option 1: Using a zip file - skill = client.beta.skills.create( + skill = client.skills.create( files: [ File.open("example_skill.zip", "rb") ] ) # Option 2: Using individual files - skill = client.beta.skills.create( + skill = client.skills.create( files: [ Anthropic::FilePart.new( Pathname("financial_skill/SKILL.md"),
) puts "Created skill: #{skill.id}" - puts "Latest version: #{skill.latest_version}" + puts "Latest version: #{skill.latest_version_id}" ``` </CodeGroup>
* `name`: Maximum 64 characters, lowercase letters/numbers/hyphens only, no XML tags, no reserved words ("anthropic", "claude") * `description`: Maximum 1024 characters, non-empty, no XML tags -For complete request/response schemas, see the [Create Skill API reference](https://platform.claude.com/docs/en/api/beta/skills/create). +For complete request/response schemas, see the [Create Skill API reference](https://platform.claude.com/docs/en/api/skills/create). ### Listing Skills
# List all Skills curl "https://api.anthropic.com/v1/skills" \ -H "x-api-key: $ANTHROPIC_API_KEY" \ - -H "anthropic-version: 2023-06-01" \ - -H "anthropic-beta: skills-2025-10-02" + -H "anthropic-version: 2023-06-01" # List only custom Skills curl "https://api.anthropic.com/v1/skills?source=custom" \ -H "x-api-key: $ANTHROPIC_API_KEY" \ - -H "anthropic-version: 2023-06-01" \ - -H "anthropic-beta: skills-2025-10-02" + -H "anthropic-version: 2023-06-01" ``` ```bash CLI # List all Skills - ant beta:skills list + ant skills list # List only custom Skills - ant beta:skills list --source custom + ant skills list --source custom ``` ```python Python client = anthropic.Anthropic() # List all Skills - for skill in client.beta.skills.list(): - print(f"{skill.id}: {skill.display_title} (source: {skill.source})") + for skill in client.skills.list(): + print(f"{skill.id}: {skill.display_name} (source: {skill.source.type})") # List only custom Skills - custom_skills = client.beta.skills.list(source="custom") + custom_skills = client.skills.list(source="custom") ``` ```typescript TypeScript const client = new Anthropic(); // List all Skills - for await (const skill of client.beta.skills.list()) { - console.log(`${skill.id}: ${skill.display_title} (source: ${skill.source})`); + for await (const skill of client.skills.list()) { + console.log(`${skill.id}: ${skill.display_name} (source: ${skill.source.type})`); } // List only custom Skills - const customSkills = await client.beta.skills.list({ + const customSkills = await client.skills.list({ source: "custom" }); ```
AnthropicClient client = new(); // List all Skills - await foreach (var skill in (await client.Beta.Skills.List()).Paginate()) + await foreach (var skill in (await client.Skills.List()).Paginate()) { - Console.WriteLine($"{skill.ID}: {skill.DisplayTitle} (source: {skill.Source})"); + Console.WriteLine($"{skill.ID}: {skill.DisplayName} (source: {skill.Source.Type})"); } // List only custom Skills - var customSkills = await client.Beta.Skills.List(new SkillListParams { Source = "custom" }); + var customSkills = await client.Skills.List(new SkillListParams { Source = "custom" }); ``` ```go Go client := anthropic.NewClient() // List all Skills - skills := client.Beta.Skills.ListAutoPaging(context.TODO(), anthropic.BetaSkillListParams{}) + skills := client.Skills.ListAutoPaging(context.TODO(), anthropic.SkillListParams{}) for skills.Next() { skill := skills.Current() - fmt.Printf("%s: %s (source: %s)\n", skill.ID, skill.DisplayTitle, skill.Source) + fmt.Printf("%s: %s (source: %s)\n", skill.ID, skill.DisplayName, skill.Source.Type) } if skills.Err() != nil { log.Fatal(skills.Err()) } // List only custom Skills - customSkills := client.Beta.Skills.ListAutoPaging(context.TODO(), anthropic.BetaSkillListParams{ + customSkills := client.Skills.ListAutoPaging(context.TODO(), anthropic.SkillListParams{ Source: anthropic.String("custom"), }) for customSkills.Next() { skill := customSkills.Current() - fmt.Printf("%s: %s (source: %s)\n", skill.ID, skill.DisplayTitle, skill.Source) + fmt.Printf("%s: %s (source: %s)\n", skill.ID, skill.DisplayName, skill.Source.Type) } if customSkills.Err() != nil { log.Fatal(customSkills.Err())
``` ```java Java - import com.anthropic.models.beta.skills.SkillListParams; - import com.anthropic.models.beta.skills.SkillListPage; - import com.anthropic.models.beta.skills.SkillListResponse; + import com.anthropic.models.skills.SkillListParams; + import com.anthropic.models.skills.SkillListPage; + import com.anthropic.models.skills.Skill; // ... void main() { AnthropicClient client = AnthropicOkHttpClient.fromEnv(); // List Skills (first page) - SkillListPage skills = client.beta().skills().list(); - - for (SkillListResponse skill : skills.data()) { - System.out.println(skill.id() + ": " + skill.displayTitle().orElseThrow() + " (source: " + skill.source() + ")"); + SkillListPage skills = client.skills().list(); + + for (Skill skill : skills.data()) { + System.out.println(skill.id() + ": " + skill.displayName() + " (source: " + skill.source().type() + ")"); } // List only custom Skills
.source("custom") .build(); - SkillListPage customSkills = client.beta().skills().list(customParams); + SkillListPage customSkills = client.skills().list(customParams); } ```
client = Anthropic::Client.new # List all Skills - client.beta.skills.list.auto_paging_each do |skill| - puts "#{skill.id}: #{skill.display_title} (source: #{skill.source})" + client.skills.list.auto_paging_each do |skill| + puts "#{skill.id}: #{skill.display_name} (source: #{skill.source.type})" end # List only custom Skills - custom_skills = client.beta.skills.list( + custom_skills = client.skills.list( source: "custom" ) ``` </CodeGroup> -See the [List Skills API reference](https://platform.claude.com/docs/en/api/beta/skills/list) for pagination and filtering options. +See the [List Skills API reference](https://platform.claude.com/docs/en/api/skills/list) for pagination and filtering options. ### Retrieving a Skill
```bash cURL curl "https://api.anthropic.com/v1/skills/skill_01AbCdEfGhIjKlMnOpQrStUv" \ -H "x-api-key: $ANTHROPIC_API_KEY" \ - -H "anthropic-version: 2023-06-01" \ - -H "anthropic-beta: skills-2025-10-02" + -H "anthropic-version: 2023-06-01" ``` ```bash CLI - ant beta:skills retrieve \ + ant skills retrieve \ --skill-id skill_01AbCdEfGhIjKlMnOpQrStUv ``` ```python Python client = anthropic.Anthropic() - skill = client.beta.skills.retrieve(skill_id="skill_01AbCdEfGhIjKlMnOpQrStUv") - - print(f"Skill: {skill.display_title}") - print(f"Latest version: {skill.latest_version}") + skill = client.skills.retrieve(skill_id="skill_01AbCdEfGhIjKlMnOpQrStUv") + + print(f"Skill: {skill.display_name}") + print(f"Latest version: {skill.latest_version_id}") print(f"Created: {skill.created_at}") ``` ```typescript TypeScript const client = new Anthropic(); - const skill = await client.beta.skills.retrieve("skill_01AbCdEfGhIjKlMnOpQrStUv"); - - console.log(`Skill: ${skill.display_title}`); - console.log(`Latest version: ${skill.latest_version}`); + const skill = await client.skills.retrieve("skill_01AbCdEfGhIjKlMnOpQrStUv"); + + console.log(`Skill: ${skill.display_name}`); + console.log(`Latest version: ${skill.latest_version_id}`); console.log(`Created: ${skill.created_at}`); ``` ```csharp C# AnthropicClient client = new(); - var skill = await client.Beta.Skills.Retrieve("skill_01AbCdEfGhIjKlMnOpQrStUv"); - - Console.WriteLine($"Skill: {skill.DisplayTitle}"); - Console.WriteLine($"Latest version: {skill.LatestVersion}"); + var skill = await client.Skills.Retrieve("skill_01AbCdEfGhIjKlMnOpQrStUv"); + + Console.WriteLine($"Skill: {skill.DisplayName}"); + Console.WriteLine($"Latest version: {skill.LatestVersionID}"); Console.WriteLine($"Created: {skill.CreatedAt}"); ``` ```go Go client := anthropic.NewClient() - skill, err := client.Beta.Skills.Get( + skill, err := client.Skills.Get( context.TODO(), "skill_01AbCdEfGhIjKlMnOpQrStUv", - anthropic.BetaSkillGetParams{}, ) if err != nil { log.Fatal(err) } - fmt.Printf("Skill: %s\n", skill.DisplayTitle) - fmt.Printf("Latest version: %s\n", skill.LatestVersion) + fmt.Printf("Skill: %s\n", skill.DisplayName) + fmt.Printf("Latest version: %s\n", skill.LatestVersionID) fmt.Printf("Created: %s\n", skill.CreatedAt) ``` ```java Java - import com.anthropic.models.beta.skills.SkillRetrieveResponse; + import com.anthropic.models.skills.Skill; // ... void main() { AnthropicClient client = AnthropicOkHttpClient.fromEnv(); - SkillRetrieveResponse skill = client.beta().skills().retrieve("skill_01AbCdEfGhIjKlMnOpQrStUv"); - - System.out.println("Skill: " + skill.displayTitle().orElseThrow()); - System.out.println("Latest version: " + skill.latestVersion().orElseThrow()); + Skill skill = client.skills().retrieve("skill_01AbCdEfGhIjKlMnOpQrStUv"); + + System.out.println("Skill: " + skill.displayName()); + System.out.println("Latest version: " + skill.latestVersionId()); System.out.println("Created: " + skill.createdAt()); } ```
```ruby Ruby client = Anthropic::Client.new - skill = client.beta.skills.retrieve("skill_01AbCdEfGhIjKlMnOpQrStUv") - - puts "Skill: #{skill.display_title}" - puts "Latest version: #{skill.latest_version}" + skill = client.skills.retrieve("skill_01AbCdEfGhIjKlMnOpQrStUv") + + puts "Skill: #{skill.display_name}" + puts "Latest version: #{skill.latest_version_id}" puts "Created: #{skill.created_at}" ``` </CodeGroup> ### Deleting a Skill -Deleting a Skill also removes all of its versions. The cascade is GA-only behavior, so unlike the other examples in this guide, these call the GA surface directly rather than the `beta` namespace. +Deleting a Skill also removes all of its versions. <CodeGroup defaultLanguage="CLI"> ```bash cURL
```php PHP $client = new Client(); - $client->skills->delete( - skillID: 'skill_01AbCdEfGhIjKlMnOpQrStUv', - ); + // The PHP SDK still uses the beta Skills namespace, where a Skill's versions + // must be deleted before the Skill itself. + $skillId = 'skill_01AbCdEfGhIjKlMnOpQrStUv'; + foreach ($client->beta->skills->versions->list($skillId)->pagingEachItem() as $version) { + $client->beta->skills->versions->delete($version->version, skillID: $skillId); + } + $client->beta->skills->delete($skillId); ``` ```ruby Ruby
NEW_VERSION=$(curl -X POST "https://api.anthropic.com/v1/skills/skill_01AbCdEfGhIjKlMnOpQrStUv/versions" \ -H "x-api-key: $ANTHROPIC_API_KEY" \ -H "anthropic-version: 2023-06-01" \ - -H "anthropic-beta: skills-2025-10-02" \ -F "files[]=@financial_skill/SKILL.md;filename=financial_skill/SKILL.md" \ -F "files[]=@financial_skill/analyze.py;filename=financial_skill/analyze.py") - VERSION_NUMBER=$(echo "$NEW_VERSION" | jq -r '.version') + VERSION_ID=$(echo "$NEW_VERSION" | jq -r '.id') # Use specific version curl https://api.anthropic.com/v1/messages \ -H "x-api-key: $ANTHROPIC_API_KEY" \ -H "anthropic-version: 2023-06-01" \ - -H "anthropic-beta: code-execution-2025-08-25,skills-2025-10-02" \ -H "content-type: application/json" \ -d "{ \"model\": \"claude-opus-5\",
\"skills\": [{ \"type\": \"custom\", \"skill_id\": \"skill_01AbCdEfGhIjKlMnOpQrStUv\", - \"version\": \"$VERSION_NUMBER\" + \"version\": \"$VERSION_ID\" }] }, \"messages\": [{\"role\": \"user\", \"content\": \"Use updated Skill\"}],
curl https://api.anthropic.com/v1/messages \ -H "x-api-key: $ANTHROPIC_API_KEY" \ -H "anthropic-version: 2023-06-01" \ - -H "anthropic-beta: code-execution-2025-08-25,skills-2025-10-02" \ -H "content-type: application/json" \ -d '{ "model": "claude-opus-5",
```bash CLI # Create a new version - VERSION_NUMBER=$(ant beta:skills:versions create \ + VERSION_ID=$(ant skills:versions create \ --skill-id skill_01AbCdEfGhIjKlMnOpQrStUv \ --file financial_skill.zip \ - --transform version \ + --transform id \ --raw-output) # Use specific version - ant beta:messages create \ - --beta code-execution-2025-08-25,skills-2025-10-02 <<YAML + ant messages create <<YAML model: claude-opus-5 max_tokens: 4096 container: skills: - type: custom skill_id: skill_01AbCdEfGhIjKlMnOpQrStUv - version: "$VERSION_NUMBER" + version: "$VERSION_ID" messages: - role: user content: Use updated Skill
YAML # Use latest version - ant beta:messages create \ - --beta code-execution-2025-08-25,skills-2025-10-02 <<YAML + ant messages create <<YAML model: claude-opus-5 max_tokens: 4096 container:
# Create a new version - new_version = client.beta.skills.versions.create( + new_version = client.skills.versions.create( skill_id="skill_01AbCdEfGhIjKlMnOpQrStUv", files=files_from_dir("financial_skill"), ) # Use specific version - response = client.beta.messages.create( + response = client.messages.create( model="claude-opus-5", max_tokens=4096, - betas=["code-execution-2025-08-25", "skills-2025-10-02"], container={ "skills": [ { "type": "custom", "skill_id": "skill_01AbCdEfGhIjKlMnOpQrStUv", - "version": new_version.version, + "version": new_version.id, } ] },
) # Use latest version - response = client.beta.messages.create( + response = client.messages.create( model="claude-opus-5", max_tokens=4096, - betas=["code-execution-2025-08-25", "skills-2025-10-02"], container={ "skills": [ {
const client = new Anthropic(); // Create a new version from a zip of the complete financial_skill/ bundle - const newVersion = await client.beta.skills.versions.create("skill_01AbCdEfGhIjKlMnOpQrStUv", { + const newVersion = await client.skills.versions.create("skill_01AbCdEfGhIjKlMnOpQrStUv", { files: [fs.createReadStream("financial_skill.zip")] }); // Use specific version - const specificVersionResponse = await client.beta.messages.create({ + const specificVersionResponse = await client.messages.create({ model: "claude-opus-5", max_tokens: 4096, - betas: ["code-execution-2025-08-25", "skills-2025-10-02"], container: { skills: [ { type: "custom", skill_id: "skill_01AbCdEfGhIjKlMnOpQrStUv", - version: newVersion.version + version: newVersion.id } ] },
}); // Use latest version - const latestVersionResponse = await client.beta.messages.create({ + const latestVersionResponse = await client.messages.create({ model: "claude-opus-5", max_tokens: 4096, - betas: ["code-execution-2025-08-25", "skills-2025-10-02"], container: { skills: [ {
```csharp C# using Anthropic.Core; - using Anthropic.Models.Beta.Skills.Versions; + using Anthropic.Models.Skills.Versions; // ... AnthropicClient client = new();
], }; - var newVersion = await client.Beta.Skills.Versions.Create("skill_01AbCdEfGhIjKlMnOpQrStUv", versionParams); + var newVersion = await client.Skills.Versions.Create("skill_01AbCdEfGhIjKlMnOpQrStUv", versionParams); // Use specific version var specificVersionParams = new MessageCreateParams { Model = "claude-opus-5", MaxTokens = 4096, - Betas = ["code-execution-2025-08-25", "skills-2025-10-02"], - Container = new BetaContainerParams + Container = new ContainerParams { Skills = [ - new BetaSkillParams + new SkillParams { - Type = BetaSkillParamsType.Custom, + Type = SkillParamsType.Custom, SkillID = "skill_01AbCdEfGhIjKlMnOpQrStUv", - Version = newVersion.Version, + Version = newVersion.ID, }, ], }, Messages = [new() { Role = Role.User, Content = "Use updated Skill" }], - Tools = [new BetaCodeExecutionTool20250825()], + Tools = [new CodeExecutionTool20250825()], }; - var response = await client.Beta.Messages.Create(specificVersionParams); + var response = await client.Messages.Create(specificVersionParams); Console.WriteLine(response); // Use latest version
{ Model = "claude-opus-5", MaxTokens = 4096, - Betas = ["code-execution-2025-08-25", "skills-2025-10-02"], - Container = new BetaContainerParams + Container = new ContainerParams { Skills = [ - new BetaSkillParams + new SkillParams { - Type = BetaSkillParamsType.Custom, + Type = SkillParamsType.Custom, SkillID = "skill_01AbCdEfGhIjKlMnOpQrStUv", Version = "latest", }, ], }, Messages = [new() { Role = Role.User, Content = "Use latest Skill version" }], - Tools = [new BetaCodeExecutionTool20250825()], + Tools = [new CodeExecutionTool20250825()], }; - var latestResponse = await client.Beta.Messages.Create(latestVersionParams); + var latestResponse = await client.Messages.Create(latestVersionParams); Console.WriteLine(latestResponse); ```
} defer analyzePy.Close() - newVersion, err := client.Beta.Skills.Versions.New( + newVersion, err := client.Skills.Versions.New( context.TODO(), "skill_01AbCdEfGhIjKlMnOpQrStUv", - anthropic.BetaSkillVersionNewParams{ + anthropic.SkillVersionNewParams{ Files: []io.Reader{ anthropic.File(skillMd, "financial_skill/SKILL.md", "text/markdown"), anthropic.File(analyzePy, "financial_skill/analyze.py", "text/x-python"),
} // Use specific version - response, err := client.Beta.Messages.New(context.TODO(), anthropic.BetaMessageNewParams{ + response, err := client.Messages.New(context.TODO(), anthropic.MessageNewParams{ Model: "claude-opus-5", MaxTokens: 4096, - Betas: []anthropic.AnthropicBeta{"code-execution-2025-08-25", anthropic.AnthropicBetaSkills2025_10_02}, - Container: anthropic.BetaMessageNewParamsContainerUnion{ - OfContainers: &anthropic.BetaContainerParams{ - Skills: []anthropic.BetaSkillParams{ + Container: anthropic.MessageCreateParamsContainerUnion{ + OfContainers: &anthropic.ContainerParams{ + Skills: []anthropic.SkillParams{ { - Type: anthropic.BetaSkillParamsTypeCustom, + Type: anthropic.SkillParamsTypeCustom, SkillID: "skill_01AbCdEfGhIjKlMnOpQrStUv", - Version: anthropic.String(newVersion.Version), + Version: anthropic.String(newVersion.ID), }, }, }, }, - Messages: []anthropic.BetaMessageParam{ - anthropic.NewBetaUserMessage(anthropic.NewBetaTextBlock("Use updated Skill")), + Messages: []anthropic.MessageParam{ + anthropic.NewUserMessage(anthropic.NewTextBlock("Use updated Skill")), }, - Tools: []anthropic.BetaToolUnionParam{ - {OfCodeExecutionTool20250825: &anthropic.BetaCodeExecutionTool20250825Param{}}, + Tools: []anthropic.ToolUnionParam{ + {OfCodeExecutionTool20250825: &anthropic.CodeExecutionTool20250825Param{}}, }, }) if err != nil {
fmt.Println(response) // Use latest version - latestResponse, err := client.Beta.Messages.New(context.TODO(), anthropic.BetaMessageNewParams{ + latestResponse, err := client.Messages.New(context.TODO(), anthropic.MessageNewParams{ Model: "claude-opus-5", MaxTokens: 4096, - Betas: []anthropic.AnthropicBeta{"code-execution-2025-08-25", anthropic.AnthropicBetaSkills2025_10_02}, - Container: anthropic.BetaMessageNewParamsContainerUnion{ - OfContainers: &anthropic.BetaContainerParams{ - Skills: []anthropic.BetaSkillParams{ + Container: anthropic.MessageCreateParamsContainerUnion{ + OfContainers: &anthropic.ContainerParams{ + Skills: []anthropic.SkillParams{ { - Type: anthropic.BetaSkillParamsTypeCustom, + Type: anthropic.SkillParamsTypeCustom, SkillID: "skill_01AbCdEfGhIjKlMnOpQrStUv", Version: anthropic.String("latest"), }, }, }, }, - Messages: []anthropic.BetaMessageParam{ - anthropic.NewBetaUserMessage(anthropic.NewBetaTextBlock("Use latest Skill version")), + Messages: []anthropic.MessageParam{ + anthropic.NewUserMessage(anthropic.NewTextBlock("Use latest Skill version")), }, - Tools: []anthropic.BetaToolUnionParam{ - {OfCodeExecutionTool20250825: &anthropic.BetaCodeExecutionTool20250825Param{}}, + Tools: []anthropic.ToolUnionParam{ + {OfCodeExecutionTool20250825: &anthropic.CodeExecutionTool20250825Param{}}, }, }) if err != nil {
``` ```java Java - import com.anthropic.models.beta.messages.MessageCreateParams; - import com.anthropic.models.beta.messages.BetaMessage; + import com.anthropic.models.messages.MessageCreateParams; + import com.anthropic.models.messages.Message; import com.anthropic.models.messages.Model; import com.anthropic.core.MultipartField; - import com.anthropic.models.beta.messages.BetaContainerParams; - import com.anthropic.models.beta.messages.BetaSkillParams; - import com.anthropic.models.beta.messages.BetaCodeExecutionTool20250825; - import com.anthropic.models.beta.skills.versions.VersionCreateParams; - import com.anthropic.models.beta.skills.versions.VersionCreateResponse; + import com.anthropic.models.messages.ContainerParams; + import com.anthropic.models.messages.SkillParams; + import com.anthropic.models.messages.CodeExecutionTool20250825; + import com.anthropic.models.skills.versions.VersionCreateParams; + import com.anthropic.models.skills.versions.SkillVersion; import java.io.InputStream; import java.nio.file.Files; import java.nio.file.Path;
.build()) .build(); - VersionCreateResponse newVersion = client.beta().skills().versions() + SkillVersion newVersion = client.skills().versions() .create("skill_01AbCdEfGhIjKlMnOpQrStUv", versionParams); // Use specific version MessageCreateParams specificVersionParams = MessageCreateParams.builder() .model(Model.CLAUDE_OPUS_5) .maxTokens(4096L) - .addBeta("code-execution-2025-08-25") - .addBeta("skills-2025-10-02") - .container(BetaContainerParams.builder() - .addSkill(BetaSkillParams.builder() - .type(BetaSkillParams.Type.CUSTOM) + .container(ContainerParams.builder() + .addSkill(SkillParams.builder() + .type(SkillParams.Type.CUSTOM) .skillId("skill_01AbCdEfGhIjKlMnOpQrStUv") - .version(newVersion.version()) + .version(newVersion.id()) .build()) .build()) .addUserMessage("Use updated Skill") - .addTool(BetaCodeExecutionTool20250825.builder().build()) + .addTool(CodeExecutionTool20250825.builder().build()) .build(); - BetaMessage response = client.beta().messages().create(specificVersionParams); + Message response = client.messages().create(specificVersionParams); System.out.println(response); // Use latest version MessageCreateParams latestVersionParams = MessageCreateParams.builder() .model(Model.CLAUDE_OPUS_5) .maxTokens(4096L) - .addBeta("code-execution-2025-08-25") - .addBeta("skills-2025-10-02") - .container(BetaContainerParams.builder() - .addSkill(BetaSkillParams.builder() - .type(BetaSkillParams.Type.CUSTOM) + .container(ContainerParams.builder() + .addSkill(SkillParams.builder() + .type(SkillParams.Type.CUSTOM) .skillId("skill_01AbCdEfGhIjKlMnOpQrStUv") .version("latest") .build()) .build()) .addUserMessage("Use latest Skill version") - .addTool(BetaCodeExecutionTool20250825.builder().build()) + .addTool(CodeExecutionTool20250825.builder().build()) .build(); - BetaMessage latestResponse = client.beta().messages().create(latestVersionParams); + Message latestResponse = client.messages().create(latestVersionParams); System.out.println(latestResponse); ```
client = Anthropic::Client.new # Create a new version - new_version = client.beta.skills.versions.create( + new_version = client.skills.versions.create( "skill_01AbCdEfGhIjKlMnOpQrStUv", files: [ Anthropic::FilePart.new(
) # Use specific version - response = client.beta.messages.create( + response = client.messages.create( model: "claude-opus-5", max_tokens: 4096, - betas: ["code-execution-2025-08-25", "skills-2025-10-02"], container: { skills: [{ type: "custom", skill_id: "skill_01AbCdEfGhIjKlMnOpQrStUv", - version: new_version.version + version: new_version.id }] }, messages: [{ role: "user", content: "Use updated Skill" }],
puts response # Use latest version - latest_response = client.beta.messages.create( + latest_response = client.messages.create( model: "claude-opus-5", max_tokens: 4096, - betas: ["code-execution-2025-08-25", "skills-2025-10-02"], container: { skills: [{ type: "custom",
``` </CodeGroup> -See the [Create Skill Version API reference](https://platform.claude.com/docs/en/api/beta/skills/versions/create) for complete details. +See the [Create Skill Version API reference](https://platform.claude.com/docs/en/api/skills/versions/create) for complete details. ***
DCF_SKILL=$(curl -X POST "https://api.anthropic.com/v1/skills" \ -H "x-api-key: $ANTHROPIC_API_KEY" \ -H "anthropic-version: 2023-06-01" \ - -H "anthropic-beta: skills-2025-10-02" \ -F "files[]=@dcf_skill/SKILL.md;filename=dcf_skill/SKILL.md") DCF_SKILL_ID=$(echo "$DCF_SKILL" | jq -r '.id')
curl https://api.anthropic.com/v1/messages \ -H "x-api-key: $ANTHROPIC_API_KEY" \ -H "anthropic-version: 2023-06-01" \ - -H "anthropic-beta: code-execution-2025-08-25,skills-2025-10-02" \ -H "content-type: application/json" \ -d "{ \"model\": \"claude-opus-5\",
```bash CLI # Create custom DCF analysis Skill - DCF_SKILL_ID=$(ant beta:skills create \ + DCF_SKILL_ID=$(ant skills create \ --file dcf_skill.zip \ --transform id \ --raw-output) # Use with Excel to create financial model - ant beta:messages create \ - --beta code-execution-2025-08-25,skills-2025-10-02 <<YAML + ant messages create <<YAML model: claude-opus-5 max_tokens: 4096 container:
# Create custom DCF analysis Skill - dcf_skill = client.beta.skills.create( + dcf_skill = client.skills.create( files=files_from_dir("/path/to/dcf_skill"), ) # Use with Excel to create financial model - response = client.beta.messages.create( + response = client.messages.create( model="claude-opus-5", max_tokens=4096, - betas=["code-execution-2025-08-25", "skills-2025-10-02"], container={ "skills": [ {"type": "anthropic", "skill_id": "xlsx", "version": "latest"},
const client = new Anthropic(); // Create custom DCF analysis Skill - const dcfSkill = await client.beta.skills.create({ + const dcfSkill = await client.skills.create({ files: [await toFile(fs.createReadStream("dcf_skill.zip"), "dcf_skill.zip")] }); // Use with Excel to create financial model - const response = await client.beta.messages.create({ + const response = await client.messages.create({ model: "claude-opus-5", max_tokens: 4096, - betas: ["code-execution-2025-08-25", "skills-2025-10-02"], container: { skills: [ { type: "anthropic", skill_id: "xlsx", version: "latest" },
AnthropicClient client = new(); // Create custom DCF analysis Skill - var dcfSkill = await client.Beta.Skills.Create(new SkillCreateParams + var dcfSkill = await client.Skills.Create(new SkillCreateParams { Files = [
{ Model = "claude-opus-5", MaxTokens = 4096, - Betas = ["code-execution-2025-08-25", "skills-2025-10-02"], - Container = new BetaContainerParams + Container = new ContainerParams { Skills = [ - new BetaSkillParams + new SkillParams { - Type = BetaSkillParamsType.Anthropic, + Type = SkillParamsType.Anthropic, SkillID = "xlsx", Version = "latest", }, - new BetaSkillParams + new SkillParams { - Type = BetaSkillParamsType.Custom, + Type = SkillParamsType.Custom, SkillID = dcfSkill.ID, Version = "latest", }, ], }, Messages = [new() { Role = Role.User, Content = "Build a DCF valuation model for a SaaS company" }], - Tools = [new BetaCodeExecutionTool20250825()], + Tools = [new CodeExecutionTool20250825()], }; - var message = await client.Beta.Messages.Create(parameters); + var message = await client.Messages.Create(parameters); Console.WriteLine(message); ```
dcfSkillID := "skill_01AbCdEfGhIjKlMnOpQrStUv" // Use with Excel to create financial model - response, err := client.Beta.Messages.New(context.TODO(), anthropic.BetaMessageNewParams{ + response, err := client.Messages.New(context.TODO(), anthropic.MessageNewParams{ Model: "claude-opus-5", MaxTokens: 4096, - Betas: []anthropic.AnthropicBeta{ - "code-execution-2025-08-25", - anthropic.AnthropicBetaSkills2025_10_02, - }, - Container: anthropic.BetaMessageNewParamsContainerUnion{ - OfContainers: &anthropic.BetaContainerParams{ - Skills: []anthropic.BetaSkillParams{ + Container: anthropic.MessageCreateParamsContainerUnion{ + OfContainers: &anthropic.ContainerParams{ + Skills: []anthropic.SkillParams{ { - Type: anthropic.BetaSkillParamsTypeAnthropic, + Type: anthropic.SkillParamsTypeAnthropic, SkillID: "xlsx", Version: anthropic.String("latest"), }, { - Type: anthropic.BetaSkillParamsTypeCustom, + Type: anthropic.SkillParamsTypeCustom, SkillID: dcfSkillID, Version: anthropic.String("latest"), }, }, }, }, - Messages: []anthropic.BetaMessageParam{ - anthropic.NewBetaUserMessage(anthropic.NewBetaTextBlock("Build a DCF valuation model for a SaaS company")), + Messages: []anthropic.MessageParam{ + anthropic.NewUserMessage(anthropic.NewTextBlock("Build a DCF valuation model for a SaaS company")), }, - Tools: []anthropic.BetaToolUnionParam{ - {OfCodeExecutionTool20250825: &anthropic.BetaCodeExecutionTool20250825Param{}}, + Tools: []anthropic.ToolUnionParam{ + {OfCodeExecutionTool20250825: &anthropic.CodeExecutionTool20250825Param{}}, }, }) if err != nil {
``` ```java Java - import com.anthropic.models.beta.messages.BetaContainerParams; - import com.anthropic.models.beta.messages.BetaSkillParams; - import com.anthropic.models.beta.messages.BetaCodeExecutionTool20250825; + import com.anthropic.models.messages.ContainerParams; + import com.anthropic.models.messages.SkillParams; + import com.anthropic.models.messages.CodeExecutionTool20250825; // ... void main() { AnthropicClient client = AnthropicOkHttpClient.fromEnv();
MessageCreateParams params = MessageCreateParams.builder() .model(Model.CLAUDE_OPUS_5) .maxTokens(4096L) - .addBeta("code-execution-2025-08-25") - .addBeta("skills-2025-10-02") - .container(BetaContainerParams.builder() + .container(ContainerParams.builder() .skills(List.of( - BetaSkillParams.builder() - .type(BetaSkillParams.Type.ANTHROPIC) + SkillParams.builder() + .type(SkillParams.Type.ANTHROPIC) .skillId("xlsx") .version("latest") .build(), - BetaSkillParams.builder() - .type(BetaSkillParams.Type.CUSTOM) + SkillParams.builder() + .type(SkillParams.Type.CUSTOM) .skillId(dcfSkillId) .version("latest") .build() )) .build()) .addUserMessage("Build a DCF valuation model for a SaaS company") - .addTool(BetaCodeExecutionTool20250825.builder().build()) + .addTool(CodeExecutionTool20250825.builder().build()) .build(); - BetaMessage response = client.beta().messages().create(params); + Message response = client.messages().create(params); System.out.println(response); } ```
client = Anthropic::Client.new # Create custom DCF analysis Skill - dcf_skill = client.beta.skills.create( + dcf_skill = client.skills.create( files: [ Anthropic::FilePart.new( Pathname("dcf_skill/SKILL.md"),
) # Use with Excel to create financial model - response = client.beta.messages.create( + response = client.messages.create( model: "claude-opus-5", max_tokens: 4096, - betas: ["code-execution-2025-08-25", "skills-2025-10-02"], container: { skills: [ { type: "anthropic", skill_id: "xlsx", version: "latest" },
The SDK tabs in this section show the `container` value to include in a Messages request. The cURL and CLI tabs show the full request. -**For production:** pin a specific version, so Skill updates never change your deployed behavior. If you omit `version` or set it to `"latest"`, requests use the newest version of the Skill, so a version uploaded by anyone in the [workspace](https://platform.claude.com/docs/en/build-with-claude/skills-guide#workspace-scoped-access) immediately changes what your production agents run. The version ID comes from the create-version response in [Versioning](https://platform.claude.com/docs/en/build-with-claude/skills-guide#versioning) or from the [List Skill Versions API](https://platform.claude.com/docs/en/api/beta/skills/versions/list). The ID is always a string: quote epoch-timestamp IDs in JSON or YAML. +**For production:** pin a specific version, so Skill updates never change your deployed behavior. If you omit `version` or set it to `"latest"`, requests use the newest version of the Skill, so a version uploaded by anyone in the [workspace](https://platform.claude.com/docs/en/build-with-claude/skills-guide#workspace-scoped-access) immediately changes what your production agents run. The version ID comes from the create-version response in [Versioning](https://platform.claude.com/docs/en/build-with-claude/skills-guide#versioning) or from the [List Skill Versions API](https://platform.claude.com/docs/en/api/skills/versions/list). The ID is always a string, so quote it in JSON or YAML (versions created under the `skills-2025-10-02` beta header have numeric-looking epoch-timestamp IDs). <CodeGroup> ```bash cURL
curl https://api.anthropic.com/v1/messages \ -H "x-api-key: $ANTHROPIC_API_KEY" \ -H "anthropic-version: 2023-06-01" \ - -H "anthropic-beta: code-execution-2025-08-25,skills-2025-10-02" \ -H "content-type: application/json" \ -d '{ "model": "claude-opus-5",
"skills": [{ "type": "custom", "skill_id": "skill_01AbCdEfGhIjKlMnOpQrStUv", - "version": "1759178010641129" + "version": "skver_01AbCdEfGhIjKlMnOpQrStUv" }] }, "messages": [{"role": "user", "content": "Analyze the sales data"}],
```bash CLI # Pin to specific versions for stability - ant beta:messages create \ - --beta code-execution-2025-08-25,skills-2025-10-02 <<YAML + ant messages create <<YAML model: claude-opus-5 max_tokens: 4096 container: skills: - type: custom skill_id: skill_01AbCdEfGhIjKlMnOpQrStUv - version: "1759178010641129" # quoted: the API requires a string + version: "skver_01AbCdEfGhIjKlMnOpQrStUv" messages: - role: user content: Analyze the sales data
{ "type": "custom", "skill_id": "skill_01AbCdEfGhIjKlMnOpQrStUv", - "version": "1759178010641129", + "version": "skver_01AbCdEfGhIjKlMnOpQrStUv", } ] }
```typescript TypeScript // Pin to specific versions for stability - const container: Anthropic.Beta.Messages.BetaContainerParams = { + const container: Anthropic.ContainerParams = { skills: [ { type: "custom", skill_id: "skill_01AbCdEfGhIjKlMnOpQrStUv", - version: "1759178010641129" + version: "skver_01AbCdEfGhIjKlMnOpQrStUv" } ] }; ``` ```csharp C# - using Anthropic.Models.Beta.Messages; + using Anthropic.Models.Messages; // Pin to specific versions for stability - var container = new BetaContainerParams + var container = new ContainerParams { Skills = [ - new BetaSkillParams + new SkillParams { - Type = BetaSkillParamsType.Custom, + Type = SkillParamsType.Custom, SkillID = "skill_01AbCdEfGhIjKlMnOpQrStUv", - Version = "1759178010641129", + Version = "skver_01AbCdEfGhIjKlMnOpQrStUv", }, ], };
```go Go // Pin to specific versions for stability - container := anthropic.BetaMessageNewParamsContainerUnion{ - OfContainers: &anthropic.BetaContainerParams{ - Skills: []anthropic.BetaSkillParams{ + container := anthropic.MessageCreateParamsContainerUnion{ + OfContainers: &anthropic.ContainerParams{ + Skills: []anthropic.SkillParams{ { - Type: anthropic.BetaSkillParamsTypeCustom, + Type: anthropic.SkillParamsTypeCustom, SkillID: "skill_01AbCdEfGhIjKlMnOpQrStUv", - Version: anthropic.String("1759178010641129"), + Version: anthropic.String("skver_01AbCdEfGhIjKlMnOpQrStUv"), }, }, },
``` ```java Java - import com.anthropic.models.beta.messages.BetaContainerParams; - import com.anthropic.models.beta.messages.BetaSkillParams; + import com.anthropic.models.messages.ContainerParams; + import com.anthropic.models.messages.SkillParams; void main() { // Pin to specific versions for stability - BetaContainerParams container = BetaContainerParams.builder() - .addSkill(BetaSkillParams.builder() - .type(BetaSkillParams.Type.CUSTOM) + ContainerParams container = ContainerParams.builder() + .addSkill(SkillParams.builder() + .type(SkillParams.Type.CUSTOM) .skillId("skill_01AbCdEfGhIjKlMnOpQrStUv") - .version("1759178010641129") + .version("skver_01AbCdEfGhIjKlMnOpQrStUv") .build()) .build(); }
skills: [{ type: "custom", skill_id: "skill_01AbCdEfGhIjKlMnOpQrStUv", - version: "1759178010641129" + version: "skver_01AbCdEfGhIjKlMnOpQrStUv" }] } ```
curl https://api.anthropic.com/v1/messages \ -H "x-api-key: $ANTHROPIC_API_KEY" \ -H "anthropic-version: 2023-06-01" \ - -H "anthropic-beta: code-execution-2025-08-25,skills-2025-10-02" \ -H "content-type: application/json" \ -d '{ "model": "claude-opus-5",
```bash CLI # Use latest for active development - ant beta:messages create \ - --beta code-execution-2025-08-25,skills-2025-10-02 <<YAML + ant messages create <<YAML model: claude-opus-5 max_tokens: 4096 container:
```typescript TypeScript // Use latest for active development - const container: Anthropic.Beta.Messages.BetaContainerParams = { + const container: Anthropic.ContainerParams = { skills: [ { type: "custom",
``` ```csharp C# - using Anthropic.Models.Beta.Messages; + using Anthropic.Models.Messages; // Use latest for active development - var container = new BetaContainerParams + var container = new ContainerParams { Skills = [ - new BetaSkillParams + new SkillParams { - Type = BetaSkillParamsType.Custom, + Type = SkillParamsType.Custom, SkillID = "skill_01AbCdEfGhIjKlMnOpQrStUv", Version = "latest", },
```go Go // Use latest for active development - container := anthropic.BetaMessageNewParamsContainerUnion{ - OfContainers: &anthropic.BetaContainerParams{ - Skills: []anthropic.BetaSkillParams{ + container := anthropic.MessageCreateParamsContainerUnion{ + OfContainers: &anthropic.ContainerParams{ + Skills: []anthropic.SkillParams{ { - Type: anthropic.BetaSkillParamsTypeCustom, + Type: anthropic.SkillParamsTypeCustom, SkillID: "skill_01AbCdEfGhIjKlMnOpQrStUv", Version: anthropic.String("latest"), },
``` ```java Java - import com.anthropic.models.beta.messages.BetaContainerParams; - import com.anthropic.models.beta.messages.BetaSkillParams; + import com.anthropic.models.messages.ContainerParams; + import com.anthropic.models.messages.SkillParams; void main() { // Use latest for active development - BetaContainerParams container = BetaContainerParams.builder() - .addSkill(BetaSkillParams.builder() - .type(BetaSkillParams.Type.CUSTOM) + ContainerParams container = ContainerParams.builder() + .addSkill(SkillParams.builder() + .type(SkillParams.Type.CUSTOM) .skillId("skill_01AbCdEfGhIjKlMnOpQrStUv") .version("latest") .build())
curl https://api.anthropic.com/v1/messages \ -H "x-api-key: $ANTHROPIC_API_KEY" \ -H "anthropic-version: 2023-06-01" \ - -H "anthropic-beta: code-execution-2025-08-25,skills-2025-10-02" \ -H "content-type: application/json" \ -d '{ "model": "claude-opus-5",
curl https://api.anthropic.com/v1/messages \ -H "x-api-key: $ANTHROPIC_API_KEY" \ -H "anthropic-version: 2023-06-01" \ - -H "anthropic-beta: code-execution-2025-08-25,skills-2025-10-02" \ -H "content-type: application/json" \ -d '{ "model": "claude-opus-5",
```bash CLI # Skills render into the system prompt in a fixed, cache-friendly order - ant beta:messages create \ - --beta code-execution-2025-08-25,skills-2025-10-02 <<'YAML' + ant messages create <<'YAML' model: claude-opus-5 max_tokens: 4096 container:
YAML # Changing the Skills list ([xlsx] vs [xlsx, pptx]) changes the prefix: a cache miss, while an identical list is a cache hit - ant beta:messages create \ - --beta code-execution-2025-08-25,skills-2025-10-02 <<'YAML' + ant messages create <<'YAML' model: claude-opus-5 max_tokens: 4096 container:
client = anthropic.Anthropic() # Skills render into the system prompt in a fixed, cache-friendly order - response1 = client.beta.messages.create( + response1 = client.messages.create( model="claude-opus-5", max_tokens=4096, - betas=[ - "code-execution-2025-08-25", - "skills-2025-10-02", - ], container={ "skills": [{"type": "anthropic", "skill_id": "xlsx", "version": "latest"}] },
) # Changing the Skills list ([xlsx] vs [xlsx, pptx]) changes the prefix: a cache miss, while an identical list is a cache hit - response2 = client.beta.messages.create( + response2 = client.messages.create( model="claude-opus-5", max_tokens=4096, - betas=[ - "code-execution-2025-08-25", - "skills-2025-10-02", - ], container={ "skills": [ {"type": "anthropic", "skill_id": "xlsx", "version": "latest"},
const client = new Anthropic(); // Skills render into the system prompt in a fixed, cache-friendly order - const response1 = await client.beta.messages.create({ + const response1 = await client.messages.create({ model: "claude-opus-5", max_tokens: 4096, - betas: ["code-execution-2025-08-25", "skills-2025-10-02"], container: { skills: [{ type: "anthropic", skill_id: "xlsx", version: "latest" }] },
}); // Changing the Skills list ([xlsx] vs [xlsx, pptx]) changes the prefix: a cache miss, while an identical list is a cache hit - const response2 = await client.beta.messages.create({ + const response2 = await client.messages.create({ model: "claude-opus-5", max_tokens: 4096, - betas: ["code-execution-2025-08-25", "skills-2025-10-02"], container: { skills: [ { type: "anthropic", skill_id: "xlsx", version: "latest" },
{ Model = "claude-opus-5", MaxTokens = 4096, - Betas = ["code-execution-2025-08-25", "skills-2025-10-02"], - Container = new BetaContainerParams + Container = new ContainerParams { Skills = [ - new BetaSkillParams + new SkillParams { - Type = BetaSkillParamsType.Anthropic, + Type = SkillParamsType.Anthropic, SkillID = "xlsx", Version = "latest", }, ], }, Messages = [new() { Role = Role.User, Content = "Analyze sales data" }], - Tools = [new BetaCodeExecutionTool20250825()], + Tools = [new CodeExecutionTool20250825()], }; - var response1 = await client.Beta.Messages.Create(parameters1); + var response1 = await client.Messages.Create(parameters1); Console.WriteLine(response1); // Different Skill set ([xlsx] vs [xlsx, pptx]) = a different prefix: a cache miss (an identical set is a cache hit)
{ Model = "claude-opus-5", MaxTokens = 4096, - Betas = ["code-execution-2025-08-25", "skills-2025-10-02"], - Container = new BetaContainerParams + Container = new ContainerParams { Skills = [ - new BetaSkillParams + new SkillParams { - Type = BetaSkillParamsType.Anthropic, + Type = SkillParamsType.Anthropic, SkillID = "xlsx", Version = "latest", }, - new BetaSkillParams + new SkillParams { - Type = BetaSkillParamsType.Anthropic, + Type = SkillParamsType.Anthropic, SkillID = "pptx", Version = "latest", }, ], }, Messages = [new() { Role = Role.User, Content = "Create a presentation" }], - Tools = [new BetaCodeExecutionTool20250825()], + Tools = [new CodeExecutionTool20250825()], }; - var response2 = await client.Beta.Messages.Create(parameters2); + var response2 = await client.Messages.Create(parameters2); Console.WriteLine(response2); ```
client := anthropic.NewClient() // Skills render into the system prompt in a fixed, cache-friendly order - response1, err := client.Beta.Messages.New(context.TODO(), anthropic.BetaMessageNewParams{ + response1, err := client.Messages.New(context.TODO(), anthropic.MessageNewParams{ Model: "claude-opus-5", MaxTokens: 4096, - Betas: []anthropic.AnthropicBeta{ - "code-execution-2025-08-25", - anthropic.AnthropicBetaSkills2025_10_02, - }, - Container: anthropic.BetaMessageNewParamsContainerUnion{ - OfContainers: &anthropic.BetaContainerParams{ - Skills: []anthropic.BetaSkillParams{ + Container: anthropic.MessageCreateParamsContainerUnion{ + OfContainers: &anthropic.ContainerParams{ + Skills: []anthropic.SkillParams{ { - Type: anthropic.BetaSkillParamsTypeAnthropic, + Type: anthropic.SkillParamsTypeAnthropic, SkillID: "xlsx", Version: anthropic.String("latest"), }, }, }, }, - Messages: []anthropic.BetaMessageParam{ - anthropic.NewBetaUserMessage(anthropic.NewBetaTextBlock("Analyze sales data")), + Messages: []anthropic.MessageParam{ + anthropic.NewUserMessage(anthropic.NewTextBlock("Analyze sales data")), }, - Tools: []anthropic.BetaToolUnionParam{ - {OfCodeExecutionTool20250825: &anthropic.BetaCodeExecutionTool20250825Param{}}, + Tools: []anthropic.ToolUnionParam{ + {OfCodeExecutionTool20250825: &anthropic.CodeExecutionTool20250825Param{}}, }, }) if err != nil {
fmt.Println(response1) // Changing the Skills list ([xlsx] vs [xlsx, pptx]) changes the prefix: a cache miss, while an identical list is a cache hit - response2, err := client.Beta.Messages.New(context.TODO(), anthropic.BetaMessageNewParams{ + response2, err := client.Messages.New(context.TODO(), anthropic.MessageNewParams{ Model: "claude-opus-5", MaxTokens: 4096, - Betas: []anthropic.AnthropicBeta{ - "code-execution-2025-08-25", - anthropic.AnthropicBetaSkills2025_10_02, - }, - Container: anthropic.BetaMessageNewParamsContainerUnion{ - OfContainers: &anthropic.BetaContainerParams{ - Skills: []anthropic.BetaSkillParams{ + Container: anthropic.MessageCreateParamsContainerUnion{ + OfContainers: &anthropic.ContainerParams{ + Skills: []anthropic.SkillParams{ { - Type: anthropic.BetaSkillParamsTypeAnthropic, + Type: anthropic.SkillParamsTypeAnthropic, SkillID: "xlsx", Version: anthropic.String("latest"), }, { - Type: anthropic.BetaSkillParamsTypeAnthropic, + Type: anthropic.SkillParamsTypeAnthropic, SkillID: "pptx", Version: anthropic.String("latest"), }, }, }, }, - Messages: []anthropic.BetaMessageParam{ - anthropic.NewBetaUserMessage(anthropic.NewBetaTextBlock("Create a presentation")), + Messages: []anthropic.MessageParam{ + anthropic.NewUserMessage(anthropic.NewTextBlock("Create a presentation")), }, - Tools: []anthropic.BetaToolUnionParam{ - {OfCodeExecutionTool20250825: &anthropic.BetaCodeExecutionTool20250825Param{}}, + Tools: []anthropic.ToolUnionParam{ + {OfCodeExecutionTool20250825: &anthropic.CodeExecutionTool20250825Param{}}, }, }) if err != nil {
``` ```java Java - import com.anthropic.models.beta.messages.BetaContainerParams; - import com.anthropic.models.beta.messages.BetaSkillParams; - import com.anthropic.models.beta.messages.BetaCodeExecutionTool20250825; + import com.anthropic.models.messages.ContainerParams; + import com.anthropic.models.messages.SkillParams; + import com.anthropic.models.messages.CodeExecutionTool20250825; // ... void main() { AnthropicClient client = AnthropicOkHttpClient.fromEnv();
MessageCreateParams params1 = MessageCreateParams.builder() .model(Model.CLAUDE_OPUS_5) .maxTokens(4096L) - .addBeta("code-execution-2025-08-25") - .addBeta("skills-2025-10-02") - .container(BetaContainerParams.builder() + .container(ContainerParams.builder() .skills(List.of( - BetaSkillParams.builder() - .type(BetaSkillParams.Type.ANTHROPIC) + SkillParams.builder() + .type(SkillParams.Type.ANTHROPIC) .skillId("xlsx") .version("latest") .build() )) .build()) .addUserMessage("Analyze sales data") - .addTool(BetaCodeExecutionTool20250825.builder().build()) + .addTool(CodeExecutionTool20250825.builder().build()) .build(); - BetaMessage response1 = client.beta().messages().create(params1); + Message response1 = client.messages().create(params1); System.out.println(response1); // Changing the Skills list ([xlsx] vs [xlsx, pptx]) changes the prefix: a cache miss, while an identical list is a cache hit MessageCreateParams params2 = MessageCreateParams.builder() .model(Model.CLAUDE_OPUS_5) .maxTokens(4096L) - .addBeta("code-execution-2025-08-25") - .addBeta("skills-2025-10-02") - .container(BetaContainerParams.builder() + .container(ContainerParams.builder() .skills(List.of( - BetaSkillParams.builder() - .type(BetaSkillParams.Type.ANTHROPIC) + SkillParams.builder() + .type(SkillParams.Type.ANTHROPIC) .skillId("xlsx") .version("latest") .build(), - BetaSkillParams.builder() - .type(BetaSkillParams.Type.ANTHROPIC) + SkillParams.builder() + .type(SkillParams.Type.ANTHROPIC) .skillId("pptx") .version("latest") .build() )) .build()) .addUserMessage("Create a presentation") - .addTool(BetaCodeExecutionTool20250825.builder().build()) + .addTool(CodeExecutionTool20250825.builder().build()) .build(); - BetaMessage response2 = client.beta().messages().create(params2); + Message response2 = client.messages().create(params2); System.out.println(response2); } ```
client = Anthropic::Client.new # Skills render into the system prompt in a fixed, cache-friendly order - response1 = client.beta.messages.create( + response1 = client.messages.create( model: "claude-opus-5", max_tokens: 4096, - betas: [ - "code-execution-2025-08-25", - "skills-2025-10-02", - ], container: { skills: [{ type: "anthropic", skill_id: "xlsx", version: "latest" }] },
puts response1 # Changing the Skills list ([xlsx] vs [xlsx, pptx]) changes the prefix: a cache miss, while an identical list is a cache hit - response2 = client.beta.messages.create( + response2 = client.messages.create( model: "claude-opus-5", max_tokens: 4096, - betas: [ - "code-execution-2025-08-25", - "skills-2025-10-02", - ], container: { skills: [ { type: "anthropic", skill_id: "xlsx", version: "latest" },
``` ```bash CLI - if ! RESULT=$(ant beta:messages create \ - --beta code-execution-2025-08-25,skills-2025-10-02 \ + if ! RESULT=$(ant messages create \ --transform-error error.message \ --format-error yaml 2>&1 <<'YAML' model: claude-opus-5
client = anthropic.Anthropic() try: - response = client.beta.messages.create( + response = client.messages.create( model="claude-opus-5", max_tokens=4096, - betas=["code-execution-2025-08-25", "skills-2025-10-02"], container={ "skills": [ {
const client = new Anthropic(); try { - const response = await client.beta.messages.create({ + const response = await client.messages.create({ model: "claude-opus-5", max_tokens: 4096, - betas: ["code-execution-2025-08-25", "skills-2025-10-02"], container: { skills: [ { type: "custom", skill_id: "skill_01AbCdEfGhIjKlMnOpQrStUv", version: "latest" }
{ Model = "claude-opus-5", MaxTokens = 4096, - Betas = ["code-execution-2025-08-25", "skills-2025-10-02"], - Container = new BetaContainerParams + Container = new ContainerParams { Skills = [ - new BetaSkillParams + new SkillParams { - Type = BetaSkillParamsType.Custom, + Type = SkillParamsType.Custom, SkillID = "skill_01AbCdEfGhIjKlMnOpQrStUv", Version = "latest", }, ], }, Messages = [new() { Role = Role.User, Content = "Process data" }], - Tools = [new BetaCodeExecutionTool20250825()], + Tools = [new CodeExecutionTool20250825()], }; - var response = await client.Beta.Messages.Create(parameters); + var response = await client.Messages.Create(parameters); Console.WriteLine(response); } catch (AnthropicBadRequestException e) when (e.Message.Contains("skill"))
```go Go client := anthropic.NewClient() - response, err := client.Beta.Messages.New(context.TODO(), anthropic.BetaMessageNewParams{ + response, err := client.Messages.New(context.TODO(), anthropic.MessageNewParams{ Model: "claude-opus-5", MaxTokens: 4096, - Betas: []anthropic.AnthropicBeta{"code-execution-2025-08-25", anthropic.AnthropicBetaSkills2025_10_02}, - Container: anthropic.BetaMessageNewParamsContainerUnion{ - OfContainers: &anthropic.BetaContainerParams{ - Skills: []anthropic.BetaSkillParams{ + Container: anthropic.MessageCreateParamsContainerUnion{ + OfContainers: &anthropic.ContainerParams{ + Skills: []anthropic.SkillParams{ { - Type: anthropic.BetaSkillParamsTypeCustom, + Type: anthropic.SkillParamsTypeCustom, SkillID: "skill_01AbCdEfGhIjKlMnOpQrStUv", Version: anthropic.String("latest"), }, }, }, }, - Messages: []anthropic.BetaMessageParam{ - anthropic.NewBetaUserMessage(anthropic.NewBetaTextBlock("Process data")), + Messages: []anthropic.MessageParam{ + anthropic.NewUserMessage(anthropic.NewTextBlock("Process data")), }, - Tools: []anthropic.BetaToolUnionParam{ - {OfCodeExecutionTool20250825: &anthropic.BetaCodeExecutionTool20250825Param{}}, + Tools: []anthropic.ToolUnionParam{ + {OfCodeExecutionTool20250825: &anthropic.CodeExecutionTool20250825Param{}}, }, })
```java Java import com.anthropic.errors.BadRequestException; - import com.anthropic.models.beta.messages.BetaContainerParams; - import com.anthropic.models.beta.messages.BetaSkillParams; - import com.anthropic.models.beta.messages.BetaCodeExecutionTool20250825; + import com.anthropic.models.messages.ContainerParams; + import com.anthropic.models.messages.SkillParams; + import com.anthropic.models.messages.CodeExecutionTool20250825; // ... void main() { AnthropicClient client = AnthropicOkHttpClient.fromEnv();
MessageCreateParams params = MessageCreateParams.builder() .model(Model.CLAUDE_OPUS_5) .maxTokens(4096L) - .addBeta("code-execution-2025-08-25") - .addBeta("skills-2025-10-02") - .container(BetaContainerParams.builder() - .addSkill(BetaSkillParams.builder() - .type(BetaSkillParams.Type.CUSTOM) + .container(ContainerParams.builder() + .addSkill(SkillParams.builder() + .type(SkillParams.Type.CUSTOM) .skillId("skill_01AbCdEfGhIjKlMnOpQrStUv") .version("latest") .build()) .build()) .addUserMessage("Process data") - .addTool(BetaCodeExecutionTool20250825.builder().build()) + .addTool(CodeExecutionTool20250825.builder().build()) .build(); - BetaMessage response = client.beta().messages().create(params); + Message response = client.messages().create(params); System.out.println(response); } catch (BadRequestException e) { if (e.getMessage().contains("skill")) {
client = Anthropic::Client.new begin - response = client.beta.messages.create( + response = client.messages.create( model: "claude-opus-5", max_tokens: 4096, - betas: ["code-execution-2025-08-25", "skills-2025-10-02"], container: { skills: [ {
## Next steps <CardGroup cols={3}> - <Card title="API reference" icon="book" href="https://platform.claude.com/docs/en/api/beta/skills/create"> + <Card title="API reference" icon="book" href="https://platform.claude.com/docs/en/api/skills/create"> Complete API reference with all endpoints </Card>
build-with-claude/vision Changed · +68 / -61 lines
FILE_ID=$(curl -sS -X POST https://api.anthropic.com/v1/files \ -H "x-api-key: $ANTHROPIC_API_KEY" \ -H "anthropic-version: 2023-06-01" \ - -H "anthropic-beta: files-api-2025-04-14" \ -F "[email protected]" | jq -r '.id') # Then use the returned file_id in your message
curl https://api.anthropic.com/v1/messages \ -H "x-api-key: $ANTHROPIC_API_KEY" \ -H "anthropic-version: 2023-06-01" \ - -H "anthropic-beta: files-api-2025-04-14" \ -H "content-type: application/json" \ -d @- <<EOF {
https://platform.claude.com/docs/images/vision-example.jpg # First, upload your image to the Files API - FILE_ID=$(ant beta:files upload \ + FILE_ID=$(ant files upload \ --file ./vision-example.jpg \ --transform id --raw-output) # Then use the returned file_id in your message - ant beta:messages create \ - --beta files-api-2025-04-14 \ + ant messages create \ --transform content --format yaml <<YAML model: claude-opus-5 max_tokens: 1024
# Upload the image file with open("vision-example.jpg", "rb") as f: - file_upload = client.beta.files.upload(file=("vision-example.jpg", f, "image/jpeg")) + file_upload = client.files.upload(file=("vision-example.jpg", f, "image/jpeg")) # Use the uploaded file in a message - message = client.beta.messages.create( + message = client.messages.create( model="claude-opus-5", max_tokens=1024, - betas=["files-api-2025-04-14"], messages=[ { "role": "user",
const anthropic = new Anthropic(); // Upload the image file - const fileUpload = await anthropic.beta.files.upload({ + const fileUpload = await anthropic.files.upload({ file: await toFile(fs.createReadStream("vision-example.jpg"), undefined, { type: "image/jpeg" })
}); // Use the uploaded file in a message - const response = await anthropic.beta.messages.create({ + const response = await anthropic.messages.create({ model: "claude-opus-5", max_tokens: 1024, - betas: ["files-api-2025-04-14"], messages: [ { role: "user",
``` ```csharp C# + using System.Collections.Generic; using Anthropic; + using Anthropic.Core; + using Anthropic.Models.Files; + using Anthropic.Models.Messages; - var client = new AnthropicClient(); + AnthropicClient client = new(); // Upload the image file - var fileUpload = await client.Beta.Files.Upload( - new FileUploadParams { File = File.OpenRead("vision-example.jpg") }); + var fileUpload = await client.Files.Upload(new FileUploadParams + { + File = new BinaryContent + { + Stream = File.OpenRead("vision-example.jpg"), + FileName = "vision-example.jpg", + ContentType = new("image/jpeg"), + }, + }); // Use the uploaded file in a message - var response = await client.Beta.Messages.Create( - new MessageCreateParams - { - Model = "claude-opus-5", - MaxTokens = 1024, - Betas = new[] { "files-api-2025-04-14" }, - Messages = new[] + var response = await client.Messages.Create(new MessageCreateParams + { + Model = Model.ClaudeOpus5, + MaxTokens = 1024, + Messages = + [ + new() { - new BetaMessageParam + Role = Role.User, + Content = new MessageParamContent(new List<ContentBlockParam> { - Role = "user", - Content = new object[] - { - new - { - type = "image", - source = new { type = "file", file_id = fileUpload.Id } - }, - new { type = "text", text = "Describe this image." } - } - } + new ContentBlockParam(new ImageBlockParam( + new ImageBlockParamSource(new FileImageSource(fileUpload.ID)) + )), + new ContentBlockParam(new TextBlockParam("Describe this image.")), + }), } - }); + ] + }); Console.WriteLine(response); ```
} defer file.Close() - fileUpload, err := client.Beta.Files.Upload(context.Background(), - anthropic.BetaFileUploadParams{ - File: file, + fileUpload, err := client.Files.Upload(context.Background(), + anthropic.FileUploadParams{ + File: anthropic.File(file, "vision-example.jpg", "image/jpeg"), }) if err != nil { log.Fatal(err)
} // Use the uploaded file in a message - message, err := client.Beta.Messages.New(context.Background(), - anthropic.BetaMessageNewParams{ + message, err := client.Messages.New(context.Background(), + anthropic.MessageNewParams{ Model: anthropic.ModelClaudeOpus5, MaxTokens: 1024, - Betas: []anthropic.AnthropicBeta{anthropic.AnthropicBetaFilesAPI2025_04_14}, - Messages: []anthropic.BetaMessageParam{ - anthropic.NewBetaUserMessage( - anthropic.NewBetaImageBlock(anthropic.BetaFileImageSourceParam{ + Messages: []anthropic.MessageParam{ + anthropic.NewUserMessage( + anthropic.NewImageBlock(anthropic.FileImageSourceParam{ FileID: fileUpload.ID, }), - anthropic.NewBetaTextBlock("Describe this image."), + anthropic.NewTextBlock("Describe this image."), ), }, })
``` ```java Java - import com.anthropic.models.beta.files.FileMetadata; - import com.anthropic.models.beta.files.FileUploadParams; + import com.anthropic.core.MultipartField; + import com.anthropic.models.files.FileMetadata; + import com.anthropic.models.files.FileUploadParams; // ... AnthropicClient client = AnthropicOkHttpClient.fromEnv(); // Upload the image file - FileMetadata file = client - .beta() - .files() - .upload( - FileUploadParams.builder() - .file(Files.newInputStream(Path.of("vision-example.jpg"))) - .build() - ); + FileMetadata file = client.files().upload( + FileUploadParams.builder() + .file( + MultipartField.<InputStream>builder() + .value(Files.newInputStream(Path.of("vision-example.jpg"))) + .filename("vision-example.jpg") + .contentType("image/jpeg") + .build() + ) + .build() + ); // Use the uploaded file in a message ImageBlockParam imageParam = ImageBlockParam.builder().fileSource(file.id()).build();
// Upload the image file $fileUpload = $client->beta->files->upload( - file: fopen('vision-example.jpg', 'r'), + FileParam::fromResource(fopen('vision-example.jpg', 'rb'), contentType: 'image/jpeg'), ); // Use the uploaded file in a message
client = Anthropic::Client.new # Upload the image file - file_upload = client.beta.files.upload( - file: File.open("vision-example.jpg", "rb") + file_upload = client.files.upload( + file: Anthropic::FilePart.new( + File.open("vision-example.jpg", "rb"), + content_type: "image/jpeg" + ) ) # Use the uploaded file in a message - message = client.beta.messages.create( + message = client.messages.create( model: "claude-opus-5", max_tokens: 1024, - betas: ["files-api-2025-04-14"], messages: [ { role: "user",
cli-sdks-libraries/sdks/csharp Changed · +3 / -3 lines
```csharp using System; -using Anthropic.Models.Beta.Files; +using Anthropic.Models.Files; FileDownloadParams parameters = new() { FileID = "file_id" }; -var response = await client.Beta.Files.Download(parameters); +var response = await client.Files.Download(parameters); Console.WriteLine(response); ```
```csharp using System.IO; -using var response = await client.Beta.Files.Download(parameters); +using var response = await client.Files.Download(parameters); using var contentStream = await response.ReadAsStream(); using var fileStream = File.Open(path, FileMode.OpenOrCreate); await contentStream.CopyToAsync(fileStream); // Or any other Stream
cli-sdks-libraries/sdks/go Changed · +3 / -3 lines
## Requirements -This library requires Go 1.23+. +This library requires Go 1.24+. ## Usage
```go // A file from the file system file, err := os.Open("/path/to/file.json") -anthropic.BetaFileUploadParams{ +anthropic.FileUploadParams{ File: anthropic.File(file, "custom-name.json", "application/json"), } // A file from a string -anthropic.BetaFileUploadParams{ +anthropic.FileUploadParams{ File: anthropic.File(strings.NewReader("my file contents"), "custom-name.json", "application/json"), } ```
cli-sdks-libraries/sdks/java Changed · +18 / -29 lines
<Tabs> <Tab title="Gradle"> ```kotlin - implementation("com.anthropic:anthropic-java:2.53.0") + implementation("com.anthropic:anthropic-java:2.57.0") ``` </Tab>
<dependency> <groupId>com.anthropic</groupId> <artifactId>anthropic-java</artifactId> - <version>2.53.0</version> + <version>2.57.0</version> </dependency> ``` </Tab>
```java import com.anthropic.core.MultipartField; -import com.anthropic.models.beta.files.FileMetadata; -import com.anthropic.models.beta.files.FileUploadParams; +import com.anthropic.models.files.FileMetadata; +import com.anthropic.models.files.FileUploadParams; FileUploadParams params = FileUploadParams.builder() .file(
) .build(); -FileMetadata fileMetadata = client.beta().files().upload(params); +FileMetadata fileMetadata = client.files().upload(params); ``` Or from an `InputStream`:
```java import com.anthropic.core.MultipartField; -import com.anthropic.models.beta.files.FileMetadata; -import com.anthropic.models.beta.files.FileUploadParams; +import com.anthropic.models.files.FileMetadata; +import com.anthropic.models.files.FileUploadParams; FileUploadParams params = FileUploadParams.builder() .file(
) .build(); -FileMetadata fileMetadata = client.beta().files().upload(params); +FileMetadata fileMetadata = client.files().upload(params); ``` Or from in-memory bytes:
```java import com.anthropic.core.MultipartField; -import com.anthropic.models.beta.files.FileMetadata; -import com.anthropic.models.beta.files.FileUploadParams; +import com.anthropic.models.files.FileMetadata; +import com.anthropic.models.files.FileUploadParams; FileUploadParams params = FileUploadParams.builder() .file(
) .build(); -FileMetadata fileMetadata = client.beta().files().upload(params); +FileMetadata fileMetadata = client.files().upload(params); ``` ### Binary responses
```java import com.anthropic.core.http.HttpResponse; -HttpResponse response = client.beta().files().download("file_abc123"); +HttpResponse response = client.files().download("file_abc123"); ``` To save the response content to a file:
```java import com.anthropic.core.http.HttpResponse; -try (HttpResponse response = client.beta().files().download(params)) { +try (HttpResponse response = client.files().download(params)) { Files.copy( response.body(), Paths.get(path),
```java import com.anthropic.core.http.HttpResponse; -try (HttpResponse response = client.beta().files().download(params)) { +try (HttpResponse response = client.files().download(params)) { response.body().transferTo(Files.newOutputStream(Paths.get(path))); } catch (Exception e) { IO.println("Something went wrong!");
``` <Accordion title="Jackson compatibility"> - The SDK depends on Jackson for JSON serialization/deserialization. It is compatible with version 2.13.4 or higher, but depends on version 2.18.2 by default. + The SDK depends on Jackson for JSON serialization/deserialization. It is compatible with version 2.13.4 or higher, but depends on version 2.19.4 by default. The SDK throws an exception if it detects an incompatible Jackson version at runtime (for example, if the default version was overridden in your Maven or Gradle config).
You can access most beta API features through the `beta()` method on the client. To enable a particular beta feature, add the appropriate [beta header](https://platform.claude.com/docs/en/api/beta-headers) with `.addBeta()` when building the message params. -For example, to use the [Files API](https://platform.claude.com/docs/en/build-with-claude/files): +For example, to enable [context editing](https://platform.claude.com/docs/en/build-with-claude/context-editing): ```java import com.anthropic.models.beta.AnthropicBeta; -import com.anthropic.models.beta.messages.BetaContentBlockParam; import com.anthropic.models.beta.messages.BetaMessage; -import com.anthropic.models.beta.messages.BetaRequestDocumentBlock; -import com.anthropic.models.beta.messages.BetaTextBlockParam; import com.anthropic.models.beta.messages.MessageCreateParams; // ... void main() {
MessageCreateParams.builder() .model(Model.CLAUDE_OPUS_5) .maxTokens(1024L) - .addBeta(AnthropicBeta.FILES_API_2025_04_14) - .addUserMessageOfBetaContentBlockParams(List.of( - BetaContentBlockParam.ofText( - BetaTextBlockParam.builder() - .text("Please summarize this document for me.") - .build()), - BetaContentBlockParam.ofDocument( - BetaRequestDocumentBlock.builder() - .fileSource("file_abc123") - .build()))) + .addBeta(AnthropicBeta.CONTEXT_MANAGEMENT_2025_06_27) + .addUserMessage("Hello, Claude") .build()); } ```
cli-sdks-libraries/sdks/python Changed · +5 / -19 lines
client = Anthropic() # Upload using a file path -client.beta.files.upload( +client.files.upload( file=Path("/path/to/file"), ) # Upload using bytes -client.beta.files.upload( +client.files.upload( file=("file.txt", b"my bytes", "text/plain"), ) ```
You can access most beta API features through the `beta` property of the client. To enable a particular beta feature, you need to add the appropriate [beta header](https://platform.claude.com/docs/en/api/beta-headers) to the `betas` field when creating a message. -For example, to use the [Files API](https://platform.claude.com/docs/en/build-with-claude/files): +For example, to enable [context editing](https://platform.claude.com/docs/en/build-with-claude/context-editing): ```python client = Anthropic()
response = client.beta.messages.create( model="claude-opus-5", max_tokens=1024, - messages=[ - { - "role": "user", - "content": [ - {"type": "text", "text": "Please summarize this document for me."}, - { - "type": "document", - "source": { - "type": "file", - "file_id": "file_abc123", - }, - }, - ], - }, - ], - betas=["files-api-2025-04-14"], + messages=[{"role": "user", "content": "Hello, Claude"}], + betas=["context-management-2025-06-27"], ) ```
cli-sdks-libraries/sdks/ruby Changed · +3 / -3 lines
require "pathname" # Use `Pathname` to send the filename and/or avoid paging a large file into memory: -file_metadata = anthropic.beta.files.upload(file: Pathname("/path/to/file")) +file_metadata = anthropic.files.upload(file: Pathname("/path/to/file")) # Alternatively, pass file contents or a `StringIO` directly: -file_metadata = anthropic.beta.files.upload(file: File.read("/path/to/file")) +file_metadata = anthropic.files.upload(file: File.read("/path/to/file")) # Or, to control the filename and/or content type: file = Anthropic::FilePart.new(File.read("/path/to/file"), filename: "/path/to/file", content_type: "...") -file_metadata = anthropic.beta.files.upload(file: file) +file_metadata = anthropic.files.upload(file: file) puts(file_metadata.id) ```
cli-sdks-libraries/sdks/typescript Changed · +9 / -23 lines
// Upload MCP resources as files const fileResource = await mcpClient.readResource({ uri: "file:///path/to/data.json" }); -await anthropic.beta.files.upload({ file: mcpResourceToFile(fileResource) }); +await anthropic.files.upload({ file: mcpResourceToFile(fileResource) }); ``` ### MCP error handling
const client = new Anthropic(); // If you have access to Node `fs`, use `fs.createReadStream()`: -await client.beta.files.upload({ +await client.files.upload({ file: await toFile(fs.createReadStream("/path/to/file"), undefined, { type: "application/json" })
}); // Or if you have the web `File` API you can pass a `File` instance: -await client.beta.files.upload({ +await client.files.upload({ file: new File(["my bytes"], "file.txt", { type: "text/plain" }) }); // You can also pass a `fetch` `Response`: -await client.beta.files.upload({ +await client.files.upload({ file: await fetch("https://somesite/file") }); // Or a `Buffer` / `Uint8Array` -await client.beta.files.upload({ +await client.files.upload({ file: await toFile(Buffer.from("my bytes"), "file", { type: "text/plain" }) }); -await client.beta.files.upload({ +await client.files.upload({ file: await toFile(new Uint8Array([0, 1, 2]), "file", { type: "text/plain" }) }); ```
You can access most beta API features through the beta property of the client. To enable a particular beta feature, you need to add the appropriate [beta header](https://platform.claude.com/docs/en/api/beta-headers) to the `betas` field when creating a message. -For example, to use the [Files API](https://platform.claude.com/docs/en/build-with-claude/files): +For example, to enable [context editing](https://platform.claude.com/docs/en/build-with-claude/context-editing): ```typescript const client = new Anthropic();
const response = await client.beta.messages.create({ model: "claude-opus-5", max_tokens: 1024, - messages: [ - { - role: "user", - content: [ - { type: "text", text: "Please summarize this document for me." }, - { - type: "document", - source: { - type: "file", - file_id: "file_abc123" - } - } - ] - } - ], - betas: ["files-api-2025-04-14"] + messages: [{ role: "user", content: "Hello, Claude" }], + betas: ["context-management-2025-06-27"] }); ```
manage-claude/user-management Changed · +9 / -20 lines
This page covers managing the people in your **Claude Enterprise** (claude.ai) organization programmatically, using the [Admin API](https://platform.claude.com/docs/en/api/admin): list members and look them up by email address, change a member's role, remove members, send and withdraw invites, manage your enterprise's groups and their membership, and read your organization's custom roles. For Claude Console (Claude Platform) organizations, see the [Admin API guide for Claude Console](https://platform.claude.com/docs/en/manage-claude/admin-api). <Note> - **The endpoints on this page are generally available for Claude Enterprise organizations.** The [beta header](https://platform.claude.com/docs/en/api/beta-headers) `anthropic-beta: ce-user-management-2026-07-13` is no longer required on group and custom-role requests; requests that still send it are accepted and behave identically. The group and custom-role examples on this page still send the header, which continues to work. + **The endpoints on this page are generally available for Claude Enterprise organizations.** The [beta header](https://platform.claude.com/docs/en/api/beta-headers) `anthropic-beta: ce-user-management-2026-07-13` is no longer required on group and custom-role requests; requests that still send it are accepted and behave identically. </Note> ## Which endpoints can your organization use?
```bash cURL curl "https://api.anthropic.com/v1/organizations/rbac_groups?limit=20" \ - -H "x-api-key: $ANTHROPIC_ADMIN_KEY" \ - -H "anthropic-beta: ce-user-management-2026-07-13" + -H "x-api-key: $ANTHROPIC_ADMIN_KEY" ``` ```json
```bash cURL curl "https://api.anthropic.com/v1/organizations/rbac_groups/rbac_group_01UvWxYzAbCdEfGhIjKlMn" \ - -H "x-api-key: $ANTHROPIC_ADMIN_KEY" \ - -H "anthropic-beta: ce-user-management-2026-07-13" + -H "x-api-key: $ANTHROPIC_ADMIN_KEY" ``` ### Create a group
curl -X POST "https://api.anthropic.com/v1/organizations/rbac_groups" \ -H "content-type: application/json" \ -H "x-api-key: $ANTHROPIC_ADMIN_KEY" \ - -H "anthropic-beta: ce-user-management-2026-07-13" \ -d '{"name": "Engineering"}' ```
curl -X POST "https://api.anthropic.com/v1/organizations/rbac_groups/rbac_group_01UvWxYzAbCdEfGhIjKlMn" \ -H "content-type: application/json" \ -H "x-api-key: $ANTHROPIC_ADMIN_KEY" \ - -H "anthropic-beta: ce-user-management-2026-07-13" \ -d '{"name": "Platform Engineering"}' ```
```bash cURL curl -X DELETE "https://api.anthropic.com/v1/organizations/rbac_groups/rbac_group_01UvWxYzAbCdEfGhIjKlMn" \ - -H "x-api-key: $ANTHROPIC_ADMIN_KEY" \ - -H "anthropic-beta: ce-user-management-2026-07-13" + -H "x-api-key: $ANTHROPIC_ADMIN_KEY" ``` ```json
```bash cURL curl "https://api.anthropic.com/v1/organizations/rbac_groups/rbac_group_01UvWxYzAbCdEfGhIjKlMn/members?limit=100" \ - -H "x-api-key: $ANTHROPIC_ADMIN_KEY" \ - -H "anthropic-beta: ce-user-management-2026-07-13" + -H "x-api-key: $ANTHROPIC_ADMIN_KEY" ``` ```json
curl -X POST "https://api.anthropic.com/v1/organizations/rbac_groups/rbac_group_01UvWxYzAbCdEfGhIjKlMn/members" \ -H "content-type: application/json" \ -H "x-api-key: $ANTHROPIC_ADMIN_KEY" \ - -H "anthropic-beta: ce-user-management-2026-07-13" \ -d '{"user_id": "user_01AbCdEfGhIjKlMnOpQrSt"}' ```
```bash cURL curl -X DELETE "https://api.anthropic.com/v1/organizations/rbac_groups/rbac_group_01UvWxYzAbCdEfGhIjKlMn/members/user_01AbCdEfGhIjKlMnOpQrSt" \ - -H "x-api-key: $ANTHROPIC_ADMIN_KEY" \ - -H "anthropic-beta: ce-user-management-2026-07-13" + -H "x-api-key: $ANTHROPIC_ADMIN_KEY" ``` ```json
```bash cURL curl "https://api.anthropic.com/v1/organizations/rbac_roles?limit=20" \ - -H "x-api-key: $ANTHROPIC_ADMIN_KEY" \ - -H "anthropic-beta: ce-user-management-2026-07-13" + -H "x-api-key: $ANTHROPIC_ADMIN_KEY" ``` ```json
```bash cURL curl "https://api.anthropic.com/v1/organizations/rbac_roles/rbac_role_01CdEfGhIjKlMnOpQrStUv" \ - -H "x-api-key: $ANTHROPIC_ADMIN_KEY" \ - -H "anthropic-beta: ce-user-management-2026-07-13" + -H "x-api-key: $ANTHROPIC_ADMIN_KEY" ``` ### List a role's permissions
```bash cURL curl "https://api.anthropic.com/v1/organizations/rbac_roles/rbac_role_01CdEfGhIjKlMnOpQrStUv/permissions?limit=20" \ - -H "x-api-key: $ANTHROPIC_ADMIN_KEY" \ - -H "anthropic-beta: ce-user-management-2026-07-13" + -H "x-api-key: $ANTHROPIC_ADMIN_KEY" ``` ```json
managed-agents/agent-setup Changed · +51 / -26 lines
AGENT_VERSION=$(jq -r '.version' <<< "$agent") ``` - ```bash CLI - agent=$(ant beta:agents create \ - --name "Coding Assistant" \ - --model '{id: claude-opus-5}' \ - --system "You are a helpful coding agent." \ - --tool '{type: agent_toolset_20260401}' \ - --format json) + <MultiFileExample language="cli" label="CLI"> + ```bash CLI + agent=$(ant beta:agents create --format json < coding-assistant.agent.yaml) - AGENT_ID=$(jq -r '.id' <<< "$agent") - AGENT_VERSION=$(jq -r '.version' <<< "$agent") - ``` + AGENT_ID=$(jq -r '.id' <<< "$agent") + ``` + <File filename="coding-assistant.agent.yaml"> + ```yaml + name: Coding Assistant + model: + id: claude-opus-5 + system: You are a helpful coding agent. + tools: + - type: agent_toolset_20260401 + ``` + </File> + </MultiFileExample> + ```python Python agent = client.beta.agents.create( name="Coding Assistant",
echo "Inference geo: $(jq -r '.model.inference_geo' <<< "$agent")" ``` - ```bash CLI - agent=$(ant beta:agents create \ - --name "Geo-pinned assistant" \ - --model '{id: claude-opus-5, inference_geo: us}' \ - --system "You are a helpful assistant." \ - --format json) + <MultiFileExample language="cli" label="CLI"> + ```bash CLI + agent=$(ant beta:agents create --format json < geo-pinned.agent.yaml) - echo "Inference geo: $(jq -r '.model.inference_geo' <<< "$agent")" - ``` + echo "Inference geo: $(jq -r '.model.inference_geo' <<< "$agent")" + ``` + <File filename="geo-pinned.agent.yaml"> + ```yaml + name: Geo-pinned assistant + model: + id: claude-opus-5 + inference_geo: us + system: You are a helpful assistant. + ``` + </File> + </MultiFileExample> + ```python Python agent = client.beta.agents.create( name="Geo-pinned assistant",
echo "New version: $(jq -r '.version' <<< "$updated_agent")" ``` - ```bash CLI - ant beta:agents update \ - --agent-id "$AGENT_ID" \ - --version "$AGENT_VERSION" \ - --system "You are a helpful coding agent. Always write tests." - ``` + <MultiFileExample language="cli" label="CLI"> + ```bash CLI + ant beta:agents update --agent-id "$AGENT_ID" < coding-assistant.agent.yaml + ``` + + <File filename="coding-assistant.agent.yaml"> + ```yaml + name: Coding Assistant + model: + id: claude-opus-5 + system: You are a helpful coding agent. Always write tests. + tools: + - type: agent_toolset_20260401 + ``` + </File> + </MultiFileExample> ```python Python updated_agent = client.beta.agents.update(
managed-agents/define-outcomes Changed · +17 / -17 lines
``` ```bash CLI - RUBRIC_ID=$(ant beta:files upload \ + RUBRIC_ID=$(ant files upload \ --file /tmp/rubric.md \ --transform id --raw-output) ```
""" Path("/tmp/rubric.md").write_text(RUBRIC) - rubric = client.beta.files.upload(file=Path("/tmp/rubric.md")) + rubric = client.files.upload(file=Path("/tmp/rubric.md")) print(f"Uploaded rubric: {rubric.id}") ```
`; await writeFile("/tmp/rubric.md", RUBRIC); - const rubric = await client.beta.files.upload({ + const rubric = await client.files.upload({ file: await toFile(readFile("/tmp/rubric.md"), "/tmp/rubric.md"), }); console.log(`Uploaded rubric: ${rubric.id}`);
using Anthropic; using Anthropic.Models.Beta.Agents; using Anthropic.Models.Beta.Environments; - using Anthropic.Models.Beta.Files; using Anthropic.Models.Beta.Sessions; using Anthropic.Models.Beta.Sessions.Events; + using Anthropic.Models.Files; var client = new AnthropicClient();
"""; await File.WriteAllTextAsync("/tmp/rubric.md", Rubric); - var rubric = await client.Beta.Files.Upload(new() + var rubric = await client.Files.Upload(new() { File = File.OpenRead("/tmp/rubric.md"), });
panic(err) } - uploaded, err := client.Beta.Files.Upload(ctx, anthropic.BetaFileUploadParams{ + uploaded, err := client.Files.Upload(ctx, anthropic.FileUploadParams{ File: anthropic.File(f, "rubric.md", "text/markdown"), }) if err != nil {
import com.anthropic.models.beta.environments.BetaCloudConfigParams; import com.anthropic.models.beta.environments.EnvironmentCreateParams; import com.anthropic.models.beta.files.FileListParams; - import com.anthropic.models.beta.files.FileUploadParams; import com.anthropic.models.beta.sessions.SessionCreateParams; import com.anthropic.models.beta.sessions.events.BetaManagedAgentsTextRubricParams; import com.anthropic.models.beta.sessions.events.BetaManagedAgentsUserDefineOutcomeEventParams; import com.anthropic.models.beta.sessions.events.BetaManagedAgentsUserInterruptEventParams; import com.anthropic.models.beta.sessions.events.EventSendParams; + import com.anthropic.models.files.FileUploadParams; import java.io.InputStream; import java.nio.file.Files;
"""; Files.writeString(Path.of("/tmp/rubric.md"), RUBRIC); - var rubric = client.beta().files().upload( + var rubric = client.files().upload( FileUploadParams.builder() .file(Path.of("/tmp/rubric.md")) .build());
MD File.write("/tmp/rubric.md", RUBRIC) - rubric = client.beta.files.upload(file: Pathname.new("/tmp/rubric.md")) + rubric = client.files.upload(file: Pathname.new("/tmp/rubric.md")) puts "Uploaded rubric: #{rubric.id}" ``` </CodeGroup>
The agent writes output files to `/mnt/session/outputs/` inside the sandbox. Once the session is idle, fetch them through the [Files API](https://platform.claude.com/docs/en/build-with-claude/files) scoped to the session. <Note> - Filtering by `scope_id` requires the `managed-agents-2026-04-01` beta header on the files request. The SDK files methods send only the files beta automatically, so the examples pass it explicitly. + Filtering by `scope_id` requires the `managed-agents-2026-04-01` beta header on the list request, so the SDK and CLI examples make that call through the `beta` namespace and pass the header explicitly. Downloading a file by ID needs no beta header. </Note> <CodeGroup>
--beta managed-agents-2026-04-01 \ --transform 'data[0].id' --raw-output) if [[ -n $FILE_ID ]]; then - ant beta:files download --file-id "$FILE_ID" --output /tmp/output.txt + ant files download --file-id "$FILE_ID" --output /tmp/output.txt fi ```
# Download a file if files.data: - content = client.beta.files.download(files.data[0].id) + content = client.files.download(files.data[0].id) content.write_to_file("/tmp/output.txt") ```
// Download a file if (files.data.length > 0) { - const content = await client.beta.files.download(files.data[0].id); + const content = await client.files.download(files.data[0].id); await writeFile("/tmp/output.txt", new Uint8Array(await content.arrayBuffer())); } ```
// Download a file if (files.Items.Count > 0) { - using var download = await client.Beta.Files.Download(files.Items[0].ID); + using var download = await client.Files.Download(files.Items[0].ID); await using var output = File.Create("/tmp/output.txt"); await (await download.ReadAsStream()).CopyToAsync(output); }
// Download a file if len(files.Data) > 0 { - resp, err := client.Beta.Files.Download(ctx, files.Data[0].ID, anthropic.BetaFileDownloadParams{}) + resp, err := client.Files.Download(ctx, files.Data[0].ID) if err != nil { panic(err) }
// Download a file if (!files.data().isEmpty()) { - try (HttpResponse response = client.beta().files().download(files.data().getFirst().id())) { + try (HttpResponse response = client.files().download(files.data().getFirst().id())) { try (InputStream body = response.body()) { Files.copy(body, Path.of("/tmp/output.txt"), StandardCopyOption.REPLACE_EXISTING); }
# Download a file if (first = files.data.first) - content = client.beta.files.download(first.id) + content = client.files.download(first.id) File.binwrite("/tmp/output.txt", content.read) end ```
managed-agents/environments Changed · +56 / -34 lines
echo "Environment ID: $environment_id" ``` - ```bash CLI - ant beta:environments create \ - --name "python-dev" \ - --config '{type: cloud, networking: {type: unrestricted}}' - ``` + <MultiFileExample language="cli" label="CLI"> + ```bash CLI + ant beta:environments create < python-dev.environment.yaml + ``` + <File filename="python-dev.environment.yaml"> + ```yaml + name: python-dev + config: + type: cloud + networking: + type: unrestricted + ``` + </File> + </MultiFileExample> + ```python Python environment = client.beta.environments.create( name="python-dev",
) ``` - ```bash CLI - ant beta:environments create <<'YAML' - name: data-analysis - config: - type: cloud - packages: - pip: - - pandas - - numpy - - scikit-learn - npm: - - express - networking: - type: unrestricted - YAML - ``` + <MultiFileExample language="cli" label="CLI"> + ```bash CLI + ant beta:environments create < environment.yaml + ``` + <File filename="environment.yaml"> + ```yaml + name: data-analysis + config: + type: cloud + packages: + pip: + - pandas + - numpy + - scikit-learn + npm: + - express + networking: + type: unrestricted + ``` + </File> + </MultiFileExample> + ```python Python environment = client.beta.environments.create( name="data-analysis",
}' ``` - ```bash CLI - ant beta:environments create <<'YAML' - name: api-access - config: - type: cloud - networking: - type: limited - allowed_hosts: - - api.example.com - allow_mcp_servers: true - allow_package_managers: true - YAML - ``` + <MultiFileExample language="cli" label="CLI"> + ```bash CLI + ant beta:environments create < environment.yaml + ``` + + <File filename="environment.yaml"> + ```yaml + name: api-access + config: + type: cloud + networking: + type: limited + allowed_hosts: + - api.example.com + allow_mcp_servers: true + allow_package_managers: true + ``` + </File> + </MultiFileExample> ```python Python environment = client.beta.environments.create(
managed-agents/files Changed · +21 / -19 lines
``` ```bash CLI - FILE_ID=$(ant beta:files upload \ + FILE_ID=$(ant files upload \ --file data.csv \ --transform id --raw-output) ``` ```python Python - file = client.beta.files.upload(file=Path("data.csv")) + file = client.files.upload(file=Path("data.csv")) print(f"File ID: {file.id}") ``` ```typescript TypeScript - const file = await client.beta.files.upload({ + const file = await client.files.upload({ file: await toFile(readFile("data.csv"), "data.csv", { type: "text/csv" }), }); console.log(`File ID: ${file.id}`);
```csharp C# await using var stream = File.OpenRead(csvPath); - var file = await client.Beta.Files.Upload(new() { File = stream }); + var file = await client.Files.Upload(new() { File = stream }); Console.WriteLine($"File ID: {file.ID}"); ```
} defer csvFile.Close() - file, err := client.Beta.Files.Upload(ctx, anthropic.BetaFileUploadParams{ + file, err := client.Files.Upload(ctx, anthropic.FileUploadParams{ File: csvFile, }) if err != nil {
``` ```java Java - var file = client.beta().files().upload( + var file = client.files().upload( FileUploadParams.builder().file(dataCsv).build() ); IO.println("File ID: " + file.id());
``` ```ruby Ruby - file = client.beta.files.upload(file: Pathname(csv_path)) + file = client.files.upload(file: Pathname(csv_path)) puts "File ID: #{file.id}" ``` </CodeGroup>
## Listing and downloading session files -Use the [Files API](https://platform.claude.com/docs/en/build-with-claude/files) to list files scoped to a session and download them. +Use the [Files API](https://platform.claude.com/docs/en/build-with-claude/files) to list files scoped to a session and download them. Filtering by `scope_id` requires the `managed-agents-2026-04-01` beta header, so the list examples use the `beta` files namespace and pass that header explicitly. Downloading a file doesn't require a beta header. <CodeGroup> ```bash cURL
curl -fsSL "https://api.anthropic.com/v1/files/$FILE_ID/content" \ -H "x-api-key: $ANTHROPIC_API_KEY" \ -H "anthropic-version: 2023-06-01" \ - -H "anthropic-beta: managed-agents-2026-04-01" \ -o output.txt ```
--beta managed-agents-2026-04-01 # Download a file - ant beta:files download --file-id "$FILE_ID" --output output.txt + ant files download --file-id "$FILE_ID" --output output.txt ``` ```python Python
print(file.id, file.filename) # Download a file - content = client.beta.files.download(files.data[0].id) + content = client.files.download(files.data[0].id) content.write_to_file("output.txt") ``` ```typescript TypeScript + import { writeFile } from "node:fs/promises"; + // List files associated with a session const files = await client.beta.files.list({ scope_id: "sesn_abc123",
} // Download a file - const content = await client.beta.files.download(files.data[0].id); - await content.writeToFile("output.txt"); + const content = await client.files.download(files.data[0].id); + await writeFile("output.txt", new Uint8Array(await content.arrayBuffer())); ``` ```csharp C# // List files associated with a session - var files = await client.Beta.Files.List(new FileListParams + var files = await client.Beta.Files.List(new() { ScopeID = "sesn_abc123", Betas = ["managed-agents-2026-04-01"],
}); // Download a file - byte[] content = await client.Beta.Files.Download(files.Data[0].ID); - await File.WriteAllBytesAsync("output.txt", content); + using var content = await client.Files.Download(files.Items[0].ID); + await using var output = File.Create("output.txt"); + await (await content.ReadAsStream()).CopyToAsync(output); ``` ```go Go
} // Download a file - resp, err := client.Beta.Files.Download(ctx, files.Data[0].ID, anthropic.BetaFileDownloadParams{}) + resp, err := client.Files.Download(ctx, files.Data[0].ID) if err != nil { panic(err) }
.build()); // Download a file - try (HttpResponse response = client.beta().files().download(files.data().get(0).id())) { + try (HttpResponse response = client.files().download(files.data().get(0).id())) { try (InputStream body = response.body()) { Files.copy(body, Path.of("output.txt"), StandardCopyOption.REPLACE_EXISTING); }
) # Download a file - content = client.beta.files.download(files.data[0].id) + content = client.files.download(files.data[0].id) File.binwrite("output.txt", content.read) ``` </CodeGroup>
managed-agents/github Changed · +22 / -10 lines
) ``` - ```bash CLI - AGENT_ID=$(ant beta:agents create \ - --name "Code Reviewer" \ - --model '{id: claude-opus-5}' \ - --system "You are a code review assistant with access to GitHub." \ - --mcp-server '{type: url, name: github, url: https://api.githubcopilot.com/mcp/}' \ - --tool '{type: agent_toolset_20260401}' \ - --tool '{type: mcp_toolset, mcp_server_name: github}' \ - --transform id --raw-output) - ``` + <MultiFileExample language="cli" label="CLI"> + ```bash CLI + AGENT_ID=$(ant beta:agents create --transform id --raw-output < code-reviewer.agent.yaml) + ``` + + <File filename="code-reviewer.agent.yaml"> + ```yaml + name: Code Reviewer + model: + id: claude-opus-5 + system: You are a code review assistant with access to GitHub. + mcp_servers: + - type: url + name: github + url: https://api.githubcopilot.com/mcp/ + tools: + - type: agent_toolset_20260401 + - type: mcp_toolset + mcp_server_name: github + ``` + </File> + </MultiFileExample> ```python Python agent = client.beta.agents.create(
managed-agents/mcp-connector Changed · +21 / -9 lines
agent_id=$(jq -r '.id' <<<"$agent_response") ``` - ```bash CLI - AGENT_ID=$(ant beta:agents create \ - --name "GitHub Assistant" \ - --model '{id: claude-opus-5}' \ - --mcp-server '{type: url, name: github, url: "https://api.githubcopilot.com/mcp/"}' \ - --tool '{type: agent_toolset_20260401}' \ - --tool '{type: mcp_toolset, mcp_server_name: github}' \ - --transform id --raw-output) - ``` + <MultiFileExample language="cli" label="CLI"> + ```bash CLI + AGENT_ID=$(ant beta:agents create --transform id --raw-output < github-assistant.agent.yaml) + ``` + + <File filename="github-assistant.agent.yaml"> + ```yaml + name: GitHub Assistant + model: + id: claude-opus-5 + mcp_servers: + - type: url + name: github + url: https://api.githubcopilot.com/mcp/ + tools: + - type: agent_toolset_20260401 + - type: mcp_toolset + mcp_server_name: github + ``` + </File> + </MultiFileExample> ```python Python agent = client.beta.agents.create(
managed-agents/migration Changed · +49 / -32 lines
kill "${stream_pid}" 2>/dev/null || true ``` - ```bash CLI - { read -r _ agent_id; read -r _ agent_version; } < <(ant beta:agents create \ - --name "Task Runner" \ - --model claude-opus-5 \ - --tool '{type: agent_toolset_20260401}' \ - --transform '{id,version}' --format yaml) + <MultiFileExample language="cli" label="CLI"> + ```bash CLI + { read -r _ agent_id; read -r _ agent_version; } < <(ant beta:agents create \ + --transform '{id,version}' --format yaml < task-runner.agent.yaml) - session_id=$(ant beta:sessions create \ - --agent "{type: agent, id: $agent_id, version: $agent_version}" \ - --environment-id "$environment_id" \ - --transform id --raw-output) + session_id=$(ant beta:sessions create \ + --agent "{type: agent, id: $agent_id, version: $agent_version}" \ + --environment-id "$environment_id" \ + --transform id --raw-output) - # Open the stream first, then send the user message - exec {stream}< <(ant beta:sessions:events stream \ - --session-id "$session_id" \ - --transform type --raw-output) + # Open the stream first, then send the user message + exec {stream}< <(ant beta:sessions:events stream \ + --session-id "$session_id" \ + --transform type --raw-output) - ant beta:sessions:events send \ - --session-id "$session_id" \ - --event "{type: user.message, content: [{type: text, text: \"$task\"}]}" \ - > /dev/null + ant beta:sessions:events send \ + --session-id "$session_id" \ + --event "{type: user.message, content: [{type: text, text: \"$task\"}]}" \ + > /dev/null - # Wait for the session to go idle (grep exits at the first match) - grep -m1 -x 'session.status_idle' <&"$stream" > /dev/null - exec {stream}<&- - ``` + # Wait for the session to go idle (grep exits at the first match) + grep -m1 -x 'session.status_idle' <&"$stream" > /dev/null + exec {stream}<&- + ``` + <File filename="task-runner.agent.yaml"> + ```yaml + name: Task Runner + model: claude-opus-5 + tools: + - type: agent_toolset_20260401 + ``` + </File> + </MultiFileExample> + ```python Python agent = client.beta.agents.create( name="Task Runner",
--json "$(jq -n --argjson version "$AGENT_VERSION" '{version: $version, model: "claude-opus-5"}')" ``` - ```bash CLI - ant beta:agents update \ - --agent-id "$AGENT_ID" \ - --version "$AGENT_VERSION" \ - --model claude-opus-5 - ``` + <MultiFileExample language="cli" label="CLI"> + ```bash CLI + ant beta:agents update --agent-id "$AGENT_ID" < agent.yaml + ``` + + <File filename="agent.yaml"> + ```yaml + name: Task Runner + model: claude-opus-5 + system: You are a task automation agent. Complete the task you are given end to end. + tools: + - type: agent_toolset_20260401 + ``` + </File> + </MultiFileExample> ```python Python client.beta.agents.update(
agents-and-tools/tool-use/define-tools Changed · +2 / -2 lines
if err != nil { log.Fatal(err) } - fmt.Println(response) + fmt.Println(response.RawJSON()) ``` ```java Java
if err != nil { log.Fatal(err) } - fmt.Println(response) + fmt.Println(response.RawJSON()) ``` ```java Java
managed-agents/multiagent-orchestration Changed · +66 / -50 lines
) ``` - ```bash CLI - ant beta:agents create <<YAML - name: Engineering Lead - model: claude-opus-5 - system: You coordinate engineering work. Delegate code review to the reviewer agent and test writing to the test agent. - tools: - - type: agent_toolset_20260401 - multiagent: - type: coordinator - agents: - - type: agent - id: $REVIEWER_AGENT_ID - - type: agent - id: $TEST_WRITER_AGENT_ID - YAML - ``` + <MultiFileExample language="cli" label="CLI"> + ```bash CLI + ant beta:agents create < coordinator.agent.yaml + ``` + <File filename="coordinator.agent.yaml"> + ```yaml + name: Engineering Lead + model: claude-opus-5 + system: You coordinate engineering work. Delegate code review to the reviewer agent and test writing to the test agent. + tools: + - type: agent_toolset_20260401 + multiagent: + type: coordinator + agents: + - type: agent + id: $REVIEWER_AGENT_ID # replace before running command + - type: agent + id: $TEST_WRITER_AGENT_ID # replace before running command + ``` + </File> + </MultiFileExample> + ```python Python coordinator = client.beta.agents.create( name="Engineering Lead",
echo "$session_id" ``` - ```bash CLI - research_agent_id=$(ant beta:agents create --transform id --raw-output <<YAML - name: researcher - model: claude-haiku-4-5 - mcp_servers: - - type: url - name: github - url: https://api.githubcopilot.com/mcp/ - tools: - - type: mcp_toolset - mcp_server_name: github - YAML - ) + <MultiFileExample language="cli" label="CLI"> + ```bash CLI + research_agent_id=$(ant beta:agents create --transform id --raw-output < researcher.agent.yaml) + ``` - coordinator_id=$(ant beta:agents create --transform id --raw-output <<YAML - name: coordinator - model: claude-opus-5 - tools: - - type: agent_toolset_20260401 - multiagent: - type: coordinator - agents: - - type: agent - id: $research_agent_id - YAML - ) + <File filename="researcher.agent.yaml"> + ```yaml + name: researcher + model: claude-haiku-4-5 + mcp_servers: + - type: url + name: github + url: https://api.githubcopilot.com/mcp/ + tools: + - type: mcp_toolset + mcp_server_name: github + ``` + </File> - session_id=$(ant beta:sessions create \ - --agent "$coordinator_id" \ - --environment-id "$environment_id" \ - --vault-id "$vault_id" \ - --transform id --raw-output) - echo "$session_id" - ``` + <File filename="subagent-coordinator.agent.yaml"> + ```yaml + name: coordinator + model: claude-opus-5 + tools: + - type: agent_toolset_20260401 + multiagent: + type: coordinator + agents: + - type: agent + id: $research_agent_id # replace before running command + ``` + </File> + + ```bash CLI + coordinator_id=$(ant beta:agents create --transform id --raw-output < subagent-coordinator.agent.yaml) + + session_id=$(ant beta:sessions create \ + --agent "$coordinator_id" \ + --environment-id "$environment_id" \ + --vault-id "$vault_id" \ + --transform id --raw-output) + echo "$session_id" + ``` + </MultiFileExample> ```python Python research_agent = client.beta.agents.create(
managed-agents/permission-policies Changed · +42 / -30 lines
}') ``` - ```bash CLI - ant beta:agents create <<'YAML' - name: Coding Assistant - model: claude-opus-5 - tools: - - type: agent_toolset_20260401 - default_config: - permission_policy: - type: always_ask - YAML - ``` + <MultiFileExample language="cli" label="CLI"> + ```bash CLI + ant beta:agents create < agent.yaml + ``` + <File filename="agent.yaml"> + ```yaml + name: Coding Assistant + model: claude-opus-5 + tools: + - type: agent_toolset_20260401 + default_config: + permission_policy: + type: always_ask + ``` + </File> + </MultiFileExample> + ```python Python agent = client.beta.agents.create( name="Coding Assistant",
}') ``` - ```bash CLI - ant beta:agents create <<'YAML' - name: Dev Assistant - model: claude-opus-5 - mcp_servers: - - type: url - name: github - url: https://mcp.example.com/github - tools: - - type: agent_toolset_20260401 - - type: mcp_toolset - mcp_server_name: github - default_config: - permission_policy: - type: always_allow - YAML - ``` + <MultiFileExample language="cli" label="CLI"> + ```bash CLI + ant beta:agents create < agent.yaml + ``` + <File filename="agent.yaml"> + ```yaml + name: Dev Assistant + model: claude-opus-5 + mcp_servers: + - type: url + name: github + url: https://mcp.example.com/github + tools: + - type: agent_toolset_20260401 + - type: mcp_toolset + mcp_server_name: github + default_config: + permission_policy: + type: always_allow + ``` + </File> + </MultiFileExample> + ```python Python agent = client.beta.agents.create( name="Dev Assistant",
}, }, }, - Configs: []anthropic.BetaManagedAgentsAgentToolConfigUnionParamsUnion{{ - OfBetaManagedAgentsBashToolConfigs: &anthropic.BetaManagedAgentsBashToolConfigParams{ + Configs: []anthropic.BetaManagedAgentsAgentToolConfigParamsUnion{{ + OfBash: &anthropic.BetaManagedAgentsBashToolConfigParams{ PermissionPolicy: anthropic.BetaManagedAgentsBashToolConfigParamsPermissionPolicyUnion{ OfAlwaysAsk: &anthropic.BetaManagedAgentsAlwaysAskPolicyParam{ Type: anthropic.BetaManagedAgentsAlwaysAskPolicyTypeAlwaysAsk,
managed-agents/quickstart Changed · +37 / -20 lines
For Linux environments, download the release binary directly. ```bash - VERSION=1.22.1 + VERSION=1.26.1 OS=$(uname -s | tr '[:upper:]' '[:lower:]') case $(uname -m) in x86_64) ARCH=amd64 ;;
<Tab title="Java"> ```groovy Gradle - implementation("com.anthropic:anthropic-java:2.53.0") + implementation("com.anthropic:anthropic-java:2.57.0") ``` </Tab>
echo "Agent ID: $AGENT_ID, version: $AGENT_VERSION" ``` - ```bash CLI - AGENT_ID=$(ant beta:agents create \ - --name "Coding Assistant" \ - --model '{id: claude-opus-5}' \ - --system "You are a helpful coding assistant. Write clean, well-documented code." \ - --tool '{type: agent_toolset_20260401}' \ - --transform id --raw-output) + <MultiFileExample language="cli" label="CLI"> + ```bash CLI + AGENT_ID=$(ant beta:agents create --transform id --raw-output < coding-assistant.agent.yaml) - echo "Agent ID: $AGENT_ID" - ``` + echo "Agent ID: $AGENT_ID" + ``` + <File filename="coding-assistant.agent.yaml"> + ```yaml + name: Coding Assistant + model: + id: claude-opus-5 + system: You are a helpful coding assistant. Write clean, well-documented code. + tools: + - type: agent_toolset_20260401 + ``` + </File> + </MultiFileExample> + ```python Python from anthropic import Anthropic
echo "Environment ID: $ENVIRONMENT_ID" ``` - ```bash CLI - ENVIRONMENT_ID=$(ant beta:environments create \ - --name "quickstart-env" \ - --config '{type: cloud, networking: {type: unrestricted}}' \ - --transform id --raw-output) + <MultiFileExample language="cli" label="CLI"> + ```bash CLI + ENVIRONMENT_ID=$(ant beta:environments create --transform id --raw-output < quickstart.environment.yaml) - echo "Environment ID: $ENVIRONMENT_ID" - ``` + echo "Environment ID: $ENVIRONMENT_ID" + ``` + + <File filename="quickstart.environment.yaml"> + ```yaml + name: quickstart-env + config: + type: cloud + networking: + type: unrestricted + ``` + </File> + </MultiFileExample> ```python Python environment = client.beta.environments.create(
managed-agents/self-hosted-sandboxes Changed · +24 / -16 lines
}' ``` - ```bash CLI - ant beta:environments create \ - --name self-hosted \ - --config '{"type": "self_hosted"}' - ``` + <MultiFileExample language="cli" label="CLI"> + ```bash CLI + ant beta:environments create < environment.yaml + ``` + <File filename="environment.yaml"> + ```yaml + name: self-hosted + config: + type: self_hosted + ``` + </File> + </MultiFileExample> + ```python Python client = anthropic.Anthropic()
For Linux environments, download the release binary directly. ```bash - VERSION=1.22.1 + VERSION=1.26.1 OS=$(uname -s | tr '[:upper:]' '[:lower:]') case $(uname -m) in x86_64) ARCH=amd64 ;;
```text FROM your-base-image - ARG ANT_VERSION=1.22.1 + ARG ANT_VERSION=1.26.1 ARG TARGETARCH RUN ARCH=$([ "$TARGETARCH" = "arm64" ] && echo arm64 || echo amd64) && \ curl -fsSL "https://github.com/anthropics/anthropic-cli/releases/download/v${ANT_VERSION}/ant_${ANT_VERSION}_linux_${ARCH}.tar.gz" \
* `.run()`: runs indefinitely, picking up sessions as they arrive. * `.handle_item()`: handles a single claimed work item and exits. Pass the work, session, and environment identifiers explicitly, or let it read the `ANTHROPIC_*` variables that `ant beta:worker poll --on-work` sets for the process it spawns. To let the session mount its [memory stores](https://platform.claude.com/docs/en/managed-agents/self-hosted-sandboxes#use-memory-stores), also pass the work item's `secret` as `work_secret` (`workSecret` in TypeScript, `WorkSecret` in Go) or set `ANTHROPIC_WORK_SECRET`; `ant beta:worker poll --on-work` does not set that variable, so read the secret from the work item JSON it writes to your script's standard input, as shown in [Run one sandbox per session](https://platform.claude.com/docs/en/managed-agents/self-hosted-sandboxes#run-one-sandbox-per-session). - * `memory_sync_interval` (`memorySyncIntervalMs` in TypeScript, `MemorySyncInterval` in Go) and `memory_sync_deletes` (`memoryRemoteDeletes`, `MemorySyncDeletes`): how often attached memory stores reconcile with the server while the session runs, and whether files the agent deletes locally are also deleted from the store. See [Configure sync](https://platform.claude.com/docs/en/managed-agents/self-hosted-sandboxes#configure-sync) for units, defaults, and how to disable memory support. + * `memory_sync_interval` (`memorySyncIntervalMs` in TypeScript, `MemorySyncInterval` in Go) and `memory_sync_deletions` (`memorySyncDeletions`, `MemorySyncDeletions`): how often attached memory stores reconcile with the server while the session runs, and whether files the agent deletes locally are also deleted from the store. See [Configure sync](https://platform.claude.com/docs/en/managed-agents/self-hosted-sandboxes#configure-sync) for units, defaults, and how to disable memory support. * **`work.poller()`:** polls the work queue on your behalf and gives you each claimed session. Use this when you want to decide what happens for each session, for example launching a sandbox rather than running tools in-process.
Two `EnvironmentWorker` options control memory behavior: * **`memory_sync_interval`** (Python, in seconds; `memorySyncIntervalMs` in TypeScript, in milliseconds; `MemorySyncInterval` in Go, a duration): how often attached stores reconcile with the server while the session runs. Defaults to 15 seconds; the minimum is 5 seconds. A shorter interval narrows the window in which another session sees stale memories, at the cost of more memory store requests. `None` in Python, `null` in TypeScript, or a negative duration in Go disables memory support entirely: the worker neither downloads nor syncs stores, and a session with memory stores attached runs without them even though its system prompt still describes them, so disable memory support only on workers whose sessions attach no memory stores. While memory support is enabled, a work item that arrives without a per-session `secret` for a session with attached stores fails rather than running without memory (see [Troubleshoot memory mounts](https://platform.claude.com/docs/en/managed-agents/self-hosted-sandboxes#troubleshoot-memory-mounts)). -* **`memory_sync_deletes`** (`memoryRemoteDeletes` in TypeScript, `MemorySyncDeletes` in Go): whether a file the agent deletes locally is also deleted from the store. The value is one of `"enabled"` (the default), `"log_only"`, or `"disabled"` in Python and TypeScript, and one of the constants `environments.MemorySyncDeletesEnabled` (the zero value), `environments.MemorySyncDeletesLogOnly`, or `environments.MemorySyncDeletesDisabled` in Go. When enabled, the worker deletes the memory from the store once a later sync confirms the file is still gone; in log-only mode it runs the same checks but only logs what it would have deleted, which lets you watch what your workers would delete before you trust the enabled mode; when disabled, it never deletes from the store. Uploads and downloads are unaffected by this setting. +* **`memory_sync_deletions`** (`memorySyncDeletions` in TypeScript, `MemorySyncDeletions` in Go): whether a file the agent deletes locally is also deleted from the store. The value is one of `"enabled"` (the default), `"log_only"`, or `"disabled"` in Python and TypeScript, and one of the constants `environments.MemorySyncDeletionsEnabled` (the zero value), `environments.MemorySyncDeletionsLogOnly`, or `environments.MemorySyncDeletionsDisabled` in Go. When enabled, the worker deletes the memory from the store once a later sync confirms the file is still gone; in log-only mode it runs the same checks but only logs what it would have deleted, which lets you watch what your workers would delete before you trust the enabled mode; when disabled, it never deletes from the store. Uploads and downloads are unaffected by this setting. Set these options where you construct the worker, whether through the `EnvironmentWorker` constructor or, in Python and TypeScript, the `client.beta.environments.work.worker()` factory that the webhook handler uses.
environment_key=environment_key, workdir="/workspace", memory_sync_interval=10, # seconds - memory_sync_deletes="log_only", + memory_sync_deletions="log_only", ) ```
environmentKey, workdir: "/workspace", memorySyncIntervalMs: 10_000, - memorySyncDeletes: "log_only" + memorySyncDeletions: "log_only" }); ```
```go Go worker := environments.NewEnvironmentWorker(client, environments.EnvironmentWorkerOptions{ - EnvironmentID: environmentID, - EnvironmentKey: environmentKey, - Workdir: "/workspace", - MemorySyncInterval: 10 * time.Second, - MemorySyncDeletes: environments.MemorySyncDeletesLogOnly, + EnvironmentID: environmentID, + EnvironmentKey: environmentKey, + Workdir: "/workspace", + MemorySyncInterval: 10 * time.Second, + MemorySyncDeletions: environments.MemorySyncDeletionsLogOnly, }) ```
managed-agents/skills Changed · +40 / -35 lines
--- title: Skills url: https://platform.claude.com/docs/en/managed-agents/skills -description: Attach reusable, filesystem-based expertise to your agent for domain-specific workflows. +description: Attach pre-built or custom skills to an agent in Claude Managed Agents to give it reusable, filesystem-based expertise for domain-specific workflows. --- Skills are reusable, filesystem-based resources that give your agent domain-specific expertise: workflows, context, and best practices that turn a general-purpose agent into a specialist. Each skill you add incurs a modest cost on the session's context window, adding instructions and metadata that help the model use the skill. Learn more in the [Agent Skills](https://platform.claude.com/docs/en/agents-and-tools/agent-skills/overview) overview.
A custom skill is a directory containing a `SKILL.md` file plus any supporting files, uploaded to your workspace as a zip archive or as individual files. Creating the skill returns the `skill_*` ID you reference when attaching it to an agent. Anthropic pre-built skills are already available in every workspace and don't require this step. To use only pre-built skills, skip to [Attach skills to an agent](https://platform.claude.com/docs/en/managed-agents/skills#attach-skills-to-an-agent). -The Skills API doesn't require a beta header. The cURL example still sends `anthropic-beta: skills-2025-10-02`, and the CLI and SDK `beta` commands add it automatically; requests that include it continue to work unchanged. +The Skills API doesn't require a beta header. Requests that still send `anthropic-beta: skills-2025-10-02` keep working and return the earlier response fields. -These examples omit the optional `display_title` field, so the skill's title is derived from `SKILL.md`. An explicitly passed `display_title` must be unique among the custom skills in your workspace. +These examples omit the optional `display_name` field, so the skill's display name is derived from the `name` field in `SKILL.md`. An explicit `display_name` can be up to 255 characters and doesn't need to be unique within your workspace. <CodeGroup defaultLanguage="CLI"> ```bash cURL
curl -X POST "https://api.anthropic.com/v1/skills" \ -H "x-api-key: $ANTHROPIC_API_KEY" \ -H "anthropic-version: 2023-06-01" \ - -H "anthropic-beta: skills-2025-10-02" \ -F "files[]=@example_skill.zip" ``` ```bash CLI - ant beta:skills create \ + ant skills create \ --file example_skill.zip ```
client = anthropic.Anthropic() - skill = client.beta.skills.create( + skill = client.skills.create( files=files_from_dir("example_skill"), ) print(f"Created skill: {skill.id}") - print(f"Latest version: {skill.latest_version}") + print(f"Latest version: {skill.latest_version_id}") ``` ```typescript TypeScript
const client = new Anthropic(); - const skill = await client.beta.skills.create({ + const skill = await client.skills.create({ files: [await toFile(fs.createReadStream("example_skill.zip"), "example_skill.zip")] }); console.log(`Created skill: ${skill.id}`); - console.log(`Latest version: ${skill.latest_version}`); + console.log(`Latest version: ${skill.latest_version_id}`); ``` ```csharp C# using System.IO; using Anthropic; - using Anthropic.Models.Beta.Skills; + using Anthropic.Models.Skills; AnthropicClient client = new();
], }; - var skill = await client.Beta.Skills.Create(parameters); + var skill = await client.Skills.Create(parameters); Console.WriteLine($"Created skill: {skill.ID}"); - Console.WriteLine($"Latest version: {skill.LatestVersion}"); + Console.WriteLine($"Latest version: {skill.LatestVersionID}"); ``` ```go Go
} defer zipFile.Close() - skill, err := client.Beta.Skills.New(context.TODO(), anthropic.BetaSkillNewParams{ + skill, err := client.Skills.New(context.TODO(), anthropic.SkillNewParams{ Files: []io.Reader{zipFile}, }) if err != nil {
} fmt.Printf("Created skill: %s\n", skill.ID) - fmt.Printf("Latest version: %s\n", skill.LatestVersion) + fmt.Printf("Latest version: %s\n", skill.LatestVersionID) } ```
import com.anthropic.client.AnthropicClient; import com.anthropic.client.okhttp.AnthropicOkHttpClient; import com.anthropic.core.MultipartField; - import com.anthropic.models.beta.skills.SkillCreateParams; - import com.anthropic.models.beta.skills.SkillCreateResponse; + import com.anthropic.models.skills.Skill; + import com.anthropic.models.skills.SkillCreateParams; import java.io.IOException; import java.io.InputStream; import java.nio.file.Files;
.build()) .build(); - SkillCreateResponse skill = client.beta().skills().create(params); + Skill skill = client.skills().create(params); IO.println("Created skill: " + skill.id()); - IO.println("Latest version: " + skill.latestVersion().orElseThrow()); + IO.println("Latest version: " + skill.latestVersionId()); } ```
client = Anthropic::Client.new - skill = client.beta.skills.create( + skill = client.skills.create( files: [ File.open("example_skill.zip", "rb") ]
) puts "Created skill: #{skill.id}" - puts "Latest version: #{skill.latest_version}" + puts "Latest version: #{skill.latest_version_id}" ``` </CodeGroup> -To list, retrieve, delete, and version custom skills, see [Managing custom skills](https://platform.claude.com/docs/en/build-with-claude/skills-guide#managing-custom-skills). For the full request and response schemas, see the [Create Skill API reference](https://platform.claude.com/docs/en/api/beta/skills/create). Skill bundles upload directly to the Skills API rather than through the [Files API](https://platform.claude.com/docs/en/build-with-claude/files). +To list, retrieve, delete, and version custom skills, see [Managing custom skills](https://platform.claude.com/docs/en/build-with-claude/skills-guide#managing-custom-skills). For the full request and response schemas, see the [Create Skill API reference](https://platform.claude.com/docs/en/api/skills/create). Skill bundles upload directly to the Skills API rather than through the [Files API](https://platform.claude.com/docs/en/build-with-claude/files). ## Attach skills to an agent
) ``` - ```bash CLI - ant beta:agents create <<'YAML' - name: Financial Analyst - model: claude-opus-5 - system: You are a financial analysis agent. - skills: - - type: anthropic - skill_id: xlsx - - type: custom - skill_id: skill_01AbCdEfGhIjKlMnOpQrStUv - version: latest - YAML - ``` + <MultiFileExample language="cli" label="CLI"> + ```bash CLI + ant beta:agents create < agent.yaml + ``` + + <File filename="agent.yaml"> + ```yaml + name: Financial Analyst + model: claude-opus-5 + system: You are a financial analysis agent. + skills: + - type: anthropic + skill_id: xlsx + - type: custom + skill_id: skill_01AbCdEfGhIjKlMnOpQrStUv + version: latest + ``` + </File> + </MultiFileExample> ```python Python agent = client.beta.agents.create(
managed-agents/tools Changed · +30 / -24 lines
Tools: []anthropic.BetaAgentNewParamsToolUnion{{ OfAgentToolset20260401: &anthropic.BetaManagedAgentsAgentToolset20260401Params{ Type: anthropic.BetaManagedAgentsAgentToolset20260401ParamsTypeAgentToolset20260401, - Configs: []anthropic.BetaManagedAgentsAgentToolConfigUnionParamsUnion{{ - OfBetaManagedAgentsWebFetchToolConfigs: &anthropic.BetaManagedAgentsWebFetchToolConfigParams{ + Configs: []anthropic.BetaManagedAgentsAgentToolConfigParamsUnion{{ + OfWebFetch: &anthropic.BetaManagedAgentsWebFetchToolConfigParams{ Enabled: anthropic.Bool(false), }, }},
Tools: []anthropic.BetaAgentNewParamsToolUnion{{ OfAgentToolset20260401: &anthropic.BetaManagedAgentsAgentToolset20260401Params{ Type: anthropic.BetaManagedAgentsAgentToolset20260401ParamsTypeAgentToolset20260401, - Configs: []anthropic.BetaManagedAgentsAgentToolConfigUnionParamsUnion{ - {OfBetaManagedAgentsWebSearchToolConfigs: &anthropic.BetaManagedAgentsWebSearchToolConfigParams{ + Configs: []anthropic.BetaManagedAgentsAgentToolConfigParamsUnion{ + {OfWebSearch: &anthropic.BetaManagedAgentsWebSearchToolConfigParams{ AllowedDomains: []string{"docs.example.com", "arxiv.org"}, UserLocation: anthropic.BetaManagedAgentsUserLocationParam{ Country: anthropic.String("US"),
Timezone: anthropic.String("America/Los_Angeles"), }, }}, - {OfBetaManagedAgentsWebFetchToolConfigs: &anthropic.BetaManagedAgentsWebFetchToolConfigParams{ + {OfWebFetch: &anthropic.BetaManagedAgentsWebFetchToolConfigParams{ BlockedDomains: []string{"ads.example.com"}, MaxContentTokens: anthropic.Int(50000), }},
) ``` - ```bash CLI - ant beta:agents create <<'YAML' - name: Weather Agent - model: claude-opus-5 - tools: - - type: agent_toolset_20260401 - - type: custom - name: get_weather - description: Get current weather for a location - input_schema: - type: object - properties: - location: - type: string - description: City name - required: - - location - YAML - ``` + <MultiFileExample language="cli" label="CLI"> + ```bash CLI + ant beta:agents create < agent.yaml + ``` + + <File filename="agent.yaml"> + ```yaml + name: Weather Agent + model: claude-opus-5 + tools: + - type: agent_toolset_20260401 + - type: custom + name: get_weather + description: Get current weather for a location + input_schema: + type: object + properties: + location: + type: string + description: City name + required: + - location + ``` + </File> + </MultiFileExample> ```python Python agent = client.beta.agents.create(
managed-agents/vaults Changed · +14 / -7 lines
echo "$vault_id" # "vlt_01ABC..." ``` - ```bash CLI - VAULT_ID=$(ant beta:vaults create \ - --display-name "Alice" \ - --metadata '{external_user_id: usr_abc123}' \ - --transform id --raw-output) - echo "$VAULT_ID" # "vlt_01ABC..." - ``` + <MultiFileExample language="cli" label="CLI"> + ```bash CLI + VAULT_ID=$(ant beta:vaults create --transform id --raw-output < alice.vault.yaml) + echo "$VAULT_ID" # "vlt_01ABC..." + ``` + + <File filename="alice.vault.yaml"> + ```yaml + display_name: Alice + metadata: + external_user_id: usr_abc123 + ``` + </File> + </MultiFileExample> ```python Python vault = client.beta.vaults.create(
release-notes/overview Changed · +5 / -5 lines
description: Updates to the Claude Platform, including the Claude API, client SDKs, and the Claude Console. --- +The Claude Platform release notes list changes to the Claude API, the client SDKs, and the Claude Console, newest first. + <Tip> For release notes on Claude Apps, see the [Release notes for Claude Apps in the Claude Help Center](https://support.claude.com/en/articles/12138966-release-notes).
### August 19, 2026 +* The [Files API](https://platform.claude.com/docs/en/build-with-claude/files) is now generally available on the Claude API. Requests to the `/v1/files` endpoints, and Messages API requests that reference an uploaded file, no longer require the `files-api-2025-04-14` beta header. Requests sent without the header use the GA response format: [file expiration](https://platform.claude.com/docs/en/build-with-claude/files#file-expiration) (set `expires_in_seconds` when you upload a file; file objects report `expires_at`), and `page` and `next_page` [pagination](https://platform.claude.com/docs/en/api/overview#pagination) plus an `ids[]` filter when you [list files](https://platform.claude.com/docs/en/build-with-claude/files#list-files). `/v1/files` requests that still send the beta header keep working and return the previous response format. +* [Agent Skills](https://platform.claude.com/docs/en/agents-and-tools/agent-skills/overview) and the Skills API (`/v1/skills`) are now generally available on the Claude API. Requests no longer require the `skills-2025-10-02` beta header, including Messages API requests that load Skills through the `container` parameter. Requests that still send the header continue to work unchanged. See [Using Agent Skills with the API](https://platform.claude.com/docs/en/build-with-claude/skills-guide). * The [Admin API](https://platform.claude.com/docs/en/api/admin) user-management endpoints for **Claude Enterprise** (claude.ai) organizations (members, invites, groups, and custom roles) are now generally available. The `anthropic-beta: ce-user-management-2026-07-13` header is no longer required on group and custom-role requests; requests that still send it are accepted unchanged. See [User management](https://platform.claude.com/docs/en/manage-claude/user-management). -- The [Files API](https://platform.claude.com/docs/en/build-with-claude/files) is now generally available on the Claude API. Requests to the `/v1/files` endpoints, and Messages API requests that reference an uploaded file, no longer require the `files-api-2025-04-14` beta header. Requests sent without the header use the GA response format: [file expiration](https://platform.claude.com/docs/en/build-with-claude/files#file-expiration) (set `expires_in_seconds` when you upload a file; file objects report `expires_at`), and `page` and `next_page` [pagination](https://platform.claude.com/docs/en/api/overview#pagination) plus an `ids[]` filter when you [list files](https://platform.claude.com/docs/en/build-with-claude/files#list-files). Storage is 1 TB per organization and the rate limit is 500 requests per minute. `/v1/files` requests that still send the beta header keep working and return the previous response format. - -* [Agent Skills](https://platform.claude.com/docs/en/agents-and-tools/agent-skills/overview) and the Skills API (`/v1/skills`) are now generally available on the Claude API. Requests no longer require the `skills-2025-10-02` beta header, including Messages API requests that load Skills through the `container` parameter. Requests that still send the header continue to work unchanged. See [Using Agent Skills with the API](https://platform.claude.com/docs/en/build-with-claude/skills-guide). - - You can now restrict which sites a Claude Managed Agents agent's `web_search` and `web_fetch` tools can reach. Set `allowed_domains` or `blocked_domains` on the tool's entry in the `agent_toolset_20260401` `configs` array; `web_fetch` also accepts `max_content_tokens` and `web_search` accepts `user_location`. Each `configs` entry is identified by its `name` and typed by an optional `type`, and requests that pass only `name`, `enabled`, and `permission_policy` continue to work; in the typed SDKs, `configs` entries become per-tool types. See [Restrict web search and web fetch domains](https://platform.claude.com/docs/en/managed-agents/tools#restrict-web-search-and-web-fetch-domains). - Claude Managed Agents sessions that run in a [self-hosted sandbox](https://platform.claude.com/docs/en/managed-agents/self-hosted-sandboxes) can now attach [memory stores](https://platform.claude.com/docs/en/managed-agents/memory). The Python, TypeScript, and Go SDK workers download each attached store into the sandbox at its `mount_path` and sync the agent's changes back to the store. See [Use memory stores](https://platform.claude.com/docs/en/managed-agents/self-hosted-sandboxes#use-memory-stores). - The session viewer in the Claude Console has been redesigned with a timeline minimap, a transcript grouped by model request, and an Inspector panel for session details and cost, raw events, per-tool statistics, mounted resources, and per-thread activity. See [Console observability](https://platform.claude.com/docs/en/managed-agents/events-and-streaming#console-observability).
* **Anthropic-managed Skills**: Pre-built Skills for working with PowerPoint (.pptx), Excel (.xlsx), Word (.docx), and PDF files * **Custom Skills**: Upload your own Skills through the Skills API (`/v1/skills` endpoints) to package domain expertise and organizational workflows * Skills require the [code execution tool](https://platform.claude.com/docs/en/agents-and-tools/tool-use/code-execution-tool) to be enabled - * Learn more in [Agent Skills](https://platform.claude.com/docs/en/agents-and-tools/agent-skills/overview) and [API reference](https://platform.claude.com/docs/en/api/skills/create-skill) + * Learn more in [Agent Skills](https://platform.claude.com/docs/en/agents-and-tools/agent-skills/overview) and [API reference](https://platform.claude.com/docs/en/api/skills/create) ### October 15, 2025
about-claude/models/whats-new-sonnet-5 Changed · +1 / -1 lines
## Cybersecurity safeguards -Claude Sonnet 5 is the first Sonnet-tier model with real-time cybersecurity safeguards. Requests that involve prohibited or high-risk cybersecurity topics may be refused. Refusals return as a successful HTTP 200 response with `stop_reason: "refusal"`, not an error. See [Safeguards, warnings, and appeals](https://support.claude.com/en/articles/8241253-safeguards-warnings-and-appeals) for background. +Claude Sonnet 5 is the first Sonnet-tier model with real-time cybersecurity safeguards. Requests that involve prohibited or high-risk cybersecurity topics may be refused. Refusals return as a successful HTTP 200 response with `stop_reason: "refusal"`, not an error. See [Real-time cyber safeguards on Claude Opus and Sonnet](https://support.claude.com/en/articles/14604842-real-time-cyber-safeguards-on-claude-opus-and-sonnet) for what the safeguards block and how legitimate security work can apply to the Cyber Verification Program. ## Pricing