Guide
Run Claude Code on Free DeepSeek: Set It Up Now, Start Nov 24
Claude Code, Python and curl setups you can verify for free today
On this page
HiAPI's Black Friday runs from Nov 24, 00:00 PT to Nov 30, 23:59 PT. During that week, accounts that have topped up get 10M free DeepSeek V4.1 Flash tokens a day, and five environment variables put Claude Code on it. You can set everything up and check it today, so it works the minute the deal opens. Python and curl setups are below too.
One thing to get right: free requests carry a promotion header. Requests without it are billed at the normal price ($0.44 per million input tokens, $1.32 per million output).
What you need: one key, one header
| API key | Create one |
| Model | deepseek-v4.1-flash |
| Base URL | https://api.hiapi.ai/v1 (OpenAI format) or https://api.hiapi.ai (Anthropic format, for Claude Code) |
| Header | X-HiAPI-Promotion: deepseek-v41-flash-bf2026 |
export HIAPI_API_KEY="sk-your-key"
Claude Code
Point Claude Code at HiAPI, set both the main and background model to DeepSeek, and add the header:
export ANTHROPIC_BASE_URL="https://api.hiapi.ai"
export ANTHROPIC_AUTH_TOKEN="$HIAPI_API_KEY"
export ANTHROPIC_MODEL="deepseek-v4.1-flash"
export ANTHROPIC_DEFAULT_HAIKU_MODEL="deepseek-v4.1-flash"
export ANTHROPIC_CUSTOM_HEADERS="X-HiAPI-Promotion: deepseek-v41-flash-bf2026"
claude
Setting ANTHROPIC_DEFAULT_HAIKU_MODEL matters: Claude Code uses a small model for background work such as titles and summaries, and you want those calls on the free model too. Run these exports in a separate shell (or a script) so your usual Claude Code setup stays untouched. More on the HiAPI connection: Claude Code guide.
Python (OpenAI SDK)
import os
from openai import OpenAI
client = OpenAI(
api_key=os.environ["HIAPI_API_KEY"],
base_url="https://api.hiapi.ai/v1",
default_headers={"X-HiAPI-Promotion": "deepseek-v41-flash-bf2026"},
)
resp = client.chat.completions.create(
model="deepseek-v4.1-flash",
messages=[{"role": "user", "content": "Write a Python function that dedupes a list while keeping order."}],
)
print(resp.choices[0].message.content)
default_headers adds the header to every request from this client, so the rest of your code stays the same.
curl
curl https://api.hiapi.ai/v1/chat/completions \
-H "Authorization: Bearer $HIAPI_API_KEY" \
-H "Content-Type: application/json" \
-H "X-HiAPI-Promotion: deepseek-v41-flash-bf2026" \
-d '{"model":"deepseek-v4.1-flash","messages":[{"role":"user","content":"Explain this regex: ^(?=.*\\d).{8,}$"}]}'
Check it today: a 403 before the event, no charge
Send any request above before Nov 24, 00:00 PT and you get a 403 with the error code promotion_not_active. That request isn't charged. Seeing it means the header reached HiAPI and your setup is right; just wait for the deal to open. If you get a normal answer instead, the header didn't go through and the request was billed at the normal price. Check the spelling and that your tool really sends custom headers.
Once the deal is live, open the usage log in the HiAPI console after your first request. The DeepSeek request should show $0.
Any other tool works the same way if it lets you set a custom OpenAI-compatible base URL, a model name and a custom request header. If it can't send custom headers, its requests are billed normally.
Limits
- Your account needs at least one successful top-up, of any amount. If you've never topped up, a small one before Nov 24 is enough.
- 10M tokens per account per day, reset at midnight PT; Nov 24, 00:00 PT to Nov 30, 23:59 PT.
- Only
deepseek-v4.1-flashis free. DeepSeek V4 Pro and other models are billed normally. - Free tokens cost $0, so they don't count toward spend-back.
- Enterprise accounts aren't eligible.
What to throw at it on Nov 24
- Let an agent take on the backlog. Tests nobody wrote, a refactor you've been putting off, docs for a module. A coding-agent turn on a mid-size repo uses roughly 200K tokens, so 10M covers dozens a day.
- Evaluate on real data. Swap V4.1 Flash into an existing pipeline and compare outputs on a few thousand real inputs, for $0.
- Long-context reads. The 1M-token window holds a whole codebase or a stack of contracts in one request.
Running image or video jobs the same week? Top-ups get up to 10% bonus and media spend earns up to 20% back: the credit math.
Related articles
View all articles →-
Guide
Gemini Omni 1.2 Flash Integration Guide: Input Modes, Parameters, and Spec-Based Billing
The minimal integration path for the public model gemini-omni-1.2-flash: input modes, parameter constraints, copyable requests, and resolution-based billing
-
Guide
How Much to Top Up This Black Friday: 18% Extra at $100, 30% at $500
Four budgets from $50 to $500, in video seconds and images
3 min read -
Guide
Get a DeepSeek API Key Before Black Friday 2026 + 4 More Steps
Key, test run, job queue, one top-up, and your local start time
3 min read