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

# Make a new music track

> Solara AI API: A new background track in the video's mood; the old ones stay. A paid edit, capped per day.

Permission: **Edit** (`edit`).



## OpenAPI

````yaml /api-reference/openapi.json post /api/v1/projects/{id}/music/regenerate
openapi: 3.1.0
info:
  title: Solara AI API
  version: '1'
  description: >-
    Make and edit videos with an API key. Every operation here accepts a key;
    everything else in Solara is for people in the app. Generated from the
    backend by tools/docs/build-public-spec.ts.
servers:
  - url: https://api.solaraai.com
    description: Production
security:
  - ApiKeyBearer: []
tags:
  - name: Styles
    description: The looks a video can be made in.
  - name: Upload
    description: Send a recording to Solara in parts.
  - name: Footage
    description: >-
      The person's own photos and clips, shown as b-roll on the lines that
      mention them. Add each one after the recording's upload and before Create
      a video: footage added after the video is made isn't placed in it.
  - name: Videos
    description: Make a video from an upload and follow it.
  - name: Editing
    description: Read and change an edit. Editing is free and never renders.
  - name: Export
    description: >-
      Render the final video and download it. An export uses one of the plan's
      videos.
  - name: Calendar
    description: >-
      What posts when, how each post went, and what is ready to post. Read only:
      moving, retrying or deleting a post is the person's, in Solara.
  - name: Performance
    description: >-
      How the workspace's posts are doing: each platform's own numbers, read on
      a schedule, never live. YouTube's and Threads' numbers are not shared with
      an API key; X's come with a plan; LinkedIn isn't measured yet.
  - name: Posting
    description: >-
      Ask the person to approve a post: they approve in Solara, and nothing
      posts before. Needs the Ask to post permission, which an AI agent gets
      when the person allows it; keys made in the app do not have it.
paths:
  /api/v1/projects/{id}/music/regenerate:
    post:
      tags:
        - Editing
      summary: Make a new music track
      description: >-
        A new background track in the video's mood; the old ones stay. A paid
        edit, capped per day.


        Permission: **Edit** (`edit`).
      operationId: regenerate-project-music
      parameters:
        - in: path
          name: id
          required: true
          schema:
            type: string
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/RegenerateMusicInputBody'
        required: true
      responses:
        '202':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/MusicStateBody'
          description: Accepted
        default:
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/ErrorModel'
          description: Error
      security:
        - ApiKeyBearer: []
