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, top up credits, 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"

Deprecated. The legacy flat plans (Standard, Pro, and their annual variants) are retiredGET /api/plans now returns an empty list, and POST /api/billing/subscribe / POST /api/billing/checkout are no longer used for new subscriptions. The current subscription product is pool time-block subscriptions, described below. 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 $ budget cap and 1 concurrent request per key.

BlockHours (UTC)RegionPrice
asia00:00–08:00Asia-Pacific$39/mo
europe08:00–16:00Europe$49/mo
americas16:00–24:00Americas$45/mo

From $39/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": {
"subscriptions": [],
"poolPledges": [
{
"id": "pledge_uuid",
"poolId": "pool_uuid",
"poolSlug": "kimi26",
"status": "active",
"currentPeriodEnd": "2026-05-23T15:55:16.220Z",
"cancelAtPeriodEnd": false,
"hasKey": true
}
],
"plan": null,
"status": "active",
"creditBalance": 25.00,
"stripeCustomerId": "cus_xxx",
"subscriptionExpiresAt": null,
"legacySubscriptionKeys": []
}
}

The subscriptions array (legacy flat plans) is now always empty. Active pool subscriptions appear under poolPledges.

Each pool subscription supports unlimited keys. After subscribing (step 2), create keys and assign them to a subscription:

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_live_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_live_abc123..." \
-H "Content-Type: application/json" \
-d '{"model": "kimi-k2.6", "messages": [{"role": "user", "content": "Hello"}]}'
Terminal window
curl -X POST https://api.cheapestinference.com/api/billing/topup \
-H "Authorization: Bearer mk_your_management_key" \
-H "Content-Type: application/json" \
-d '{"amount": 50, "method": "stripe"}'

Returns a sessionUrl to complete the payment. Minimum $10.

Terminal window
# 1. Get payment address
curl -X POST https://api.cheapestinference.com/api/billing/topup \
-H "Authorization: Bearer mk_your_management_key" \
-H "Content-Type: application/json" \
-d '{"amount": 50, "method": "usdc"}'
{
"success": true,
"data": {
"address": "0x...",
"chain": "base",
"amount": "50"
}
}
Terminal window
# 2. Send USDC on Base, then verify
curl -X POST https://api.cheapestinference.com/api/billing/verify-topup \
-H "Authorization: Bearer mk_your_management_key" \
-H "Content-Type: application/json" \
-d '{"txHash": "0xabc123...", "amount": 50}'

Credit keys deduct from your prepaid balance. Optionally set a per-key budget and rate limits:

Terminal window
curl -X POST https://api.cheapestinference.com/api/keys/credit \
-H "Authorization: Bearer mk_your_management_key" \
-H "Content-Type: application/json" \
-d '{"name": "client-acme", "maxBudget": 25, "rpm": 100, "tpm": 50000}'
ParameterTypeRequiredDescription
namestringYesKey name
maxBudgetnumberNoPer-key budget in USD (omit for shared pool)
rpmnumberNoRequests per minute limit
tpmnumberNoTokens per minute limit

7. Subscribe to an Unlimited (dedicated model) plan

Section titled “7. Subscribe to an Unlimited (dedicated model) plan”

Unlimited plans give you a specific model with no $ budget cap, 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
# Unlimited pool subscription (current product)
curl -X DELETE https://api.cheapestinference.com/api/pools/POOL_ID/pledge \
-H "Authorization: Bearer mk_your_management_key"
# Legacy flat-plan subscription (retired — only for any pre-existing subscription)
curl -X POST https://api.cheapestinference.com/api/billing/cancel \
-H "Authorization: Bearer mk_your_management_key" \
-H "Content-Type: application/json" \
-d '{"subscriptionId": "sub_uuid"}'

Both paths flip 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.6", "messages": [{"role": "user", "content": "Hello!"}]}'