شرح التكامل مع واجهة API لتوليد كلمات الأغاني من Suno

إذا كنت ترغب في توليد أغنية مخصصة، لكنك لا تود كتابة كلماتها بنفسك، فيمكنك استخدام واجهة API لتوليد كلمات الأغاني التي توفرها orchats لتوليد الكلمات عبر موجه، وهي واجهة Suno Lyrics Generation API。

الفوترة: بعد نجاح التوليد، تبلغ التكلفة القياسية لكل طلب 0.08 رصيد. عند إرجاع عدة كلمات أغاني مقترحة في طلب واحد، تُحتسب التكلفة لمرة واحدة فقط؛ وتخضع خصومات الاستخدام المطبقة للفاتورة الفعلية، ولا تُفرض رسوم على الطلبات الفاشلة.

معامل الإدخال الرئيسي لهذه الواجهة هو prompt، ويمكن اختيار model (القيم المتاحة هي default وremi-v1، والقيمة الافتراضية هي default)، ومثال الإدخال كما يلي:

يقابل ذلك في الموقع الرسمي Create → Songs → Advanced → Lyrics → Help me write lyrics。

مساعد كتابة كلمات الأغاني في موقع Suno الرسمي، وقد أُدخل فيه الموجه نفسه الموجود في الطلب أدناه

هنا نُدخل موجهًا عن فانوس على شاطئ البحر.

{
  "prompt": "Write an original acoustic folk chorus about a lantern on the shore."
}

انقر على تشغيل، وستكون النتيجة كما يلي:

{
  "success": true,
  "task_id": "063f0ad3-3933-4655-94a5-166fde41524f",
  "data": [
    {
      "text": "[Chorus]\nLantern on the shore\nLantern on the shore\nIt keeps my footsteps sure\nWhen the dark rolls in for more\n\nLantern on the shore\nLantern on the shore\nI follow that small gold flame\nAnd I don’t feel lost anymore",
      "title": "Shore Lantern",
      "status": "complete",
      "tags": [
        "Acoustic folk with fingerpicked guitar, brushed hand percussion, and a loping 6/8 sway; chorus opens wide after a sparse verse feel, then settles into a warm refrain with stacked harmony on the anchor line. Lead vocal is close-mic and intimate, with a soft double on the last words and a few airy ad-libs. Vinyl crackle intro, tide-foam ambience between phrases, wide but earthy mix.",
        "folk",
        "acoustic"
      ]
    },
    {
      "text": "[Chorus]\nLantern on the shore\nLantern on the shore\nGuide me home once more\nTill the dark lets go\n\n[Chorus]\nLantern on the shore\nLantern on the shore\nBurn for me once more\nTill the waves say no",
      "title": "Lantern on the Shore",
      "status": "complete",
      "tags": [
        "Acoustic folk with fingerpicked guitar, brushed kick and airy room harmonies; chorus opens sparse then widens with low humming doubles and a soft fiddle lift, pre-chorus feel implied by a gentle build into the hook, final chorus adds handclaps and a tidal swell of backing vocals. Warm, intimate, close-mic mix with a natural wooden glow.",
        "folk",
        "acoustic"
      ]
    }
  ],
  "started_at": 1796061011.339,
  "finished_at": 1796061021.686,
  "elapsed": 10.347,
  "cost": {
    "amount": 0.072,
    "currency": "credit",
    "list_amount": 0.08
  }
}

كما نرى، فإن data عبارة عن مصفوفة تُرجع في كل مرة عدة كلمات أغاني مقترحة، ويحتوي حقل text في كل عنصر على كلمات الأغنية، وtitle هو العنوان، وtags هي وسوم أنماط الموسيقى الموصى بها.

بعد الحصول على الكلمات، يمكننا استخدام واجهة Suno Audios Generation API لتوليد أغنية مخصصة.