Skip to main content
The Ornn Data API authenticates requests with an API key passed as a Bearer token, and not every endpoint requires one.

The Authorization header

Send your key in the Authorization header on every request to a protected endpoint:

Getting a key

API keys are created in the dashboard, not through the API. Sign in to data.ornn.com, go to Settings → API Keys, and create one. See Manage API keys for details.
Your full key (sk_prem_... on Trial/Premium, sk_live_... on Full) is shown only once, at creation. Store it somewhere safe. If you lose it, revoke it and create a new one. You cannot retrieve it later.

Which endpoints need a key?

Ornn Data’s access tiers are Index (free), Premium ($500/month, or a 72-hour trial), and Full (custom). Index mirrors what you can already see on index.ornn.com. A sk_prem_ key unlocks every index family at daily grain with complete history, plus six forward curves (B300, GB200, and GB300 require Full). A sk_live_ key unlocks hourly, those three enterprise forward curves, and neocloud site data. See Access tiers for the full matrix and data.ornn.com/pricing for prices.

Granularity by tier

Premium is a daily-grain tier at every range: the 1-year view, the all-time view and API-key access are all served at daily. A request for granularity=hourly or auto is answered at daily rather than refused, so existing integrations keep working — read the granularity field on the response to see what you were served. The endpoints that exist only to serve sub-daily data — /api/gpu/{gpuName}/hourly, /api/gpu/{gpuName}/rolling-24h-average, /api/power/load, and /api/power/fuel-mix — return 403 for a Premium key; all are included with a Full subscription. Daily history at /api/gpu/{gpuName}/rolling-24h-average/history remains Premium. Public GPU indices (current price + trailing 3 months of history, no key): H100 SXM, H200, B200, A100 SXM4, RTX 5090. Public token indices — OTPI (current value + trailing 1 month of history, no key): anthropic, openai, google, deepseek.
On the windowed endpoints, an anonymous request returns the free window and includes "access": "public-3mo" (GPU) or "public-1mo" (OTPI). Send your API key to reach the complete history — the response then returns "access": "premium" (Premium/sk_prem_) or "access": "full" (Full/sk_live_). A non-free GPU or a non-free OTPI lab is only served with a key (otherwise 401). A startDate earlier than the free window is clamped to the window rather than refused: the GPU routes answer 200 with "access": "public-3mo", and /api/otpi answers 200 with "access": "public-1mo" as long as endDate still falls inside or after its window. /api/otpi refuses with 401 only when the whole startDateendDate range predates the free window. The Workload Cost Index and LLM coding analytics do not have a free window: /api/workload, /api/llm-coding/index, and /api/llm-coding/history require a key on every request.
To discover the free-vs-paid split at runtime — for example to render a pricing table — pair the full catalog with its -free companion: /api/gpu-types with /api/gpu-types-free, and /api/token-types with /api/token-types-free. The -free routes return the same list regardless of caller tier.
Public index and catalog routes that use the public limiter are limited to 60 requests/minute per IP. Because the limiter runs before optional authentication, sending a valid API key does not switch those requests to a separate per-key limit. See Rate limits.

Authentication errors

If the key is missing, malformed, or invalid, you get a 401:
A revoked key returns {"error": "Unauthorized", "message": "API key is inactive"}. See Errors & status codes for the full list.