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": {
    "title": "<string>",
    "description": "<string>",
    "properties": {},
    "items": {
      "title": "<string>",
      "description": "<string>",
      "properties": {},
      "items": "<unknown>",
      "required": [
        "<string>"
      ],
      "enum": [
        "<string>"
      ],
      "additionalProperties": true,
      "x-cotool": {
        "viewerId": "<string>"
      }
    },
    "required": [
      "<string>"
    ],
    "enum": [
      "<string>"
    ],
    "additionalProperties": true,
    "x-cotool": {
      "viewerId": "<string>"
    }
  },
  "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

Successful response

schema
object
required

The generated JSON schema

exampleOutput
required

Example output data conforming to the schema