DoAIRight
API Reference

DoAIRight Evals API

Ingest, experiment-assignment, CI test-set gating, and OpenTelemetry capture for the DoAIRight Evaluate & Assure platform. All endpoints authenticate with a per-system `dar_…` API key as an HTTP Bearer token.

Authentication

Every endpoint requires an HTTP Bearer token: a per-system API key in the form dar_<token>, sent as Authorization: Bearer dar_….

Base URL

https://doairight.com

Machine-readable spec

GET /api/evals/openapi.json — this same document (OpenAPI 3.0.3), as JSON.

post/api/evals/observe

Ingest one observed run

Example request

curl -X POST https://doairight.com/api/evals/observe \
  -H "Authorization: Bearer dar_xxxxxxxxxxxxxxxx" \
  -H "Content-Type: application/json" \
  -d '{
  "prompt": "Summarize this contract in three bullet points.",
  "response": "- Term: 12 months\n- Auto-renews unless cancelled 30 days prior\n- Governing law: Delaware",
  "kind": "generative"
}'

Responses

202Queued for scoring
400Invalid payload
401Missing/invalid/revoked API key
402Usage quota exceeded for this billing period
422Blocked by an active governance policy (block-mode)
429Rate limit exceeded for this API key (per-minute cap; see Retry-After header). In-memory, per-instance limiter.
post/api/evals/submit

Submit a BYOR (bring-your-own-response) experiment run

Example request

curl -X POST https://doairight.com/api/evals/submit \
  -H "Authorization: Bearer dar_xxxxxxxxxxxxxxxx" \
  -H "Content-Type: application/json" \
  -d '{
  "prompt": "Summarize this contract in three bullet points.",
  "response": "- Term: 12 months\n- Auto-renews unless cancelled 30 days prior\n- Governing law: Delaware",
  "experimentKey": "summary-prompt-v2",
  "variantKey": "treatment"
}'

Responses

202Queued for scoring
400Invalid payload
401Missing/invalid/revoked API key
402Usage quota exceeded for this billing period
422Blocked by an active governance policy (block-mode)
429Rate limit exceeded for this API key (per-minute cap; see Retry-After header). In-memory, per-instance limiter.
post/api/evals/variant

Get a sticky experiment variant assignment

Example request

curl -X POST https://doairight.com/api/evals/variant \
  -H "Authorization: Bearer dar_xxxxxxxxxxxxxxxx" \
  -H "Content-Type: application/json" \
  -d '{
  "experimentKey": "summary-prompt-v2",
  "userKey": "user_8f21"
}'

Responses

200Variant assignment
400Invalid payload
401Missing/invalid/revoked API key
409Experiment not running / not comparable
429Rate limit exceeded for this API key (per-minute cap; see Retry-After header). In-memory, per-instance limiter.
post/api/evals/ci

Run a CI/test-set gate against a prompt version + dataset with client-submitted responses

Example request

curl -X POST https://doairight.com/api/evals/ci \
  -H "Authorization: Bearer dar_xxxxxxxxxxxxxxxx" \
  -H "Content-Type: application/json" \
  -d '{
  "promptVersionKey": "contract-summary@3",
  "datasetId": "8b6e6f2a-1e0a-4f52-9a7a-2b8b2b9b0a11",
  "items": [
    {
      "itemId": "5c1b6b0e-2222-4f0a-9d3d-2b9b0a118b6e",
      "response": "- Term: 12 months\n- Auto-renews unless cancelled 30 days prior"
    }
  ]
}'

Responses

200Gate verdict (pass/fail/not-evaluable) + per-dimension breakdown
400Invalid payload / unknown prompt version or dataset
401Missing/invalid/revoked API key
402Usage quota exceeded for this billing period
429Rate limit exceeded for this API key (per-minute cap; see Retry-After header). In-memory, per-instance limiter.
post/api/evals/otlp

OpenTelemetry (GenAI semantic conventions) trace export ingest

Accepts an OTLP/JSON export; each span that normalizes to a GenAI turn is ingested through the same pipeline as /observe.

Example request

curl -X POST https://doairight.com/api/evals/otlp \
  -H "Authorization: Bearer dar_xxxxxxxxxxxxxxxx"

Responses

202Spans processed, runs queued
400Malformed OTLP payload
401Missing/invalid/revoked API key
402Usage quota exceeded for this billing period
429Rate limit exceeded for this API key (per-minute cap; see Retry-After header). In-memory, per-instance limiter.