Stream

Create stream

POST
https://api.tunio.ai/v1/streams

Creates a station in the token's location, owned by the token's user, together with a player link for it. The name is turned into a slug that must be unique across all Tunio stations.

Request body

Create stream request

NameTypeDescription
descriptionRequiredstring
Description of the station shown to listeners.
is_privateboolean
Hide the station from the public listing. Default false.
langRequiredstring
Language code of the station, for example "en".
nameRequiredstring
Station slug. It is lowercased, spaces and underscores become dashes, and every character other than a-z, 0-9 and "-" is dropped. The result must be unique across all Tunio stations; it addresses the public page app.tunio.ai/stream/<name> and the stream URLs.
timezonestring
IANA time zone of the station, for example "Europe/Berlin". Empty or omitted means UTC; an unknown zone gives 400 invalid_timezone.
titleRequiredstring
Display title of the station.
Request example
01{
02 "description": "Background music for Cafe Central",
03 "is_private": true,
04 "lang": "en",
05 "name": "cafe-central",
06 "timezone": "Europe/Berlin",
07 "title": "Cafe Central"
08}

Responses

NameTypeDescription
streamobject
The created station.
artdj_enabledboolean
Whether the AI DJ is enabled.
cross_fade_innumber
Fade-in length of a track, in seconds.
cross_fade_outnumber
Fade-out length of a track, in seconds.
descriptionstring
Description shown to listeners.
image_urlstring
CDN URL of the cover, or null when the stream has none.
image_url_jpegstring
The same cover as a JPEG no larger than 360 px, for clients that cannot read WebP. Null when the stream has no cover.
instant_playlist_idstring
UUID of the instant playlist set with POST /v1/stream/{stream_id}/instant-playlist, or null.
is_privateboolean
Whether the station is hidden from the public listing.
langstring
Language code of the station.
listenersinteger
Current number of listeners.
liveobject
Live broadcasting settings.
music_orderstring
Which listener music orders the station accepts: "disabled", "all", or "air_genres" (only tracks in the genres the station plays).
music_volumenumber
Music volume, 0..1.
namestring
Station slug; the public page is app.tunio.ai/stream/<name>.
pinstring
Not populated by this API; always null.
restream_statusarray
Not populated by this API; always omitted. Use GET /v1/stream/{stream_id}/restreams.
statusstring
Broadcast status.
stream_idstring
Station UUID.
timezonestring
IANA time zone of the station; empty means UTC.
timezone_posixstring
The same zone as POSIX rules, for clients without a time zone database. Null when the zone is unset or unknown to this server.
titlestring
Display title.
urlstring
Continuous AAC stream URL.
url_hlsstring
HLS playlist URL.
user_idinteger
ID of the station's owner.
successboolean
Always true.
NameTypeDescription
errorsobject
Failed validation rules keyed by JSON field name, for example "required field", "min=1" or "oneof=ai human mixed".
messagestring
Always "validation_error".
successboolean
Always false for error payloads.
NameTypeDescription
messagestring
Error code or human-readable error details.
successboolean
Always false for error payloads.
NameTypeDescription
max_streams_allowedinteger
Number of stations the plan allows.
messagestring
plan_expired, plan_no_streams_allowed or max_streams_reached; error_access_denied (without max_streams_allowed) when the token has no location.
successboolean
Always false.
NameTypeDescription
messagestring
Error code or human-readable error details.
successboolean
Always false for error payloads.
NameTypeDescription
messagestring
Error code or human-readable error details.
successboolean
Always false for error payloads.