Set up your account
Go from no account to a working API key in about fifteen minutes. Sign up, verify your email, add funds, create a key and make a free test call, with every screen explained.
This page takes you in a straight line from "I have nothing" to "my key works". You do not need to write code. You will click through the console at spicyapi.ai/console and, at the end, paste one command into a terminal.
Before your first generation you need three things:
| You need | Why | Where it is set up |
|---|---|---|
| An account with a verified email | Until the email is verified, every API call is refused with 403, even with a valid key | Step 1 |
| A balance above zero | Generations are paid from a prepaid balance in US dollars. New accounts start at $0 and there is no free tier, so the first generation on an empty account is refused with 40201 (insufficient balance) | Step 2 |
| An API key kept on your own computer or server | The key tells SpicyAPI which account a request belongs to and whose balance pays for it | Step 4 |
What on this page costs money
Only adding funds (step 2) and, if you turn it on, auto top-up (step 3) take money from you. Creating an account, creating keys and the test call in step 6 are free. A balance is only used when you run a generation, and a generation that fails or times out gives the money back automatically.
Before you start
- Age. You must be at least 18 to hold an account.
- Where you are. SpicyAPI is not available in mainland China or in a small number of other regions. Sign-up and payments check where they come from, and requests from those regions are refused. See Content and usage responsibility.
- Sign-up may be closed for a while. Accounts are opened in batches. If the sign-up page says Accounts open in batches, choose Request access and you will be told when your account can be created. You can still read the model catalog, schemas and prices without an account.
Step by step
Create your account and verify your email
Open spicyapi.ai/register. There are three ways to sign up:
| Option | What you enter | Good to know |
|---|---|---|
| Continue with Google or Continue with GitHub | Nothing: you approve on Google's or GitHub's page | The email from that account is used. If the provider has already verified it, there is no separate verification email. The account has no password until you set one in Settings → Password (you need one later to close the account or hand over a team) |
| Email account | Email address and a password of at least 12 characters | We email you a verification link |
Tick the agreement to the Terms of Service and Privacy Policy, then choose Create account.
What you should see: for an email account, a page titled Check your inbox. Open the email and click the link. The page Email verified confirms it, and Go to the console takes you in.
What just happened: your account exists, but it can only call the API once the email is verified. Until then the console shows the banner Email not verified — API calls are blocked.
- The link works once and expires after 24 hours. If it has expired, open the link anyway and use Send a fresh verification link, or choose Verify on the console banner.
- Nothing arrived after a few minutes? Check your spam folder, then use Send it again.
Add funds
Open Billing in the console: spicyapi.ai/console/billing. Under Add funds:
- Choose an amount. Pick one of the preset amounts (for example $10, $25, $50 or $100) or Custom and type your own. The console shows the smallest and largest amount you can add in one payment. Online payments take at most two decimal places.
- Look for a bonus. Some amounts come with a promotional bonus, shown as +$… bonus before you pay. The bonus is added as a separate entry next to the amount you paid.
- Choose a payment option and follow the tab below.
Accepted: Visa, Mastercard, American Express and JCB, plus Apple Pay and Google Pay where your browser and device support them.
- Select Card and choose Continue to Stripe · $….
- A secure checkout page opens. Enter your card there and pay. SpicyAPI never sees or stores your card number.
- You are returned to Billing.
What you should see: first Payment submitted, then a confirmation that the amount is in your balance. Available balance goes up and Balance activity shows a Top-up entry (and a Bonus entry if one applied).
How long it takes: usually a few seconds. The balance changes only after the payment processor's signed confirmation reaches us, so refresh the page after a moment if it has not changed yet.
If something goes wrong:
- Checkout canceled means nothing was charged and your balance did not change. You can simply try again.
- Closed the checkout page before paying? Nothing was charged. The unpaid order under Top-up orders closes on its own; just start a new top-up.
- A card issued in a region we cannot serve is not added to your balance. The order stays pending and our team reviews it; contact Support with the order ID.
Other messages you may see:
- Top-up is unavailable or A top-up order cannot be created right now: top-ups are temporarily closed, or you have too many pending orders. Finish or cancel the old ones under Top-up orders, or try again later.
- The connection dropped, so the result is unknown: check Top-up orders before trying again, so you do not pay twice.
Optional: turn on auto top-up
Auto top-up charges a saved card for you when your balance runs low, so long jobs do not stop halfway with 40201. It only works with a card.
- In Billing, find Auto top-up and choose Save payment method securely.
- Enter your card on the secure page that opens. Your card details stay with the payment processor.
- Back in Billing you see Checking your payment method, then Payment method saved. If you see That card can't be used here, nothing was saved; try a different card.
- Fill in three fields:
- Top up below: the balance that triggers a charge.
- Amount per top-up: how much each charge adds. It has to be within the same range as a normal top-up.
- Monthly cap: the most auto top-up may charge in one calendar month. It cannot be lower than the amount per top-up.
- Tick the authorization and choose Turn on auto top-up.
What you should see: Auto top-up is now on, with these limits. The card shows the rule, for example "Tops up $50 when your balance drops below $10", and Used this month.
The rules, exactly:
- We check your balance about every 30 seconds to 2 minutes. When your available balance is at or below the threshold, we charge the saved card for the set amount.
- Each charge is a normal top-up order tagged Auto top-up. It receives the same bonus as a manual top-up of the same amount, and you can issue an invoice for it.
- The monthly cap counts calendar months in UTC. Once it is used up, auto top-up waits until the 1st of the next month. Failed charges do not count toward the cap.
- If a charge fails, we try again after 1 hour, and again after 6 hours. If the third attempt in a row also fails, auto top-up turns itself off. If the bank declines the card outright (for example a stolen or closed card), it turns off immediately. A successful charge resets the count.
- After it has turned itself off, fix the card (or save a new one) and turn it on again.
- Turn off auto top-up stops future charges at any time. It never changes your balance or top-ups that already went through.
Pair it with a low-balance alert
In Notifications, turn on Low balance alert and choose a threshold. You get a notification (and an email, for accounts with an email address) when the balance drops below it, even if auto top-up is off or has failed.
Create an API key
Open API keys: spicyapi.ai/console/keys and choose Create key (or Create your first key).
Which account pays for this key
A key belongs to the scope selected at the top of the left sidebar. If you have never joined a team, that is always Personal, and the key spends your own balance. If you pick a team there first, the key belongs to that team and every task sent with it is paid by the team owner. See Console and teams.
In the dialog Create an API key, only the name is required. Everything under Advanced can be changed later.
Name. Name the key after whatever will use it, such as production backend or my laptop. You will need to recognize it when you revoke it. Up to 120 characters.
Spend caps (under Advanced, in US dollars). When a cap is reached, this key refuses new tasks with 40202 until the period rolls over. Your other keys keep working. Money set aside for tasks that are still running counts toward every cap.
| Field | What it limits | When it resets | If you leave it blank when creating |
|---|---|---|---|
| Daily cap | What this key may spend in one day | Every day at 00:00 UTC | No daily cap. It is the one worth setting first: it stops a leaked key or a runaway script within a day |
| Monthly budget | What this key may spend in one calendar month | The 1st of each month, 00:00 UTC | No monthly cap |
| Lifetime cap | Everything this key may ever spend | Never | No lifetime cap |
Enter 0 in any cap for no limit; a blank field means the same.
Clearing a cap removes it
When you later choose Edit on an existing key, an empty cap field means no cap. To keep a limit, leave a number in the field.
Access.
- Allowed models. Leave it at All models (no restriction) and the key can call every model, including models added later. Choose specific models and the key refuses any other model with
40301. - IP allowlist. Any address accepts calls from anywhere. Only these accepts calls only from the addresses you list: IPv4, IPv6 or CIDR ranges such as
203.0.113.10, 198.51.100.0/24, separated by commas, up to 64 entries. Use the public address your server calls from, not an address inside your office or home network. Calls from anywhere else are refused with40302. Leave this at Any address for a laptop, whose address changes. - Expiry. Choose 7, 30 or 90 days, 1 year, Never or an exact date. The key stops working at the end of that day, UTC, and from then on it gets the same
401as a revoked key.
Choose Create.
What you should see: a dialog Key created showing the full key, which starts with sk-spicy-. Copy it with Copy the key, or choose Save as a file. Tick I've stored this key somewhere safe, then Done.
What just happened: this is the only time the full key is shown. We keep only a one-way hash of it, so nobody, including our support team, can show it to you again. If you lose it, revoke it and create a new one.
Treat the key like the password to your balance
Anyone who has the key can spend your balance until a cap or the balance stops them.
- Keep it in a password manager, in an environment variable on your own computer (next step), or in your server's secret settings.
- Never put it in a web page, a browser extension, a mobile app or a desktop app you give to other people. Anything that runs on someone else's device can be read out of it. If a website or app needs generations, have it call your own server, and let your server call SpicyAPI.
- Never commit it to Git, paste it into chat or email, show it in a screenshot, or send it to support.
Later, on the same page:
- Edit changes the name, caps, allowed models, IP allowlist and expiry. Changes take effect straight away.
- Revoke stops the key immediately and cannot be undone. Tasks that were already accepted keep running and are still charged.
- You can hold up to 50 active keys in one scope. Use one key per app or environment, so you can revoke one without stopping the others.
Put the key in SPICY_API_KEY
An environment variable is a named value your terminal hands to the programs it starts. The official SDK, CLI and MCP server, and every example in these docs, read your key from one called SPICY_API_KEY. That way the key never has to be typed into a command or saved inside a project.
Open a terminal first: on macOS press Cmd + Space, type Terminal and press Enter. On Windows open the Start menu, type PowerShell and open Windows PowerShell.
For the current terminal window only (forgotten when you close it):
export SPICY_API_KEY="sk-spicy-paste-your-key-here"Permanently: add that same export line to the end of your shell's startup file, which runs each time a terminal opens. On macOS the file is ~/.zshrc; on most Linux systems it is ~/.bashrc.
nano ~/.zshrcPaste the line at the bottom, press Ctrl + O then Enter to save, and Ctrl + X to exit. Then open a new terminal window.
Check it without printing the whole key:
echo "${SPICY_API_KEY:0:9}"Expected: sk-spicy-. An empty line means the variable is not set in this window.
On a server, set SPICY_API_KEY in your hosting provider's secret or environment settings instead of a file in your project.
Make a free test call
This asks for your balance. It costs nothing, creates nothing, and proves three things at once: the key is set, the key is valid, and your account is allowed to call the API.
curl https://api.spicyapi.ai/api/v1/chat/credit \
-H "Authorization: Bearer $SPICY_API_KEY"Expected: a response like this (shortened):
{
"code": 200,
"msg": "success",
"data": {
"available": "25",
"held": "0",
"total": "25"
},
"request_id": "req_01k..."
}What it means: "code": 200 is success. Amounts are US dollars written as text. available is what you can spend on new generations, held is set aside for generations still running, and total is the two together. The real response also contains a funding object that separates paid funds from any promotional grants; you can ignore it for now.
If you get something else:
| You see | Meaning | Fix |
|---|---|---|
"code": 401 with Missing credentials… | The key did not reach us | SPICY_API_KEY is not set in this window. Repeat step 5 and open a new window |
"code": 401 with API key format is not recognized… | What was sent is not a SpicyAPI key | Copy the key again; it must start with sk-spicy- and have no spaces or quotes inside |
"code": 401 with Credentials are invalid or expired | The key is wrong, revoked or past its expiry date | Check the key's status on API keys, or create a new one |
"code": 403 with This account cannot call the API right now | The key is fine, but the account cannot use the API yet, usually because the email is not verified | Verify your email (step 1), then try again |
"code": 40302 | Your IP allowlist does not include the address you are calling from | Edit the key and add your public address, or switch back to Any address |
"code": 40303 | The service is not available where you are | See Content and usage responsibility |
"available": "0" | Everything works, but there is no money yet | Finish step 2. Your first generation would be refused with 40201 |
Prefer not to use curl? The CLI does the same with spicyapi balance.
You are ready. Before your first generation, check what it will cost: every model page on spicyapi.ai shows its price, and the API can quote a task before you create it.
Next steps
Quickstart
Pick a model, create your first task and download the result over the HTTP API
Command-line tool (CLI)
Browse models, check prices and generate from a terminal, without writing code
MCP server
Let an AI assistant such as Claude or Cursor generate for you, confirming every charge first
TypeScript SDK
Call SpicyAPI from your own JavaScript or TypeScript code
Python SDK
Call SpicyAPI from your own Python code
Go SDK
Call SpicyAPI from your own Go code
PHP SDK
Call SpicyAPI from your own PHP code
Java SDK
Call SpicyAPI from your own Java code
Billing
How a charge works, spend caps, the ledger and invoices in detail
Console and teams
What every console page does, and how to share keys and limits with a team
Balance rules
- Dollars, not points. Prices and balances are in US dollars, so the price on a model page is what comes out of your balance. There is no subscription and no monthly fee.
- Paid balance never expires. Promotional credit, such as a referral reward or a top-up bonus, is spent first and expires on the date shown in Billing.
- You pay per task. When a task is accepted, its estimated price is set aside ("held") from your available balance. If the task succeeds, you are charged for what was actually used, never more than the amount held, and the rest comes back. Failed or expired tasks normally release the full hold. Some content refusals are charged at the accepted quote only when the model page explicitly discloses this exception. Check
settledandcostfor the final charge. - A balance is not cash. Top-ups are non-refundable, and a balance cannot be paid out. If a charge looks wrong, such as a charge that contradicts the model page’s billing terms, a top-up charged twice or a payment that never reached your balance, email
support@spicyapi.aifrom your account's address with the task or order ID, the date and the amount. We investigate and correct confirmed errors on your balance. Details are in the refund policy. - Bonuses have no cash value. A bonus is booked separately from what you paid and cannot be refunded or paid out.
- Promotional grants and approved credit appear under Balance details in Billing only if your account has them. Grants can be limited to certain models and can expire. Credit is only available after a separate approval.
- Payment disputes pause spending. If a card payment is disputed with your bank (a chargeback), new tasks on the account are paused while it is investigated. Contact us first if a charge looks wrong; it is usually faster.
- Closing your account forfeits the balance. It is not refunded or paid out, so spend it first. See Console and teams.
- Team keys use the owner's balance. Members of a team never pay for its tasks and never see the owner's balance.
Invoices and receipts
Everything is under Billing → Invoices: spicyapi.ai/console/billing/invoices.
- Add your invoice details once. Choose Add invoice details. Required: a name (your organization or your own name), address line 1, city and country. A tax ID (for example an EU VAT ID) is optional. Details are printed exactly as you enter them, and only Latin, Greek and Cyrillic characters can be printed, so write a Japanese or Korean company name in its registered romanized form.
- Choose New invoice and pick what it is for:
- A top-up payment: a payment invoice for one top-up you have paid. This is the document to claim the payment, for example for reimbursement or bookkeeping.
- A month of usage: an itemised list of what you spent in one closed month. It is not a payment receipt. That money was paid when you topped up, so do not claim both documents for the same money.
- Choose Issue invoice, then Download PDF.
Good to know:
- No VAT or GST is added. Every invoice carries a reverse-charge notice, so any tax due in your own country is yours to account for.
- Each paid top-up and each closed month can be invoiced once. If one already exists, download it instead.
- Wrong details? Fix them and choose Reissue: the old invoice is marked voided and a replacement with a new number covers the same thing. Use Void without replacing only when an invoice covers the wrong top-up or month. Only a limited number of invoice changes are allowed per hour.
- Account statements further down the same page are CSV snapshots of one month's balance activity, for your own reconciliation. They are not receipts and not tax documents.
- For a team, invoices belong to the team owner's account, because the owner paid.

