API Reference
The Coaxiom API gives you programmatic access to real-time and historical AI inference prices across 15+ AI providers. All responses are JSON. Authentication uses bearer tokens.
/v1/prices and /v1/providers endpoints are free — no API key required for up to 100 requests/day.
Authentication
Pass your API key in the Authorization header as a bearer token. Keys are prefixed cxm_ and generated in your dashboard.
Authorization: Bearer cxm_your_api_key_here
For unauthenticated requests (free tier), omit the header. Rate limits apply per IP address.
Base URL
https://coaxiom.io/api/v1/
All endpoints are HTTPS only. HTTP requests will be redirected. The API is stateless — no sessions or cookies.
Quick Start
Query prices for Llama 3.1 70B across providers (coming soon):
curl https://coaxiom.io/api/v1/prices?model=llama-3.1-70b
import requests
res = requests.get(
"https://coaxiom.io/api/v1/prices",
params={"model": "llama-3.1-70b"},
headers={"Authorization": "Bearer cxm_your_key"} # optional
)
data = res.json()
for p in data["prices"]:
print(f"{p['provider']:15} ${p['blended_per_1m']:.4f}/1M")
const res = await fetch(
'https://coaxiom.io/api/v1/prices?model=llama-3.1-70b',
{ headers: { 'Authorization': 'Bearer cxm_your_key' } }
);
const { prices } = await res.json();
prices.forEach(p => console.log(p.provider, p.blended_per_1m));
/v1/prices
Returns live AI inference prices across all providers for a given model. This is the core endpoint — the benchmark feed for inference cost intelligence.
Query Parameters
| Parameter | Type | Description |
|---|---|---|
| modeloptional | string | Model slug to filter by. If omitted, returns all tracked models. Example: llama-3.1-70b |
| provideroptional | string | Filter to a single provider. Example: groq |
Example Request
GET /api/v1/prices?model=llama-3.1-70b
Authorization: Bearer cxm_your_key
Example Response
{
"model": "llama-3.1-70b",
"updated_at": "2026-05-12T14:32:00Z",
"prices": [
{
"provider": "groq",
"input_per_1m": 0.05,
"output_per_1m": 0.10,
"blended_per_1m": 0.075,
"context_window": 131072,
"status": "live"
},
{
"provider": "together",
"input_per_1m": 0.18,
"output_per_1m": 0.18,
"blended_per_1m": 0.18,
"context_window": 131072,
"status": "live"
}
]
}
/v1/history
Returns OHLC (open, high, low, close) price history for a model+provider pair. This is the only time-series AI inference pricing feed in existence — our core data moat.
Query Parameters
| Parameter | Type | Description |
|---|---|---|
| modelrequired | string | Model slug. Example: llama-3.1-70b |
| providerrequired | string | Provider slug. Example: groq |
| daysoptional | integer | Number of days of history. Default: 30. Max: 365 (Team tier). |
| intervaloptional | string | Candle interval: 1d (default), 1h (Team+). |
Example Request
GET /api/v1/history?model=llama-3.1-70b&provider=groq&days=30
Authorization: Bearer cxm_your_key
Example Response
{
"model": "llama-3.1-70b",
"provider": "groq",
"interval": "1d",
"candles": [
{
"date": "2026-04-12",
"open": 0.075,
"high": 0.082,
"low": 0.071,
"close": 0.075,
"change_pct": 0.0
},
{
"date": "2026-04-13",
"open": 0.075,
"high": 0.075,
"low": 0.060,
"close": 0.060,
"change_pct": -20.0
}
]
}
402 Payment Required.
/v1/compare
Cross-model price comparison. Returns a normalized comparison matrix across up to 5 models simultaneously — useful for cost-optimal model selection in production routing.
Query Parameters
| Parameter | Type | Description |
|---|---|---|
| modelsrequired | string | Comma-separated model slugs, max 5. Example: llama-3.1-70b,gpt-4o,claude-3-5-sonnet |
| provideroptional | string | Filter to a specific provider across all models. |
Example Request
GET /api/v1/compare?models=llama-3.1-70b,gpt-4o,deepseek-v3
Authorization: Bearer cxm_your_key
Example Response
{
"updated_at": "2026-05-12T14:32:00Z",
"models": [
{
"model": "llama-3.1-70b",
"cheapest_provider": "groq",
"cheapest_blended": 0.075,
"avg_blended": 0.21,
"provider_count": 12
},
{
"model": "gpt-4o",
"cheapest_provider": "openai",
"cheapest_blended": 3.75,
"avg_blended": 4.10,
"provider_count": 3
}
]
}
/v1/models
Returns the full catalog of tracked models with metadata. Use this to discover valid slugs for other endpoints.
Example Request
GET /api/v1/models
Example Response
{
"models": [
{
"slug": "llama-3.1-70b",
"display_name": "Llama 3.1 70B",
"family": "llama",
"params_b": 70,
"context_window": 131072,
"provider_count": 12,
"is_benchmark": true
},
{
"slug": "deepseek-v3",
"display_name": "DeepSeek V3",
"family": "deepseek",
"params_b": 671,
"context_window": 131072,
"provider_count": 8,
"is_benchmark": false
}
]
}
/v1/providers
Returns all tracked inference providers with status and model counts.
Example Request
GET /api/v1/providers
Example Response
{
"providers": [
{
"slug": "groq",
"name": "Groq",
"model_count": 6,
"status": "operational",
"signup_url": "https://console.groq.com"
},
{
"slug": "together",
"name": "Together AI",
"model_count": 14,
"status": "operational",
"signup_url": "https://api.together.ai"
}
]
}
API Routing Developer+
Coaxiom's routing layer is an OpenAI-compatible endpoint that automatically selects the cheapest live provider for your model. Drop it in as your baseURL and Coaxiom handles the rest.
X-Provider-Keys header. This keeps Coaxiom as a neutral routing layer and ensures your traffic operates under your own provider agreements.
Base URL
https://coaxiom.io/api/v1/route
Authentication Headers
| Header | Required | Description |
|---|---|---|
Authorization | Yes | Bearer cxm_your_key — your Coaxiom API key |
X-Provider-Keys | Recommended | base64-encoded JSON of your provider API keys (see below) |
X-Provider-Keys format
Encode a JSON object mapping provider slugs to your API keys, then base64-encode the result:
// Build the header value:
const providerKeys = {
together: "sk-...",
groq: "gsk_...",
fireworks: "fw-...",
nebius: "...",
};
const headerValue = btoa(JSON.stringify(providerKeys));
// → pass as: "X-Provider-Keys": headerValue
OpenAI-compatible chat completions. Routes to cheapest available provider. Falls back to static priority order if price data is unavailable.
// Node.js — native SDK
import { CoaxiomClient } from '@coaxiom/sdk';
const client = new CoaxiomClient({
apiKey: 'cxm_your_key',
providerKeys: {
together: 'sk-...',
groq: 'gsk_...',
fireworks: 'fw-...',
},
});
const res = await client.chat({
model: 'llama-3.3-70b',
messages: [{ role: 'user', content: 'Hello' }],
});
console.log(res.choices[0].message.content);
console.log(res._coaxiom); // routing metadata
# Python — native SDK
from coaxiom import CoaxiomClient
client = CoaxiomClient(
api_key="cxm_your_key",
provider_keys={
"together": "sk-...",
"groq": "gsk_...",
},
)
res = client.chat(
model="llama-3.3-70b",
messages=[{"role": "user", "content": "Hello"}],
)
print(res["choices"][0]["message"]["content"])
print(res["_coaxiom"]) # routing metadata
# OpenAI drop-in (Python)
from coaxiom import CoaxiomClient
client = CoaxiomClient(api_key="cxm_your_key", provider_keys={"groq": "gsk_..."})
openai = client.openai_client() # returns openai.OpenAI pointing at Coaxiom
res = openai.chat.completions.create(
model="llama-3.3-70b",
messages=[{"role": "user", "content": "Hello"}],
)
print(res.choices[0].message.content)
Response — _coaxiom metadata block
Every routing response includes a _coaxiom key alongside the standard OpenAI response fields:
{
"id": "chatcmpl-...",
"choices": [...],
"usage": { "prompt_tokens": 12, "completion_tokens": 48, "total_tokens": 60 },
"_coaxiom": {
"provider": "groq",
"provider_name": "Groq",
"model_slug": "llama-3.3-70b",
"provider_model_id": "llama-3.3-70b-versatile",
"routed_by_price": true,
"price_per_1m_usd": 0.59,
"latency_ms": 412,
"key_source": "customer",
"version": "1.0"
}
}
key_source: "customer" confirms your X-Provider-Keys key was used. "platform" indicates Coaxiom's shared key was used (dev/test only).
List all routable models and which providers are configured for each.
GET /api/v1/route/models
Authorization: Bearer cxm_your_key
{
"models": [
{
"slug": "llama-3.3-70b",
"providers": [
{ "provider": "groq", "model_id": "llama-3.3-70b-versatile", "configured": true },
{ "provider": "together", "model_id": "meta-llama/Llama-3.3-70B-Instruct-Turbo", "configured": false }
]
}
],
"count": 45
}
configured: true reflects Coaxiom's platform keys. Your X-Provider-Keys may unlock additional providers regardless of this field.
Supported provider slugs
Use these slug names as keys in your X-Provider-Keys JSON object:
together
groq
fireworks
deepinfra
nebius
cerebras
mistral
sambanova
xai
hyperbolic
novita
lambda
nvidia
perplexity
cloudflare
digitalocean
openai
Install the SDKs
# Python
pip install coaxiom
# Node / TypeScript
npm install @coaxiom/sdk
Plans & Rate Limits
All limits are per rolling 24-hour window (free) or per calendar month (paid tiers). Exceeding limits returns 429 Too Many Requests.
| Plan | Price | Requests | /prices | /history | /compare | Webhooks |
|---|---|---|---|---|---|---|
| Free | $0 | 100 / day | ✓ | — | — | — |
| Developer | $19 / mo | 10,000 / mo | ✓ | ✓ | — | — |
| Team | $79 / mo | 100,000 / mo | ✓ | ✓ | ✓ | ✓ |
| Enterprise | Custom | Unlimited | ✓ | ✓ | ✓ | ✓ |
Error Codes
All errors return JSON with an error field describing what went wrong.
| Code | Meaning | Common Cause |
|---|---|---|
| 400 | Bad Request | Missing required parameter or invalid value |
| 401 | Unauthorized | Invalid or missing API key |
| 402 | Payment Required | Endpoint requires a paid tier |
| 404 | Not Found | Model or provider slug doesn't exist |
| 429 | Too Many Requests | Rate limit exceeded. Check Retry-After header |
| 500 | Internal Server Error | Something broke on our end. Retry with exponential backoff |
Error Response Shape
{
"error": "model not found",
"code": 404
}
Response Schemas
Price Object
OHLC Candle Object
Changelog
v1.1 — May 2026
- API Routing launched:
POST /api/v1/route/chat/completions— OpenAI-compatible, routes to cheapest live provider X-Provider-Keysheader: customers supply their own provider credentials — Coaxiom acts as pure routing layer- Python SDK (
pip install coaxiom) and Node SDK (npm install @coaxiom/sdk) released _coaxiommetadata block in all routing responses: provider, price, latency, key_source- Security notification emails: API key created, API key revoked, new device sign-in
v1 — May 2026
- Initial public API launch
- Endpoints:
/prices,/history,/compare,/models,/providers - 15+ providers tracked at launch
- OHLC history available from index inception date