{
  "openapi": "3.1.0",
  "info": {
    "title": "Generate Music API",
    "version": "1.0.0"
  },
  "servers": [
    {
      "url": "https://api.cometapi.com"
    }
  ],
  "security": [
    {
      "bearerAuth": []
    }
  ],
  "paths": {
    "/suno/submit/music": {
      "post": {
        "summary": "Generate music",
        "operationId": "generate_music",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "prompt": {
                    "type": "string",
                    "description": "Lyrics (custom mode only)\n",
                    "default": "A gentle acoustic song about a paper boat at sunrise"
                  },
                  "tags": {
                    "type": "string",
                    "description": "Style tags (custom mode only)\n"
                  },
                  "mv": {
                    "type": "string",
                    "description": "Suno model version. Use the model list to select an available version. Custom models use `chirp-custom:{model_id}`."
                  },
                  "title": {
                    "type": "string",
                    "description": "Title (custom mode only)\n"
                  },
                  "notify_hook": {
                    "type": "string",
                    "description": "Callback URL: https://example.com/callback"
                  },
                  "gpt_description_prompt": {
                    "type": "string",
                    "description": "Inspiration prompt (inspiration mode only)\n"
                  },
                  "task": {
                    "type": "string",
                    "description": "Selects a workflow such as `vox`, `mashup_condition`, `chop_sample_condition`, `sound`, `playlist_condition`, `vox_playlist_condition`, `stem_condition`, `gen_stem`, `cover`, or `extend`. Omit it for standard generation."
                  },
                  "continue_clip_id": {
                    "type": "string",
                    "description": "Clip ID of the song to extend.\n"
                  },
                  "continue_at": {
                    "type": "string",
                    "description": "Float. Position in seconds to continue from.\n"
                  },
                  "task_id": {
                    "type": "string",
                    "description": "Task ID for operations on a previous task.\n"
                  },
                  "make_instrumental": {
                    "type": "boolean",
                    "description": "Whether to generate instrumental only. Set to true for instrumental.\n",
                    "default": true
                  },
                  "negative_tags": {
                    "type": "string",
                    "description": "Excluded style tags",
                    "default": "heavy metal"
                  },
                  "generation_type": {
                    "type": "string",
                    "description": "Generation input mode. Use `TEXT` for prompt and lyrics workflows.",
                    "default": "TEXT"
                  },
                  "persona_id": {
                    "type": "string",
                    "description": "Persona ID used by `vox` and `vox_playlist_condition` workflows. The persona and account-bound clips must belong to the routed account."
                  },
                  "artist_clip_id": {
                    "type": "string",
                    "description": "Source singer clip for the Persona v2 vox workflow."
                  },
                  "mashup_clip_ids": {
                    "type": "array",
                    "description": "Two source clip IDs used by `mashup_condition`.",
                    "minItems": 2,
                    "maxItems": 2,
                    "items": {
                      "type": "string"
                    }
                  },
                  "chop_sample_clip_id": {
                    "type": "string",
                    "description": "Source clip ID used by `chop_sample_condition`."
                  },
                  "chop_sample_start_s": {
                    "type": "number",
                    "description": "Sample start position in seconds."
                  },
                  "chop_sample_end_s": {
                    "type": "number",
                    "description": "Sample end position in seconds. It must be greater than `chop_sample_start_s`."
                  },
                  "playlist_id": {
                    "type": "string",
                    "description": "Playlist mode. Use `inspiration` for inspiration generation."
                  },
                  "playlist_clip_ids": {
                    "type": "array",
                    "description": "One to four same-account reference clip IDs for inspiration generation.",
                    "minItems": 1,
                    "maxItems": 4,
                    "items": {
                      "type": "string"
                    }
                  },
                  "metadata": {
                    "type": "object",
                    "description": "Workflow metadata. Use `create_mode: custom` for custom generation examples.",
                    "additionalProperties": true
                  },
                  "stem_condition_clip_id": {
                    "type": "string",
                    "description": "Source clip ID for `stem_condition`."
                  },
                  "stem_control_tags": {
                    "type": "string",
                    "description": "Instrument instruction for `stem_condition`, for example `add Drums`."
                  },
                  "batch_size": {
                    "type": "integer",
                    "description": "Number of generated clips for workflows that expose batch control.",
                    "minimum": 1,
                    "maximum": 2
                  },
                  "stem_task": {
                    "type": "string",
                    "description": "Stem operation used by `gen_stem`. Use `extract` for instrument and MIDI extraction."
                  },
                  "stem_type_id": {
                    "type": "integer",
                    "description": "Stem type identifier. Use `91` with the extract workflow."
                  },
                  "stem_type_group_name": {
                    "type": "string",
                    "description": "Instrument group to extract, such as `Piano`."
                  },
                  "stem_name": {
                    "type": "string",
                    "description": "Instrument name. Match `stem_type_group_name` for the extract workflow."
                  },
                  "duration": {
                    "type": "integer",
                    "description": "Requested output duration in seconds for model versions that support duration control.",
                    "minimum": 10,
                    "maximum": 360
                  },
                  "cover_clip_id": {
                    "type": "string",
                    "description": "Source clip ID for `cover`. Use a clip returned by a compatible generation or upload workflow."
                  }
                },
                "default": {
                  "prompt": "A gentle acoustic song about a paper boat at sunrise",
                  "negative_tags": "heavy metal",
                  "make_instrumental": true
                }
              },
              "examples": {
                "1. Inspiration mode": {
                  "summary": "1. Inspiration mode",
                  "value": {
                    "mv": "chirp-hawk",
                    "gpt_description_prompt": "cat"
                  }
                },
                "2. Custom mode": {
                  "summary": "2. Custom mode",
                  "value": {
                    "prompt": "[Verse]\nWalking down the streets\nBeneath the city lights\nNeon signs flickering\nLighting up the night\nHeart beating faster\nLike a drum in my chest\nI'm alive in this moment\nFeeling so blessed\n\nStilettos on the pavement\nStepping with grace\nSurrounded by the people\nMoving at their own pace\nThe rhythm of the city\nIt pulses in my veins\nLost in the energy\nAs my worries drain\n\n[Verse 2]\nConcrete jungle shining\nWith its dazzling glow\nEvery corner hiding secrets that only locals know\nA symphony of chaos\nBut it's music to my ears\nThe hustle and the bustle\nWiping away my fears",
                    "tags": "emotional punk",
                    "mv": "chirp-hawk",
                    "title": "City Lights"
                  }
                },
                "Persona voice": {
                  "summary": "Generate with a voice persona",
                  "value": {
                    "task": "vox",
                    "generation_type": "TEXT",
                    "title": "Window of Stars",
                    "tags": "ambient pop, soft piano",
                    "mv": "chirp-hawk",
                    "prompt": "[Verse]\nMoonlight settles on the floor\nI can hear the evening call\n[Chorus]\nCarry me beyond the stars\nLet the quiet heal my heart",
                    "persona_id": "<persona_id>",
                    "artist_clip_id": "<clip_id>"
                  }
                },
                "Mashup": {
                  "summary": "Mix two source songs",
                  "value": {
                    "task": "mashup_condition",
                    "generation_type": "TEXT",
                    "title": "Night and Morning Mashup",
                    "tags": "electronic rock",
                    "mv": "chirp-hawk",
                    "prompt": "[Verse]\nCity lights fade into dawn\nTwo old rhythms carry on\n[Chorus]\nTurn the night into a song",
                    "mashup_clip_ids": [
                      "<first_clip_id>",
                      "<second_clip_id>"
                    ]
                  }
                },
                "Sample": {
                  "summary": "Generate from a selected sample",
                  "value": {
                    "task": "chop_sample_condition",
                    "generation_type": "TEXT",
                    "title": "Sampled Horizon",
                    "tags": "indie pop",
                    "mv": "chirp-hawk",
                    "prompt": "[Verse]\nA small refrain returns again\n[Chorus]\nBuild a new road from the sound",
                    "chop_sample_clip_id": "<clip_id>",
                    "chop_sample_start_s": 12,
                    "chop_sample_end_s": 28
                  }
                },
                "Sound": {
                  "summary": "Generate a loop or one-shot",
                  "value": {
                    "task": "sound",
                    "generation_type": "TEXT",
                    "title": "Neon Pulse Loop",
                    "tags": "loop, key: G#, tempo: 60, electronic percussion",
                    "mv": "chirp-hawk",
                    "prompt": "",
                    "make_instrumental": true,
                    "metadata": {
                      "create_mode": "custom"
                    }
                  }
                },
                "Inspiration": {
                  "summary": "Generate from reference songs",
                  "value": {
                    "task": "playlist_condition",
                    "generation_type": "TEXT",
                    "title": "Paper Lanterns",
                    "tags": "acoustic pop, warm harmony",
                    "mv": "chirp-hawk",
                    "prompt": "[Verse]\nPaper lanterns cross the sky\n[Chorus]\nKeep the warm light by my side",
                    "playlist_id": "inspiration",
                    "playlist_clip_ids": [
                      "<first_clip_id>",
                      "<second_clip_id>"
                    ]
                  }
                },
                "Voice inspiration": {
                  "summary": "Combine inspiration clips with a voice persona",
                  "value": {
                    "task": "vox_playlist_condition",
                    "generation_type": "TEXT",
                    "title": "Rain on the Window",
                    "tags": "cinematic pop, strings",
                    "mv": "chirp-hawk",
                    "prompt": "[Verse]\nRain keeps drawing on the glass\n[Chorus]\nI will wait until it passes",
                    "persona_id": "<persona_id>",
                    "playlist_id": "inspiration",
                    "playlist_clip_ids": [
                      "<first_clip_id>",
                      "<second_clip_id>"
                    ]
                  }
                },
                "Custom model": {
                  "summary": "Generate with a trained custom model",
                  "value": {
                    "generation_type": "TEXT",
                    "title": "Custom Signal",
                    "tags": "neo soul, bass music",
                    "mv": "chirp-custom:<model_id>",
                    "prompt": "[Verse]\nA signal moves beneath the street\n[Chorus]\nTurn the custom rhythm free",
                    "metadata": {
                      "create_mode": "custom"
                    }
                  }
                },
                "Add stem": {
                  "summary": "Add an instrument to a source clip",
                  "value": {
                    "task": "stem_condition",
                    "generation_type": "TEXT",
                    "title": "Good News with Drums",
                    "tags": "bright pop, piano, handclaps",
                    "mv": "chirp-hawk",
                    "prompt": "[Verse]\nMorning spills across the room\n[Chorus]\nGood news found me just in time",
                    "stem_condition_clip_id": "<clip_id>",
                    "stem_control_tags": "add Drums",
                    "batch_size": 2,
                    "metadata": {
                      "create_mode": "custom",
                      "is_remix": true
                    }
                  }
                },
                "Extract stem": {
                  "summary": "Extract an instrument and prepare MIDI",
                  "value": {
                    "task": "gen_stem",
                    "generation_type": "TEXT",
                    "title": "Piano Stem",
                    "tags": "pop",
                    "mv": "chirp-hawk",
                    "prompt": "",
                    "make_instrumental": true,
                    "continue_clip_id": "<clip_id>",
                    "stem_type_id": 91,
                    "stem_type_group_name": "Piano",
                    "stem_task": "extract",
                    "stem_name": "Piano"
                  }
                },
                "Duration": {
                  "summary": "Request an output duration",
                  "value": {
                    "generation_type": "TEXT",
                    "title": "Fifteen Second Sunrise",
                    "tags": "acoustic pop",
                    "mv": "chirp-hawk",
                    "prompt": "[Verse]\nSunrise finds the open road\n[Chorus]\nCarry every hope back home",
                    "duration": 15
                  }
                },
                "Cover": {
                  "summary": "Create a cover from an uploaded clip",
                  "value": {
                    "task": "cover",
                    "generation_type": "TEXT",
                    "title": "Open Road Cover",
                    "tags": "rock, punk",
                    "mv": "chirp-hawk",
                    "prompt": "[Verse]\nThe open road is calling me\n[Chorus]\nChange the sound and set it free",
                    "cover_clip_id": "<clip_id>"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "code",
                    "message",
                    "data"
                  ],
                  "properties": {
                    "code": {
                      "type": "string",
                      "description": "Business status code"
                    },
                    "message": {
                      "type": "string",
                      "description": "Message"
                    },
                    "data": {
                      "type": "string",
                      "description": "Response data"
                    }
                  }
                }
              }
            }
          }
        },
        "x-codeSamples": [
          {
            "lang": "Shell",
            "label": "Default",
            "source": "curl https://api.cometapi.com/suno/submit/music \\\n  -H \"Authorization: Bearer $COMETAPI_KEY\" \\\n  -H \"Content-Type: application/json\" \\\n  -d '{\n      \"mv\": \"chirp-hawk\",\n      \"gpt_description_prompt\": \"cat\"\n    }'\n"
          },
          {
            "lang": "Python",
            "label": "Default",
            "source": "import os\nimport requests\n\nresponse = requests.post(\n    \"https://api.cometapi.com/suno/submit/music\",\n    headers={\"Authorization\": \"Bearer \" + os.environ[\"COMETAPI_KEY\"]},\n    json={\n            \"mv\": \"chirp-hawk\",\n            \"gpt_description_prompt\": \"cat\"\n    },\n)\n\nprint(response.json())  # code success returns a task id in data; poll GET /suno/fetch/{task_id}\n"
          },
          {
            "lang": "JavaScript",
            "label": "Default",
            "source": "const response = await fetch(\"https://api.cometapi.com/suno/submit/music\", {\n    method: \"POST\",\n    headers: {\n        Authorization: `Bearer ${process.env.COMETAPI_KEY}`,\n        \"Content-Type\": \"application/json\",\n    },\n    body: JSON.stringify({\n            \"mv\": \"chirp-hawk\",\n            \"gpt_description_prompt\": \"cat\"\n        }),\n});\n\nconsole.log(await response.json()); // code success returns a task id in data; poll GET /suno/fetch/{task_id}\n"
          },
          {
            "lang": "Shell",
            "label": "Persona voice",
            "source": "curl https://api.cometapi.com/suno/submit/music \\\n  -H \"Authorization: Bearer $COMETAPI_KEY\" \\\n  -H 'Content-Type: application/json' \\\n  -d '{\"task\":\"vox\",\"generation_type\":\"TEXT\",\"title\":\"Window of Stars\",\"tags\":\"ambient pop, soft piano\",\"mv\":\"chirp-hawk\",\"prompt\":\"[Verse] Moonlight settles on the floor [Chorus] Carry me beyond the stars\",\"persona_id\":\"<persona_id>\",\"artist_clip_id\":\"<clip_id>\"}'\n"
          },
          {
            "lang": "Python",
            "label": "Persona voice",
            "source": "import os\nimport requests\n\npayload = {\"task\": \"vox\", \"generation_type\": \"TEXT\", \"title\": \"Window of Stars\", \"tags\": \"ambient pop, soft piano\", \"mv\": \"chirp-hawk\", \"prompt\": \"[Verse] Moonlight settles on the floor [Chorus] Carry me beyond the stars\", \"persona_id\": \"<persona_id>\", \"artist_clip_id\": \"<clip_id>\"}\nresponse = requests.post(\"https://api.cometapi.com/suno/submit/music\", headers={\"Authorization\": \"Bearer \" + os.environ[\"COMETAPI_KEY\"]}, json=payload)\nprint(response.json())\n"
          },
          {
            "lang": "JavaScript",
            "label": "Persona voice",
            "source": "const payload = { task: \"vox\", generation_type: \"TEXT\", title: \"Window of Stars\", tags: \"ambient pop, soft piano\", mv: \"chirp-hawk\", prompt: \"[Verse] Moonlight settles on the floor [Chorus] Carry me beyond the stars\", persona_id: \"<persona_id>\", artist_clip_id: \"<clip_id>\" };\nconst response = await fetch(\"https://api.cometapi.com/suno/submit/music\", { method: \"POST\", headers: { Authorization: `Bearer ${process.env.COMETAPI_KEY}`, \"Content-Type\": \"application/json\" }, body: JSON.stringify(payload) });\nconsole.log(await response.json());\n"
          },
          {
            "lang": "Shell",
            "label": "Mashup",
            "source": "curl https://api.cometapi.com/suno/submit/music \\\n  -H \"Authorization: Bearer $COMETAPI_KEY\" \\\n  -H 'Content-Type: application/json' \\\n  -d '{\"task\":\"mashup_condition\",\"generation_type\":\"TEXT\",\"title\":\"Night and Morning Mashup\",\"mv\":\"chirp-hawk\",\"prompt\":\"[Verse] City lights fade into dawn [Chorus] Turn the night into a song\",\"mashup_clip_ids\":[\"<first_clip_id>\",\"<second_clip_id>\"]}'\n"
          },
          {
            "lang": "Python",
            "label": "Mashup",
            "source": "import os\nimport requests\n\npayload = {\"task\": \"mashup_condition\", \"generation_type\": \"TEXT\", \"title\": \"Night and Morning Mashup\", \"mv\": \"chirp-hawk\", \"prompt\": \"[Verse] City lights fade into dawn [Chorus] Turn the night into a song\", \"mashup_clip_ids\": [\"<first_clip_id>\", \"<second_clip_id>\"]}\nresponse = requests.post(\"https://api.cometapi.com/suno/submit/music\", headers={\"Authorization\": \"Bearer \" + os.environ[\"COMETAPI_KEY\"]}, json=payload)\nprint(response.json())\n"
          },
          {
            "lang": "JavaScript",
            "label": "Mashup",
            "source": "const payload = { task: \"mashup_condition\", generation_type: \"TEXT\", title: \"Night and Morning Mashup\", mv: \"chirp-hawk\", prompt: \"[Verse] City lights fade into dawn [Chorus] Turn the night into a song\", mashup_clip_ids: [\"<first_clip_id>\", \"<second_clip_id>\"] };\nconst response = await fetch(\"https://api.cometapi.com/suno/submit/music\", { method: \"POST\", headers: { Authorization: `Bearer ${process.env.COMETAPI_KEY}`, \"Content-Type\": \"application/json\" }, body: JSON.stringify(payload) });\nconsole.log(await response.json());\n"
          },
          {
            "lang": "Shell",
            "label": "Sample",
            "source": "curl https://api.cometapi.com/suno/submit/music \\\n  -H \"Authorization: Bearer $COMETAPI_KEY\" \\\n  -H 'Content-Type: application/json' \\\n  -d '{\"task\":\"chop_sample_condition\",\"generation_type\":\"TEXT\",\"title\":\"Sampled Horizon\",\"mv\":\"chirp-hawk\",\"prompt\":\"[Verse] A small refrain returns again\",\"chop_sample_clip_id\":\"<clip_id>\",\"chop_sample_start_s\":12,\"chop_sample_end_s\":28}'\n"
          },
          {
            "lang": "Python",
            "label": "Sample",
            "source": "import os\nimport requests\n\npayload = {\"task\": \"chop_sample_condition\", \"generation_type\": \"TEXT\", \"title\": \"Sampled Horizon\", \"mv\": \"chirp-hawk\", \"prompt\": \"[Verse] A small refrain returns again\", \"chop_sample_clip_id\": \"<clip_id>\", \"chop_sample_start_s\": 12, \"chop_sample_end_s\": 28}\nresponse = requests.post(\"https://api.cometapi.com/suno/submit/music\", headers={\"Authorization\": \"Bearer \" + os.environ[\"COMETAPI_KEY\"]}, json=payload)\nprint(response.json())\n"
          },
          {
            "lang": "JavaScript",
            "label": "Sample",
            "source": "const payload = { task: \"chop_sample_condition\", generation_type: \"TEXT\", title: \"Sampled Horizon\", mv: \"chirp-hawk\", prompt: \"[Verse] A small refrain returns again\", chop_sample_clip_id: \"<clip_id>\", chop_sample_start_s: 12, chop_sample_end_s: 28 };\nconst response = await fetch(\"https://api.cometapi.com/suno/submit/music\", { method: \"POST\", headers: { Authorization: `Bearer ${process.env.COMETAPI_KEY}`, \"Content-Type\": \"application/json\" }, body: JSON.stringify(payload) });\nconsole.log(await response.json());\n"
          },
          {
            "lang": "Shell",
            "label": "Sound",
            "source": "curl https://api.cometapi.com/suno/submit/music \\\n  -H \"Authorization: Bearer $COMETAPI_KEY\" \\\n  -H 'Content-Type: application/json' \\\n  -d '{\"task\":\"sound\",\"generation_type\":\"TEXT\",\"title\":\"Neon Pulse Loop\",\"tags\":\"loop, key: G#, tempo: 60, electronic percussion\",\"mv\":\"chirp-hawk\",\"prompt\":\"\",\"make_instrumental\":true,\"metadata\":{\"create_mode\":\"custom\"}}'\n"
          },
          {
            "lang": "Python",
            "label": "Sound",
            "source": "import os\nimport requests\n\npayload = {\"task\": \"sound\", \"generation_type\": \"TEXT\", \"title\": \"Neon Pulse Loop\", \"tags\": \"loop, key: G#, tempo: 60, electronic percussion\", \"mv\": \"chirp-hawk\", \"prompt\": \"\", \"make_instrumental\": True, \"metadata\": {\"create_mode\": \"custom\"}}\nresponse = requests.post(\"https://api.cometapi.com/suno/submit/music\", headers={\"Authorization\": \"Bearer \" + os.environ[\"COMETAPI_KEY\"]}, json=payload)\nprint(response.json())\n"
          },
          {
            "lang": "JavaScript",
            "label": "Sound",
            "source": "const payload = { task: \"sound\", generation_type: \"TEXT\", title: \"Neon Pulse Loop\", tags: \"loop, key: G#, tempo: 60, electronic percussion\", mv: \"chirp-hawk\", prompt: \"\", make_instrumental: true, metadata: { create_mode: \"custom\" } };\nconst response = await fetch(\"https://api.cometapi.com/suno/submit/music\", { method: \"POST\", headers: { Authorization: `Bearer ${process.env.COMETAPI_KEY}`, \"Content-Type\": \"application/json\" }, body: JSON.stringify(payload) });\nconsole.log(await response.json());\n"
          },
          {
            "lang": "Shell",
            "label": "Inspiration",
            "source": "curl https://api.cometapi.com/suno/submit/music \\\n  -H \"Authorization: Bearer $COMETAPI_KEY\" \\\n  -H 'Content-Type: application/json' \\\n  -d '{\"task\":\"playlist_condition\",\"generation_type\":\"TEXT\",\"title\":\"Paper Lanterns\",\"mv\":\"chirp-hawk\",\"prompt\":\"[Verse] Paper lanterns cross the sky\",\"playlist_id\":\"inspiration\",\"playlist_clip_ids\":[\"<first_clip_id>\",\"<second_clip_id>\"]}'\n"
          },
          {
            "lang": "Python",
            "label": "Inspiration",
            "source": "import os\nimport requests\n\npayload = {\"task\": \"playlist_condition\", \"generation_type\": \"TEXT\", \"title\": \"Paper Lanterns\", \"mv\": \"chirp-hawk\", \"prompt\": \"[Verse] Paper lanterns cross the sky\", \"playlist_id\": \"inspiration\", \"playlist_clip_ids\": [\"<first_clip_id>\", \"<second_clip_id>\"]}\nresponse = requests.post(\"https://api.cometapi.com/suno/submit/music\", headers={\"Authorization\": \"Bearer \" + os.environ[\"COMETAPI_KEY\"]}, json=payload)\nprint(response.json())\n"
          },
          {
            "lang": "JavaScript",
            "label": "Inspiration",
            "source": "const payload = { task: \"playlist_condition\", generation_type: \"TEXT\", title: \"Paper Lanterns\", mv: \"chirp-hawk\", prompt: \"[Verse] Paper lanterns cross the sky\", playlist_id: \"inspiration\", playlist_clip_ids: [\"<first_clip_id>\", \"<second_clip_id>\"] };\nconst response = await fetch(\"https://api.cometapi.com/suno/submit/music\", { method: \"POST\", headers: { Authorization: `Bearer ${process.env.COMETAPI_KEY}`, \"Content-Type\": \"application/json\" }, body: JSON.stringify(payload) });\nconsole.log(await response.json());\n"
          },
          {
            "lang": "Shell",
            "label": "Voice inspiration",
            "source": "curl https://api.cometapi.com/suno/submit/music \\\n  -H \"Authorization: Bearer $COMETAPI_KEY\" \\\n  -H 'Content-Type: application/json' \\\n  -d '{\"task\":\"vox_playlist_condition\",\"generation_type\":\"TEXT\",\"title\":\"Rain on the Window\",\"mv\":\"chirp-hawk\",\"prompt\":\"[Verse] Rain keeps drawing on the glass\",\"persona_id\":\"<persona_id>\",\"playlist_id\":\"inspiration\",\"playlist_clip_ids\":[\"<first_clip_id>\",\"<second_clip_id>\"]}'\n"
          },
          {
            "lang": "Python",
            "label": "Voice inspiration",
            "source": "import os\nimport requests\n\npayload = {\"task\": \"vox_playlist_condition\", \"generation_type\": \"TEXT\", \"title\": \"Rain on the Window\", \"mv\": \"chirp-hawk\", \"prompt\": \"[Verse] Rain keeps drawing on the glass\", \"persona_id\": \"<persona_id>\", \"playlist_id\": \"inspiration\", \"playlist_clip_ids\": [\"<first_clip_id>\", \"<second_clip_id>\"]}\nresponse = requests.post(\"https://api.cometapi.com/suno/submit/music\", headers={\"Authorization\": \"Bearer \" + os.environ[\"COMETAPI_KEY\"]}, json=payload)\nprint(response.json())\n"
          },
          {
            "lang": "JavaScript",
            "label": "Voice inspiration",
            "source": "const payload = { task: \"vox_playlist_condition\", generation_type: \"TEXT\", title: \"Rain on the Window\", mv: \"chirp-hawk\", prompt: \"[Verse] Rain keeps drawing on the glass\", persona_id: \"<persona_id>\", playlist_id: \"inspiration\", playlist_clip_ids: [\"<first_clip_id>\", \"<second_clip_id>\"] };\nconst response = await fetch(\"https://api.cometapi.com/suno/submit/music\", { method: \"POST\", headers: { Authorization: `Bearer ${process.env.COMETAPI_KEY}`, \"Content-Type\": \"application/json\" }, body: JSON.stringify(payload) });\nconsole.log(await response.json());\n"
          },
          {
            "lang": "Shell",
            "label": "Custom model",
            "source": "curl https://api.cometapi.com/suno/submit/music \\\n  -H \"Authorization: Bearer $COMETAPI_KEY\" \\\n  -H 'Content-Type: application/json' \\\n  -d '{\"generation_type\":\"TEXT\",\"title\":\"Custom Signal\",\"tags\":\"neo soul, bass music\",\"mv\":\"chirp-custom:<model_id>\",\"prompt\":\"[Verse] A signal moves beneath the street\",\"metadata\":{\"create_mode\":\"custom\"}}'\n"
          },
          {
            "lang": "Python",
            "label": "Custom model",
            "source": "import os\nimport requests\n\npayload = {\"generation_type\": \"TEXT\", \"title\": \"Custom Signal\", \"tags\": \"neo soul, bass music\", \"mv\": \"chirp-custom:<model_id>\", \"prompt\": \"[Verse] A signal moves beneath the street\", \"metadata\": {\"create_mode\": \"custom\"}}\nresponse = requests.post(\"https://api.cometapi.com/suno/submit/music\", headers={\"Authorization\": \"Bearer \" + os.environ[\"COMETAPI_KEY\"]}, json=payload)\nprint(response.json())\n"
          },
          {
            "lang": "JavaScript",
            "label": "Custom model",
            "source": "const payload = { generation_type: \"TEXT\", title: \"Custom Signal\", tags: \"neo soul, bass music\", mv: \"chirp-custom:<model_id>\", prompt: \"[Verse] A signal moves beneath the street\", metadata: { create_mode: \"custom\" } };\nconst response = await fetch(\"https://api.cometapi.com/suno/submit/music\", { method: \"POST\", headers: { Authorization: `Bearer ${process.env.COMETAPI_KEY}`, \"Content-Type\": \"application/json\" }, body: JSON.stringify(payload) });\nconsole.log(await response.json());\n"
          },
          {
            "lang": "Shell",
            "label": "Add stem",
            "source": "curl https://api.cometapi.com/suno/submit/music \\\n  -H \"Authorization: Bearer $COMETAPI_KEY\" \\\n  -H 'Content-Type: application/json' \\\n  -d '{\"task\":\"stem_condition\",\"generation_type\":\"TEXT\",\"title\":\"Good News with Drums\",\"tags\":\"bright pop, piano\",\"mv\":\"chirp-hawk\",\"prompt\":\"[Verse] Morning spills across the room\",\"stem_condition_clip_id\":\"<clip_id>\",\"stem_control_tags\":\"add Drums\",\"batch_size\":2,\"metadata\":{\"create_mode\":\"custom\",\"is_remix\":true}}'\n"
          },
          {
            "lang": "Python",
            "label": "Add stem",
            "source": "import os\nimport requests\n\npayload = {\"task\": \"stem_condition\", \"generation_type\": \"TEXT\", \"title\": \"Good News with Drums\", \"tags\": \"bright pop, piano\", \"mv\": \"chirp-hawk\", \"prompt\": \"[Verse] Morning spills across the room\", \"stem_condition_clip_id\": \"<clip_id>\", \"stem_control_tags\": \"add Drums\", \"batch_size\": 2, \"metadata\": {\"create_mode\": \"custom\", \"is_remix\": True}}\nresponse = requests.post(\"https://api.cometapi.com/suno/submit/music\", headers={\"Authorization\": \"Bearer \" + os.environ[\"COMETAPI_KEY\"]}, json=payload)\nprint(response.json())\n"
          },
          {
            "lang": "JavaScript",
            "label": "Add stem",
            "source": "const payload = { task: \"stem_condition\", generation_type: \"TEXT\", title: \"Good News with Drums\", tags: \"bright pop, piano\", mv: \"chirp-hawk\", prompt: \"[Verse] Morning spills across the room\", stem_condition_clip_id: \"<clip_id>\", stem_control_tags: \"add Drums\", batch_size: 2, metadata: { create_mode: \"custom\", is_remix: true } };\nconst response = await fetch(\"https://api.cometapi.com/suno/submit/music\", { method: \"POST\", headers: { Authorization: `Bearer ${process.env.COMETAPI_KEY}`, \"Content-Type\": \"application/json\" }, body: JSON.stringify(payload) });\nconsole.log(await response.json());\n"
          },
          {
            "lang": "Shell",
            "label": "Extract stem",
            "source": "curl https://api.cometapi.com/suno/submit/music \\\n  -H \"Authorization: Bearer $COMETAPI_KEY\" \\\n  -H 'Content-Type: application/json' \\\n  -d '{\"task\":\"gen_stem\",\"generation_type\":\"TEXT\",\"title\":\"Piano Stem\",\"tags\":\"pop\",\"mv\":\"chirp-hawk\",\"prompt\":\"\",\"make_instrumental\":true,\"continue_clip_id\":\"<clip_id>\",\"stem_type_id\":91,\"stem_type_group_name\":\"Piano\",\"stem_task\":\"extract\",\"stem_name\":\"Piano\"}'\n"
          },
          {
            "lang": "Python",
            "label": "Extract stem",
            "source": "import os\nimport requests\n\npayload = {\"task\": \"gen_stem\", \"generation_type\": \"TEXT\", \"title\": \"Piano Stem\", \"tags\": \"pop\", \"mv\": \"chirp-hawk\", \"prompt\": \"\", \"make_instrumental\": True, \"continue_clip_id\": \"<clip_id>\", \"stem_type_id\": 91, \"stem_type_group_name\": \"Piano\", \"stem_task\": \"extract\", \"stem_name\": \"Piano\"}\nresponse = requests.post(\"https://api.cometapi.com/suno/submit/music\", headers={\"Authorization\": \"Bearer \" + os.environ[\"COMETAPI_KEY\"]}, json=payload)\nprint(response.json())\n"
          },
          {
            "lang": "JavaScript",
            "label": "Extract stem",
            "source": "const payload = { task: \"gen_stem\", generation_type: \"TEXT\", title: \"Piano Stem\", tags: \"pop\", mv: \"chirp-hawk\", prompt: \"\", make_instrumental: true, continue_clip_id: \"<clip_id>\", stem_type_id: 91, stem_type_group_name: \"Piano\", stem_task: \"extract\", stem_name: \"Piano\" };\nconst response = await fetch(\"https://api.cometapi.com/suno/submit/music\", { method: \"POST\", headers: { Authorization: `Bearer ${process.env.COMETAPI_KEY}`, \"Content-Type\": \"application/json\" }, body: JSON.stringify(payload) });\nconsole.log(await response.json());\n"
          },
          {
            "lang": "Shell",
            "label": "Duration",
            "source": "curl https://api.cometapi.com/suno/submit/music \\\n  -H \"Authorization: Bearer $COMETAPI_KEY\" \\\n  -H 'Content-Type: application/json' \\\n  -d '{\"generation_type\":\"TEXT\",\"title\":\"Fifteen Second Sunrise\",\"tags\":\"acoustic pop\",\"mv\":\"chirp-hawk\",\"prompt\":\"[Verse] Sunrise finds the open road\",\"duration\":15}'\n"
          },
          {
            "lang": "Python",
            "label": "Duration",
            "source": "import os\nimport requests\n\npayload = {\"generation_type\": \"TEXT\", \"title\": \"Fifteen Second Sunrise\", \"tags\": \"acoustic pop\", \"mv\": \"chirp-hawk\", \"prompt\": \"[Verse] Sunrise finds the open road\", \"duration\": 15}\nresponse = requests.post(\"https://api.cometapi.com/suno/submit/music\", headers={\"Authorization\": \"Bearer \" + os.environ[\"COMETAPI_KEY\"]}, json=payload)\nprint(response.json())\n"
          },
          {
            "lang": "JavaScript",
            "label": "Duration",
            "source": "const payload = { generation_type: \"TEXT\", title: \"Fifteen Second Sunrise\", tags: \"acoustic pop\", mv: \"chirp-hawk\", prompt: \"[Verse] Sunrise finds the open road\", duration: 15 };\nconst response = await fetch(\"https://api.cometapi.com/suno/submit/music\", { method: \"POST\", headers: { Authorization: `Bearer ${process.env.COMETAPI_KEY}`, \"Content-Type\": \"application/json\" }, body: JSON.stringify(payload) });\nconsole.log(await response.json());\n"
          },
          {
            "lang": "Shell",
            "label": "Cover",
            "source": "curl https://api.cometapi.com/suno/submit/music \\\n  -H \"Authorization: Bearer $COMETAPI_KEY\" \\\n  -H 'Content-Type: application/json' \\\n  -d '{\"task\":\"cover\",\"generation_type\":\"TEXT\",\"title\":\"Open Road Cover\",\"tags\":\"rock, punk\",\"mv\":\"chirp-hawk\",\"prompt\":\"[Verse] The open road is calling me\",\"cover_clip_id\":\"<clip_id>\"}'\n"
          },
          {
            "lang": "Python",
            "label": "Cover",
            "source": "import os\nimport requests\n\npayload = {\"task\": \"cover\", \"generation_type\": \"TEXT\", \"title\": \"Open Road Cover\", \"tags\": \"rock, punk\", \"mv\": \"chirp-hawk\", \"prompt\": \"[Verse] The open road is calling me\", \"cover_clip_id\": \"<clip_id>\"}\nresponse = requests.post(\"https://api.cometapi.com/suno/submit/music\", headers={\"Authorization\": \"Bearer \" + os.environ[\"COMETAPI_KEY\"]}, json=payload)\nprint(response.json())\n"
          },
          {
            "lang": "JavaScript",
            "label": "Cover",
            "source": "const payload = { task: \"cover\", generation_type: \"TEXT\", title: \"Open Road Cover\", tags: \"rock, punk\", mv: \"chirp-hawk\", prompt: \"[Verse] The open road is calling me\", cover_clip_id: \"<clip_id>\" };\nconst response = await fetch(\"https://api.cometapi.com/suno/submit/music\", { method: \"POST\", headers: { Authorization: `Bearer ${process.env.COMETAPI_KEY}`, \"Content-Type\": \"application/json\" }, body: JSON.stringify(payload) });\nconsole.log(await response.json());\n"
          }
        ]
      }
    }
  },
  "components": {
    "securitySchemes": {
      "bearerAuth": {
        "type": "http",
        "scheme": "bearer",
        "description": "Bearer token authentication. Use your CometAPI key."
      }
    }
  }
}