components:
  schemas:
    RegenerateMusicInputBody:
      additionalProperties: false
      type: object
      properties:
        mood:
          description: 'This version''s mood; absent: the setting''s'
          enum:
            - auto
            - calm
            - upbeat
            - inspiring
            - cinematic
            - playful
          type: string
        note:
          description: >-
            The customer's words for this version: a change (softer, more piano)
            or the music they want (warm lo-fi piano)
          maxLength: 300
          type: string
        provider:
          description: 'The model that makes it; absent: the setting''s, else the default'
          enum:
            - elevenlabs
            - lyria
          type: string
    MusicStateBody:
      additionalProperties: false
      type: object
      properties:
        current:
          $ref: '#/components/schemas/MusicTrackBody'
          description: The track an export plays now
        daily_limit:
          format: int64
          type: integer
        default_provider:
          description: The model a track gets when its request names none
          enum:
            - elevenlabs
            - lyria
          type: string
        enabled:
          type: boolean
        free_day_spent:
          description: >-
            A free workspace's AI for today can't take a new track: none is made
            until midnight UTC (a plan lifts it). Sent only while status is none
            or off
          type: boolean
        generation_id:
          description: The pinned version, when the customer picked one
          type: string
        mood:
          enum:
            - auto
            - calm
            - upbeat
            - inspiring
            - cinematic
            - playful
          type: string
        status:
          description: >-
            off: music is off; none: on but nothing on its way (the daily cap);
            generating: a track is being made (current may still play); ready:
            current plays; failed: the newest failed and none is ready
          enum:
            - 'off'
            - none
            - generating
            - ready
            - failed
          type: string
        used_today:
          description: Tracks made for this video in the last 24 h (cached ones are free)
          format: int64
          type: integer
        versions:
          description: Every version, newest first
          items:
            $ref: '#/components/schemas/MusicTrackBody'
          type:
            - array
            - 'null'
        volume_db:
          description: The bed's level against its default, dB (-12..6)
          format: double
          type: number
      required:
        - enabled
        - mood
        - volume_db
        - status
        - versions
        - used_today
        - daily_limit
    ErrorModel:
      additionalProperties: false
      type: object
      properties:
        code:
          $ref: '#/components/schemas/ErrorCode'
          description: >-
            Names a customer-visible error, for the app to translate; absent on
            other errors
        detail:
          description: >-
            A human-readable explanation specific to this occurrence of the
            problem.
          examples:
            - Property foo is required but is missing.
          type: string
        errors:
          description: Optional list of individual error details
          items:
            $ref: '#/components/schemas/ErrorDetail'
          type:
            - array
            - 'null'
        instance:
          description: >-
            A URI reference that identifies the specific occurrence of the
            problem.
          examples:
            - https://example.com/error-log/abc123
          format: uri
          type: string
        status:
          description: HTTP status code
          examples:
            - 400
          format: int64
          type: integer
        title:
          description: >-
            A short, human-readable summary of the problem type. This value
            should not change between occurrences of the error.
          examples:
            - Bad Request
          type: string
        type:
          default: about:blank
          description: A URI reference to human-readable documentation for the error.
          examples:
            - https://example.com/errors/example
          format: uri
          type: string
    MusicTrackBody:
      additionalProperties: false
      type: object
      properties:
        asset_id:
          description: The id the plan's music block names it by
          type: string
        brief:
          description: One line on why it fits the video
          type: string
        cache_hit:
          description: Reused from an identical request at no cost
          type: boolean
        completed_at:
          format: date-time
          type: string
        created_at:
          format: date-time
          type: string
        duration_ms:
          description: 'The length it was made for: the video''s edited length'
          format: int64
          type: integer
        error_class:
          description: >-
            Why it failed: rate_limited, provider_5xx, rejected, auth, timeout,
            network, no_audio, decode, no_plan, unavailable
          type: string
        id:
          format: uuid
          type: string
        loudness_lufs:
          description: The track's integrated loudness
          format: double
          type: number
        model:
          type: string
        mood:
          type: string
        note:
          type: string
        peaks_url:
          description: >-
            The waveform {version, bin_ms: 20, duration_ms, peaks: 0..255},
            signed; once ready
          type: string
        provider:
          description: >-
            elevenlabs or lyria; customer for an upload; library for an auto
            edit's track of the licensed music library (its model is the track's
            id)
          type: string
        rights_confirmed_at:
          description: When the customer confirmed the rights to an upload
          format: date-time
          type: string
        status:
          enum:
            - queued
            - running
            - ready
            - failed
            - canceled
          type: string
        title:
          description: The track's name, e.g. Calm piano pulse
          type: string
        track_ms:
          description: >-
            The track's own length (longer than duration_ms for a trimmed
            provider)
          format: int64
          type: integer
        trigger:
          description: >-
            auto: music turned on or Start; regenerate: New track; export: an
            export found none for the cut; upload: the customer's own music
          enum:
            - auto
            - regenerate
            - export
            - upload
          type: string
        url:
          description: The audio, signed; once ready
          type: string
        version:
          description: 1, 2, … in the order they were asked for
          format: int64
          type: integer
      required:
        - id
        - version
        - status
        - trigger
        - mood
        - provider
        - model
        - duration_ms
        - asset_id
        - created_at
    ErrorCode:
      description: >-
        A stable name for a customer-visible error; the app translates it.
        Absent on other errors.
      enum:
        - invalid_credentials
        - invalid_or_expired
        - too_many_attempts
        - resend_too_soon
        - email_taken
        - invalid_phone
        - temporarily_unavailable
        - turnstile_failed
        - email_unchanged
        - phone_unchanged
        - account_deletion_unavailable
        - project_not_found
        - plan_changed
        - subscription_required
        - restyle_limit
        - fill_limit
        - export_limit
        - ask_limit
        - music_limit
        - music_unavailable
        - free_limit
        - plan_required
        - allowance_used
        - not_exported
        - not_editable
        - earlier_cut
        - invalid_edit
        - edit_timing_off
        - landscape_off
        - speaker_poster_off
        - reedit_off
        - music_off
        - animated_off
        - animated_locked
        - animation_pending
        - caption_style_unfit
        - animated_colors_fixed
        - animated_too_long
        - speed_too_slow
        - animated_allowance_used
        - animated_plan_required
        - redraw_limit
        - cap_workspace
        - cap_workspace_drawing
        - cap_global
        - attachment_video
        - attachment_too_big
        - attachment_missing
        - attachment_limit
        - attachment_too_long
        - ask_busy
        - plan_not_for_sale
        - not_entitled
        - plan_change_unavailable
        - not_for_sale
        - same_plan
        - resume_required
        - upgrade_pending
        - quote_expired
        - no_pending_upgrade
        - exit_offer_ended
        - campaign_offer_ended
        - post_publishing
        - post_already_ended
        - post_not_ended
        - post_preparing
        - post_not_retryable
        - post_needs_reconnect
        - post_may_be_live
        - text_post_needs_media
        - caption_required
        - caption_too_long
        - caption_ai_limit
        - caption_ai_no_source
        - caption_ai_failed
        - caption_ai_unavailable
        - caption_ai_no_room
        - caption_ai_listening
        - upload_words_limit
        - company_not_found
        - linkedin_needs_reconnect
        - youtube_off
        - youtube_not_short
        - youtube_too_large
        - scope_not_offered
        - x_off
        - x_video_refused
        - threads_off
        - threads_video_refused
        - pinterest_off
        - pinterest_video_refused
        - pinterest_business_account_needed
        - pinterest_needs_reconnect
        - google_business_off
        - google_business_needs_reconnect
        - google_business_video_refused
        - google_business_location_not_found
        - google_business_ended
        - bluesky_off
        - bluesky_video_refused
        - linkedin_page_off
        - linkedin_page_needs_reconnect
        - linkedin_page_not_found
        - facebook_video_refused
        - photo_unfittable
        - intake_not_found
        - intake_not_complete
        - intake_limit
        - intake_not_configured
        - intake_invalid
        - api_key_invalid
        - api_key_revoked
        - api_key_not_allowed
        - insufficient_scope
        - agent_api_off
        - agent_only
        - api_key_limit
        - api_key_daily_limit
        - idempotency_in_progress
        - idempotency_key_reused
        - publish_request_expired
        - publish_request_edited
        - publish_request_decided
        - publish_request_pending
        - video_not_postable
        - text_posts_waiting
        - publish_request_daily_limit
        - video_format_not_supported
        - photo_posts_waiting
        - upload_not_ready
        - tiktok_option_not_allowed
        - workspace_owner_only
        - oauth_off
        - oauth_request_expired
        - oauth_client_gone
        - oauth_device_code_unknown
        - oauth_request_not_yours
        - url_not_allowed
        - url_not_public
        - url_unreachable
        - not_a_video
        - video_too_large
        - video_too_long
        - url_fetches_busy
        - url_fetch_daily_limit
        - upload_incomplete
        - upload_used
        - broll_off
        - media_limit
        - media_daily_limit
        - media_too_large
        - media_too_long
        - media_not_supported
        - ai_clips_off
        - clip_limit
        - ai_clips_plan_required
        - clip_refusal_limit
        - stock_clip_limit
        - auto_edit_off
        - auto_edit_limit
        - auto_edit_locked
        - auto_edit_files_missing
        - auto_edit_busy
        - auto_edit_cutting
        - picture_blocks_off
        - picture_pending
        - block_too_long
        - footage_not_ready
        - block_is_clip
        - crop_size_unknown
        - no_speech
        - no_audio
        - feedback_unavailable
        - feedback_not_sent
        - feedback_rate_limited
        - duplicate_post
        - video_has_post
        - several_posts
        - post_in_old_format
        - x_same_text
        - youtube_already_posted
        - use_create_post
        - publish_requests_waiting
        - post_analytics_needs_plan
        - workspace_suspended
        - support_view_ended
        - support_view_read_only
      type: string
    ErrorDetail:
      additionalProperties: false
      type: object
      properties:
        location:
          description: >-
            Where the error occurred, e.g. 'body.items[3].tags' or
            'path.thing-id'
          type: string
        message:
          description: Error message text
          type: string
        value:
          description: The value at the given location
  securitySchemes:
    ApiKeyBearer:
      type: http
      scheme: bearer
      bearerFormat: sol_live_
      description: >-
        An API key, created in Solara: the menu under your name, then API keys.
        Send it as `Authorization: Bearer sol_live_…`. It works while the
        workspace has agent access, within what its plan gives (the free plan
        included).

````

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