APIs & SDKs overview
The nanocosmos platform exposes everything you can do in the nanoStream Dashboard through APIs, plus a JavaScript player and a browser broadcasting library. This page is the one place for base URLs and authentication. Start here, then jump to the reference for the API you need.
Which API do you need?
| API / SDK | What you do with it | Base URL | Reference |
|---|---|---|---|
| nanoStream REST API | Create and manage streams, tags, transcoding, organisation settings, webhooks | https://bintu.nanostream.cloud | nanoStream REST API, full reference |
| nanoStream Real-Time API | Start and stop On-Demand Recording, switch Multi-Camera angles while a stream is live | https://real-time-api.nanostream.cloud | nanoStream Real-Time API |
| Analytics API (v2) | Read viewer, playback, ingest, usage and alert metrics | https://metrics-api.nanostream.cloud | Analytics API |
| Cloud Token Service | Mint expiring access tokens from your API key | https://token.nanostream.cloud | Access tokens below, full reference |
| nanoStream Player | Play streams in the browser (JavaScript) | https://demo.nanocosmos.de/nanoplayer/api/release/nanoplayer.5.min.js | nanoStream Player |
| nanoStream Webcaster | Broadcast from the browser | — | nanoStream Webcaster |
| AI Live Captions API | Control live captions and translations | — | AI Live Captions API |
| nanoStudio Chroma API | Automate chroma keying and branded outputs | — | nanoStudio Chroma API |
The nanoStream REST API is also called the bintu API. Hostnames, headers and config keys keep the bintu name (bintu.nanostream.cloud, X-BINTU-APIKEY, source.group.apiurl), so you see both names in code.
The primary API host is https://bintu.nanostream.cloud. The former host https://bintu.nanocosmos.de still works and serves the same API, so existing integrations don't need to change; the nanoStream Player also still uses it as its default apiurl.
All APIs operate on the same data. A stream you create with the REST API shows up in the Dashboard at once, and changes you make in the Dashboard are visible through the API.
Viewers never authenticate against an API. Playback is either open, or, on organisations with secure playback, gated by a playback token (JWT) that you put into the player config. API credentials are only for managing streams and reading metrics. See Playback tokens.
Credentials at a glance
| Credential | Lifetime | Scope | Header | Use it for |
|---|---|---|---|---|
| Organisation API key | Never expires | Full control of the organisation | X-BINTU-APIKEY | Server-side calls and minting access tokens. Never put it in a browser or client app. |
| Dashboard login (email + password) | Until changed | The user's role, for example nanoAdmin or nanoReadOnly | — | Signing in, and minting access tokens without handling the API key |
| Access token (JWT) | You choose at mint time, up to 365 days (default 24 hours) | Same as or narrower than the credential that minted it | X-BINTU-TOKEN (REST API), x-access-token (Analytics API), Authorization: Bearer (Real-Time API) | The recommended credential for services, CI jobs, dashboards and status pages |
| Player key | — | Read-only stream discovery | — | Listing an organisation's streams from a public page |
| Playback token (JWT) | You choose at mint time | Playback of specific streams, groups or the whole organisation | Player security config | Secure playback only, not API calls. See Playback tokens. |
The REST API, the Analytics API and the Cloud Token Service share one user database and one token format. One access token minted with the audiences bintu and metrics works for both the REST API and the Analytics API. Your Analytics login is your Dashboard login.
Get your API key
- Sign in to the nanoStream Dashboard at https://dashboard.nanostream.cloud.
- Open your organisation overview page: https://dashboard.nanostream.cloud/organisation.
- Copy the API key of your organisation.
- Store it in a server-side secret store or environment variable, for example
BINTU_API_KEY.
Send the key in the X-BINTU-APIKEY header:
curl -s "https://bintu.nanostream.cloud/stream?quantity=1" \
-H "content-type: application/json" \
-H "X-BINTU-APIKEY: $BINTU_API_KEY"
The organisation record also carries a player key (playerKey). It only allows stream discovery, so it is the safe choice when a public page needs to list your streams. Read it from the Dashboard (Organisation › Overview › API Access, rows Api Key and Player Key) or with GET https://bintu.nanostream.cloud/organisation and your API key.
The API key never expires and grants full control of your organisation. Keep it out of browsers, mobile apps, tickets and repositories. If it leaks, contact support to rotate it; you can't rotate it yourself in the Dashboard. For anything that leaves your backend, use an access token.
Access tokens
An access token is a JWT with an expiry. It is the recommended credential for all API access, because a leaked token stops working on its own. There is no revocation route for access tokens, so expiry is your control: keep exp as short as your use case allows.
You can mint access tokens in three ways.
From your API key (Cloud Token Service)
This route gives you the most control: you choose the lifetime, the audiences and, optionally, the user whose role the token inherits.
curl -X POST https://token.nanostream.cloud/bintu/token \
-H "X-BINTU-APIKEY: $BINTU_API_KEY" \
-H "content-type: application/json" \
-d '{
"exp": 1790261651,
"aud": ["bintu", "metrics"],
"iss": "<USER_ID>",
"custom": "status page service"
}'
| Field | Required | Description |
|---|---|---|
exp | No | Expiry as Unix time in seconds. Default 24 hours, maximum 365 days (error 3000 beyond that). |
nbf | No | "Not before" as Unix time in seconds. Default: now. |
aud | No | Services the token may call. Default ["bintu"]. Add metrics for the Analytics API. Other values: splay, guardian, secure-conference. |
iss | No | A user ID. Limits the token to that user's role, for example a read-only user. Without it, the token has the API key's full rights. |
custom | No | Free-text note stored in the token. |
The response contains the token in data.token. POST https://token.nanostream.cloud/bintu/verify validates a token.
For anything client-facing, mint against a read-only user's ID (iss) and list only the audiences you need.
From a Dashboard login (no API key)
POST /user/validate mints a token that carries exactly the signed-in user's role. This is the safer default when a suitable read-only user exists, because no organisation key is involved.
curl -X POST https://bintu.nanostream.cloud/user/validate \
-H "content-type: application/json" \
-d '{ "email": "<EMAIL>", "password": "<PASSWORD>", "exp": 1790271095 }'
From the Analytics login
The Analytics API has its own POST /authenticate route, which the Analytics dashboard uses. It always returns a token valid for 24 hours and ignores any expiry you send. For longer-lived Analytics tokens, use the Cloud Token Service with "aud": ["metrics"]. See Analytics API.
Use the token
| API | Header |
|---|---|
| nanoStream REST API | X-BINTU-TOKEN: <token> |
| Analytics API | x-access-token: <token> |
| nanoStream Real-Time API | Authorization: Bearer <token> (switching endpoints also accept X-BINTU-TOKEN) |
The same token value works in all three if it carries the right audiences.
What is inside a token
| Claim | Meaning |
|---|---|
aud | Services the token may call, for example ["bintu","metrics"] |
exp / nbf / iat | Validity window (Unix seconds) |
jti | Unique token ID. Quote this when you report a token, never the token itself. |
sub | The user the token acts as |
hash | Organisation hash. A token always belongs to one organisation. |
custom | Your free-text note |
Rate limits
| API | Limit |
|---|---|
| Analytics API | 1 request per second, with bursts of up to 30 requests per second processed immediately. Above that you get HTTP 502 or 504. |
| nanoStream REST API | No rate limit. |
| nanoStream Real-Time API | No rate limit. |
There is still no need to poll tightly: use webhooks to learn when a stream starts or stops.
Full API references
| API | Interactive reference |
|---|---|
| Analytics API v2 | https://api.nanostream.cloud/docs/analytics/v2/ (OpenAPI: https://api.nanostream.cloud/docs/analytics/v2/openapi_v2.json) |
| nanoStream Real-Time API | https://real-time-api.nanostream.cloud/docs |
| nanoStream REST API (bintu) | https://api.nanostream.cloud/docs/bintu/ (OpenAPI: https://api.nanostream.cloud/docs/bintu/openapi.json); guide: nanoStream REST API |
| Cloud Token Service | https://api.nanostream.cloud/docs/token/ (OpenAPI: https://api.nanostream.cloud/docs/token/openapi.json) |
| Player API | Player configuration reference, Events & error codes |
Common errors
| Symptom | Likely cause | Fix |
|---|---|---|
401 on the REST or Real-Time API | Missing, expired or malformed key or token | Check the header name and the token's exp |
403 on the REST API | Key of another organisation, or a malformed stream name | Use the key of the organisation that owns the stream |
403 with 105002 on the Analytics API | Your plan or user role does not include that route | Use a higher-tier account or ask support |
403 with 105003 on the Analytics API | Route is only available in the Analytics dashboard | Use the dashboard for that view |
| Token rejected after a while | Token expired | Mint a new one; keep lifetimes short and rotate automatically |
Next steps
- nanoStream REST API: create your first stream with curl
- Webhooks: approve or reject ingest from your backend
- Analytics API: pull viewer and playback metrics
- Build with AI: let an AI agent call these APIs for you with Agent Skills