Skip to content

Management API

Everything you can do in the dashboard, you can do via API. Create a management key and use it to subscribe to pools, create API keys, and manage your account — all programmatically. Perfect for CI/CD pipelines, SaaS platforms, and AI agents.

From the dashboard, switch to the Management Keys tab and create one. You’ll get a key starting with mk_. Save it — you won’t see it again.

All Management API requests use this key as a Bearer token:

Terminal window
curl https://api.cheapestinference.com/api/billing/status \
-H "Authorization: Bearer mk_your_management_key"

The subscription product is pool time-block subscriptions. See the full reference at Unlimited Subscriptions API.

A pool is divided into three daily 8-hour UTC time blocks. Reserve 1–3 blocks (all three = full 24/7); during reserved hours usage is unlimited, with no token caps; each key handles a limited number of simultaneous requests.

BlockHours (UTC)RegionPrice
asia00:00–08:00Asia-Pacific$52/mo
europe08:00–16:00Europe$61/mo
americas16:00–24:00Americas$59/mo

From $52/mo. Annual billing saves 15%. Subscribe via POST /api/pools/:id/subscribe:

Terminal window
# List available pools
curl https://api.cheapestinference.com/api/pools \
-H "Authorization: Bearer mk_your_management_key"
# Subscribe to the Europe block, billed monthly
curl -X POST https://api.cheapestinference.com/api/pools/POOL_SLUG/subscribe \
-H "Authorization: Bearer mk_your_management_key" \
-H "Content-Type: application/json" \
-d '{"blocks": ["europe"], "quantity": 1, "billingCycle": "month"}'

Pass "billingCycle": "year" for annual billing (−15%). You can hold multiple subscriptions on the same pool to cover more time blocks. After subscribing, create your API key with POST /api/keys/subscription (see step 4).

The full pool subscribe reference — including the no-card Stripe Checkout flow — is at Unlimited Subscriptions API.

Terminal window
curl https://api.cheapestinference.com/api/billing/status \
-H "Authorization: Bearer mk_your_management_key"
{
"success": true,
"data": {
"poolPledges": [
{
"id": "pledge_uuid",
"poolId": "pool_uuid",
"poolSlug": "frontier",
"modelName": "Frontier Pool",
"status": "active",
"monthlyPrice": "61.00",
"billingCycle": "month",
"currentPeriodEnd": "2026-05-23T15:55:16.220Z",
"cancelAtPeriodEnd": false,
"createdAt": "2026-04-23T15:55:16.220Z",
"hasKey": true,
"hours": [8, 9, 10, 11, 12, 13, 14, 15]
}
],
"chargeCurrency": "usd",
"eurPriceFactor": 1.0,
"status": "active",
"stripeCustomerId": "cus_xxx"
}
}

Active pool subscriptions appear under poolPledges. chargeCurrency / eurPriceFactor tell you which currency the next charge bills in (eurozone cards bill EUR at amount × eurPriceFactor).

Each subscription backs one API key (or a share of one combined key). After subscribing (step 2), create its key:

Terminal window
curl -X POST https://api.cheapestinference.com/api/keys/subscription \
-H "Authorization: Bearer mk_your_management_key" \
-H "Content-Type: application/json" \
-d '{"name": "prod-api", "subscriptionId": "sub_uuid"}'
{
"success": true,
"data": {
"id": "key_uuid",
"name": "prod-api",
"apiKey": "sk-abc123..."
}
}

Save the apiKey — it’s shown only once. Use it to make inference requests:

Terminal window
curl https://api.cheapestinference.com/v1/chat/completions \
-H "Authorization: Bearer sk-abc123..." \
-H "Content-Type: application/json" \
-d '{"model": "kimi-k2.7", "messages": [{"role": "user", "content": "Hello"}]}'

An Unlimited subscription covers every model in its pool with no token caps, by reserving 8-hour time blocks. Each pool exposes its own annualDiscount field on the list response. You can hold multiple subscriptions on the same pool to cover more time blocks. Full endpoint reference: Unlimited Subscriptions API.

Terminal window
# List available pools
curl https://api.cheapestinference.com/api/pools \
-H "Authorization: Bearer mk_your_management_key"
# Subscribe to the Europe block, billed annually
curl -X POST https://api.cheapestinference.com/api/pools/POOL_SLUG/subscribe \
-H "Authorization: Bearer mk_your_management_key" \
-H "Content-Type: application/json" \
-d '{"blocks": ["europe"], "quantity": 1, "billingCycle": "year"}'

Omit billingCycle (or pass "month") for monthly billing.

No API key is created automatically. Create it yourself:

Terminal window
# Create key for the most recent subscription
curl -X POST https://api.cheapestinference.com/api/keys/subscription \
-H "Authorization: Bearer mk_your_management_key"
# Or target a specific subscription
curl -X POST https://api.cheapestinference.com/api/keys/subscription \
-H "Authorization: Bearer mk_your_management_key" \
-H "Content-Type: application/json" \
-d '{"subscriptionId": "subscription_uuid"}'
# List all your subscriptions and their keys
curl https://api.cheapestinference.com/api/pools/POOL_SLUG/my-subscriptions \
-H "Authorization: Bearer mk_your_management_key"
Terminal window
# Cancel a pool subscription
curl -X DELETE https://api.cheapestinference.com/api/pools/POOL_ID/pledge \
-H "Authorization: Bearer mk_your_management_key"

This flips cancelAtPeriodEnd: true on Stripe’s side — the subscription stays active until the end of the billing period, then the key is revoked automatically. No refund is issued for unused time on annual subscriptions.

Terminal window
# List all consumption keys
curl https://api.cheapestinference.com/api/keys \
-H "Authorization: Bearer mk_your_management_key"
# Delete a key
curl -X DELETE https://api.cheapestinference.com/api/keys/KEY_ID \
-H "Authorization: Bearer mk_your_management_key"
Terminal window
MK="mk_your_management_key"
API="https://api.cheapestinference.com/api"
# 1. Pick a pool and subscribe to a time block (e.g. Europe), billed monthly
POOL_SLUG=$(curl -s $API/pools -H "Authorization: Bearer $MK" | jq -r '.data[0].slug')
curl -s -X POST $API/pools/$POOL_SLUG/subscribe \
-H "Authorization: Bearer $MK" \
-H "Content-Type: application/json" \
-d '{"blocks": ["europe"], "quantity": 1, "billingCycle": "month"}'
# 2. Check status and grab the pool subscription ID
STATUS=$(curl -s $API/billing/status -H "Authorization: Bearer $MK")
SUB_ID=$(echo $STATUS | jq -r '.data.poolPledges[0].id')
# 3. Create a key
KEY=$(curl -s -X POST $API/keys/subscription \
-H "Authorization: Bearer $MK" \
-H "Content-Type: application/json" \
-d "{\"name\": \"my-app\", \"subscriptionId\": \"$SUB_ID\"}" | jq -r '.data.apiKey')
# 4. Use it
curl https://api.cheapestinference.com/v1/chat/completions \
-H "Authorization: Bearer $KEY" \
-H "Content-Type: application/json" \
-d '{"model": "kimi-k2.7", "messages": [{"role": "user", "content": "Hello!"}]}'