---
title: "LLM API curl quickstart - chat, streaming, transcription"
description: "Make your first BroadNet Inference calls with curl - a chat completion, a streamed reply and an audio transcription - and read the response, usage and errors."
url: https://broadrouter.com/guides/curl-quickstart/
lang: en
updated: 2026-11-16
publisher: BroadRouter (a BroadNet site); API by BroadNet Inference, https://inference.broadnet.ai
---

# First request to BroadNet Inference with curl

Updated 2026-11-16

Send a POST to https://inference.broadnet.ai/v1/chat/completions with the header Authorization Bearer and your key, and a JSON body with model, such as broadnet/gemma-4-26b-a4b, and messages. Add stream true for streaming. For audio, post a multipart form with model, language and file to /v1/audio/transcriptions.

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](https://broadrouter.com/guides/openai-python-sdk/) or tool will too.

## 1\. Set your key

Create a key in the BroadNet console. New accounts get a $5 starting credit.

```bash
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:

```bash
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`:

```bash
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](https://broadrouter.com/guides/reasoning-tokens-empty-response/).

## 4\. Stream the reply

Add `"stream": true` and turn off curl’s buffering with `-N`:

```bash
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](https://broadrouter.com/guides/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`:

```bash
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](https://broadrouter.com/guides/transcribe-whatsapp-voice-notes/). For Arabic, use `broadnet/cohere-transcribe-arabic` with `language=ar`; see the [Arabic speech-to-text guide](https://broadrouter.com/guides/arabic-speech-to-text-api/). 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](https://broadrouter.com/pricing/). Each model has its own page, for example [GLM 5.3](https://broadrouter.com/models/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](https://broadrouter.com/guides/api-keys-ip-allow-lists/).
-   **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](https://broadrouter.com/guides/errors-and-retries/).
-   **On an unlimited plan.** Each [plan session](https://broadrouter.com/guides/unlimited-llm-api-sessions/) 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.

## Terms in this guide

[Pay-as-you-go](https://broadrouter.com/glossary/pay-as-you-go/)

Pay-as-you-go is a pricing model in which you pay only for what you use, metered per unit such as tokens, requests or audio minutes, with no subscription or minimum commitment. Most LLM APIs bill this way, from a prepaid balance or a periodic invoice.

[Prepaid credit](https://broadrouter.com/glossary/prepaid-credit/)

Prepaid credit is money added to an API account before use. Each request deducts its cost from the balance, and when the balance runs out, metered requests stop until you top up. It caps spend at what you have paid in.

[Token](https://broadrouter.com/glossary/token/)

A token is the unit of text a language model reads and writes: a word, part of a word, a punctuation mark or a byte sequence produced by the model's tokenizer. LLM APIs count, limit and usually bill usage in tokens.

[API key](https://broadrouter.com/glossary/api-key/)

An API key is a secret string that identifies and authorizes a client calling an API. LLM APIs usually expect it in an Authorization: Bearer header, and anyone who holds the key can make requests that are billed to the account that owns it.

[Chat Completions API](https://broadrouter.com/glossary/chat-completions-api/)

The Chat Completions API is OpenAI's HTTP endpoint, POST /v1/chat/completions, that takes a model name and a list of role-tagged messages and returns the model's next message. Its request and response shape became the common format that OpenAI-compatible providers and SDKs reuse.

[Concurrency](https://broadrouter.com/glossary/concurrency/)

Concurrency is the number of requests a client has in flight at the same time. LLM APIs often cap it per key or plan, separately from requests per minute, because each open request holds GPU capacity until its response has finished.

[Rate limit](https://broadrouter.com/glossary/rate-limit/)

A rate limit is a cap an API places on how much a client can use it in a time window, such as requests per minute or tokens per minute. Requests over the limit are refused, usually with HTTP 429 Too Many Requests, until usage falls back under it.

[Server-sent events (SSE)](https://broadrouter.com/glossary/sse/)

Server-sent events (SSE) is a web standard for a server to push a stream of text events to a client over one long-lived HTTP response with the content type text/event-stream. Each event is one or more field lines, such as data:, ended by a blank line.

## Questions

### Which model can I call on the free starting credit?

BroadNet Gemma 4 VL 26B, model ID broadnet/gemma-4-26b-a4b, and both transcription models. GLM 5.3, Qwen3.8 27B and DeepSeek V4.1 Flash need a top-up.

### Why is message content empty in my curl response?

Reasoning models spend max\_tokens on reasoning first. If finish\_reason is length, raise max\_tokens to 1,000 or more.

### Why is my Arabic transcript in Latin letters?

The request had no language field. Send language=ar for Arabic and the matching ISO 639-1 code for other languages.

### Does GET /v1/models list every model I can call?

BroadNet's docs say GET /v1/models "supplies public catalogue metadata for external monitors". Use the model IDs from the API reference or pricing.json for requests.

## Related guides

-   [Use the OpenAI Python SDK with BroadNet Inference](https://broadrouter.com/guides/openai-python-sdk/)
-   [Stream chat completions and handle dropped connections](https://broadrouter.com/guides/streaming-chat-completions/)
-   [Arabic speech-to-text API, step by step](https://broadrouter.com/guides/arabic-speech-to-text-api/)
-   [BroadNet Inference error codes and when to retry](https://broadrouter.com/guides/errors-and-retries/)

Try it on your real workload. New accounts start with $5 of credit for Gemma and transcription. DeepSeek, GLM and Qwen3.8 need a top-up.

[Get started](https://inference.broadnet.ai/account/?utm_source=broadrouter&utm_medium=referral&utm_campaign=guides-curl-quickstart&utm_content=page-cta) ·

**Sources**

-   [BroadNet Inference API reference](https://inference.broadnet.ai/docs?utm_source=broadrouter&utm_medium=referral&utm_campaign=guides-curl-quickstart&utm_content=sources)
-   [Machine-readable model list and prices (pricing.json)](https://inference.broadnet.ai/pricing.json?utm_source=broadrouter&utm_medium=referral&utm_campaign=guides-curl-quickstart&utm_content=sources)
