⌘K
Create Verdict
POST /v1/verdicts — Create a new debate and get an AI-powered verdict on any question.
1 min read
Share
POST
/v1/verdictsCreate a new debate and start the AI debate process.
Request Body
| Name | Type | Required | Description |
|---|---|---|---|
question | string | Required | The question or decision to debate. Max 2000 characters. |
mode | string | Optional | Debate mode: 'fast' (1 credit), 'balanced' (3 credits), or 'thorough' (8 credits). Default: 'balanced'. |
context | string | Optional | Additional context for the debate. Max 5000 characters. |
options | string[] | Optional | Specific options to compare (e.g., ['React', 'Vue', 'Svelte']). |
tags | string[] | Optional | Tags for organizing debates. |
Example Request
bash
curl -X POST https://api.askverdict.ai/v1/verdicts \
-H "Authorization: Bearer vrd_your_api_key" \
-H "Content-Type: application/json" \
-d '{
"question": "Should we migrate from PostgreSQL to MongoDB?",
"mode": "balanced",
"context": "We have a 5-year-old Rails app with complex joins and reporting needs. Team of 8 engineers.",
"tags": ["infrastructure", "database"]
}'Response
The debate starts asynchronously. Use the Stream endpoint to watch it unfold in real-time, or poll Get Verdict until status is "completed".
Error Responses
| Code | Error | Description |
|---|---|---|
400 | VALIDATION_ERROR | Missing or invalid question |
401 | UNAUTHORIZED | Invalid API key |
402 | INSUFFICIENT_CREDITS | Not enough credits for the selected mode |
429 | RATE_LIMITED | Too many requests |
Was this page helpful?