Skip to main content

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 handYour backend creates streams on demand
You want to inspect ingest and playout URLs, check transcoding or watch statusYou provision streams from a CMS, CRM or game platform
Operations or editorial teams handle streams day to dayYou 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.
  • curl or any HTTP client.
Value
Base URLhttps://bintu.nanostream.cloud
Auth header (API key)X-BINTU-APIKEY: <your API key>
Auth header (access token)X-BINTU-TOKEN: <your access token>
Full referenceapi.nanostream.cloud/docs/bintu (every endpoint, with try-it-out)
Content typeapplication/json
warning

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​

ResourceMethod and pathWhat it does
StreamsGET /stream?quantity=<n>List the newest streams of your organisation (default 50)
StreamsPOST /streamCreate a stream, optionally with transcoding profiles and tags
StreamGET /stream/<id-or-name>Read one stream by stream ID (UUID) or stream name
Stream tagsPUT /stream/<id>/tagReplace the tags of a stream
TagsGET /tagList all tags in your organisation
Transcoding profilesGET /transcoding_profilesList the transcoding profiles available to your organisation
OrganisationGET /organisationRead your organisation record, including the player key
Organisation webhookPUT /organisation/webhookSet the custom ingest webhook. See Webhooks.
Access tokenPOST /user/validateMint 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 fieldDescription
transcodesArray of transcoding profiles. Each entry creates one rendition.
transcodes[].profileProfile name, for example vtrans2-852x480x800x25 (width x height x bitrate in kbit/s x frame rate).
transcodes[].tagsTags for that rendition.
note

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.

info

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

ResponseMeaning
200The stream record
404, code 3001Stream not found: a well-formed name or ID that doesn't exist
403, code 2001Access 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:

FieldSideUse it for
ingest.rtmp.url + ingest.rtmp.streamnamePublishYour encoder (OBS, vMix, ffmpeg, hardware encoders)
playout.rtmp[0].streamname / playout.h5live[0].rtmp.streamnamePlaybackPlayer configs, demo player URLs, embed codes, playback tests
playout.*[].id / streamgroupPlaybackThe 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].server hosts 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:

HostUse
rtmp://bintu-stream.nanocosmos.de/liveStandard ingest, passthrough only
rtmp://bintu-vtrans.nanocosmos.de/liveIngest with live transcoding / ABR

For SRT and WebRTC/WHIP ingest, see Ingest overview.

Stream states​

Every stream has a state:

StateMeaning
createdThe stream exists but has never been live.
liveAn encoder is publishing to the stream right now.
endedThe stream was live and is no longer receiving a signal. Publishing again to the same stream name makes it live.
lockedIngest 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 adminThe stream was locked by nanocosmos. Only nanocosmos support can unlock it.
deletedThe 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.
note

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.

ActionCall
Create a stream with tagsPOST /stream with tags in the body
Replace a stream's tagsPUT /stream/<id>/tag
List all tagsGET /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​

StatusTypical causeWhat to do
401Missing or invalid API key or access tokenCheck the header name (X-BINTU-APIKEY or X-BINTU-TOKEN) and the token's expiry
403Key of another organisation, a role without permission, or a malformed stream nameUse the owning organisation's key; check the user role
404Stream not foundCheck the stream ID or name
422Request body doesn't match the schemaCompare 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​

tip

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