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>" }
Generate a JSON schema for agent structured output based on system prompt and description using an LLM.
API Key authentication for programmatic access. Include your API key in the Authorization header as: Bearer your_api_key_here
Bearer your_api_key_here
The system prompt of the agent to inform schema generation
User description of the desired output structure
Successful response
The generated JSON schema
Show child attributes
Example output data conforming to the schema
Was this page helpful?