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

# Search music

> Search and list available music with pagination support



## OpenAPI

````yaml POST /music/search
openapi: 3.1.0
info:
  title: Wondercraft Public API
  version: 0.0.1
servers:
  - url: https://api.wondercraft.ai/v1
    description: Base Wondercraft API
security: []
paths:
  /music/search:
    post:
      tags:
        - Music
      summary: List music
      description: Search and list available music with pagination support
      operationId: list_songs_music_search_post
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/ListMusicRequest'
        required: true
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ListMusicResponse'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
      security:
        - APIKeyHeader: []
components:
  schemas:
    ListMusicRequest:
      properties:
        query:
          anyOf:
            - type: string
            - type: 'null'
          title: Query
          description: Text search query for music titles and metadata
        filters:
          additionalProperties:
            items:
              type: string
            type: array
          propertyNames:
            $ref: '#/components/schemas/WondercraftAPIMusicFilterKey'
          type: object
          title: Filters
          description: >-
            Dictionary of music filters, where the key is the filter key and the
            value is a list of filter values.
        limit:
          type: integer
          maximum: 100
          minimum: 1
          title: Limit
          description: Number of results to return (1-100)
          default: 10
        offset:
          type: integer
          minimum: 0
          title: Offset
          description: Number of results to skip for pagination
          default: 0
      type: object
      title: ListMusicRequest
      description: Request model for listing music via API
    ListMusicResponse:
      properties:
        music:
          items:
            $ref: '#/components/schemas/WondercraftAPIMusic'
          type: array
          title: Music
          description: Array of music objects
        has_more_results:
          type: boolean
          title: Has More Results
          description: Whether there are more results available for pagination
      type: object
      required:
        - music
        - has_more_results
      title: ListMusicResponse
      description: Response model for listing music via API
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          type: array
          title: Detail
      type: object
      title: HTTPValidationError
    WondercraftAPIMusic:
      properties:
        id:
          type: string
          title: Id
          description: Unique music identifier
        title:
          anyOf:
            - type: string
            - type: 'null'
          title: Title
          description: Music title
        artist:
          anyOf:
            - type: string
            - type: 'null'
          title: Artist
          description: Music artist
        duration_ms:
          anyOf:
            - type: integer
            - type: 'null'
          title: Duration Ms
          description: Music duration in milliseconds
        audio_url:
          anyOf:
            - type: string
            - type: 'null'
          title: Audio Url
          description: URL to download or stream the music audio
        image_url:
          anyOf:
            - type: string
            - type: 'null'
          title: Image Url
          description: URL to the music's cover image/thumbnail
        genres:
          anyOf:
            - items:
                type: string
              type: array
            - type: 'null'
          title: Genres
          description: Music genre
        moods:
          anyOf:
            - items:
                type: string
              type: array
            - type: 'null'
          title: Moods
          description: Music mood
        use_cases:
          anyOf:
            - items:
                type: string
              type: array
            - type: 'null'
          title: Use Cases
          description: Intended use case for the music
        instruments:
          anyOf:
            - items:
                type: string
              type: array
            - type: 'null'
          title: Instruments
          description: Intended audience for the music
        rhythms:
          anyOf:
            - items:
                type: string
              type: array
            - type: 'null'
          title: Rhythms
          description: Rhythm of the music
      type: object
      required:
        - id
        - title
        - artist
        - duration_ms
        - audio_url
        - image_url
        - genres
        - moods
        - use_cases
        - instruments
        - rhythms
      title: WondercraftAPIMusic
      description: Simplified music model for API responses
    ValidationError:
      properties:
        loc:
          items:
            anyOf:
              - type: string
              - type: integer
          type: array
          title: Location
        msg:
          type: string
          title: Message
        type:
          type: string
          title: Error Type
      type: object
      required:
        - loc
        - msg
        - type
      title: ValidationError
  securitySchemes:
    APIKeyHeader:
      type: apiKey
      in: header
      name: X-API-KEY

````

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