This page gets you from a new key to three working calls: a chat completion, a streamed reply and a transcription. All you need is curl. BroadNet Inference uses the OpenAI request shape, so once these work, any OpenAI-compatible SDK or tool will too.
1. Set your key
Create a key in the BroadNet console. New accounts get a $5 starting credit.
export BROADNET_API_KEY='paste-your-key'
Send the key only in the Authorization: Bearer header.
2. Your first chat completion
BroadNet Gemma 4 VL 26B is the one chat model that runs on the starting credit, so start there:
curl https://inference.broadnet.ai/v1/chat/completions \
-H "Authorization: Bearer $BROADNET_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "broadnet/gemma-4-26b-a4b",
"messages": [{"role": "user", "content": "Say hello in English and Arabic."}]
}'
The reply is standard chat-completions JSON. The answer is in choices[0].message.content, and usage holds the token counts you pay for.
3. Try a reasoning model
After a top-up, switch the model. GLM 5.3, Qwen3.8 27B and DeepSeek V4.1 Flash reason before they answer, and that reasoning counts toward max_tokens:
curl https://inference.broadnet.ai/v1/chat/completions \
-H "Authorization: Bearer $BROADNET_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "broadnet/glm-5.3",
"max_tokens": 2000,
"reasoning_effort": "low",
"messages": [{"role": "user", "content": "Give me a regex for a UK postcode."}]
}'
If content is empty and finish_reason is length, the budget ran out during reasoning. See why reasoning models return empty answers.
4. Stream the reply
Add "stream": true and turn off curl’s buffering with -N:
curl -N https://inference.broadnet.ai/v1/chat/completions \
-H "Authorization: Bearer $BROADNET_API_KEY" \
-H "Content-Type: application/json" \
-d '{"model":"broadnet/gemma-4-26b-a4b","stream":true,"stream_options":{"include_usage":true},"messages":[{"role":"user","content":"Count to five."}]}'
You get Server-Sent Events. The stream ends with the literal line data: [DONE], and with include_usage the last chunk carries the token counts. More in streaming chat completions.
5. Transcribe audio
Transcription takes a multipart form. Send WAV or MP3, up to 26,214,400 bytes, and always send language:
curl https://inference.broadnet.ai/v1/audio/transcriptions \
-H "Authorization: Bearer $BROADNET_API_KEY" \
-F model=broadnet/cohere-transcribe \
-F language=en \
-F file=@meeting.mp3
The response is JSON with the transcript in text. WhatsApp .ogg voice notes and .m4a recordings need converting first; see how to transcribe WhatsApp voice notes. For Arabic, use broadnet/cohere-transcribe-arabic with language=ar; see the Arabic speech-to-text guide. The multilingual model costs $0.002 per audio minute and the Arabic model $0.0042.
Which model to pick
| Model | ID | Endpoint | Free credit |
|---|---|---|---|
| BroadNet Gemma 4 VL 26B | broadnet/gemma-4-26b-a4b |
/v1/chat/completions |
Yes |
| GLM 5.3 | broadnet/glm-5.3 |
/v1/chat/completions |
No |
| Qwen3.8 27B | broadnet/qwen3.8-27b |
/v1/chat/completions |
No |
| DeepSeek V4.1 Flash | broadnet/deepseek-v4.1-flash |
/v1/chat/completions |
No |
| BroadNet Transcribe | broadnet/cohere-transcribe |
/v1/audio/transcriptions |
Yes |
| BroadNet Transcribe Arabic | broadnet/cohere-transcribe-arabic |
/v1/audio/transcriptions |
Yes |
Per-token and per-minute prices are on the pricing page. Each model has its own page, for example GLM 5.3.
Troubleshooting
- 401. The key is missing, invalid or expired, or the pay-as-you-go allowance is used up. Check for stray spaces around the key.
- Error on the model field. Copy the ID from the table; it includes the
broadnet/prefix. Paid models fail on the starting credit until you top up. - 413. The audio file is over 26,214,400 bytes. Split it.
- 403. The key’s IP allow-list, model or route policy refused the request. See IP allow-lists for API keys.
- 429. A pay-as-you-go key allows 30 requests a minute and 4 in flight. Back off and retry. See BroadNet error codes and retries.
- On an unlimited plan. Each plan session runs one request at a time, so run parallel curl loops on separate sessions. Plan keys work only with
broadnet/deepseek-v4.1-flash.
Save the X-Request-ID response header (curl -D headers.txt ...) when you report a problem.
