id.
For a guided walkthrough, see Create an agent.
Base URL: https://agents.assemblyai.com
Authentication
Every request requires your AssemblyAI API key in theAuthorization header. The raw key works directly; a Bearer prefix is accepted and stripped:
Endpoints
Create an agent
POST /v1/agents
201 with the full agent record.
List agents
GET /v1/agents returns a lightweight array of id, name, and timestamps, not full configurations.
Retrieve an agent
GET /v1/agents/{id} returns the full agent record. Tool header values are masked as "***" (see HTTP tool config).
Update an agent
PUT /v1/agents/{id} accepts the same body as create, but every field is optional. Send only what changes. Returns 200 with the updated record.
Delete an agent
DELETE /v1/agents/{id} returns 204 with no body.
Request body
POST /v1/agents takes the agent as one JSON object; PUT /v1/agents/{id} takes the same body with every field optional (only name, system_prompt, and voice are required). For a copy-ready body with every field populated, see A complete agent. For exact field types, defaults, and validation, see the create-agent API reference.
Tool object
Parameters (JSON Schema)
parameters is a standard JSON Schema object describing the tool’s arguments. The same shape for HTTP and client-side tools:
type and description, these sharpen tool-calling and turn-detection accuracy:
If you omit these, the agent infers the expected shape from each property’s
description at runtime. See Parameter hints for guidance and examples.
HttpToolConfig
Write shape (create / update):
HttpToolHeader (write):
{ name, value?, remove? }. Provide value to set or rotate the header. Provide name only (no value) to keep the stored value unchanged (useful for round-tripping on update). Set remove: true to delete it. Sending both value and remove: true is rejected.
HttpToolHeader (read): { name, last_set_at }. Values are never returned.
How arguments are sent: GET/DELETE → query string (stringified, null dropped); POST/PUT/PATCH → JSON body. Query params already in url are merged with the model’s arguments.
Rotating a secret: send { "name": "Authorization", "value": "Bearer <new>" } in the headers list of a PUT /v1/agents/{id}. Any other headers you want to keep, round-trip as name-only entries.
Server-side execution constraints. AssemblyAI makes the request on your behalf and enforces:
https only; public hosts only (private/loopback/link-local/CGNAT IPs blocked, including obfuscated literals); redirects not followed (a 3xx is returned to the model as an error); response body capped at 8 KiB before being fed to the model; per-call timeout from timeout_seconds.Agent object
The full record returned by create, get, and update:id. Header values are masked as "***" (here the tool has no headers, so headers is {}).
Validation errors
Deploy a stored agent
Once created, connect byagent_id. Over the WebSocket, bind to the agent in your first session.update:
agent_id is mutually exclusive with inline session fields (system_prompt, greeting, tools, input, output). See Deploy your agent.