Documentation
The AgnosLogic API is a JSON REST API over HTTPS. Authenticate with Bearer tokens. All responses include latency metrics and calibrated verdicts.
Authentication
Every request requires a Bearer token in the Authorization header. Get your API key from the dashboard after signing in with Google.
Async pattern (for cold starts)
API endpoints try to return synchronously within 7 seconds. If the inference backend is cold (first request in a while), the endpoint returns 202 Accepted with a jobId. Poll GET /api/jobs/:id every 2 seconds until you get status: "completed".
Rate limits
Rate limits are enforced per API key based on your plan. Usage resets at midnight UTC.
| Plan | Daily | Monthly |
|---|---|---|
| Explorer (free) | 15 | 450 |
| Builder | 500 | 10,000 |
| Enterprise | Unlimited | Unlimited |
Errors
| Status | Meaning |
|---|---|
400 | Missing or invalid request parameters |
401 | Missing or invalid API key |
202 | Job queued — poll for result |
429 | Rate limit exceeded |
502 | Inference backend unavailable |
POST/v1/score
Score a piece of text for epistemic risk. Returns a verdict without generating new content.
| Field | Type | Description |
|---|---|---|
| textrequired | string | Text to analyze. Max 2000 characters. |
POST/v1/ask
Generate an answer to a question with a built-in verdict.
| Field | Type | Description |
|---|---|---|
| questionrequired | string | The question to answer. |
| max_tokens | integer | Max response length. Default: 200. Max: 512. |
POST/v1/compare
Compare two statements and identify which is more likely to be hallucinated.
GET/v1/usage
Check current rate limit usage for your API key.
GET/v1/health
Public endpoint. No authentication required. Returns API status.
GET/api/jobs/:id
Check the status of an async job. Poll every 2 seconds.