Create agent

Creates a new agent for the current user in the specified organization. Also creates the first agent revision.

Supports optional JSON Structured Output: set jsonOutputEnabled: true and provide a valid jsonSchema string (JSON Schema Draft 7) to force the agent's responses into a predefined JSON format. Not available for image generation models.

Body Params

Agent creation data. Organization ID is required. All other fields are optional and use defaults from configuration. Creates a new agent with its first revision. Requires a valid paid account (payment_required middleware).

string
required
string
string
string
string
string
number
number
integer
number
boolean
boolean
integer
integer
string
integer
boolean
integer
integer
integer
boolean
mcpServerNames
array of strings
mcpServerNames
boolean
boolean
Defaults to false

Enables JSON Structured Output. Not available for image generation models. When true, a valid jsonSchema must be provided.

string | null

JSON Schema (Draft 7) string defining expected output structure. Required when jsonOutputEnabled is true; null when disabled.

Responses

Language
Credentials
Bearer
JWT
Response
Click Try It! to start a request and see the response here! Or choose an example:
application/json