Debates API

Create, manage, and control AI debates — full CRUD plus lifecycle commands.

12 min read
Share

Debates are the core resource in AskVerdict. Each debate runs a multi-agent AI panel that argues a question from different perspectives and produces a structured verdict. Debates are asynchronous — you create one, then stream or poll for results.

Base URL

All endpoints below are relative to https://api.askverdict.ai. Authenticate every request with Authorization: Bearer <your_api_key>.


Endpoints

MethodPathDescription
POST/api/debatesCreate and start a new debate
GET/api/debatesList your debates (paginated)
GET/api/debates/:idGet a single debate by ID
DELETE/api/debates/:idSoft-delete a debate
POST/api/debates/:id/commandsSend a lifecycle command to a running debate
POST/api/debates/:id/retryRetry a failed debate
POST/api/debates/:id/forkFork a public debate with a modified question
GET/api/debates/:id/analyticsGet per-debate analytics
PATCH/api/debates/:id/workspaceMove a debate into or out of a workspace

POST /api/debates

POST/api/debates

Create a new debate and start the AI engine. Returns immediately with a debate ID and stream URL — the engine runs in the background.

Request Body

NameTypeRequiredDescription
questionstringRequiredThe question or decision to debate. Minimum 10 characters, maximum 2000 characters.
mode"fast" | "balanced" | "thorough"OptionalDebate depth. fast = 1 credit, balanced = 3 credits, thorough = 8 credits. Default: fast.
contextstringOptionalAdditional background context for the AI agents. Maximum 5000 characters.
agentCountintegerOptionalNumber of AI agents to participate. Between 2 and 7 inclusive.
maxRoundsintegerOptionalMaximum debate rounds before forcing a verdict. Between 1 and 5 inclusive.
enableSearchbooleanOptionalAllow agents to perform web searches for up-to-date information.
attachmentIdsstring[]OptionalArray of uploaded file attachment UUIDs to include as document context. Maximum 5 attachments. Requires BYOK Pro plan.
workspaceIdstring (UUID)OptionalScope the debate to a workspace. You must be a member with write access.
presetstringOptionalModel configuration preset. Options: hackathon, balanced, economy, deepseek, groq, mixed. Maximum 50 characters.
skipCachebooleanOptionalForce a fresh debate run even if a cached verdict exists for the same question.

Choosing a mode

Use fast for quick directional answers. Use balanced for most production decisions. Reserve thorough for high-stakes or complex trade-off analysis — it runs more rounds with deeper agent reasoning.

Example Requests

bash
curl -X POST https://api.askverdict.ai/api/debates \
  -H "Authorization: Bearer vrd_your_api_key" \
  -H "Content-Type: application/json" \
  -d '{
    "question": "Should we rewrite our monolith as microservices?",
    "mode": "balanced",
    "context": "6-year-old Node.js app, team of 12 engineers, 200k daily active users. Main pain points: deploy coupling and database contention.",
    "agentCount": 4,
    "maxRounds": 3
  }'

Response

Free plan debates

On the free plan, a judgeModel field is also returned in the response (e.g. "judgeModel": "haiku-4-5"). Free debates use a lighter model to control costs.

After receiving debateId, connect to streamUrl via SSE to watch the debate unfold in real time. See the Stream API reference for event shapes.

Error Responses

StatusCodeDescription
400VALIDATION_ERRORRequest body failed schema validation
401UNAUTHORIZEDMissing or invalid API key
403FORBIDDENNot a member of the specified workspace, or insufficient workspace role
429MONTHLY_LIMIT_REACHEDFree plan monthly debate limit reached. Response includes limit and upgradeUrl
429CONCURRENT_LIMITToo many active debates running simultaneously. Response includes activeCount and limit
429QUOTA_EXCEEDEDInsufficient credits for the selected mode

GET /api/debates

GET/api/debates

List your debates in reverse-chronological order. Supports pagination, status filtering, and workspace scoping.

Query Parameters

NameTypeRequiredDescription
pageintegerOptionalPage number, 1-indexed. Default: 1.
limitintegerOptionalResults per page. Between 1 and 100. Default: 20.
status"pending" | "running" | "paused" | "completed" | "failed"OptionalFilter by debate status. Omit to return all statuses.
sortBy"createdAt" | "completedAt"OptionalField to sort by. Default: createdAt.
sortOrder"asc" | "desc"OptionalSort direction. Default: desc.
workspaceIdstring (UUID)OptionalFilter to debates belonging to a specific workspace. You must be a member.

Example Requests

bash
# List completed debates, newest first
curl "https://api.askverdict.ai/api/debates?status=completed&page=1&limit=20" \
  -H "Authorization: Bearer vrd_your_api_key"
 
# List workspace debates
curl "https://api.askverdict.ai/api/debates?workspaceId=ws-uuid-here" \
  -H "Authorization: Bearer vrd_your_api_key"

