Qwen API

Qwen API

Three Alibaba models on the standard Text API passthrough, each flat-rated across its whole 1M-token window. Every model here answers on all four request formats the Text API supports.

ModelChoose it for
qwen3.8-maxThe current flagship
qwen3.8-flashThe fast, inexpensive tier for high-volume work
qwen3.7-maxThe previous flagship, for pipelines already calibrated on it

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: "qwen3.8-max",
10 max_tokens: 2000,
11 messages: [
12 { role: "user", content: "Explain what a vector clock buys you over a wall-clock timestamp in a distributed log." }
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": "qwen3.8-max",
> "messages": [
> {
> "role": "user",
> "content": "Explain what a vector clock buys you over a wall-clock timestamp in a distributed log."
> }
> ]
>}'

All three price cached input separately from fresh input; a repeated prompt prefix bills at the cache rate automatically, with no cache API to call.

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.