nanoStream REST API
The nanoStream REST API is the stream-management API of the nanocosmos platform. It is also called the bintu API: hostnames, headers and config keys keep the bintu name. Use it when you want to automate what you would otherwise do in the nanoStream Dashboard, for example creating a stream per event, per customer session or per game table.
When to use the API vs the Dashboard
| Use the Dashboard when… | Use the REST API when… |
|---|---|
| You create a few streams by hand | Your backend creates streams on demand |
| You want to inspect ingest and playout URLs, check transcoding or watch status | You provision streams from a CMS, CRM or game platform |
| Operations or editorial teams handle streams day to day | You tag, filter or route streams automatically |
Both work on the same data. Most teams combine them: the Dashboard for visibility, the API for automation. See Builder Hub, Dashboard or API: which to use.
Before you start
- A nanocosmos account. New users create a free account in the Builder Hub.
- Your organisation API key or an access token. See APIs & SDKs overview for how to get one.
curlor any HTTP client.
| Value | |
|---|---|
| Base URL | https://bintu.nanostream.cloud |
| Auth header (API key) | X-BINTU-APIKEY: <your API key> |
| Auth header (access token) | X-BINTU-TOKEN: <your access token> |
| Full reference | api.nanostream.cloud/docs/bintu (every endpoint, with try-it-out) |
| Content type | application/json |
Call the REST API from your backend only. The API key grants full control of your organisation and must never reach a browser.
The examples below read the key from an environment variable:
export BINTU_API_KEY="<YOUR_API_KEY>"
Core resources
| Resource | Method and path | What it does |
|---|---|---|
| Streams | GET /stream?quantity=<n> | List the newest streams of your organisation (default 50) |
| Streams | POST /stream | Create a stream, optionally with transcoding profiles and tags |
| Stream | GET /stream/<id-or-name> | Read one stream by stream ID (UUID) or stream name |
| Stream tags | PUT /stream/<id>/tag | Replace the tags of a stream |
| Tags | GET /tag | List all tags in your organisation |
| Transcoding profiles | GET /transcoding_profiles | List the transcoding profiles available to your organisation |
| Organisation | GET /organisation | Read your organisation record, including the player key |
| Organisation webhook | PUT /organisation/webhook | Set the custom ingest webhook. See Webhooks. |
| Access token | POST /user/validate | Mint an access token from a Dashboard login. See APIs & SDKs overview. |
GET /transcoding_profiles returns an array of profiles. Use the name as transcodes[].profile when you create a stream:
[{ "id": "…", "name": "vtrans-2000x25", "vtrans": { "bitrate": 2000, "codec": "h264", "fps": 25, "width": 0, "height": 0 } }]
List your latest streams
curl -s "https://bintu.nanostream.cloud/stream?quantity=1" \
-H "content-type: application/json" \
-H "X-BINTU-APIKEY: $BINTU_API_KEY"
quantity sets how many stream objects come back, newest first. Without it, you get 50.
The same call in JavaScript (Node.js, server side):
const res = await fetch("https://bintu.nanostream.cloud/stream?quantity=1", {
method: "GET",
headers: { "X-BINTU-APIKEY": process.env.BINTU_API_KEY }
});
const streams = await res.json();
Create a stream
Single stream
The request body is optional. An empty body {}, or a body with only tags (an array of strings), creates a single passthrough stream. Add transcodes only for a stream group.
curl -s -X POST "https://bintu.nanostream.cloud/stream" \
-H "content-type: application/json" \
-H "accept: application/json" \
-H "X-BINTU-APIKEY: $BINTU_API_KEY" \
--data-raw '{ "tags": ["event2026", "location:berlin"] }'
Stream with Adaptive Bitrate Streaming (ABR)
Add transcodes to create a stream group: the original (passthrough) stream plus one transcoded rendition per profile. The player then switches between renditions to match each viewer's bandwidth. See Adaptive Bitrate Streaming & live transcoding.
curl -s -X POST "https://bintu.nanostream.cloud/stream" \
-H "content-type: application/json" \
-H "accept: application/json" \
-H "X-BINTU-APIKEY: $BINTU_API_KEY" \
--data-raw '{
"transcodes": [
{ "profile": "vtrans2-852x480x800x25", "tags": ["foo", "bar"] },
{ "profile": "vtrans2-640x360x400x25", "tags": [] }
]
}'
await fetch("https://bintu.nanostream.cloud/stream", {
method: "POST",
headers: {
"content-type": "application/json",
"X-BINTU-APIKEY": process.env.BINTU_API_KEY
},
body: JSON.stringify({
transcodes: [
{ profile: "vtrans2-852x480x800x25", tags: ["foo", "bar"] },
{ profile: "vtrans2-640x360x400x25", tags: [] }
]
})
});
| Body field | Description |
|---|---|
transcodes | Array of transcoding profiles. Each entry creates one rendition. |
transcodes[].profile | Profile name, for example vtrans2-852x480x800x25 (width x height x bitrate in kbit/s x frame rate). |
transcodes[].tags | Tags for that rendition. |
When you create an ABR stream in the Dashboard, each rendition gets descriptive tags automatically (for example "Passthrough", "1. Transcode"). Streams created with the REST API don't get these tags.
An ABR stream must be sent to the transcoding ingest host bintu-vtrans.nanocosmos.de. If the encoder sends to bintu-stream.nanocosmos.de, the stream still plays, but only as passthrough: no renditions exist and the player can't switch. Always copy the ingest URL from the API response or the Dashboard instead of building it by hand.
Read a stream
curl -s "https://bintu.nanostream.cloud/stream/<STREAM_ID_OR_NAME>" \
-H "X-BINTU-APIKEY: $BINTU_API_KEY"
You can pass the stream ID (UUID) or the stream name (XXXXX-YYYYY).
| Response | Meaning |
|---|---|
200 | The stream record |
404, code 3001 | Stream not found: a well-formed name or ID that doesn't exist |
403, code 2001 | Access denied: a malformed name, or the key belongs to another organisation |
The same route also answers without an API key. A keyless read returns only the public part of the record (the playout block). The ingest block, tags and transcoding details are only included when you call with the API key of the organisation that owns the stream.
Ingest vs playout stream names
A stream record names the stream in two places, and the two names are not guaranteed to be the same:
| Field | Side | Use it for |
|---|---|---|
ingest.rtmp.url + ingest.rtmp.streamname | Publish | Your encoder (OBS, vMix, ffmpeg, hardware encoders) |
playout.rtmp[0].streamname / playout.h5live[0].rtmp.streamname | Playback | Player configs, demo player URLs, embed codes, playback tests |
playout.*[].id / streamgroup | Playback | The stream group ID that the player's source.group.id takes |
Rules:
- For playback, always read the name from the first playout entry, never the ingest name. A player given the ingest name may play nothing.
- For publishing, always use the ingest URL and ingest stream name.
- The
playout.h5live[0].serverhosts tell you whether the stream needs a playback token: secure organisations use the secure H5Live hosts. - An ABR stream has one ingest (the passthrough) and several playout renditions. The encoder publishes once; nanocosmos creates the renditions.
There are two RTMP ingest hosts. Pick the one the API gives you:
| Host | Use |
|---|---|
rtmp://bintu-stream.nanocosmos.de/live | Standard ingest, passthrough only |
rtmp://bintu-vtrans.nanocosmos.de/live | Ingest with live transcoding / ABR |
For SRT and WebRTC/WHIP ingest, see Ingest overview.
Stream states
Every stream has a state:
| State | Meaning |
|---|---|
created | The stream exists but has never been live. |
live | An encoder is publishing to the stream right now. |
ended | The stream was live and is no longer receiving a signal. Publishing again to the same stream name makes it live. |
locked | Ingest was stopped through the API (PUT /stream/{id}/stop). New publishes are rejected until you call PUT /stream/{id}/unlock, which sets the stream to ended. |
locked by admin | The stream was locked by nanocosmos. Only nanocosmos support can unlock it. |
deleted | The stream has been deleted. Deleted streams don't appear in the regular stream list; the Dashboard shows them only when you filter for this state. |
live reflects the platform state, which can lag behind the encoder by a short time. To confirm a stream really delivers frames, play it in the demo player or check ingest metrics in nanoStream Analytics.
Tags
Tags are free-form labels for grouping, filtering and automation, for example camera1, studio/west or location:berlin. Tags you send when creating a stream are created in your organisation automatically if they don't exist yet.
| Action | Call |
|---|---|
| Create a stream with tags | POST /stream with tags in the body |
| Replace a stream's tags | PUT /stream/<id>/tag |
| List all tags | GET /tag |
PUT /stream/<id>/tag replaces all tags of the stream and returns the stream object. The roles nanoAdmin and nanoUser can call it:
curl -s -X PUT "https://bintu.nanostream.cloud/stream/STREAM_ID/tag" \
-H "content-type: application/json" \
-H "X-BINTU-APIKEY: $BINTU_API_KEY" \
--data-raw '{ "tags": ["foo", "bar"] }'
See Stream tags & metadata for naming conventions and Dashboard filtering.
Errors
| Status | Typical cause | What to do |
|---|---|---|
401 | Missing or invalid API key or access token | Check the header name (X-BINTU-APIKEY or X-BINTU-TOKEN) and the token's expiry |
403 | Key of another organisation, a role without permission, or a malformed stream name | Use the owning organisation's key; check the user role |
404 | Stream not found | Check the stream ID or name |
422 | Request body doesn't match the schema | Compare your JSON with the examples above |
When you contact support, include the stream name, the stream ID and the time (UTC). Never include your API key.
Next steps
- Full bintu API reference: every endpoint, parameter and response schema
- Webhooks: approve or reject each publish attempt from your backend
- Embed the player: play the stream you just created
- nanoStream Real-Time API: record or switch cameras while the stream is live
- Playback tokens: protect playback with JWTs
Try it in the Builder Hub: the Go Live Workflow creates a stream, shows its ingest URL and plays it back, with no code. Start for Free