Ai Music Generator avatar
Ai Music Generator

Pricing

from $40.00 / 1,000 results

Go to Apify Store
Ai Music Generator

Ai Music Generator

AI Music Generator API that creates original music and soundtracks from text prompts. Generate complete songs, melodies, beats, and covers with AI for use in videos, podcasts, games, and creative projects. Ideal for content creators, musicians, and developers.

Pricing

from $40.00 / 1,000 results

Rating

0.0

(0)

Developer

Taher Ali Badnawarwala

Taher Ali Badnawarwala

Maintained by Community

Actor stats

0

Bookmarked

2

Total users

1

Monthly active users

4 days ago

Last modified

Share

AI Music Generator Actor

An Apify Actor that generates custom music tracks using AI-powered music generation technology. Simply provide a music category and description, and the Actor will create a professional music track for you.

What This Tool Does

This Actor connects to the MultipleWords music generation API to create custom music tracks based on category and description. It accepts a music category ID and descriptive text about the music you want to generate, processes the request through the API, monitors the generation queue, and returns a high-quality music file URL along with detailed metadata.

Key Features

🎵 Generate music tracks from text descriptions
🚀 Fast and automated music creation
📦 Structured output with music URLs and metadata
🔄 Reliable error handling with automatic retries
📊 Complete generation details and timestamps
⏱️ Queue status monitoring with exponential backoff

Purpose & Use Cases

This tool is designed to help individuals, businesses, and developers automate music creation for various purposes:

Content Creation

  • Generate background music for YouTube videos, podcasts, and streams
  • Create royalty-free music for social media content
  • Produce music tracks for online courses and educational materials
  • Generate music for advertisements and marketing campaigns

Business & Startups

  • Create custom music for brand videos and presentations
  • Generate music for product launches and demos
  • Produce background music for corporate content
  • Create unique soundtracks for marketing materials

Development & Automation

  • Integrate music generation into automated workflows
  • Batch generate music for multiple projects
  • Create music programmatically via API integration
  • Automate music creation for content pipelines

Creative Projects

  • Generate music for personal projects and portfolios
  • Create soundtracks for games and applications
  • Produce music for independent films and videos
  • Generate music samples for experimentation

Input Parameters

The Actor requires the following input:

music_category_id (Optional)

  • Type: Integer
  • Description: Category ID for the music genre (e.g., 1 for Pop music)
  • Default: 1
  • Example: 1

music_description (Optional)

  • Type: String
  • Description: A text description of the music you want to generate. Describe the style, mood, instruments, or characteristics you want.
  • Default: "Testng this Music, Pop music, Rock, Techno, Dubstep"
  • Example: "Upbeat electronic dance music with synthesizers and heavy bass"

Best Practices:

  • Include specific details about genre (pop, rock, electronic, jazz, etc.)
  • Mention mood or atmosphere (energetic, calm, dramatic, etc.)
  • Describe instruments or sounds you want included
  • Specify tempo preferences if relevant (fast, slow, moderate)

Note: The following parameters are handled automatically and do not need to be provided:

  • user_id: Set internally to 663559
  • music_name: Set internally to "Pop,Hip Hop, Jazz"
  • reference_music_id: Set internally to 1

Output Structure

The Actor returns structured data containing the generated music information:

{
"status": 1,
"music_id": 568574,
"queue_status": 1,
"music_url": "https://multiplewords.nyc3.cdn.digitaloceanspaces.com/music/pop-hip-hop-jazz-2026-01-28-05-48-26.mp3",
"music": {
"id": 568574,
"music_url": "https://multiplewords.nyc3.cdn.digitaloceanspaces.com/music/pop-hip-hop-jazz-2026-01-28-05-48-26.mp3",
"user_id": 663559,
"music_description": "Testng this Music, Pop music, Rock, Techno, Dubstep",
"music_name": "Pop,Hip Hop, Jazz",
"music_category_id": 1,
"music_created_at": "2026-01-28T05:48:07.864234Z",
"music_updated_at": "2026-01-28T05:48:27.439861Z",
"language_id": 49,
"url_slug": "pop-hip-hop-jazz-2026-01-28-05-48-26",
"art_work_url": "https://eu2.contabostorage.com/327b3177b4f240d2a0bda83c3f4e01fe:taher-storage/launcher_icon_new.png",
"is_public": true,
"is_active": true,
"job_key": "6a4a3b7f-2134-47b1-9587-e7efb50dcd1d",
"job_status": 1,
"duration": 15,
"reference_music_id": 1,
"isReferenceMusic": false,
"isPro": false,
"user_first_name": "lamborghini",
"user_last_name": "content",
"music_category_name": "Pop music",
"reference_music_url": "no music",
"number_of_times_played": 0
},
"position": 0
}

