POST
POST /v1/agents?beta=true — Claude API
Beta
Anthropic API key (required); https://api.anthropic.com
Claude APICreate Agent
- Base URL
- https://api.anthropic.com
- Auth
- x-api-key: <ANTHROPIC_API_KEY>
- Last verified
- 2026-10-20 · upstream hash matched
Actions Try in browser→
Agents: curl -H "Accept: text/markdown" this URL
→ 358 tokens · Vary: Accept
→ 358 tokens · Vary: Accept
Critical gotchas
Authentication uses the x-api-key header and requests also require an anthropic-version header.
The official OpenAPI URL is discovered from the SDK repository manifest and must remain under Anthropic's trusted Stainless storage prefix.
cURL
curl -X POST 'https://api.anthropic.com/v1/agents?beta=true' \ -H "x-api-key: $ANTHROPIC_API_KEY" \ -H 'anthropic-version: 2023-06-01' \ -H 'Content-Type: application/json' \ -d '{ "name": "example-name", "model": "example-model"}'
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
| name | body | string | Yes | Human-readable name for the agent. |
| model | body | string | Yes | 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 |
| description | body | string | No | Description of what the agent does. |
| system | body | string | No | System prompt for the agent. |
| tools | body | object[] | No | Tool configurations available to the agent. Maximum of 128 tools across all toolsets allowed. |
| mcp_servers | body | object[] | No | MCP servers this agent connects to. Maximum 20. Names must be unique within the array. Every server must be referenced by an `mcp_toolset` in `tools`; unreferenced servers are rejected. See the [MCP connector guide](https://platform.claude.com/docs/en/managed-agents/mcp-connector). |
| skills | body | object[] | No | Skills available to the agent. |
| metadata | body | object | No | Arbitrary key-value metadata. Maximum 16 pairs, keys up to 64 chars, values up to 512 chars. |
| multiagent | body | object | No | Multiagent orchestration configuration. Currently supports the `coordinator` topology with a roster of 1-20 agents. |
Response 200 OK
{
"type": "agent",
"id": "agent_011CZkYpogX7uDKUyvBTophP",
"version": 1,
"name": "My First Agent",
"description": "A general-purpose starter agent.",
"model": {
"id": "claude-opus-5",
"speed": "standard"
},
"system": "You are a general-purpose agent that can research, write code, run commands, and use connected tools to complete the user's task end to end.",
"tools": [
{
"type": "agent_toolset_20260401",
"default_config": {
"enabled": true,
"permission_policy": {
"type": "always_ask"
}
},
"configs": []
}
],
"mcp_servers": [
{
"type": "url",
"name": "example-mcp",
"url": "https://example-server.modelcontextprotocol.io/sse"
}
],
"skills": [
{
"type": "anthropic",
"skill_id": "xlsx",
"version": "1"
},
{
"type": "custom",
"skill_id": "skill_011CZkZFNu9hAbo3jZPRgTlx",
"version": "2"
}
],
"multiagent": null,
"metadata": {
"foo": "bar"
},
"created_at": "2026-03-15T10:00:00Z",
"updated_at": "2026-03-15T10:00:00Z",
"archived_at": null
} Get a free Claude API key → sponsored Affiliate link - we may earn a commission, at no extra cost to you.