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

# Get Background Music

> Get available background music with pagination.
Supports filtering and sorting of music tracks.


Browse JoggAI's library of royalty-free background music.

## Example Usage

```bash theme={null}
curl --request GET \
  --url 'https://api.jogg.ai/v2/musics' \
  --header 'x-api-key: YOUR_API_KEY'
```

## Query Parameters

* `genre` - Filter by genre (e.g., "Corporate", "Ambient")
* `mood` - Filter by mood (e.g., "Energetic", "Calm")


## OpenAPI

````yaml GET /v2/musics
openapi: 3.0.1
info:
  title: JoggAI OpenAPI v2
  description: >
    JoggAI OpenAPI v2 provides a comprehensive suite of endpoints for creating
    and managing AI-powered video content.


    ## Authentication

    All API requests require authentication using an API key provided in the
    `x-api-key` header.


    ## Base URL

    Production: https://api.jogg.ai/v2


    ## Rate Limiting

    API calls are subject to rate limiting based on your subscription plan.


    ## Error Handling

    All endpoints return standard HTTP status codes along with detailed error
    messages in the response body.
  version: 2.0.0
  license:
    name: MIT
servers:
  - url: https://api.jogg.ai
    description: Production server
security:
  - apiKeyAuth: []
tags:
  - name: Video
    description: Video creation and management operations
  - name: Avatar
    description: Avatar management and creation operations
  - name: Voice
    description: Voice and timbre management operations
  - name: Asset
    description: Asset management including music, scripts, and uploads
  - name: Template
    description: Template management operations
  - name: Product
    description: Product management operations
  - name: User
    description: User account operations
  - name: Webhook
    description: Webhook endpoint management for event notifications
paths:
  /v2/musics:
    get:
      tags:
        - Asset
      summary: List background music
      description: |
        Get available background music with pagination.
        Supports filtering and sorting of music tracks.
      parameters:
        - name: page
          in: query
          description: Page number
          schema:
            type: integer
            minimum: 1
            default: 1
        - name: page_size
          in: query
          description: Items per page
          schema:
            type: integer
            minimum: 1
            maximum: 100
            default: 10
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                allOf:
                  - $ref: '#/components/schemas/BaseResponse'
                  - type: object
                    properties:
                      data:
                        type: object
                        properties:
                          music:
                            type: array
                            description: List of music tracks
                            items:
                              $ref: '#/components/schemas/MusicInfo'
                          pagination:
                            $ref: '#/components/schemas/Pagination'
components:
  schemas:
    BaseResponse:
      type: object
      required:
        - code
        - msg
      properties:
        code:
          type: integer
          description: |
            Business status code:
            * 0 - Success
            * 10104 - Record not found
            * 10105 - Invalid API key
            * 18020 - Insufficient credit
            * 18025 - No permission to call APIs
            * 40000 - Parameter error
            * 50000 - System error
          example: 0
        msg:
          type: string
          description: Response message
          example: Success
    MusicInfo:
      type: object
      properties:
        id:
          type: integer
          description: Music ID
          example: 1
        name:
          type: string
          description: Music name
          example: Upbeat Background
        music_url:
          type: string
          description: Music file URL
          example: https://res.jogg.ai/music/example.mp3
        duration:
          type: integer
          description: Music duration in seconds
          example: 120
    Pagination:
      type: object
      description: Pagination information
      properties:
        page:
          type: integer
          description: Current page number
          example: 1
        page_size:
          type: integer
          description: Items per page
          example: 10
        total_items:
          type: integer
          format: int64
          description: Total number of items
          example: 100
        total_pages:
          type: integer
          description: Total number of pages
          example: 10
  securitySchemes:
    apiKeyAuth:
      type: apiKey
      in: header
      name: x-api-key
      description: API key for authentication. Obtain your key from the JoggAI dashboard.

````