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

# Download a music track

> A download URL for one music track. Free.



## OpenAPI

````yaml openapi/magnific-api-v2-stock-openapi.yaml GET /v2/stock/music/{music_id}/download
openapi: 3.1.0
info:
  title: Magnific API v2 — Stock
  version: 2.0.0
  description: >-
    Search, read and download stock under `/v2/stock`: images and templates,
    icons and videos (same items, licences and billing as API v1), and music and
    sound effects (free, as on the web).
servers:
  - url: https://api.magnific.com
    description: Production V2
security:
  - magnificApiKey: []
  - bearerAuth: []
tags:
  - name: Videos
    description: >-
      Generate and edit videos. Add `?dry_run=true` to get the price of a
      request first.
paths:
  /v2/stock/music/{music_id}/download:
    get:
      tags:
        - Stock audio
      summary: Download a music track
      description: |-
        The URL of the track's audio file.

        A personal token needs `api:read`.
      operationId: stock_music_download
      parameters:
        - $ref: '#/components/parameters/Audiomusic_id'
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                type: object
                required:
                  - data
                properties:
                  data:
                    $ref: '#/components/schemas/AudioDownload'
        '401':
          description: '`unauthenticated`: no valid token or API key.'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/AudioError'
        '403':
          description: >-
            `forbidden`, or what is missing: `magnific_api_disabled` (the key
            may not use the Magnific API), `tool_disabled` (the organization
            turned the audio library off), `key_not_supported`,
            `api_key_wallet_unavailable` (the key's creator is no longer in its
            organization).
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/AudioError'
        '404':
          description: >-
            `not_found`: no such item, or a premium one your plan does not
            include, or its file is not available.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/AudioError'
        '429':
          description: '`rate_limited`: wait the `Retry-After` header, in seconds.'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/AudioError'
        '500':
          description: '`internal_error`: give `request_id` to support.'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/AudioError'
        '503':
          description: >-
            `service_unavailable`: the entitlement could not be checked. Retry
            later.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/AudioError'
      security:
        - magnificApiKey: []
        - bearerAuth: []
components:
  parameters:
    Audiomusic_id:
      name: music_id
      in: path
      required: true
      description: The track `id`.
      schema:
        type: integer
  schemas:
    AudioDownload:
      type: object
      required:
        - id
        - title
        - download_url
      properties:
        id:
          type: integer
        title:
          type: string
        download_url:
          type: string
          description: The audio file.
    AudioError:
      type: object
      required:
        - code
        - message
      properties:
        code:
          type: string
          description: 'Stable, for code: each status lists the codes it carries.'
        message:
          type: string
          description: For people.
        details:
          type: object
          properties:
            errors:
              type: object
              description: Validation messages by parameter.
              additionalProperties:
                type: array
                items:
                  type: string
        request_id:
          type: string
          description: Give it to support.
  securitySchemes:
    magnificApiKey:
      type: apiKey
      in: header
      name: x-magnific-api-key
      description: >-
        Your Magnific API key. [Learn how to obtain an API
        key](https://docs.magnific.com/quickstart)
    bearerAuth:
      type: http
      scheme: bearer
      bearerFormat: JWT
      description: >-
        A personal access token, sent as `Authorization: Bearer <token>`. [How
        to get one](/api-reference/v2/overview#get-a-personal-access-token)

````

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