> ## Documentation Index
> Fetch the complete documentation index at: https://docs.lumisreach.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Generate a music track

> Compose a background track from a prompt with ElevenLabs' Eleven Music, as the dashboard's Create with AI does. It takes a minute or two: this answers `201` with `status: generating`; poll `GET /v1/videos/music/generated/{id}` until it is `ready`, then use it on any of your workspace's videos as `music: { library: "generated", track_id }`. It is charged once, when the track is stored, at `price_cents` (`GET /v1/videos/music/catalog` has the price per minute); a track that fails costs nothing. Set `max_price_cents` to refuse, with 400, a track that would cost more. At most 3 tracks are made at once. Plans without the content API get `403 plan_not_included`.



## OpenAPI

````yaml /openapi.json post /v1/videos/music/generated
openapi: 3.1.0
info:
  title: LumisReach v1 API
  version: 1.0.0
  description: >-
    Programmatic access to the LumisReach voice platform — calls, numbers,
    caller trust, and brands.
  contact:
    name: LumisReach
    email: founders@lumisreach.com
servers:
  - url: https://api.lumisreach.com/api
security:
  - bearerAuth: []
tags:
  - name: Contacts
  - name: Calls
  - name: Messages
  - name: Emails
  - name: Phone Numbers
  - name: Caller IDs
  - name: Enterprise Registration
  - name: Branded Calling
  - name: Dialer Calls
  - name: SMS
  - name: WebRTC
  - name: Reputation
  - name: Usage
  - name: Account
  - name: Billing
  - name: Documents
  - name: Lincoln AI
  - name: Optimized posts
  - name: Predictions
  - name: Quick Agent Actions
  - name: Sub-entities
  - name: Video schedules
  - name: Videos
paths:
  /v1/videos/music/generated:
    post:
      tags:
        - Videos
      summary: Generate a music track
      description: >-
        Compose a background track from a prompt with ElevenLabs' Eleven Music,
        as the dashboard's Create with AI does. It takes a minute or two: this
        answers `201` with `status: generating`; poll `GET
        /v1/videos/music/generated/{id}` until it is `ready`, then use it on any
        of your workspace's videos as `music: { library: "generated", track_id
        }`. It is charged once, when the track is stored, at `price_cents` (`GET
        /v1/videos/music/catalog` has the price per minute); a track that fails
        costs nothing. Set `max_price_cents` to refuse, with 400, a track that
        would cost more. At most 3 tracks are made at once. Plans without the
        content API get `403 plan_not_included`.
      operationId: v1_videos_music_generated_post
      parameters:
        - name: Idempotency-Key
          in: header
          required: false
          description: >-
            A UUID. When present, deduplicates repeat submissions. See
            /api-reference/idempotency.
          schema:
            type: string
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $schema: http://json-schema.org/draft-07/schema#
              type: object
              properties:
                prompt:
                  type: string
                  minLength: 3
                  maxLength: 1000
                  description: >-
                    The music you want: genre, mood, tempo, instruments, e.g.
                    `warm lo-fi beat with soft piano, 85 bpm`
                seconds:
                  default: 60
                  description: >-
                    How long, 10 to 180 seconds. Default 60: a track shorter
                    than the video loops.
                  type: integer
                  minimum: 10
                  maximum: 180
                instrumental:
                  default: true
                  description: 'No vocals. Default `true`: vocals compete with narration.'
                  type: boolean
                max_price_cents:
                  description: >-
                    A spending cap: a track priced above it is refused with 400
                    and nothing is made
                  type: integer
                  minimum: 0
                  maximum: 9007199254740991
              required:
                - prompt
                - seconds
                - instrumental
              additionalProperties: false
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                $schema: http://json-schema.org/draft-07/schema#
                type: object
                properties:
                  data:
                    type: object
                    properties:
                      track_id:
                        type: string
                        format: uuid
                        pattern: >-
                          ^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$
                        description: >-
                          Pass as `music.track_id` with `library: generated`
                          once `ready`
                      status:
                        type: string
                        enum:
                          - generating
                          - ready
                          - failed
                      title:
                        type: string
                      prompt:
                        type: string
                      instrumental:
                        type: boolean
                      length_seconds:
                        type:
                          - number
                          - 'null'
                      price_cents:
                        type: integer
                        minimum: -9007199254740991
                        maximum: 9007199254740991
                        description: >-
                          What it costs (charged once it is ready; a failed
                          track is free)
                      error:
                        type:
                          - string
                          - 'null'
                      created_at:
                        type: string
                        format: date-time
                        pattern: >-
                          ^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d:[0-5]\d(?:\.\d+)?(?:Z))$
                    required:
                      - track_id
                      - status
                      - title
                      - prompt
                      - instrumental
                      - length_seconds
                      - price_cents
                      - error
                      - created_at
                    additionalProperties: false
                required:
                  - data
                additionalProperties: false
        '400':
          description: Validation error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorEnvelope'
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorEnvelope'
        '403':
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorEnvelope'
        '404':
          description: Not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorEnvelope'
        '409':
          description: Conflict (incl. idempotency conflicts)
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorEnvelope'
        '429':
          description: Rate limited
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorEnvelope'
components:
  schemas:
    ErrorEnvelope:
      type: object
      properties:
        error:
          type: object
          required:
            - code
            - message
          properties:
            code:
              type: string
            message:
              type: string
            fields:
              type: object
              additionalProperties:
                type: string
            doc_url:
              type: string
              format: uri
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.