POST
/
agents
/
template
/
single-task
curl --request POST \
  --url https://agent-prod.studio.lyzr.ai/v3/agents/template/single-task \
  --header 'Content-Type: application/json' \
  --header 'x-api-key: <api-key>' \
  --data '{
  "name": "<string>",
  "description": "<string>",
  "agent_role": "<string>",
  "agent_instructions": "<string>",
  "examples": "<string>",
  "features": [
    {
      "type": "<string>",
      "config": {},
      "priority": 123
    }
  ],
  "tool": "<string>",
  "tool_usage_description": "<string>",
  "llm_credential_id": "<string>",
  "response_format": {},
  "provider_id": "<string>",
  "model": "<string>",
  "top_p": 123,
  "temperature": 123
}'
{
  "id": 67890,
  "message": "Single task agent created successfully."
}

Endpoint:

POST /v3/agents/template/single-task

Description:

Creates a new agent specifically for a single-task operation.

Request Headers:

HeaderTypeRequiredDescription
x-api-keyStringYesAPI key for authentication
acceptStringYesExpected response format (application/json)
content-typeStringYesFormat of request body (application/json)

Request Body:

{
  "name": "string",
  "description": "string",
  "agent_role": "string",
  "agent_instructions": "string",
  "examples": "string",
  "features": [
    {
      "type": "string",
      "config": {},
      "priority": 0
    }
  ],
  "tool": "string",
  "tool_usage_description": "string",
  "llm_credential_id": "string",
  "response_format": {},
  "provider_id": "string",
  "model": "string",
  "top_p": 0,
  "temperature": 0
}

Request Example (cURL):

curl -X POST "https://agent-prod.studio.lyzr.ai/v3/agents/template/single-task" ^
-H "accept: application/json" ^
-H "content-type: application/json" ^
-H "x-api-key: sk-default-XXXXXXX" ^
-d "{\"name\":\"string\",\"description\":\"string\",\"agent_role\":\"string\",\"agent_instructions\":\"string\",\"examples\":\"string\",\"features\":[{\"type\":\"string\",\"config\":{},\"priority\":0}],\"tool\":\"string\",\"tool_usage_description\":\"string\",\"llm_credential_id\":\"string\",\"response_format\":{},\"provider_id\":\"string\",\"model\":\"string\",\"top_p\":0,\"temperature\":0}"

Authorizations

x-api-key
string
header
required

Body

application/json

Response

201
application/json

Single task agent created successfully

The response is of type object.