API Reference

Documentation

The AgnosLogic API is a JSON REST API over HTTPS. Authenticate with Bearer tokens. All responses include latency metrics and calibrated verdicts.

# Base URL https://agnoslogic.com/v1

Authentication

Every request requires a Bearer token in the Authorization header. Get your API key from the dashboard after signing in with Google.

Authorization: Bearer agnoslogic_YOUR_API_KEY

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".

Note: Cold starts typically add 30–90 seconds on the first request after inactivity. Subsequent requests are sub-100ms.
# Example: handle both sync and async responses response = requests.post("/v1/ask", ...) data = response.json() if "jobId" in data: # Poll until complete while True: time.sleep(2) status = requests.get(f"/api/jobs/{{data["jobId"]}}").json() if status["status"] == "completed": data = status["result"] break

Rate limits

Rate limits are enforced per API key based on your plan. Usage resets at midnight UTC.

PlanDailyMonthly
Explorer (free)15450
Builder50010,000
EnterpriseUnlimitedUnlimited

Errors

StatusMeaning
400Missing or invalid request parameters
401Missing or invalid API key
202Job queued — poll for result
429Rate limit exceeded
502Inference backend unavailable

POST/v1/score

Score a piece of text for epistemic risk. Returns a verdict without generating new content.

FieldTypeDescription
textrequiredstringText to analyze. Max 2000 characters.
curl https://agnoslogic.com/v1/score \ -H "Authorization: Bearer YOUR_API_KEY" \ -H "Content-Type: application/json" \ -d '{"text": "Water boils at 100°C at sea level."}'
# Response { "verdict": "verified", "category": "LOW", "latency_ms": 87 }

POST/v1/ask

Generate an answer to a question with a built-in verdict.

FieldTypeDescription
questionrequiredstringThe question to answer.
max_tokensintegerMax 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.

# Response while running { "status": "running", "runpod_status": "IN_PROGRESS" } # Response when complete { "status": "completed", "result": { "verdict": "verified", "category": "LOW", "response": "..." } }