Skip to content

Agents

Agents are the core AI personalities in your workspace. Each agent has a name, description, time zone, optional voice provider keys, and one or more avatars. Use these endpoints to manage agents and their avatar images.

Returns the agents accessible to the authenticated user. Use the optional workspace_id filter to scope results to a single workspace.

GET /v1/agents
ParameterTypeRequiredDescription
workspace_idintegerNoFilter agents to a specific workspace.
[
{
"id": 42,
"name": "TrendBot",
"description": "Trend analysis agent",
"primary_avatar_url": "https://cdn.gen.pro/avatars/42/thumbnail.webp",
"role": "owner",
"organization": "My Company",
"time_zone": "America/New_York",
"tiktok_integration": false,
"tiktok_social_account": false,
"degods": false,
"shared_users": [],
"default_user_voice": null
}
]
Terminal window
# All agents
curl https://api.gen.pro/v1/agents \
-H "X-API-Key: your-api-key"
# Filtered by workspace
curl "https://api.gen.pro/v1/agents?workspace_id=10" \
-H "X-API-Key: your-api-key"
StatusError codeDescription
401unauthorizedMissing or invalid API key.

Creates a new agent. If organization_id is provided, the agent is created within that workspace (requires manage_agents permission). Otherwise, it is created as a personal agent.

POST /v1/agents
ParameterTypeRequiredDescription
agent[name]stringYesAgent name. Must be unique within the workspace.
agent[description]stringNoA short description of the agent’s purpose.
agent[time_zone]stringNoIANA time zone identifier (e.g. America/New_York).
agent[eleven_lab_api_key]stringNoElevenLabs API key for voice synthesis. Validated on submission.
agent[hume_ai_api_key]stringNoHume AI API key for emotional voice. Validated on submission.
agent[agent_avatars_attributes]arrayNoArray of avatar objects with file (image upload) or degod_avatar_id.
organization_idintegerNoWorkspace to create the agent in.
{
"agent": {
"id": 43,
"name": "ProductReviewer",
"description": "Reviews trending products",
"organization_id": 10,
"time_zone": "America/Los_Angeles",
"primary_avatar_id": null,
"primary_avatar_url": null,
"role": "owner",
"default_user_voice": null
}
}
Terminal window
curl -X POST https://api.gen.pro/v1/agents \
-H "X-API-Key: your-api-key" \
-H "Content-Type: application/json" \
-d '{
"organization_id": 10,
"agent": {
"name": "ProductReviewer",
"description": "Reviews trending products",
"time_zone": "America/Los_Angeles"
}
}'
StatusError codeDescription
401unauthorizedMissing or invalid API key.
422agent_creation_failedValidation failed (e.g. duplicate name in workspace).
422organization_not_foundThe specified organization_id does not exist or you lack access.
422invalid_api_keyThe provided ElevenLabs or Hume AI API key is invalid.

Returns a single agent by ID. Includes full detail such as organization ID, primary avatar, and voice configuration.

GET /v1/agents/:id
ParameterTypeRequiredDescription
idstringYesThe agent ID (path parameter).
with_organization_uuidbooleanNoIf true, includes the workspace UUID in the response.
{
"id": 42,
"name": "TrendBot",
"description": "Trend analysis agent",
"organization_id": 10,
"time_zone": "America/New_York",
"primary_avatar_id": 101,
"primary_avatar_url": "https://cdn.gen.pro/avatars/42/thumbnail.webp",
"agent_setup_project_id": 500,
"role": "owner",
"default_user_voice": {
"id": "voice_abc123",
"name": "Sarah",
"gender": "female",
"language": "English",
"provider": "eleven_labs",
"url": "https://api.elevenlabs.io/v1/previews/voice_abc123.mp3"
}
}
Terminal window
curl https://api.gen.pro/v1/agents/42 \
-H "X-API-Key: your-api-key"
StatusError codeDescription
401unauthorizedMissing or invalid API key.
403permission_deniedYou do not have access to this agent.
422agent_not_foundNo agent exists with the given ID.

Updates an existing agent’s name, description, time zone, voice keys, avatar, or default voice. Requires editor role or higher in the workspace.

