Management API
Everything you can do in the dashboard, you can do via API. Create a management key and use it to subscribe to plans, 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 plan
Section titled “2. Subscribe to a plan”Direct (saved card)
Section titled “Direct (saved card)”If you already have a card on file, subscribe instantly — no browser redirect needed:
curl -X POST https://api.cheapestinference.com/api/billing/subscribe \ -H "Authorization: Bearer mk_your_management_key" \ -H "Content-Type: application/json" \ -d '{"planSlug": "pro", "createKey": true, "keyName": "prod-api"}'{ "success": true, "data": { "subscriptionId": "sub_uuid", "planSlug": "pro", "status": "active", "currentPeriodEnd": "2026-04-24T00:00:00.000Z", "key": { "id": "key_uuid", "name": "prod-api", "apiKey": "sk_live_abc123..." } }}Set createKey: false (or omit it) to create a subscription without a key — you can create keys later with POST /api/keys/subscription.
Via Stripe Checkout (first time)
Section titled “Via Stripe Checkout (first time)”If you haven’t saved a card yet, use checkout to add one:
curl -X POST https://api.cheapestinference.com/api/billing/checkout \ -H "Authorization: Bearer mk_your_management_key" \ -H "Content-Type: application/json" \ -d '{"planSlug": "pro"}'Returns a sessionUrl — open it in a browser to complete payment. After that, your card is saved and you can use /subscribe for future subscriptions.
Available plans
Section titled “Available plans”| Plan | Billing | Price | RPM | Budget per 8h |
|---|---|---|---|---|
standard | monthly | $30/mo | 200 | $0.22 |
pro | monthly | $60/mo | 400 | $0.67 |
standard-annual | annual | ~$270/yr | 200 | $0.22 |
pro-annual | annual | ~$540/yr | 400 | $0.67 |
Annual plans charge upfront at a reduced effective monthly rate. Call GET /api/plans for the current authoritative prices. Rate limits are identical between monthly and annual.
You can hold multiple subscriptions — each one is an independent budget pool with its own keys.
Unlimited (pool) plans
Section titled “Unlimited (pool) plans”Unlimited plans give you dedicated model access with no $ budget cap, unlimited throughput, and 1 concurrent request. You subscribe to 8-hour time blocks (Asia, Europe, Americas) and are charged monthly or annually with a discount for annual billing.
See the full reference at Unlimited Subscriptions API.
Subscribe to the annual tier
Section titled “Subscribe to the annual tier”Use the -annual slug. Same flow, Stripe switches to a yearly interval and charges upfront:
curl -X POST https://api.cheapestinference.com/api/billing/subscribe \ -H "Authorization: Bearer mk_your_management_key" \ -H "Content-Type: application/json" \ -d '{"planSlug": "pro-annual", "createKey": true, "keyName": "prod-api"}'For the first-time no-card flow, /api/billing/checkout accepts the same -annual slugs and opens a Stripe Checkout session with yearly billing.
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": [ { "id": "sub_uuid", "planSlug": "pro", "status": "active", "currentPeriodEnd": "2026-03-05T10:00:00.000Z", "cancelAtPeriodEnd": false, "keyCount": 2, "keys": [ { "id": "key_uuid", "name": "prod-api", "isActive": true, "createdAt": "2026-02-03T10:00:00.000Z" }, { "id": "key_uuid", "name": "staging", "isActive": true, "createdAt": "2026-02-03T10:00:00.000Z" } ] } ], "plan": "pro", "status": "active", "creditBalance": 25.00, "stripeCustomerId": "cus_xxx", "subscriptionExpiresAt": null, "legacySubscriptionKeys": [] }}4. Create API keys from a subscription
Section titled “4. Create API keys from a subscription”Each subscription supports unlimited keys. 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": "deepseek/deepseek-chat-v3-0324", "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”# All-Models subscriptioncurl -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"}'
# Unlimited pool subscriptioncurl -X DELETE https://api.cheapestinference.com/api/pools/POOL_ID/pledge \ -H "Authorization: Bearer mk_your_management_key"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. Subscribe to ProSESSION=$(curl -s -X POST $API/billing/checkout \ -H "Authorization: Bearer $MK" \ -H "Content-Type: application/json" \ -d '{"planSlug": "pro"}' | jq -r '.data.sessionUrl')echo "Pay at: $SESSION"
# 2. After payment, check statusSTATUS=$(curl -s $API/billing/status -H "Authorization: Bearer $MK")SUB_ID=$(echo $STATUS | jq -r '.data.subscriptions[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": "deepseek/deepseek-chat-v3-0324", "messages": [{"role": "user", "content": "Hello!"}]}'