POST
Create an agent

Authorizations

Authorization
string
header
required

A server API key, ask_.... Carries a role.

Headers

Idempotency-Key
string

Up to 255 characters. The key is scoped to the calling principal, the HTTP method, the path and the key. Only 2xx responses are stored, for 24 hours. The same key with the same body replays the stored response, with the response header Idempotency-Replayed: true. The same key with a different body is 422 idempotency_key_reuse. If the first request is still running, the answer is 409 idempotency_in_progress; a record in progress for more than 60 seconds is taken over by the new request. A key that is longer than 255 characters or not printable ASCII is 400 invalid_idempotency_key.

Maximum string length: 255

Body

application/json
name
string
required
Required string length: 1 - 100
model
string
required
instructions
string
Maximum string length: 32000
tools
object[]
mcp_servers
object[]
skills
string[]
metadata
object

Response

The new agent.

id
string
required
object
string
required
Allowed value: "agent"
name
string
required
instructions
string
required

The system prompt.

model
string
required

A model id. Under a gateway provider it must be a key of the model map.

tools
object[]
required
mcp_servers
object[]
required
skills
string[]
required

Skill names to load for the agent.

metadata
object
required
status
enum<string>
required
Available options:
ready
created_at
string<date-time>
required
updated_at
string<date-time>
required