PATCH /v1/agents/:id
ParameterTypeRequiredDescription
idstringYesThe agent ID (path parameter).
agent[name]stringNoUpdated agent name.
agent[description]stringNoUpdated description.
agent[time_zone]stringNoIANA time zone identifier.
agent[eleven_lab_api_key]stringNoElevenLabs API key. Validated on submission.
agent[hume_ai_api_key]stringNoHume AI API key. Validated on submission.
agent[agent_avatars_attributes]arrayNoArray of avatar objects. Providing this resets the primary avatar. Each object accepts degod_avatar_id, file (image upload), and is_primary (boolean).
agent[default_user_voice_attributes]objectNoSet the default voice. Requires source (eleven_labs, hume_ai, or user_voice_resource) and voice_id.
{
"agent": {
"id": 42,
"name": "TrendBot v2",
"description": "Updated trend agent",
"organization_id": 10,
"time_zone": "Europe/London",
"primary_avatar_id": 101,
"primary_avatar_url": "https://cdn.gen.pro/avatars/42/thumbnail.webp",
"role": "owner",
"default_user_voice": {
"source": "eleven_labs",
"voice_id": "voice_abc123"
}
}
}
Terminal window
curl -X PATCH https://api.gen.pro/v1/agents/42 \
-H "X-API-Key: your-api-key" \
-H "Content-Type: application/json" \
-d '{
"agent": {
"name": "TrendBot v2",
"description": "Updated trend agent",
"time_zone": "Europe/London"
}
}'
StatusError codeDescription
401unauthorizedMissing or invalid API key.
403permission_deniedYou do not have access to this agent.
404user_voice_resource_not_foundThe specified voice_id for a user_voice_resource source does not exist on this agent.
422agent_not_foundNo agent exists with the given ID.
422validation_errorOne or more fields failed validation.
422agent_update_failedAn unexpected error occurred during update.
422invalid_api_keyThe provided ElevenLabs or Hume AI API key is invalid.
422voice_id_requiredvoice_id is required when source is present in default_user_voice_attributes.

Soft-deletes an agent. Requires owner or manager role, or being the agent’s creator.

DELETE /v1/agents/:id
ParameterTypeRequiredDescription
idstringYesThe agent ID (path parameter).

Returns 200 OK with an empty body on success.

Terminal window
curl -X DELETE https://api.gen.pro/v1/agents/42 \
-H "X-API-Key: your-api-key"
StatusError codeDescription
401unauthorizedMissing or invalid API key.
403forbiddenYou do not have permission to delete this agent.

Returns the avatar images for an agent, ordered with the primary avatar first. Supports cursor-based pagination (20 per page).

GET /v1/agents/:agent_id/avatars
ParameterTypeRequiredDescription
agent_idstringYesThe agent ID (path parameter).
cursorintegerNoReturn avatars with an ID greater than this value (for pagination).
[
{
"id": 101,
"is_primary": true,
"url": "https://cdn.gen.pro/avatars/101/original.webp",
"thumbnail_url": "https://cdn.gen.pro/avatars/101/thumbnail.webp",
"degod_avatar_id": null
},
{
"id": 102,
"is_primary": false,
"url": "https://cdn.gen.pro/avatars/102/original.webp",
"thumbnail_url": "https://cdn.gen.pro/avatars/102/thumbnail.webp",
"degod_avatar_id": 7
}
]
Terminal window
curl https://api.gen.pro/v1/agents/42/avatars \
-H "X-API-Key: your-api-key"
# Paginate
curl "https://api.gen.pro/v1/agents/42/avatars?cursor=101" \
-H "X-API-Key: your-api-key"
StatusError codeDescription
401unauthorizedMissing or invalid API key.
404agent_not_foundThe specified agent does not exist.

Uploads one or more avatar images for an agent. Accepts image files (JPEG, PNG, or WebP) or DeGod avatar IDs.

POST /v1/agents/:agent_id/avatars
ParameterTypeRequiredDescription
agent_idstringYesThe agent ID (path parameter).
agent_avatars_attributesarrayYesArray of avatar objects. Each object accepts file (multipart image upload) or degod_avatar_id (integer).

Returns 200 OK with an empty body on success.

Terminal window
curl -X POST https://api.gen.pro/v1/agents/42/avatars \
-H "X-API-Key: your-api-key" \
-F "agent_avatars_attributes[][file]=@avatar.png"
StatusError codeDescription
401unauthorizedMissing or invalid API key.
404agent_not_foundThe specified agent does not exist.
422avatar_creation_failedImage validation failed (wrong format or missing file).

Sets an avatar as the agent’s primary avatar. All other avatars for the agent are marked as non-primary.

PATCH /v1/agents/:agent_id/avatars/:id
ParameterTypeRequiredDescription
agent_idstringYesThe agent ID (path parameter).
idintegerYesThe avatar ID (path parameter).

Returns 200 OK with an empty body on success.

Terminal window
curl -X PATCH https://api.gen.pro/v1/agents/42/avatars/101 \
-H "X-API-Key: your-api-key"
StatusError codeDescription
401unauthorizedMissing or invalid API key.
404agent_not_foundThe specified agent does not exist.
422avatar_update_failedThe avatar could not be found or updated.

Removes one or more avatars from an agent. If the deleted avatar was primary, the next available avatar is automatically promoted to primary.

DELETE /v1/agents/:agent_id/avatars/:id
ParameterTypeRequiredDescription
agent_idstringYesThe agent ID (path parameter).
idstringYesThe DeGod avatar ID to delete. To delete multiple, pass IDs separated by underscores (e.g. 7_8_9).

Returns 200 OK with an empty body on success.

Terminal window
# Delete a single avatar
curl -X DELETE https://api.gen.pro/v1/agents/42/avatars/7 \
-H "X-API-Key: your-api-key"
# Delete multiple avatars
curl -X DELETE https://api.gen.pro/v1/agents/42/avatars/7_8_9 \
-H "X-API-Key: your-api-key"
StatusError codeDescription
401unauthorizedMissing or invalid API key.
404agent_not_foundThe specified agent does not exist.