Skip to main content
POST
/
agent
/
create
Create Agent
curl --request POST \
  --url https://api.example.com/agent/create

Documentation Index

Fetch the complete documentation index at: https://docs.mosaic.so/llms.txt

Use this file to discover all available pages before exploring further.

Creates a new agent template with metadata only. Graph structure is mutated later via POST /agent//update. POST /agent/create does not accept graph fields (graph, nodes, connections, create_video_input_node). Sending them returns a validation error.

Request

curl -X POST "https://api.mosaic.so/agent/create" \
  -H "Authorization: Bearer mk_your_api_key" \
  -H "Content-Type: application/json" \
  -d '{
    "name": "UGC Variants",
    "description": "Generate and caption UGC clips",
    "visibility": "private"
  }'

Body Parameters

FieldTypeRequiredDescription
namestringNoAgent name (1-120 chars).
descriptionstringNoAgent description (<=5000 chars).
visibilitystringNopublic or private.
workspace_idstringNoTarget workspace UUID. Defaults to organization primary workspace.

Response

{
  "success": true,
  "agent_id": "a7ac4cc6-2302-4b14-8fd1-a3287bfc7606",
  "operations_applied": 0,
  "created_nodes": []
}