Skip to main content

Base URL

All API requests should be made to:
https://api.rotavision.com/v1

Authentication

Include your API key in the Authorization header:
curl https://api.rotavision.com/v1/vishwas/analyze \
  -H "Authorization: Bearer rv_live_your_api_key" \
  -H "Content-Type: application/json"
See Authentication for details on API key types and scopes.

Request Format

All request bodies should be JSON with Content-Type: application/json:
curl -X POST https://api.rotavision.com/v1/vishwas/analyze \
  -H "Authorization: Bearer rv_live_..." \
  -H "Content-Type: application/json" \
  -d '{
    "model_id": "loan-approval-v2",
    "dataset": { ... }
  }'

Response Format

All responses are JSON. Successful responses include the requested data:
{
  "id": "analysis_abc123",
  "model_id": "loan-approval-v2",
  "status": "completed",
  "overall_score": 0.82,
  "created_at": "2026-02-01T10:30:00Z"
}
Error responses follow a consistent structure:
{
  "error": {
    "code": "invalid_request",
    "message": "The 'model_id' field is required",
    "type": "validation_error",
    "param": "model_id",
    "request_id": "req_abc123"
  }
}

Pagination

List endpoints support cursor-based pagination:
curl "https://api.rotavision.com/v1/vishwas/analyses?limit=20&cursor=abc123" \
  -H "Authorization: Bearer rv_live_..."
Response includes pagination metadata:
{
  "data": [...],
  "has_more": true,
  "next_cursor": "xyz789"
}
ParameterDescription
limitNumber of items per page (default: 20, max: 100)
cursorCursor for the next page

Filtering & Sorting

List endpoints support filtering and sorting:
# Filter by status and sort by creation date
curl "https://api.rotavision.com/v1/guardian/alerts?status=active&sort=-created_at" \
  -H "Authorization: Bearer rv_live_..."
ParameterDescription
sortField to sort by. Prefix with - for descending
created_afterFilter by creation date (ISO 8601)
created_beforeFilter by creation date (ISO 8601)

Idempotency

For POST requests, include an Idempotency-Key header to safely retry requests:
curl -X POST https://api.rotavision.com/v1/vishwas/analyze \
  -H "Authorization: Bearer rv_live_..." \
  -H "Idempotency-Key: unique-request-id-123" \
  -H "Content-Type: application/json" \
  -d '{ ... }'
Requests with the same idempotency key within 24 hours return the cached response.

Versioning

The API version is included in the URL path (/v1). We follow semantic versioning:
  • Patch versions (v1.0.x): Bug fixes, no breaking changes
  • Minor versions (v1.x.0): New features, backward compatible
  • Major versions (vX.0.0): Breaking changes
We provide at least 12 months notice before deprecating major versions.

SDKs

Official SDKs handle authentication, retries, and error handling:

Products