DeepSeek API, pay as you go
DeepSeek’s models through the MegaBrain API, without an account on the DeepSeek platform. Pay per token from a prepaid US-dollar balance at the prices in the table; the same key opens Claude, GPT, Gemini and image and video generation.
DeepSeek models and prices
Prices in US dollars per 1M tokens, from the MegaBrain catalogue; they update automatically.
| Model | Input | Output | Context |
|---|---|---|---|
| DeepSeek V4 Pro 0423 deepseek/deepseek-v4-pro | $1.7 | $3.4 | 1M |
| DeepSeek V4.1 Flash deepseek/deepseek-v4.1-flash | $0.14 | $0.57 | 1M |
| DeepSeek V4 Flash 0423 deepseek/deepseek-v4-flash | $0.11 | $0.22 | 1M |
One balance for DeepSeek and every other lab
You do not top up a separate DeepSeek account: you create a key in MegaBrain, and requests to DeepSeek models are paid from the same US-dollar balance as Claude, GPT or Gemini, at the prices in the table.
Your code barely changes
The DeepSeek API and the MegaBrain API are both OpenAI-compatible. Change the base URL to https://getmegabrain.com/api/gateway/v1, the key to your MegaBrain key, and set model to an id from the table: they start with deepseek/.
First request
The API is OpenAI-compatible: the official SDK, LangChain and any client with a base URL field work. Create the key on the API key page after you sign up.
from openai import OpenAI
client = OpenAI(
base_url="https://getmegabrain.com/api/gateway/v1",
api_key="YOUR_MEGABRAIN_KEY",
)
response = client.chat.completions.create(
model="deepseek/deepseek-v4-pro",
messages=[{"role": "user", "content": "Hello! What can you do?"}],
)
print(response.choices[0].message.content)Questions and answers
Do I need a DeepSeek platform account?
No. Sign up on MegaBrain, top up the balance by card and create a key. Requests to DeepSeek are paid from that balance for the tokens actually used.
How are requests paid for?
From a prepaid balance in US dollars, for the tokens actually used: input and output separately, at the price per 1M tokens in the table. No subscription is needed: top up by card and pay as you go.
Will code written for the DeepSeek API work?
Yes. Both APIs are OpenAI-compatible: change the base URL to https://getmegabrain.com/api/gateway/v1, the key to your MegaBrain key and the model name to an id from the table.
Can I use DeepSeek in Cursor or an AI agent?
Yes, in any client with a base URL field: the OpenAI SDK, LangChain, Cursor, Continue, OpenCode, Kilo Code. Step-by-step guides for agents are in MegaBrain University.
Can I try it for free?
Yes. The model mb-auto/free (Auto Free) is free and works without an API key or sign-up: each request goes to a free model available at that moment, with a limit per IP address. The paid models in the table need an account and a balance.
Get your API key
Sign-up is open. Create an account, top up the balance by card and create a key: it works for every text, image, video and audio model in the catalogue. Credits never expire.
Questions? Write to team@getmegabrain.com