AI 任務是非同步的。當功能支援 webhook 時,請優先使用以 webhook 為基礎的完成處理。設定您的 webhook 端點、驗證 webhook 簽章,並在收到 success 或 error 通知後,使用收到的 task_id 查詢任務結果。設定與驗證細節請見 webhook 整合指南。
若您的整合不支援 webhook 或無法使用 webhook,請實作輪詢。送出 AI 任務後,以固定間隔(例如每 10 秒)輪詢狀態端點,直到任務狀態為 success 或 error。
安全
BearerAuthenticationV2
Any of:
歌曲主題。instrumental 為 true 時必填。有人聲的歌曲請提供 idea、lyrics 或兩者。 想要特定語言的歌詞,就在這裡提出(例如 "with Japanese lyrics")。
默认值:""
示例:"A song about a small café that stays open late for people who can't sleep"
歌曲歌詞。支援 [intro]、[verse]、[chorus]、[outro] 等段落標籤。支援的歌詞語言: 英文、日文、韓文、葡文、西班牙文、德文、法文、義文、繁體中文、簡體中文、印地文、土耳其文。
默认值:""
示例:"[verse]\nTwo a.m., the neon hums\nSteam on the glass, the night still runs\n\n[chorus]\nLeave the light on, leave the light on\nFor the ones who don'
- https://yce-api-01.makeupar.comhttps://yce-api-01.makeupar.com/s2s/v2.0/task/ai-song
curl -i -X POST \
https://yce-api-01.makeupar.com/s2s/v2.0/task/ai-song \
-H 'Authorization: Bearer <YOUR_TOKEN_HERE>' \
-H 'Content-Type: application/json' \
-d '{
"idea": "A song about a small café that stays open late for people who can'\''t sleep",
"lyrics": "[verse]\nTwo a.m., the neon hums\nSteam on the glass, the night still runs\n\n[chorus]\nLeave the light on, leave the light on\nFor the ones who don'\''t go home",
"music_style": {
"genre": "Acoustic Pop",
"mood": "Calm, hopeful",
"vocal": "female",
"description": "soft piano, brushed drums"
},
"instrumental": false
}'响应
{ "status": 200, "data": { "task_id": "grH0CvsgXuAIHLUzD0V1Ol34hoet3R1tvdbtiVHrDb6_UqCLKIejAIajwxrhOAfe" } }