Create Agent
Create an agent template (metadata only).
Creates a new agent template with metadata only.
Graph structure is mutated later via POST /agent/{agent_id}/update.
POST /agent/create does not accept graph fields (graph, nodes, connections, create_video_input_node). Sending them returns a validation error.
Request
bash
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
| Field | Type | Required | Description |
|---|---|---|---|
name | string | No | Agent name (1-120 chars). |
description | string | No | Agent description (<=5000 chars). |
visibility | string | No | public or private. |
workspace_id | string | No | Target workspace UUID. Defaults to organization primary workspace. |
Response
json
{
"success": true,
"agent_id": "a7ac4cc6-2302-4b14-8fd1-a3287bfc7606",
"operations_applied": 0,
"created_nodes": []
}