Skip to main content
POST
/
v1
/
agents
/
from-template
Create Agent From Template
curl --request POST \
  --url https://api.example.com/v1/agents/from-template \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "template_id": "<string>",
  "name": "<string>",
  "description": "<string>",
  "instructions": "<string>",
  "execution_mode": "<string>",
  "models": {},
  "knowledge_bases": [
    "<string>"
  ],
  "skills": [
    "<string>"
  ],
  "tool_categories": [
    "<string>"
  ],
  "suggested_prompts": [
    "<string>"
  ],
  "generate_runtime_key": true
}
'
{
  "agent": {
    "id": 123,
    "user_id": 123,
    "name": "<string>",
    "execution_mode": "<string>",
    "knowledge_bases": [
      "<string>"
    ],
    "skills": [
      "<string>"
    ],
    "tool_categories": [
      "<string>"
    ],
    "suggested_prompts": [
      "<string>"
    ],
    "status": "<string>",
    "created_at": "<string>",
    "updated_at": "<string>",
    "widget_enabled": true,
    "allowed_domains": [
      "<string>"
    ],
    "share_enabled": true,
    "share_updated_at": "<string>",
    "description": "<string>",
    "instructions": "<string>",
    "models": {},
    "logo_url": "<string>",
    "published_at": "<string>"
  },
  "api_key": {
    "full_key": "<string>",
    "key_prefix": "<string>",
    "created_at": "2023-11-07T05:31:56Z"
  }
}

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Body

application/json

Body for POST /v1/agents/from-template.

template_id
string
required
Minimum string length: 1
name
string | null
Required string length: 1 - 200
description
string | null
instructions
string | null
execution_mode
string | null
models
Models · object
knowledge_bases
string[] | null
skills
string[] | null
tool_categories
string[] | null
suggested_prompts
string[] | null
generate_runtime_key
boolean
default:true

Response

Successful Response

agent
V1AgentResponse · object
required
api_key
RuntimeKeyResponse · object

Runtime API key returned once after creation or rotation.