Prepaid LLM API with per-key spend limits

Pay per token from a prepaid balance with no subscription, give every app its own key and monthly cap, and read each request’s exact cost from the response.

Checked 2026-11-22

·Home·Models

UplinkSwitch bills every request from a prepaid balance: no subscription, no fee on top-ups, and a hard stop at zero instead of a surprise invoice. Give each app its own key with a monthly spend limit, and one runaway job can't drain what the others need. All 568 chat models, gpt-6.1-sol and claude-sonnet-5-5 among them, are called at https://api.uplinkswitch.com/v1, and every response reports its own cost.

How the balance works

  • Top up from $10, with no fee on top. The amount you pay is the credit you get.
  • No expiry. The terms set none. Top-ups aren't refundable, so load what you expect to use.
  • Prices hold for 30 days. Each top-up locks the rates your account pays for a month; inside that window a rate can fall but not rise.
  • Zero means stop. A request the balance can't cover is refused before it runs, with nothing charged.
  • You pay for answers, not failures. An error costs nothing, and neither does an answer the model refuses by its own refusal signal (up to a daily cap).
  • Card, crypto or WeChat Pay, each with an emailed receipt and a printable receipt page.

Before a balance runs dry, accounts with recent usage get an email once it drops below roughly a day of their typical spend. Auto top-up is the alternative: save a card, pick a threshold and an amount, and the balance refills itself as an ordinary, receipted payment. It stays off until you switch it on.

One key per app, each with its own cap

Keys are free to create, so split them by what can go wrong:

KeyMonthly limitWhat it protects against
web-app-prodExpected spend plus a marginA traffic spike becoming a budget problem
background-jobsModerateA queue worker stuck retrying the same item
eval-runsLowA benchmark loop someone forgot to stop
dev-laptopLowestA test script pointed at the wrong model

How the limit counts. Settled charges plus in-flight holds for the key over its period: a UTC month by default, or a UTC day or an ISO week if you set it that way. It's checked when a request is admitted, so a burst of parallel calls can't overshoot it. A key can also carry a one-off prepaid budget of its own, separate from the periodic limit.

Other controls on the same key:

  • Model allowlist: restrict the key to named models or aliases. Anything else returns 403 scope_denied.
  • Expiry date: the key stops working on its own, which suits contractors and demos.
  • Rate limits: each key has a requests-per-minute and a concurrency limit, and optionally tokens per minute. Going over returns 429 rate_limited with retry-after.
  • Budget autopilot (optional): from 80% of its monthly limit, a key can answer with a cheaper model from the same developer instead of being refused. The x-uplink-autopilot header names the model you asked for, and x-uplink-model names the one that answered.

Create, pause, resume and revoke keys on the console's Keys page. The full key is shown once, and each key shows what it has spent this month.

The 402 codes, and who each one stops

CodeMeaningWho is affectedWhat to do
monthly_limit_reached (or weekly_limit_reached, daily_limit_reached)This key spent its limit for the periodOnly this keyRaise the limit, or wait for the period to reset; other keys keep working
key_budget_exhaustedThe key's own one-off budget is used upOnly this keyRaise the key's budget, or use another key
insufficient_balanceThe prepaid balance can't cover the requestEvery key on the accountTop up, or turn on auto top-up
spend_cap_reachedA new account hit its starting cap before its first payment settledThe new accountWait for the payment to settle

None of them charges anything, and retrying in a loop won't change the answer. Treat them as alerts, not transient errors. (Keys that set a per-end-user budget can also return user_budget_reached for one user; the API reference covers it.)

See what every request cost

Responses that aren't streamed carry three headers, in exact dollars: x-uplink-charge (what you paid), x-uplink-list-cost (the same request at the developer's list price) and x-uplink-saved (the difference). Every response, errors included, carries x-uplink-request-id. Look that id up with any key on the account and you get the input, cached and output tokens and the charge; streamed requests appear there about a minute after they finish.

Python

python
import os, openai, requests
from openai import OpenAI

