REST API Reference
The Orq REST API lets you ingest traces, query eval scores, manage projects, and trigger gate checks from any language or CI tool.
Base URL
URL
https://api.getorqai.com/v1
Authentication
All requests require a Bearer token in the Authorization header:
Shell
Authorization: Bearer sk-orq-...
POST /traces
Ingest a trace event. The SDK calls this automatically; use the raw endpoint for non-SDK languages.
JSON
{
"name": "my_step",
"input": "What is the capital of France?",
"output": "Paris",
"latency_ms": 412,
"model": "gpt-4o-mini",
"tokens": { "prompt": 18, "completion": 4 }
}
POST /gate
Trigger a gate evaluation for a suite and environment. Returns pass/fail and a breakdown of failing metrics.
JSON response
{
"passed": false,
"failed_metrics": [
{ "name": "correctness", "score": 0.62, "threshold": 0.75 }
]
}
GET /projects/{id}/scores
Query historical eval scores for a project. Supports date range filtering and metric name filtering.
Next steps
- CI integration guide for using the gate endpoint in pipelines
- SDK reference for higher-level abstractions