openapi: 3.1.0 info: title: Beatoven Composition Tasks Tracks API description: 'Public REST API for Beatoven.ai''s text-to-music generation. Submit a natural language prompt and receive an asynchronously composed track with downloadable master mix and individual stems (bass, chords, melody, percussion). The API is asynchronous: POST a composition request to receive a task_id, then poll the task endpoint until status is "composed". ' version: v1 contact: name: Beatoven.ai Support email: hello@beatoven.ai url: https://www.beatoven.ai/api license: name: Beatoven.ai Terms of Service url: https://www.beatoven.ai/tos servers: - url: https://public-api.beatoven.ai description: Beatoven public API production server security: - BearerAuth: [] tags: - name: Tracks description: Compose new tracks from natural language prompts. paths: /api/v1/tracks/compose: post: summary: Compose A Track From A Prompt description: 'Start an asynchronous track composition from a text prompt. Returns a task_id that can be polled at /api/v1/tasks/{task_id} until the track is composed. ' operationId: composeTrack tags: - Tracks requestBody: required: true content: application/json: schema: $ref: '#/components/schemas/ComposeRequest' examples: LoFiChillHop: summary: 30-second peaceful lo-fi prompt value: prompt: text: 30 seconds peaceful lo-fi chill hop track format: wav looping: false responses: '200': description: Composition task accepted. content: application/json: schema: $ref: '#/components/schemas/ComposeResponse' examples: Started: value: status: started task_id: ccb84650-7b4a-4d00-9f80-8a6427ca21aa_1 '400': $ref: '#/components/responses/BadRequest' '401': $ref: '#/components/responses/Unauthorized' '500': $ref: '#/components/responses/ServerError' components: responses: ServerError: description: Internal server error. content: application/json: schema: $ref: '#/components/schemas/Error' Unauthorized: description: Missing or invalid Bearer API token. content: application/json: schema: $ref: '#/components/schemas/Error' BadRequest: description: Invalid request body or parameters. content: application/json: schema: $ref: '#/components/schemas/Error' schemas: Error: type: object properties: error: type: string ComposeRequest: type: object required: - prompt properties: prompt: $ref: '#/components/schemas/Prompt' format: type: string enum: - mp3 - aac - wav default: wav description: Audio container for the rendered track. looping: type: boolean default: false description: Set true to bias the composition toward loopable structure. Prompt: type: object required: - text properties: text: type: string description: Natural language prompt describing the desired track (genre, mood, length, instruments). example: 30 seconds peaceful lo-fi chill hop track ComposeResponse: type: object properties: status: type: string enum: - started description: Indicates the composition task has been accepted. task_id: type: string description: Identifier used to poll composition progress. securitySchemes: BearerAuth: type: http scheme: bearer description: Beatoven API token, issued by hello@beatoven.ai or from the API dashboard.