Finetuning.aiFinetuning.ai

Quickstart

Generate your first AI music track in 5 minutes

This guide walks you through generating your first AI music track with the Finetuning.ai API.

Prerequisites

  • A Finetuning.ai account with API access
  • Your API key from finetuning.ai/dashboard
  • Sufficient credits in your account

Step 1: Verify your API key

First, confirm your API key works and check your credit balance:

curl https://pub.finetuning.ai/v1/me \
  -H "X-API-Key: your-api-key"

You should see a response with your account info and available credits.

Step 2: Create a generation

Now let's generate a music track:

curl -X POST https://pub.finetuning.ai/v1/generations \
  -H "X-API-Key: your-api-key" \
  -H "Content-Type: application/json" \
  -d '{
    "prompt": "upbeat electronic track with synth leads",
    "duration": 30,
    "tags": ["electronic", "upbeat", "synth"]
  }'

The API returns a generation object with an id and initial status of "pending".

Step 3: Check generation status

Poll the generation endpoint to check when your track is ready:

curl https://pub.finetuning.ai/v1/generations/YOUR_GENERATION_ID \
  -H "X-API-Key: your-api-key"

When status changes to "completed", the response includes a URL to download your generated track.

Step 4: Download your track

Use the audio_url from the completed generation response to download your track:

curl -O "YOUR_AUDIO_URL"

That's it! You've generated your first AI music track.

Next steps

On this page