Response


GET /api/debates/:id

GET/api/debates/:id

Retrieve a single debate by its UUID. Only the owning user can access a private debate.

Path Parameters

NameTypeRequiredDescription
idstring (UUID)RequiredThe debate ID returned from the create endpoint.

Example Requests

bash
curl "https://api.askverdict.ai/api/debates/d8a3f1c2-4e5b-6789-abcd-ef0123456789" \
  -H "Authorization: Bearer vrd_your_api_key"

Response

Debate Status Values

StatusDescription
pendingCreated, engine starting up
runningAgents actively debating
pausedPaused via command — resumes on resume command
completedVerdict reached, verdict field populated
failedEngine error — use the retry endpoint to re-run

Error Responses

StatusCodeDescription
401UNAUTHORIZEDInvalid API key
404NOT_FOUNDDebate does not exist or belongs to another user

DELETE /api/debates/:id

DELETE/api/debates/:id

Soft-delete a debate. The debate is hidden from list results but not permanently removed from storage.

Path Parameters

NameTypeRequiredDescription
idstring (UUID)RequiredThe debate ID to delete.

Example Request

bash
curl -X DELETE "https://api.askverdict.ai/api/debates/d8a3f1c2-4e5b-6789-abcd-ef0123456789" \
  -H "Authorization: Bearer vrd_your_api_key"

Response


POST /api/debates/:id/commands

POST/api/debates/:id/commands

Send a real-time lifecycle command to an actively running debate. Commands take effect within the current or next round.

Debate must be running

This endpoint returns 409 DEBATE_NOT_RUNNING if the debate engine is not currently active (e.g. the debate is completed, failed, or the server restarted). Check status with GET /api/debates/:id before sending commands.

Path Parameters

NameTypeRequiredDescription
idstring (UUID)RequiredThe running debate ID.

Request Body

The body is a discriminated union on the type field.

Pause

NameTypeRequiredDescription
type"pause"RequiredPause the debate after the current agent response completes.

Resume

NameTypeRequiredDescription
type"resume"RequiredResume a paused debate.

Skip to Verdict

NameTypeRequiredDescription
type"skip"RequiredSkip remaining rounds and force the judge to produce a verdict immediately.

Inject

NameTypeRequiredDescription
type"inject"RequiredInject a message or evidence into the debate context. Agents see it in the next round.
payload.contentstringRequiredThe content to inject. Must be non-empty.

Example Requests

bash
# Pause
curl -X POST "https://api.askverdict.ai/api/debates/d8a3f1c2-4e5b-6789-abcd-ef0123456789/commands" \
  -H "Authorization: Bearer vrd_your_api_key" \
  -H "Content-Type: application/json" \
  -d '{ "type": "pause" }'
 
# Skip to verdict
curl -X POST "https://api.askverdict.ai/api/debates/d8a3f1c2-4e5b-6789-abcd-ef0123456789/commands" \
  -H "Authorization: Bearer vrd_your_api_key" \
  -H "Content-Type: application/json" \
  -d '{ "type": "skip" }'
 
# Inject new evidence
curl -X POST "https://api.askverdict.ai/api/debates/d8a3f1c2-4e5b-6789-abcd-ef0123456789/commands" \
  -H "Authorization: Bearer vrd_your_api_key" \
  -H "Content-Type: application/json" \
  -d '{
    "type": "inject",
    "payload": {
      "content": "Update: the engineering team confirmed migration would take 18 months, not 6."
    }
  }'

Response

Error Responses

StatusCodeDescription
400VALIDATION_ERRORUnknown command type or missing required payload
404NOT_FOUNDDebate not found or not owned by user
409DEBATE_NOT_RUNNINGEngine is not currently active for this debate

POST /api/debates/:id/retry

POST/api/debates/:id/retry

Re-run a failed debate from scratch. Clears previous events, resets status to pending, and relaunches the engine with the original question and mode.

Only failed debates can be retried

Retrying a debate that is not in failed status returns 409 DEBATE_NOT_FAILED. If the engine is already running for the debate ID, 409 DEBATE_ALREADY_RUNNING is returned instead.

Path Parameters

NameTypeRequiredDescription
idstring (UUID)RequiredThe ID of the failed debate to retry.

Example Request

bash
curl -X POST "https://api.askverdict.ai/api/debates/d8a3f1c2-4e5b-6789-abcd-ef0123456789/retry" \
  -H "Authorization: Bearer vrd_your_api_key"

Response

Error Responses

StatusCodeDescription
404NOT_FOUNDDebate not found or not owned by user
409DEBATE_NOT_FAILEDDebate is not in failed status
409DEBATE_ALREADY_RUNNINGEngine is already running for this debate

POST /api/debates/:id/fork

POST/api/debates/:id/fork