KEY = os.environ["UPLINKSWITCH_API_KEY"]
client = OpenAI(base_url="https://api.uplinkswitch.com/v1", api_key=KEY)

try:
    raw = client.chat.completions.with_raw_response.create(
        model="gpt-6.1-sol",
        messages=[{"role": "user", "content": "Give me a one-line definition of idempotency."}],
    )
except openai.APIStatusError as e:
    if e.status_code == 402:
        print("blocked:", e.code)   # e.g. monthly_limit_reached, key_budget_exhausted, insufficient_balance
        raise SystemExit(1)
    raise

print(raw.parse().choices[0].message.content)
print("charge", raw.headers.get("x-uplink-charge"),
      "| at list", raw.headers.get("x-uplink-list-cost"),
      "| saved", raw.headers.get("x-uplink-saved"))

# Full record (tokens + charge), available within about a minute:
rid = raw.headers["x-uplink-request-id"]
print(requests.get(f"https://api.uplinkswitch.com/v1/requests/{rid}",
                   headers={"Authorization": f"Bearer {KEY}"}, timeout=30).json())

curl

bash
# Send a request and print only the cost headers
curl -s -o /dev/null -D - https://api.uplinkswitch.com/v1/chat/completions \
  -H "Authorization: Bearer $UPLINKSWITCH_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"model":"claude-sonnet-5-5","messages":[{"role":"user","content":"Reply with OK."}]}' \
  | grep -i '^x-uplink-'

# Then look the request up by its id
curl -s https://api.uplinkswitch.com/v1/requests/REQUEST_ID \
  -H "Authorization: Bearer $UPLINKSWITCH_API_KEY"

What the two example models cost

Model idPrice per 1M (in / out)Developer list
gpt-6.1-sol$0.582 / $2.91$2.00 / $10.00
claude-sonnet-5-5$1.164 / $2.91$2.00 / $10.00

Every model's price, next to its list price, is on the pricing index (/pricing-index), also as JSON and CSV.

A monthly plan, only if it helps

Plans swap a fixed monthly payment for more usage than it costs: Plus is $10 for $20 of usage, and the larger tiers keep the same shape. They're optional; the prepaid balance does everything above without one.

Prepaid access does not require a monthly plan

A prepaid balance pays for API usage without enrolling in a subscription. Monthly plans are a separate choice. You can also leave automatic funding disabled and decide when to add credit yourself.

Funding choiceHow to think about it
Manual card paymentAdd credit when you choose
Crypto paymentFollow the instructions for that checkout
Card auto top-upOpt into a refill triggered by your chosen threshold
Monthly planEvaluate its allowance separately from manual funding

Fund with crypto, then check the balance

  1. Sign into the console and open the funding flow.
  2. Use the asset and network offered by that checkout. Confirm the destination and payment instructions before sending.
  3. Complete the requested payment and check whether your account balance has been credited.
  4. Select an existing key or create a dedicated application key with a spending cap.

A wallet transfer and usable API credit are different checkpoints. If payment is still pending, inspect its checkout status before attempting another transfer. If credit is visible but a request is blocked, use the 402 table above to distinguish an account balance problem from a limit on that particular key. The billing walkthrough covers what each top-up records, the no-KYC note covers what signup asks for, and the OpenAI API alternative page covers moving an existing client over.

Questions and answers

No. There's no expiry on credit. What lasts 30 days is the price lock from each top-up, not the balance itself.

Not if it has a spend limit or a budget. The key stops at its own cap (monthly_limit_reached for the default monthly period), and the rest of the balance stays available to your other keys.

The Keys page shows each key's spend for the current month. For an audit trail, the signed monthly statement includes totals by key and a CSV with one row per request, verifiable at /statements/verify.

Not at the moment. The /playground has a few free turns a day on low-cost models with no sign-up, and API calls with a key draw on prepaid credit.

Prepaid usage does not depend on a monthly plan. Choose a plan only after comparing its allowance with your expected traffic.

Funding the account and changing a key limit are separate actions. Read the returned billing code before deciding which control needs attention.
Join on Telegram
Help