DeepSeek API

DeepSeek API

Three DeepSeek models run on the same passthrough as the rest of the Text API. Every model here answers on all four request formats the Text API supports.

ModelChoose it for
deepseek-v4-pro-0813The flagship reasoner — the default for hard reasoning and long agentic runs
deepseek-v4-flash-0731The fast, inexpensive tier for high-volume extraction, classification and routing
deepseek-v4-flash-vision-expV4 Flash with image input, priced identically to the text-only Flash

OpenAI Chat Completions

POST https://api.beatapi.io/v1/chat/completions

1import OpenAI from "openai";
2
3const client = new OpenAI({
4 apiKey: process.env.BEATAPI_API_KEY,
5 baseURL: "https://api.beatapi.io/v1"
6});
7
8const completion = await client.chat.completions.create({
9 model: "deepseek-v4-pro-0813",
10 max_tokens: 2000,
11 messages: [
12 { role: "user", content: "Design a resilient webhook retry strategy for a payments API." }
13 ]
14});
15
16console.log(completion.choices[0].message.content);
$curl --request POST \
> --url https://api.beatapi.io/v1/chat/completions \
> --header 'Authorization: Bearer <BEATAPI_API_KEY>' \
> --header 'Content-Type: application/json' \
> --data '{
> "model": "deepseek-v4-pro-0813",
> "messages": [
> {
> "role": "user",
> "content": "Design a resilient webhook retry strategy for a payments API."
> }
> ]
>}'

Peak-hour pricing

DeepSeek publishes a peak window, and BeatAPI bills it exactly as published: weekdays 09:00–12:00 and 14:00–18:00 Beijing time (GMT+8), every rate doubles — input, cached input and output alike. Outside that window, and all day Saturday and Sunday, the standard rate applies.

The prices on the pricing page are the off-peak rates. A batch job scheduled for 10:00 on a Tuesday costs twice what the same job costs at 20:00, or at any time over the weekend. Every response’s usage record shows which rate was applied.

All three models reason by default and report the thinking budget under usage.completion_tokens_details.reasoning_tokens, which is counted in completion_tokens and billed as output.

Other SDK formats

The same models answer on /v1/responses, /v1/messages and the Gemini-compatible endpoint. The request and response shapes are identical for every text model, so they are documented once on the Text API page rather than repeated here.

Authentication and availability

One BeatAPI key reaches every model on this page — there is no per-vendor key, no per-vendor base URL, and no separate signup. Send Authorization: Bearer <BEATAPI_API_KEY> against https://api.beatapi.io.