Fork a public debate into your account, optionally changing the question. The forked debate runs as a fresh debate under your billing.

Billing applies to forks

Forking counts against your quota and billing the same as creating a new debate. Forks always run in fast mode.

Path Parameters

NameTypeRequiredDescription
idstring (UUID)RequiredThe ID of the public debate to fork.

Request Body

NameTypeRequiredDescription
modifiedQuestionstringOptionalOverride the source debate question. Maximum 500 characters. If omitted, the original question is used.

Example Request

bash
curl -X POST "https://api.askverdict.ai/api/debates/d8a3f1c2-4e5b-6789-abcd-ef0123456789/fork" \
  -H "Authorization: Bearer vrd_your_api_key" \
  -H "Content-Type: application/json" \
  -d '{
    "modifiedQuestion": "Should a startup with 3 engineers rewrite their monolith as microservices?"
  }'

Response

Error Responses

StatusCodeDescription
404NOT_FOUNDSource debate not found or not public
429MONTHLY_LIMIT_REACHEDFree plan monthly limit reached
429QUOTA_EXCEEDEDInsufficient credits

GET /api/debates/:id/analytics

GET/api/debates/:id/analytics

Retrieve per-debate analytics alongside your overall debate averages. Only the debate owner can access this endpoint.

Path Parameters

NameTypeRequiredDescription
idstring (UUID)RequiredThe debate ID to retrieve analytics for.

Example Request

bash
curl "https://api.askverdict.ai/api/debates/d8a3f1c2-4e5b-6789-abcd-ef0123456789/analytics" \
  -H "Authorization: Bearer vrd_your_api_key"

Response

Error Responses

StatusCodeDescription
404NOT_FOUNDDebate not found or not owned by the authenticated user

PATCH /api/debates/:id/workspace

PATCH/api/debates/:id/workspace

Move a debate into a workspace, or back to your personal account by setting workspaceId to null. You must own the debate and have write access to the target workspace.

Path Parameters

NameTypeRequiredDescription
idstring (UUID)RequiredThe debate ID to move.

Request Body

NameTypeRequiredDescription
workspaceIdstring (UUID) | nullRequiredUUID of the destination workspace, or null to move the debate back to your personal account.

Example Requests

bash
# Move into a workspace
curl -X PATCH "https://api.askverdict.ai/api/debates/d8a3f1c2-4e5b-6789-abcd-ef0123456789/workspace" \
  -H "Authorization: Bearer vrd_your_api_key" \
  -H "Content-Type: application/json" \
  -d '{ "workspaceId": "ws-uuid-here" }'
 
# Move back to personal account
curl -X PATCH "https://api.askverdict.ai/api/debates/d8a3f1c2-4e5b-6789-abcd-ef0123456789/workspace" \
  -H "Authorization: Bearer vrd_your_api_key" \
  -H "Content-Type: application/json" \
  -d '{ "workspaceId": null }'

Response

Error Responses

StatusCodeDescription
400VALIDATION_ERRORBody missing or workspaceId is not a valid UUID or null
403FORBIDDENNot a workspace member, or role does not have write access
404NOT_FOUNDDebate not found or not owned by user

Debate Object Reference

The debate object is returned by GET /api/debates and GET /api/debates/:id.

FieldTypeDescription
idstringUUID of the debate
questionstringThe question that was debated
statusstringCurrent lifecycle status — see status values
mode"fast" | "balanced" | "thorough" | nullDepth setting used
fundingSource"free_tier" | "user_credits" | "byok"How the debate was funded
isPublicbooleanWhether the debate is publicly accessible
agentCountinteger | nullNumber of agents that participated (set after completion)
roundCountinteger | nullNumber of rounds completed (set after completion)
createdAtstring (ISO 8601)When the debate was created
completedAtstring (ISO 8601) | nullWhen the debate finished, or null if still running
ownerIdstringUser ID of the debate owner
workspaceIdstring | nullWorkspace UUID if scoped, otherwise null
verdictVerdict | nullStructured verdict object — null until status is completed
costDebateCost | nullCredit cost breakdown — null until status is completed

Verdict Object

FieldTypeDescription
recommendationstringThe panel's final recommendation
confidencenumberConfidence score between 0 and 1
summarystringNarrative summary of the debate outcome
agentsUsedstring[]Model identifiers for each agent that participated
totalRoundsintegerNumber of rounds that ran before verdict

Funding Sources

ValueDescription
free_tierMonthly free debate allowance (uses lighter Haiku model)
user_creditsDeducted from your credit balance at debate creation
byokBring-your-own-key — your provider API keys are used, not billed by AskVerdict

BYOK keys

Pass your provider API keys per-request via the X-Provider-Keys header as a JSON object: {"anthropic":"sk-ant-...","openai":"sk-..."}. Keys are never stored server-side.

Was this page helpful?