## Basic tool info Model name: tencent-ailab/SongGeneration 2 Model description: Song Generation 2 generates full songs with vocals and instrumentals from lyrics — supports 14 genres, reference audio cloning, and separate track output (vocal/bgm/mix). Model cover: https://cdn.wiro.ai/uploads/models/tencent-ailab-songgeneration-2-cover.webp Model categories: - tool - text-to-song - persistent - quick-showcase - use-agent - music-generation Model tags: - text-to-audio - music - text2music Run Task Endpoint (POST): https://api.wiro.ai/v1/Run/tencent-ailab/songgeneration-2 Get Task Detail Endpoint (POST): https://api.wiro.ai/v1/Task/Detail ## Model Inputs: - name: inputAudio label: Reference Audio help: Upload a reference audio to clone its style. If provided, caption and genre are ignored. type: combinefileinput default: - name: caption label: Caption help: Comma-separated style tags (e.g. female, pop, energetic, piano). Ignored if reference audio or genre is provided. type: textarea default: female, slow, piano - name: prompt label: prompt help: Song lyrics with structure tags ([verse], [chorus], [bridge], [intro-short], [outro-short], etc.). If empty, switches to instrumental mode automatically. Max duration: 4m 30s. type: textarea default: [verse] Bright lights flashing in the city sky Running fast and we don't know why Electric nights got our hearts on fire Chasing dreams we'll never tire [verse] Grit in our eyes wind in our hair Breaking rules we don't even care Shouting loud above the crowd Living life like we're unbowed [chorus] Running wild in the night so free Feel the beat pumping endlessly Hearts collide in the midnight air We belong we don't have a care [verse] Piercing through like a lightning strike Every moment feels like a hike Daring bold never backing down Kings and queens without a crown [chorus] Running wild in the night so free Feel the beat pumping endlessly Hearts collide in the midnight air We belong we don't have a care [bridge] Close your eyes let your spirit soar We are the ones who wanted more Breaking chains of the mundane In this world we'll make our claim - name: genre label: Genre help: Music genre. If set, caption is ignored. Default: None type: select default: options: - value: "" label: None (use caption instead) - value: "Auto" label: Auto - value: "Pop" label: Pop - value: "Rock" label: Rock - value: "Electronic" label: Electronic - value: "Hip-Hop" label: Hip-Hop - value: "R&B/Soul" label: R&B / Soul - value: "Jazz" label: Jazz - value: "Latin" label: Latin - value: "Country" label: Country - value: "Metal" label: Metal - value: "Ballad" label: Ballad - value: "Funk" label: Funk - value: "Soundtrack" label: Soundtrack - value: "World" label: World - name: temperature label: temperature help: Controls randomness in generation (0.05-5.0, higher=more varied) type: float default: 0.8 - name: generateType label: Output Type help: Output type. Separate produces 3 files. Default: Mixed type: select default: mixed options: - value: "mixed" label: Mixed (Vocal + Instrumental) - value: "bgm" label: Instrumental Only - value: "vocal" label: Vocal Only - value: "separate" label: Separate Tracks (Mix + Vocal + BGM) ## Model Parameter Inspires: - prompt: [verse] Empty streets, walking all alone Echoes of your voice inside my phone Late night thoughts keep pulling me in I wonder if you feel the way I did [chorus] I’m lost without you, can’t you see? The pieces don’t fit without you next to me Every step I take just leads me back to you I’m lost without you, what am I gonna do? [verse] Pictures fade but memories stay I’m haunted by the words I didn’t say You were the calm inside my storm Now I’m here just trying to stay warm [bridge] If you feel alone tonight Know I’m still holding tight Waiting for a sign from you [outro] I’m lost without you, I’m lost without you - prompt: [verse] Staring at the sunset, colors paint the sky Thoughts of you keep swirling, can't deny I know I let you down, I made mistakes But I'm here to mend the heart I didn't break [chorus] Every road you take, I'll be one step behind Every dream you chase, I'm reaching for the light You can't fight this feeling now I won't back down You know you can't deny it now I won't back down [verse] They might say I'm foolish, chasing after you But they don't feel this love the way we do My heart beats only for you, can't you see? I won't let you slip away from me [bridge] No, I won't back down, won't turn around Until you're back where you belong I'll cross the oceans wide, stand by your side Together we are strong [outro] Every road you take, I'll be one step behind Every dream you chase, love's the tie that binds You can't fight this feeling now I won't back down - prompt: [verse] Woke up feeling stronger than before I’ve been through battles, scars and more This heart don’t break, it only learns Watch me rise, feel the fire burn [chorus] I’ve got fire in my veins Can’t hold me down, can’t feel the chains Every word, every fight, feeds the flame I’ve got fire in my veins [verse] Doubt me now, you’ll see me fly Failure’s just fuel that keeps me alive Lightning strikes but I won’t fall I’m standing here, I’m standing tall [bridge] This is my time, this is my fight Burning brighter in the night [outro] Fire in my veins, fire in my soul You can’t stop what you can’t control - prompt: [verse] Neon lights blur the city view I’m lost in thought, dreaming of you Every song plays like you’re near Your voice still lingers in my ear [chorus] I wanna fade into you Let this world disappear too Every second feels brand new When I fade into you [verse] Time slows down when you’re in my mind All the noise just leaves me behind Floating through this midnight blue All I want is to be with you [bridge] Colors melt, shadows break Hearts collide, we can’t fake [outro] Fade into you… fade into you ## Integration Header Prepare ```bash # Sign up Wiro dashboard and create project export YOUR_API_KEY="{{useSelectedProjectAPIKey}}"; export YOUR_API_SECRET="XXXXXXXXX"; # unix time or any random integer value export NONCE=$(date +%s); # hmac-SHA256 (YOUR_API_SECRET+Nonce) with YOUR_API_KEY export SIGNATURE="$(echo -n "${YOUR_API_SECRET}${NONCE}" | openssl dgst -sha256 -hmac "${YOUR_API_KEY}")"; ``` ## Run Command - Make HTTP Post Request ```bash curl -X POST "https://api.wiro.ai/v1/Run/tencent-ailab/songgeneration-2" -H "Content-Type: multipart/form-data" -H "x-api-key: ${YOUR_API_KEY}" -H "x-nonce: ${NONCE}" -H "x-signature: ${SIGNATURE}" -d '{ "inputAudio": "", "caption": "female, slow, piano", "prompt": "[verse]\nBright lights flashing in the city sky\nRunning fast and we don't know why\nElectric nights got our hearts on fire\nChasing dreams we'll never tire\n\n[verse]\nGrit in our eyes wind in our hair\nBreaking rules we don't even care\nShouting loud above the crowd\nLiving life like we're unbowed\n\n[chorus]\nRunning wild in the night so free\nFeel the beat pumping endlessly\nHearts collide in the midnight air\nWe belong we don't have a care\n\n[verse]\nPiercing through like a lightning strike\nEvery moment feels like a hike\nDaring bold never backing down\nKings and queens without a crown\n\n[chorus]\nRunning wild in the night so free\nFeel the beat pumping endlessly\nHearts collide in the midnight air\nWe belong we don't have a care\n\n[bridge]\nClose your eyes let your spirit soar\nWe are the ones who wanted more\nBreaking chains of the mundane\nIn this world we'll make our claim", "genre": "", "temperature": "0.8", "generateType": "mixed", "callbackUrl": "You can provide a callback URL; Wiro will send a POST request to it when the task is completed." }'; ``` ## Run Command - Response ```json { "errors": [], "taskid": "2221", "socketaccesstoken": "eDcCm5yyUfIvMFspTwww49OUfgXkQt", "result": true } ``` ## Get Task Detail - Make HTTP Post Request with Task ID ```bash curl -X POST "https://api.wiro.ai/v1/Task/Detail" -H "Content-Type: multipart/form-data" -H "x-api-key: ${YOUR_API_KEY}" -H "x-nonce: ${NONCE}" -H "x-signature: ${SIGNATURE}" -d '{ "taskid": "2221" }'; ``` ## Get Task Detail - Make HTTP Post Request with Socket Access Token ```bash curl -X POST "https://api.wiro.ai/v1/Task/Detail" -H "Content-Type: multipart/form-data" -H "x-api-key: ${YOUR_API_KEY}" -H "x-nonce: ${NONCE}" -H "x-signature: ${SIGNATURE}" -d '{ "tasktoken": "eDcCm5yyUfIvMFspTwww49OUfgXkQt" }'; ``` ## Get Task Detail - Response ```json { "total": "1", "errors": [], "tasklist": [ { "id": "2221", "uuid": "15bce51f-442f-4f44-a71d-13c6374a62bd", "socketaccesstoken": "eDcCm5yyUfIvMFspTwww49OUfgXkQt", "parameters": {}, "debugoutput": "", "debugerror": "", "starttime": "1734513809", "endtime": "1734513813", "elapsedseconds": "6.0000", "status": "task_postprocess_end", "createtime": "1734513807", "canceltime": "0", "assigntime": "1734513807", "accepttime": "1734513807", "preprocessstarttime": "1734513807", "preprocessendtime": "1734513807", "postprocessstarttime": "1734513813", "postprocessendtime": "1734513814", "outputs": [ { "id": "6bc392c93856dfce3a7d1b4261e15af3", "name": "0.png", "contenttype": "image/png", "parentid": "6c1833f39da71e6175bf292b18779baf", "uuid": "15bce51f-442f-4f44-a71d-13c6374a62bd", "size": "202472", "addedtime": "1734513812", "modifiedtime": "1734513812", "accesskey": "dFKlMApaSgMeHKsJyaDeKrefcHahUK", "url": "https://cdn1.wiro.ai/6a6af820-c5050aee-40bd7b83-a2e186c6-7f61f7da-3894e49c-fc0eeb66-9b500fe2/0.png" } ], "size": "202472" } ], "result": true } ``` ## Kill Task - Make HTTP Post Request with Task ID ```bash curl -X POST "https://api.wiro.ai/v1/Task/Kill" -H "Content-Type: multipart/form-data" -H "x-api-key: ${YOUR_API_KEY}" -H "x-nonce: ${NONCE}" -H "x-signature: ${SIGNATURE}" -d '{ "taskid": "534574" }'; ``` ## Kill Task - Make HTTP Post Request with Socket Access Token ```bash curl -X POST "https://api.wiro.ai/v1/Task/Kill" -H "Content-Type: multipart/form-data" -H "x-api-key: ${YOUR_API_KEY}" -H "x-nonce: ${NONCE}" -H "x-signature: ${SIGNATURE}" -d '{ "socketaccesstoken": "ZpYote30on42O4jjHXNiKmrWAZqbRE" }'; ``` ## Kill Task - Response ```json { "errors": [], "tasklist": [ { "id": "534574", "uuid": "15bce51f-442f-4f44-a71d-13c6374a62bd", "name": "", "socketaccesstoken": "ZpYote30on42O4jjHXNiKmrWAZqbRE", "parameters": { "inputImage": "https://api.wiro.ai/v1/File/mCmUXgZLG1FNjjjwmbtPFr2LVJA112/inputImage-6060136.png" }, "debugoutput": "", "debugerror": "", "starttime": "1734513809", "endtime": "1734513813", "elapsedseconds": "6.0000", "status": "task_cancel", "cps": "0.000585000000", "totalcost": "0.003510000000", "guestid": null, "projectid": "699", "modelid": "598", "description": "", "basemodelid": "0", "runtype": "model", "modelfolderid": "", "modelfileid": "", "callbackurl": "", "marketplaceid": null, "createtime": "1734513807", "canceltime": "0", "assigntime": "1734513807", "accepttime": "1734513807", "preprocessstarttime": "1734513807", "preprocessendtime": "1734513807", "postprocessstarttime": "1734513813", "postprocessendtime": "1734513814", "pexit": "0", "categories": "["tool","image-to-image","quick-showcase","compare-landscape"]", "outputs": [ { "id": "6bc392c93856dfce3a7d1b4261e15af3", "name": "0.png", "contenttype": "image/png", "parentid": "6c1833f39da71e6175bf292b18779baf", "uuid": "15bce51f-442f-4f44-a71d-13c6374a62bd", "size": "202472", "addedtime": "1734513812", "modifiedtime": "1734513812", "accesskey": "dFKlMApaSgMeHKsJyaDeKrefcHahUK", "foldercount": "0", "filecount": "0", "ispublic": 0, "expiretime": null, "url": "https://cdn1.wiro.ai/6a6af820-c5050aee-40bd7b83-a2e186c6-7f61f7da-3894e49c-fc0eeb66-9b500fe2/0.png" } ], "size": "202472" } ], "result": true } ``` ## Cancel Task - Make HTTP Post Request (For tasks on queue) ```bash curl -X POST "https://api.wiro.ai/v1/Task/Cancel" -H "Content-Type: multipart/form-data" -H "x-api-key: ${YOUR_API_KEY}" -H "x-nonce: ${NONCE}" -H "x-signature: ${SIGNATURE}" -d '{ "taskid": "634574" }'; ``` ## Cancel Task - Response ```json { "errors": [], "tasklist": [ { "id": "634574", "uuid": "15bce51f-442f-4f44-a71d-13c6374a62bd", "name": "", "socketaccesstoken": "ZpYote30on42O4jjHXNiKmrWAZqbRE", "parameters": { "inputImage": "https://api.wiro.ai/v1/File/mCmUXgZLG1FNjjjwmbtPFr2LVJA112/inputImage-6060136.png" }, "debugoutput": "", "debugerror": "", "starttime": "1734513809", "endtime": "1734513813", "elapsedseconds": "6.0000", "status": "task_cancel", "cps": "0.000585000000", "totalcost": "0.003510000000", "guestid": null, "projectid": "699", "modelid": "598", "description": "", "basemodelid": "0", "runtype": "model", "modelfolderid": "", "modelfileid": "", "callbackurl": "", "marketplaceid": null, "createtime": "1734513807", "canceltime": "0", "assigntime": "1734513807", "accepttime": "1734513807", "preprocessstarttime": "1734513807", "preprocessendtime": "1734513807", "postprocessstarttime": "1734513813", "postprocessendtime": "1734513814", "pexit": "0", "categories": "["tool","image-to-image","quick-showcase","compare-landscape"]", "outputs": [ { "id": "6bc392c93856dfce3a7d1b4261e15af3", "name": "0.png", "contenttype": "image/png", "parentid": "6c1833f39da71e6175bf292b18779baf", "uuid": "15bce51f-442f-4f44-a71d-13c6374a62bd", "size": "202472", "addedtime": "1734513812", "modifiedtime": "1734513812", "accesskey": "dFKlMApaSgMeHKsJyaDeKrefcHahUK", "foldercount": "0", "filecount": "0", "ispublic": 0, "expiretime": null, "url": "https://cdn1.wiro.ai/6a6af820-c5050aee-40bd7b83-a2e186c6-7f61f7da-3894e49c-fc0eeb66-9b500fe2/0.png" } ], "size": "202472" } ], "result": true } ``` ## Task Status Information This section defines the possible task status values returned by the API when polling for task completion. ### Completed Task Statuses (Polling can stop) These indicate that the task has reached a terminal state — either success or failure. Once any of these is received, polling should stop. - task_postprocess_end : Task completed successfully and post-processing is done. - task_cancel : Task was cancelled by the user or system. ### Running Task Statuses (Continue polling) These statuses indicate that the task is still in progress. Polling should continue if one of these is returned. - task_queue : Task is waiting in the queue. - task_accept : Task has been accepted for processing. - task_assign : Task is being assigned to a worker. - task_preprocess_start : Preprocessing is starting. - task_preprocess_end : Preprocessing is complete. - task_start : Task execution has started. - task_output : Output is being generated.