API Overview

Base URL, authentication, error format, rate limits, and pagination for the AskVerdict REST API.

2 min read
Share

The AskVerdict API is a RESTful JSON API for creating and managing AI-powered debates.

Base URL

plaintext
https://api.askverdict.ai

All endpoints are prefixed with /v1/.

Authentication

Every request requires an API key passed via the Authorization header:

bash
Authorization: Bearer vrd_your_api_key

See Authentication for details on creating keys and BYOK setup.

Request Format

  • All request bodies use Content-Type: application/json
  • Query parameters use standard URL encoding
  • Dates are ISO 8601 format

Response Format

All responses follow a consistent structure:

json
{
  "debate": { ... },
  "verdict": { ... }
}

Error responses:

json
{
  "error": {
    "code": "VALIDATION_ERROR",
    "message": "Question is required"
  }
}

HTTP Status Codes

CodeMeaning
200Success
201Created
400Bad Request — invalid parameters
401Unauthorized — missing or invalid API key
403Forbidden — insufficient permissions or plan
404Not Found — resource doesn't exist
429Too Many Requests — rate limit exceeded
500Internal Server Error

Rate Limits

Default rate limit is 60 requests per minute per API key. Headers included in every response:

plaintext
X-RateLimit-Limit: 60
X-RateLimit-Remaining: 57
X-RateLimit-Reset: 1708444800

Pagination

List endpoints support pagination via query parameters:

ParameterTypeDefaultDescription
pagenumber1Page number
limitnumber20Items per page (max 100)

Response includes pagination metadata:

json
{
  "debates": [...],
  "pagination": {
    "page": 1,
    "limit": 20,
    "total": 47,
    "totalPages": 3
  }
}

Endpoints

POST/v1/verdicts

Create a new debate and get a verdict

GET/v1/verdicts

List your debates with pagination and filtering

GET/v1/verdicts/:id

Get a specific debate with its verdict

GET/v1/verdicts/:id/stream

Stream debate events via SSE

DELETE/v1/verdicts/:id

Delete a debate

GET/v1/me

Get authenticated user profile

GET/v1/usage

Get API key usage statistics

Next Steps

Was this page helpful?