Stream
Create stream
POST
https://api.tunio.ai/ v1/ streamsCreates 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
| Name | Type | Description |
|---|---|---|
| descriptionRequired | string | Description of the station shown to listeners. |
| is_private | boolean | Hide the station from the public listing. Default false. |
| langRequired | string | Language code of the station, for example "en". |
| nameRequired | string | 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. |
| timezone | string | IANA time zone of the station, for example "Europe/Berlin". Empty or omitted means UTC; an unknown zone gives 400 invalid_timezone. |
| titleRequired | string | 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
| Name | Type | Description |
|---|---|---|
| stream | object | The created station. |
| artdj_enabled | boolean | Whether the AI DJ is enabled. |
| cross_fade_in | number | Fade-in length of a track, in seconds. |
| cross_fade_out | number | Fade-out length of a track, in seconds. |
| description | string | Description shown to listeners. |
| image_url | string | CDN URL of the cover, or null when the stream has none. |
| image_url_jpeg | string | 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_id | string | UUID of the instant playlist set with POST /v1/stream/{stream_id}/instant-playlist, or null. |
| is_private | boolean | Whether the station is hidden from the public listing. |
| lang | string | Language code of the station. |
| listeners | integer | Current number of listeners. |
| live | object | Live broadcasting settings. |
| music_order | string | Which listener music orders the station accepts: "disabled", "all", or "air_genres" (only tracks in the genres the station plays). |
| music_volume | number | Music volume, 0..1. |
| name | string | Station slug; the public page is app.tunio.ai/stream/<name>. |
| pin | string | Not populated by this API; always null. |
| restream_status | array | Not populated by this API; always omitted. Use GET /v1/stream/{stream_id}/restreams. |
| status | string | Broadcast status. |
| stream_id | string | Station UUID. |
| timezone | string | IANA time zone of the station; empty means UTC. |
| timezone_posix | string | The same zone as POSIX rules, for clients without a time zone database.
Null when the zone is unset or unknown to this server. |
| title | string | Display title. |
| url | string | Continuous AAC stream URL. |
| url_hls | string | HLS playlist URL. |
| user_id | integer | ID of the station's owner. |
| success | boolean | Always true. |
| Name | Type | Description |
|---|---|---|
| errors | object | Failed validation rules keyed by JSON field name, for example "required field", "min=1" or "oneof=ai human mixed". |
| message | string | Always "validation_error". |
| success | boolean | Always false for error payloads. |
| Name | Type | Description |
|---|---|---|
| message | string | Error code or human-readable error details. |
| success | boolean | Always false for error payloads. |
| Name | Type | Description |
|---|---|---|
| max_streams_allowed | integer | Number of stations the plan allows. |
| message | string | plan_expired, plan_no_streams_allowed or max_streams_reached; error_access_denied (without max_streams_allowed) when the token has no location. |
| success | boolean | Always false. |
| Name | Type | Description |
|---|---|---|
| message | string | Error code or human-readable error details. |
| success | boolean | Always false for error payloads. |
| Name | Type | Description |
|---|---|---|
| message | string | Error code or human-readable error details. |
| success | boolean | Always false for error payloads. |