{
  "openapi": "3.0.1",
  "info": {
    "title": "AI Music Generator",
    "description": "Transform your ideas into professional-grade, radio-ready tracks in seconds. This powerhouse Apify Actor connects to cutting-edge AI music models to give you a complete, automated music production studio right at your fingertips. This tool is designed for speed, creativity, and seamless automation.",
    "version": "0.0",
    "x-build-id": "XTUZhCwTveL2EtpvI"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/visita~ai-music-generator/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-visita-ai-music-generator",
        "x-openai-isConsequential": false,
        "summary": "Executes an Actor, waits for its completion, and returns Actor's dataset items in response.",
        "tags": [
          "Run Actor"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/inputSchema"
              }
            }
          }
        },
        "parameters": [
          {
            "name": "token",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Enter your Apify token here"
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/acts/visita~ai-music-generator/runs": {
      "post": {
        "operationId": "runs-sync-visita-ai-music-generator",
        "x-openai-isConsequential": false,
        "summary": "Executes an Actor and returns information about the initiated run in response.",
        "tags": [
          "Run Actor"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/inputSchema"
              }
            }
          }
        },
        "parameters": [
          {
            "name": "token",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Enter your Apify token here"
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/runsResponseSchema"
                }
              }
            }
          }
        }
      }
    },
    "/acts/visita~ai-music-generator/run-sync": {
      "post": {
        "operationId": "run-sync-visita-ai-music-generator",
        "x-openai-isConsequential": false,
        "summary": "Executes an Actor, waits for completion, and returns the OUTPUT from Key-value store in response.",
        "tags": [
          "Run Actor"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/inputSchema"
              }
            }
          }
        },
        "parameters": [
          {
            "name": "token",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Enter your Apify token here"
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    }
  },
  "components": {
    "schemas": {
      "inputSchema": {
        "type": "object",
        "properties": {
          "studioMode": {
            "title": "🎚️ Studio Mode",
            "enum": [
              "original-creation",
              "cover-remix",
              "instrumental-magic",
              "stem-splitter",
              "extend-track",
              "generate-media",
              "generate-persona",
              "get-details"
            ],
            "type": "string",
            "description": "Choose your generation pipeline (Create from scratch, Remix/Cover a track, Extract/Add Instrumentals, or Generate Media from Existing Song).",
            "default": "original-creation"
          },
          "audioSource": {
            "title": "🔊 Audio Source",
            "enum": [
              "custom-link",
              "premium-library"
            ],
            "type": "string",
            "description": "If remixing or using instrumental mode, choose where the audio comes from.",
            "default": "premium-library"
          },
          "customAudioLink": {
            "title": "🔗 Custom Audio Link",
            "type": "string",
            "description": "Direct URL to an MP3 or audio file (if Audio Source is 'Custom URL Link')."
          },
          "libraryGenre": {
            "title": "🎵 Music Genre",
            "enum": [
              "pop",
              "kids",
              "birthday",
              "christmas-new-year",
              "rap-hip-hop",
              "trap",
              "drill",
              "r&b",
              "soul",
              "gospel",
              "house",
              "afro-house",
              "amapiano",
              "deep-house",
              "slap-house",
              "bass-house",
              "tech-house",
              "electro-house",
              "edm",
              "trance",
              "progressive-house",
              "future-house",
              "acid-house",
              "french-house",
              "big-room-house",
              "chicago-house",
              "rock",
              "alt-rock",
              "indie-rock",
              "country",
              "blues",
              "jazz",
              "funk",
              "love-songs",
              "oldies",
              "latin",
              "reggaeton",
              "dancehall",
              "afrobeat",
              "afro-pop",
              "indie",
              "alternative",
              "lo-fi",
              "community-creations"
            ],
            "type": "string",
            "description": "Select the genre for your track. Each genre has unique LLM prompting for authentic sound.",
            "default": "pop"
          },
          "libraryTrackName": {
            "title": "🎵 Library Track Name",
            "type": "string",
            "description": "The exact track name to load from the catalog (e.g. 'synth_pop_anthem.mp3')."
          },
          "taskId": {
            "title": "🔑 Task ID",
            "type": "string",
            "description": "REQUIRED for media/persona generation modes. For other modes, if provided, skips generation and directly polls the status of this existing Task ID instead. Get this from a previous successful music generation run."
          },
          "pollingIntervalSeconds": {
            "title": "⏱️ Polling Interval",
            "type": "integer",
            "description": "How often to check for the task completion status (in seconds). Recommended: 20-30 seconds for music generation.",
            "default": 20
          },
          "callBackUrl": {
            "title": "🔔 Webhook Callback URL",
            "type": "string",
            "description": "URL to receive completion notifications directly from Suno API."
          },
          "asyncPassthrough": {
            "title": "⚡ Async Passthrough (Zero-Duration)",
            "type": "boolean",
            "description": "If enabled AND a Webhook Callback URL is provided, the Actor will exit instantly after starting the task, preventing long wait times. You MUST handle the webhook response on your end.",
            "default": false
          },
          "generateLyricsLLM": {
            "title": "🤖 Use AI Co-Writer",
            "type": "boolean",
            "description": "If enabled, our LLM will dynamically write context-aware lyrics based on your Prompt and the selected Studio Mode/Backing Track!",
            "default": false
          },
          "llmModel": {
            "title": "🧠 AI Producer Model",
            "enum": [
              "openai/gpt-4o-mini",
              "openai/gpt-5.1",
              "google/gemini-3.1-pro",
              "anthropic/claude-3-opus"
            ],
            "type": "string",
            "description": "Select the OpenRouter model to write the lyrics. Better models provide higher quality artistic expression.",
            "default": "openai/gpt-4o-mini"
          },
          "songMood": {
            "title": "🎭 Song Mood / Vibe",
            "enum": [
              "dynamic-match",
              "raw-aggressive",
              "melancholy-heartbreak",
              "hype-euphoric",
              "chill-lofi",
              "sarcastic-playful"
            ],
            "type": "string",
            "description": "Determines the emotional tone and artistic style of the AI-generated lyrics, forcing it to sound human, raw, and expressive.",
            "default": "dynamic-match"
          },
          "songTheme": {
            "title": "?? Song Theme",
            "enum": [
              "auto",
              "love-romance",
              "success-grind",
              "heartbreak-betrayal",
              "party-hype",
              "rebellion-angst",
              "custom"
            ],
            "type": "string",
            "description": "Select the main theme/topic for the song, or select 'Custom Theme' to type your own.",
            "default": "auto"
          },
          "llmPrompt": {
            "title": "?? Custom Theme / Prompt",
            "type": "string",
            "description": "If 'Custom Theme' is selected above, type your specific instructions or topic here."
          },
          "songLanguage": {
            "title": "🌐 Language",
            "enum": [
              "Native + English Blend",
              "English",
              "Spanish",
              "French",
              "German",
              "Italian",
              "Portuguese",
              "Japanese",
              "Korean",
              "Chinese",
              "Hindi",
              "Arabic",
              "Russian",
              "Swahili",
              "Zulu",
              "Yoruba",
              "custom"
            ],
            "type": "string",
            "description": "Select the language you want the lyrics to be generated in. We also support 'Native + English Blend' which naturally mixes English with culturally appropriate native phrasing (e.g. Spanish + English for Reggaeton, Zulu + English for Amapiano).",
            "default": "American"
          },
          "customLanguage": {
            "title": "🌐 Custom Language",
            "type": "string",
            "description": "If 'custom' is selected above, type your preferred language here."
          },
          "songAccent": {
            "title": "🗣️ Vocal Accent / Slang",
            "enum": [
              "American",
              "British",
              "Chicago",
              "UK/London",
              "Jamaican Patois",
              "West African Pidgin",
              "South African",
              "auto",
              "custom"
            ],
            "type": "string",
            "description": "Select the specific regional slang or dialect for the lyrics.",
            "default": "Chicago drill"
          },
          "customAccent": {
            "title": "🗣️ Custom Accent / Slang",
            "type": "string",
            "description": "If 'custom' is selected above, type your preferred accent or slang here."
          },
          "prompt": {
            "title": "📝 Lyrics / Suno Prompt",
            "type": "string",
            "description": "If Custom Mode is true: Limits: V4 (3000 chars), V4.5+ (5000 chars); Required if Instrumental is false. If Custom Mode is false: Limit: 500 chars. If 'Use AI Co-Writer' is enabled, the AI output overwrites this field safely."
          },
          "model": {
            "title": "🔧 Model",
            "enum": [
              "V4",
              "V4_5",
              "V4_5PLUS",
              "V4_5ALL",
              "V5"
            ],
            "type": "string",
            "description": "Model version to use.",
            "default": "V4_5ALL"
          },
          "customMode": {
            "title": "⚙️ Custom Mode",
            "type": "boolean",
            "description": "Enable custom parameter mode for advanced control.",
            "default": false
          },
          "stylePresets": {
            "title": "🎨 Style Presets",
            "type": "array",
            "description": "Select multiple presets to guide the musical style. We will dynamically insert these into the styling engine!",
            "items": {
              "type": "string",
              "enum": [
                "Male Vocals",
                "Female Vocals",
                "Heavy Bass",
                "Acoustic",
                "Electronic",
                "Fast Tempo",
                "Slow Tempo",
                "Synth",
                "Piano",
                "Acapella"
              ]
            }
          },
          "style": {
            "title": "Style",
            "type": "string",
            "description": "Music style/genre (required in custom mode). Limits: V4 (200 chars), V4.5+ (1000 chars). Ignored if Custom Mode is false."
          },
          "title": {
            "title": "Title",
            "type": "string",
            "description": "Song title (required in custom mode). Limits: V4/V4.5ALL (80 chars), V4.5/V4.5PLUS/V5 (100 chars). Ignored if Custom Mode is false."
          },
          "instrumental": {
            "title": "🎹 Instrumental",
            "type": "boolean",
            "description": "Generate instrumental-only music without vocals.",
            "default": false
          },
          "usePersona": {
            "title": "🎤 Use AI Persona",
            "type": "boolean",
            "description": "Enable to use a previously generated AI persona for consistent vocal style and characteristics.",
            "default": false
          },
          "generationPersonaName": {
            "title": "👤 Persona Name",
            "type": "string",
            "description": "Name of the AI Persona to use for generation (must match a previously created persona)."
          },
          "submitPersonaProfileToLLM": {
            "title": "🧠 Submit Persona Profile To LLM",
            "type": "boolean",
            "description": "If enabled, the saved persona description is sent to the lyric LLM as style guidance. Disable to use persona voice only at Suno request level.",
            "default": false
          },
          "mediaTaskId": {
            "title": "🔑 Media Generation Task ID",
            "type": "string",
            "description": "REQUIRED for generate-media mode. Provide the Task ID from a previous successful music generation run to create video and cover art."
          },
          "videoAuthor": {
            "title": "Video Author",
            "type": "string",
            "description": "Optional author name for the music video (max 50 chars)."
          },
          "videoDomainName": {
            "title": "🌐 Video Domain Name",
            "type": "string",
            "description": "Optional domain name / watermark for the music video (max 50 chars)."
          },
          "stemAudioId": {
            "title": "Stem Audio ID",
            "type": "string",
            "description": "The audio ID to separate (required if Studio Mode is Stem Splitter)."
          },
          "stemTaskId": {
            "title": "Stem Task ID",
            "type": "string",
            "description": "The task ID associated with the audio ID (required if Studio Mode is Stem Splitter)."
          },
          "personaTaskId": {
            "title": "🎤 Persona Task ID",
            "type": "string",
            "description": "REQUIRED for generate-persona mode. Provide the Task ID from a previous successful music generation run. The Actor will automatically fetch the audioId from this task."
          },
          "personaName": {
            "title": "💫 Persona Name",
            "type": "string",
            "description": "Name for the AI Persona (required for persona generation)."
          },
          "personaDescription": {
            "title": "📝 Persona Description",
            "type": "string",
            "description": "Detailed description of the Persona's musical characteristics, style, and personality (required for persona generation)."
          },
          "extendAudioId": {
            "title": "Extend Audio ID",
            "type": "string",
            "description": "The audio ID to extend (required if Studio Mode is Extend Track)."
          },
          "extendTime": {
            "title": "Extend Time (e.g. 02:30 or 150)",
            "type": "string",
            "description": "At what timestamp to extend the track."
          },
          "detailsTaskId": {
            "title": "📋 Task ID",
            "type": "string",
            "description": "Provide a Task ID from a previous music generation run to fetch full generation details."
          },
          "detailsAudioId": {
            "title": "🎵 Audio ID",
            "type": "string",
            "description": "Alternatively, provide an Audio ID (track ID) to fetch details. Either Task ID or Audio ID is required for this mode."
          }
        }
      },
      "runsResponseSchema": {
        "type": "object",
        "properties": {
          "data": {
            "type": "object",
            "properties": {
              "id": {
                "type": "string"
              },
              "actId": {
                "type": "string"
              },
              "userId": {
                "type": "string"
              },
              "startedAt": {
                "type": "string",
                "format": "date-time",
                "example": "2025-01-08T00:00:00.000Z"
              },
              "finishedAt": {
                "type": "string",
                "format": "date-time",
                "example": "2025-01-08T00:00:00.000Z"
              },
              "status": {
                "type": "string",
                "example": "READY"
              },
              "meta": {
                "type": "object",
                "properties": {
                  "origin": {
                    "type": "string",
                    "example": "API"
                  },
                  "userAgent": {
                    "type": "string"
                  }
                }
              },
              "stats": {
                "type": "object",
                "properties": {
                  "inputBodyLen": {
                    "type": "integer",
                    "example": 2000
                  },
                  "rebootCount": {
                    "type": "integer",
                    "example": 0
                  },
                  "restartCount": {
                    "type": "integer",
                    "example": 0
                  },
                  "resurrectCount": {
                    "type": "integer",
                    "example": 0
                  },
                  "computeUnits": {
                    "type": "integer",
                    "example": 0
                  }
                }
              },
              "options": {
                "type": "object",
                "properties": {
                  "build": {
                    "type": "string",
                    "example": "latest"
                  },
                  "timeoutSecs": {
                    "type": "integer",
                    "example": 300
                  },
                  "memoryMbytes": {
                    "type": "integer",
                    "example": 1024
                  },
                  "diskMbytes": {
                    "type": "integer",
                    "example": 2048
                  }
                }
              },
              "buildId": {
                "type": "string"
              },
              "defaultKeyValueStoreId": {
                "type": "string"
              },
              "defaultDatasetId": {
                "type": "string"
              },
              "defaultRequestQueueId": {
                "type": "string"
              },
              "buildNumber": {
                "type": "string",
                "example": "1.0.0"
              },
              "containerUrl": {
                "type": "string"
              },
              "usage": {
                "type": "object",
                "properties": {
                  "ACTOR_COMPUTE_UNITS": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATASET_READS": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATASET_WRITES": {
                    "type": "integer",
                    "example": 0
                  },
                  "KEY_VALUE_STORE_READS": {
                    "type": "integer",
                    "example": 0
                  },
                  "KEY_VALUE_STORE_WRITES": {
                    "type": "integer",
                    "example": 1
                  },
                  "KEY_VALUE_STORE_LISTS": {
                    "type": "integer",
                    "example": 0
                  },
                  "REQUEST_QUEUE_READS": {
                    "type": "integer",
                    "example": 0
                  },
                  "REQUEST_QUEUE_WRITES": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATA_TRANSFER_INTERNAL_GBYTES": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATA_TRANSFER_EXTERNAL_GBYTES": {
                    "type": "integer",
                    "example": 0
                  },
                  "PROXY_RESIDENTIAL_TRANSFER_GBYTES": {
                    "type": "integer",
                    "example": 0
                  },
                  "PROXY_SERPS": {
                    "type": "integer",
                    "example": 0
                  }
                }
              },
              "usageTotalUsd": {
                "type": "number",
                "example": 0.00005
              },
              "usageUsd": {
                "type": "object",
                "properties": {
                  "ACTOR_COMPUTE_UNITS": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATASET_READS": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATASET_WRITES": {
                    "type": "integer",
                    "example": 0
                  },
                  "KEY_VALUE_STORE_READS": {
                    "type": "integer",
                    "example": 0
                  },
                  "KEY_VALUE_STORE_WRITES": {
                    "type": "number",
                    "example": 0.00005
                  },
                  "KEY_VALUE_STORE_LISTS": {
                    "type": "integer",
                    "example": 0
                  },
                  "REQUEST_QUEUE_READS": {
                    "type": "integer",
                    "example": 0
                  },
                  "REQUEST_QUEUE_WRITES": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATA_TRANSFER_INTERNAL_GBYTES": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATA_TRANSFER_EXTERNAL_GBYTES": {
                    "type": "integer",
                    "example": 0
                  },
                  "PROXY_RESIDENTIAL_TRANSFER_GBYTES": {
                    "type": "integer",
                    "example": 0
                  },
                  "PROXY_SERPS": {
                    "type": "integer",
                    "example": 0
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}