BroadRouter
Get started

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?

  1. Sign in at inference.broadnet.ai and create an inference key. It is shown once; the console stores only its hash.
  2. Install the OpenAI SDK and set the key in your shell. Keep keys on your server, never in browser code.
  3. Send the request. Read the answer from choices[0].message.content.
A metal key whose bow is shaped like curly braces { }, entering a keyhole, beside the text "One API key. More possibilities." and "BroadRouter".

setup

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)

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.

How a request reaches a model
  1. 01Your appKey kept in an environment variable
  2. 02OpenAI SDKTwo settings change

    base_url api_key

  3. 03BroadNet InferenceOpenAI-compatible APIinference.broadnet.ai/v1POST /chat/completions
  4. 04The model you nameSet in every request
    • broadnet/deepseek-v4.1-flash
    • broadnet/glm-5.3
    • broadnet/qwen3.8-27b
    • broadnet/gemma-4-26b-a4byour choice
  5. 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.

stream.sh

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)

The 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.

ModelIDEndpointInputDocumentedAccess
DeepSeek V4.1 Flashbroadnet/deepseek-v4.1-flash/chat/completionsText + ImageReasoningTop-up required
GLM 5.3broadnet/glm-5.3/chat/completionsTextTools, Structured output, ReasoningTop-up required
Qwen3.8 27Bbroadnet/qwen3.8-27b/chat/completionsText + ImageTools, Structured output, ReasoningTop-up required
BroadNet Gemma 4 VL 26Bbroadnet/gemma-4-26b-a4b/chat/completionsText + Image—Starting credit
BroadNet Transcribe Arabicbroadnet/cohere-transcribe-arabic/audio/transcriptionsArabic audio—Starting credit
BroadNet Transcribebroadnet/cohere-transcribe/audio/transcriptionsAudio, 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.

  1. Endpoint. Set the base URL to https://inference.broadnet.ai/v1.
  2. Key. Use a BroadNet inference key from an environment variable. Plan keys and pay-as-you-go keys are separate.
  3. Model ID. Use the exact ID, for example broadnet/gemma-4-26b-a4b.
  4. Parameters. Check that every parameter you send is documented for that model. Remove ones it does not list.
  5. Streaming. Confirm your client reads SSE to [DONE] and handles a stream that ends early.
  6. Tools and structured output. The reference documents these for GLM 5.3 and Qwen3.8 27B. Test any other model before relying on them.
  7. Reasoning. Reasoning can use part of the output budget. Leave room in max_tokens; see empty answers from reasoning models.
  8. 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.
  9. Context. Context includes input and answer. Check the model's limit on its model page.
  10. Errors. Map the status codes below to retry or fix actions, and log X-Request-ID.
  11. Costs. Estimate with the pricing calculators. Images count as input tokens on pay-as-you-go.

Which errors should I retry?

StatusMeaningAction
400 / 422Invalid request or fieldFix the request; don't retry as is
401Missing, invalid or expired key, or exhausted allowanceCheck the key and account
402insufficient_balanceTop up, then retry
413Request over the byte or text limitSend less, for example a smaller audio file
429Rate, concurrency, token-rate or spending limitBack off with a bound, then retry
500–504Server-side problemRetry 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?

Need a private endpoint or a model that is not listed? Contact BroadNet.

Read as MarkdownAsk ChatGPTAsk ClaudeAsk Perplexity