Output Fields Explained

  • status: Success indicator from music generation API (1 = success)
  • music_id: Unique identifier for the generated music track
  • queue_status: Status from queue check API (1 = success)
  • music_url: Direct URL to download the generated music file (MP3 format)
  • music: Complete metadata object about the music generation
    • music_created_at: Timestamp when the music was created
    • music_updated_at: Timestamp when the music was last updated
    • duration: Length of the music track in seconds
    • job_status: Status of the generation job (1 = completed)
    • music_category_name: Name of the music category
    • art_work_url: URL to the artwork/cover image for the music
  • position: Position in the generation queue (0 = completed/ready)

How to Use

Running Locally

  1. Install dependencies:

    $npm install
  2. Run the Actor:

    $apify run
  3. Provide input when prompted, or create an input file in storage/key_value_stores/default/INPUT.json:

    {
    "music_category_id": 1,
    "music_description": "Upbeat electronic dance music with synthesizers and heavy bass"
    }

Deploy to Apify Platform

  1. Login to Apify:

    $apify login
  2. Deploy the Actor:

    $apify push
  3. Run on Apify Console:

    • Go to Actors -> My Actors
    • Select your AI Music Generator Actor
    • Enter your music_category_id and music_description in the input form
    • Click "Start" to generate your music

Using via API

Once deployed, you can call the Actor via Apify API:

curl -X POST "https://api.apify.com/v2/acts/YOUR_USERNAME~ai-music-generator/run-sync" \
-H "Authorization: Bearer YOUR_API_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"music_category_id": 1,
"music_description": "Calm ambient music perfect for meditation and relaxation"
}'

Integration Examples

With Make (Integromat)

  • Connect the Actor to your Make workflows
  • Automatically generate music when new video projects are created
  • Send generated music files to storage services or email
  • Trigger music generation from form submissions

With Zapier

  • Generate music when new content is published
  • Automatically add music files to Google Drive or Dropbox
  • Send music generation notifications via Slack or email
  • Create music for scheduled social media posts

With Custom Applications

  • Integrate via Apify API into your web applications
  • Batch generate music for multiple video projects
  • Create automated music workflows for content pipelines
  • Build music generation into video editing tools

Technical Details

  • Runtime: Node.js 18+
  • Dependencies: Apify SDK v3.5.2+
  • Music Generation API: https://shorts.multiplewords.com/mwvideos/api/music_prompt
  • Queue Check API: https://multiplewords.com/api/check_queue_music/{music_id}
  • Request Method: POST (generation), GET (queue check)
  • Content Type: multipart/form-data (generation)
  • Output Format: MP3 audio files
  • Default Track Duration: 15 seconds

Error Handling

The Actor includes comprehensive error handling:

  • ✅ Validates input parameters before processing
  • ✅ Handles API errors gracefully with detailed error messages
  • ✅ Automatic retry logic with exponential backoff for queue checks
  • ✅ Waits for music processing before checking queue status
  • ✅ Provides detailed error messages in logs
  • ✅ Returns appropriate exit codes for debugging
  • ✅ Continues execution even if queue check fails (saves generation response)

Retry Strategy

The Actor implements a smart retry mechanism:

  • Initial wait: 5 seconds after music generation
  • Retry attempts: Up to 3 attempts for queue API
  • Exponential backoff: 5s, 10s, 15s delays between retries
  • Automatic handling of 500 errors from queue API

Resources

Support

For issues, questions, or feature requests, please refer to the Apify documentation or community forums.


Built with ❤️ using Apify SDK