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.
1. Create a management key
Section titled “1. Create a management key”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:
curl https://api.cheapestinference.com/api/billing/status \ -H "Authorization: Bearer mk_your_management_key"2. Subscribe to a pool (time-block) plan
Section titled “2. Subscribe to a pool (time-block) plan”Deprecated. The legacy flat plans (Standard, Pro, and their annual variants) are retired —
GET /api/plansnow returns an empty list, andPOST /api/billing/subscribe/POST /api/billing/checkoutare 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.
| Block | Hours (UTC) | Region | Price |
|---|---|---|---|
asia | 00:00–08:00 | Asia-Pacific | $39/mo |
europe | 08:00–16:00 | Europe | $49/mo |
americas | 16:00–24:00 | Americas | $45/mo |
From $39/mo. Annual billing saves 15%. Subscribe via POST /api/pools/:id/subscribe:
# List available poolscurl https://api.cheapestinference.com/api/pools \ -H "Authorization: Bearer mk_your_management_key"
# Subscribe to the Europe block, billed monthlycurl -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.
3. Check subscription status
Section titled “3. Check subscription status”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.
4. Create API keys from a subscription
Section titled “4. Create API keys from a subscription”Each pool subscription supports unlimited keys. After subscribing (step 2), create keys and assign them to a subscription:
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:
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"}]}'5. Top up credits
Section titled “5. Top up credits”Via Stripe (card)
Section titled “Via Stripe (card)”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.
Via USDC on Base
Section titled “Via USDC on Base”# 1. Get payment addresscurl -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" }}# 2. Send USDC on Base, then verifycurl -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}'6. Create credit keys
Section titled “6. Create credit keys”Credit keys deduct from your prepaid balance. Optionally set a per-key budget and rate limits:
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}'| Parameter | Type | Required | Description |
|---|---|---|---|
name | string | Yes | Key name |
maxBudget | number | No | Per-key budget in USD (omit for shared pool) |
rpm | number | No | Requests per minute limit |
tpm | number | No | Tokens 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.
# List available poolscurl https://api.cheapestinference.com/api/pools \ -H "Authorization: Bearer mk_your_management_key"
# Subscribe to the Europe block, billed annuallycurl -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.
After subscribing — create your API key
Section titled “After subscribing — create your API key”No API key is created automatically. Create it yourself:
# Create key for the most recent subscriptioncurl -X POST https://api.cheapestinference.com/api/keys/subscription \ -H "Authorization: Bearer mk_your_management_key"
# Or target a specific subscriptioncurl -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 keyscurl https://api.cheapestinference.com/api/pools/POOL_SLUG/my-subscriptions \ -H "Authorization: Bearer mk_your_management_key"8. Cancel a subscription
Section titled “8. Cancel a subscription”# 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.
9. List and delete keys
Section titled “9. List and delete keys”# List all consumption keyscurl https://api.cheapestinference.com/api/keys \ -H "Authorization: Bearer mk_your_management_key"
# Delete a keycurl -X DELETE https://api.cheapestinference.com/api/keys/KEY_ID \ -H "Authorization: Bearer mk_your_management_key"Full flow example
Section titled “Full flow example”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 monthlyPOOL_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 IDSTATUS=$(curl -s $API/billing/status -H "Authorization: Bearer $MK")SUB_ID=$(echo $STATUS | jq -r '.data.poolPledges[0].id')
# 3. Create a keyKEY=$(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 itcurl 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!"}]}'