{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/feed-fm/json-schema/feed-fm-create-play-request-schema.json",
  "title": "CreatePlayRequest",
  "description": "Body for `POST /play`, which reserves the next track for a client. Give\na `station_id` to play a specific station, a `placement_id` to let the\nserver pick within a placement, or an `audio_file_id` to request a\nspecific track on an on-demand station.\n",
  "x-generated": "2026-12-01",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/_original/feed-fm-v3-openapi.yml#/components/schemas/CreatePlayRequest",
  "type": "object",
  "properties": {
    "client_id": {
      "type": "string",
      "maxLength": 23,
      "description": "The client this play belongs to. Required, but may instead arrive as\na `cid` cookie or a `client_id` query parameter — see *Identifying a\nclient*. Values longer than 23 characters are silently truncated.\n"
    },
    "placement_id": {
      "type": "string",
      "description": "The placement to pull from. Defaults to the credentials' default\nplacement when omitted.\n"
    },
    "station_id": {
      "type": "string",
      "description": "The station to pull from. Defaults to the placement's default\nstation when omitted.\n"
    },
    "audio_file_id": {
      "type": "string",
      "description": "Request a specific audio file. Only honoured for on-demand and\nreplay stations; asking on a radio station gives\n`notOnDemandOrReplay` (code 23).\n"
    },
    "formats": {
      "type": "string",
      "default": "mp3",
      "description": "Comma-separated list of acceptable codecs, in preference order, e.g.\n`aac,mp3`. Valid codecs are `mp3` and `aac`. If none of the\nrequested formats exist for the selected track the call reports\n`formatUnavailable` (code 24) — which is delivered as HTTP 200 with\n`success: false`.\n"
    },
    "max_bitrate": {
      "type": "integer",
      "description": "Upper bound on the delivered bitrate, in kbps. The server picks the\nhighest available file at or below this value.\n"
    },
    "crossfade": {
      "type": "number",
      "description": "Crossfade duration in seconds to apply to this play, overriding the\nstation's configured value. Read **only when `at` is also supplied**\n— sent on its own it is ignored, with no error and nothing in the\nresponse to say so.\n"
    },
    "preview": {
      "type": "boolean",
      "default": false,
      "description": "When `true`, create a preview play rather than a reportable one. The\nresulting `audio_file` carries `preview: true`.\n"
    },
    "at": {
      "type": "number",
      "description": "Request the song that should play at this seconds offset within the\nstation. Only meaningful for stations that allow seeking; surfaces\nas `start_at` on the returned play.\n"
    }
  }
}