Skip to main content
POST
/
api
/
agent-schemas
/
generate
cURL
curl -X POST "https://app.cotool.ai/api/agent-schemas/generate" \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"systemPrompt":"string","description":"string"}'
{
  "schema": {
    "type": "string",
    "title": "<string>",
    "description": "<string>",
    "properties": {},
    "items": {
      "type": "string",
      "title": "<string>",
      "description": "<string>",
      "properties": {},
      "items": "<unknown>",
      "required": [
        "<string>"
      ],
      "enum": [
        "<string>"
      ],
      "x-cotool": {
        "presetId": "classification"
      }
    },
    "required": [
      "<string>"
    ],
    "enum": [
      "<string>"
    ],
    "x-cotool": {
      "presetId": "classification"
    }
  },
  "exampleOutput": "<string>"
}

Authorizations

Authorization
string
header
required

API Key authentication for programmatic access. Include your API key in the Authorization header as: Bearer your_api_key_here

Body

application/json
systemPrompt
string

The system prompt of the agent to inform schema generation

description
string

User description of the desired output structure

Response

200 - application/json

Successful response

schema
object
required

The generated JSON schema

exampleOutput
required

Example output data conforming to the schema