Developers
Updated
BroadNet Inference uses the OpenAI request shapes at https://inference.broadnet.ai/v1. Create a key in the console, keep it in an environment variable, and send a request to /chat/completions or /audio/transcriptions with an exact model ID. Before you move production traffic, check parameters, streaming, tools, limits and errors for that model.
How do I send my first chat request?

- Sign in at inference.broadnet.ai and create an inference key. It is shown once; the console stores only its hash.
- Install the OpenAI SDK and set the key in your shell. Keep keys on your server, never in browser code.
- Send the request. Read the answer from
choices[0].message.content.

python -m pip install openai
export BROADNET_API_KEY='paste-the-key-once'first_request.py
import os
from openai import OpenAI
client = OpenAI(
base_url="https://inference.broadnet.ai/v1",
api_key=os.environ["BROADNET_API_KEY"],
)
response = client.chat.completions.create(
model="broadnet/gemma-4-26b-a4b",
messages=[{"role": "user", "content": "Reply with one short sentence."}],
)
print(response.choices[0].message.content)request.sh
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":"Reply with one short sentence."}]}'The example uses BroadNet Gemma 4 VL 26B, which the $5 starting credit covers. DeepSeek V4.1 Flash, GLM 5.3 and Qwen3.8 27B need a top-up first. Keep the X-Request-ID response header for support.
- 01Your appKey kept in an environment variable
- 02OpenAI SDKTwo settings change
base_urlapi_key - 03BroadNet InferenceOpenAI-compatible API
inference.broadnet.ai/v1POST /chat/completions - 04The model you nameSet in every request
broadnet/deepseek-v4.1-flashbroadnet/glm-5.3broadnet/qwen3.8-27bbroadnet/gemma-4-26b-a4byour choice
- 05ResponseFrom that model
You choose the model in each request. There is no automatic routing: the request runs on the model ID you sent.
Your app calls the OpenAI SDK with BroadNet’s base URL and your key. The request goes to BroadNet Inference with the model ID you wrote, and that model answers. Nothing picks or switches the model for you.
Streaming
Set stream=true and read Server-Sent Events until data: [DONE]. With stream_options.include_usage, token usage arrives in the last chunk. If the stream ends before [DONE], treat the answer as incomplete. BroadNet asks you to verify streaming per model before relying on it in production.
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 from one to three."}]}'How do I transcribe audio?
Send WAV or MP3, up to 26,214,400 bytes per file, to /audio/transcriptions. Always set language: without it, Arabic can come back in Latin letters. Use language=ar for Arabic. Convert .ogg or .m4a first: ffmpeg -i voice-note.ogg -ar 16000 -ac 1 voice-note.wav
transcribe.py
import os
from openai import OpenAI
client = OpenAI(
base_url="https://inference.broadnet.ai/v1",
api_key=os.environ["BROADNET_API_KEY"],
)
with open("recording.wav", "rb") as audio:
result = client.audio.transcriptions.create(
model="broadnet/cohere-transcribe-arabic",
file=audio,
language="ar",
)
print(result.text)transcribe.sh
curl https://inference.broadnet.ai/v1/audio/transcriptions \
-H "Authorization: Bearer $BROADNET_API_KEY" \
-F model=broadnet/cohere-transcribe-arabic \
-F language=ar \
-F file=@voice-note.wavThe response is JSON with the transcript in text. Arabic or multilingual model, and what audio costs.
Which model IDs can I use?
Pass the exact ID as model. Don't rely on /v1/models to discover chat models; use this list or the reference.
| Model | ID | Endpoint | Input | Documented | Access |
|---|---|---|---|---|---|
| DeepSeek V4.1 Flash | broadnet/deepseek-v4.1-flash | /chat/completions | Text + Image | Reasoning | Top-up required |
| GLM 5.3 | broadnet/glm-5.3 | /chat/completions | Text | Tools, Structured output, Reasoning | Top-up required |
| Qwen3.8 27B | broadnet/qwen3.8-27b | /chat/completions | Text + Image | Tools, Structured output, Reasoning | Top-up required |
| BroadNet Gemma 4 VL 26B | broadnet/gemma-4-26b-a4b | /chat/completions | Text + Image | — | Starting credit |
| BroadNet Transcribe Arabic | broadnet/cohere-transcribe-arabic | /audio/transcriptions | Arabic audio | — | Starting credit |
| BroadNet Transcribe | broadnet/cohere-transcribe | /audio/transcriptions | Audio, 14 languages | — | Starting credit |
"Documented" lists the tools, structured output and reasoning that BroadNet's reference names for each model (checked 2026-11-15). A dash means the reference does not name them; it does not mean they are absent.
Moving from another OpenAI-compatible API: checklist
The request shapes are familiar, but models differ. Work through each item for the model you chose, and test before you switch traffic.
- Endpoint. Set the base URL to
https://inference.broadnet.ai/v1. - Key. Use a BroadNet inference key from an environment variable. Plan keys and pay-as-you-go keys are separate.
- Model ID. Use the exact ID, for example
broadnet/gemma-4-26b-a4b. - Parameters. Check that every parameter you send is documented for that model. Remove ones it does not list.
- Streaming. Confirm your client reads SSE to
[DONE]and handles a stream that ends early. - Tools and structured output. The reference documents these for GLM 5.3 and Qwen3.8 27B. Test any other model before relying on them.
- Reasoning. Reasoning can use part of the output budget. Leave room in
max_tokens; see empty answers from reasoning models. - Limits. A pay-as-you-go key allows 30 requests a minute and 4 in flight. A plan session allows one request at a time. A Gemma hourly key allows one stream, 120 requests a minute and 300,000 tokens a minute.
- Context. Context includes input and answer. Check the model's limit on its model page.
- Errors. Map the status codes below to retry or fix actions, and log
X-Request-ID. - Costs. Estimate with the pricing calculators. Images count as input tokens on pay-as-you-go.
Which errors should I retry?
| Status | Meaning | Action |
|---|---|---|
| 400 / 422 | Invalid request or field | Fix the request; don't retry as is |
| 401 | Missing, invalid or expired key, or exhausted allowance | Check the key and account |
| 402 | insufficient_balance | Top up, then retry |
| 413 | Request over the byte or text limit | Send less, for example a smaller audio file |
| 429 | Rate, concurrency, token-rate or spending limit | Back off with a bound, then retry |
| 500–504 | Server-side problem | Retry with bounded exponential backoff |
Summarised from the reference's error table, checked 2026-11-15. Retry code examples.
Where are the full docs and guides?

- Developer referenceRequest shapes, limits, errors and the price feed. The authoritative source.
- IntegrationsSettings for Aider, Cline, LangChain, n8n, LiteLLM and other OpenAI-compatible tools.
- GuidesSDKs, streaming, retries, IP allow-lists and Arabic speech.
- Python SDK guideInstall, first request and streaming with the OpenAI Python SDK.
- Node SDK guideThe same in JavaScript and TypeScript, with request IDs.
- cURL quickstartEvery request from the shell.
- Keys and IP allow-listsLock keys to your servers.
- API request builderBuild a request in your browser and copy it.
Need a private endpoint or a model that is not listed? Contact BroadNet.