← Back to Skills Marketplace
scikkk

Music Generation

by scikkk · GitHub ↗ · v1.0.0 · MIT-0
cross-platform ✓ Security Clean
326
Downloads
0
Stars
4
Active Installs
1
Versions
Install in OpenClaw
/install music-gen
Description
SenseAudio Music Generation API for creating AI-generated lyrics and songs. Supports lyrics generation, song generation with style/vocal control, and async t...
README (SKILL.md)

SenseAudio Music Generation

SenseAudio provides AI-powered music generation APIs for creating lyrics and full songs. The workflow is:

  1. Generate lyrics (sync or async)
  2. Generate a song using the lyrics (async, returns task_id)
  3. Poll for results

Base URL: https://api.senseaudio.cn Auth: Authorization: Bearer $SENSEAUDIO_API_KEY


1. Generate Lyrics

POST /v1/song/lyrics/create

Parameter Type Required Description
prompt string yes Description of the lyrics to generate
provider string yes Model provider, currently only sensesong

Response (sync):

{
  "data": [
    {
      "text": "[intro-medium] ; [verse] ... ; [chorus] ... ; [outro-medium]",
      "title": ""
    }
  ]
}

Response (async): Returns task_id — poll with lyrics pending endpoint.

curl -X POST https://api.senseaudio.cn/v1/song/lyrics/create \
  -H "Authorization: Bearer $SENSEAUDIO_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"prompt": "一段慷慨激昂的歌词", "provider": "sensesong"}'

2. Poll Lyrics (Async)

GET /v1/song/lyrics/pending/:task_id

Response:

{
  "task_id": "bcee6b21-...",
  "status": "SUCCESS",
  "response": {
    "task_id": "bcee6b21-...",
    "data": [{"text": "...", "title": ""}]
  }
}

Status values: PENDING | SUCCESS | FAILED

curl https://api.senseaudio.cn/v1/song/lyrics/pending/{task_id} \
  -H "Authorization: Bearer $SENSEAUDIO_API_KEY"

3. Generate Song

POST /v1/song/music/create

Parameter Type Required Description
model string yes Currently only sensesong
lyrics string no Song lyrics (use format from lyrics API)
instrumental bool no true for instrumental (no vocals)
style string no Music style (e.g. "pop", "rock", "jazz")
style_weight string no Style weight 0–1
title string no Song title
vocal_gender string no f = female, m = male
negative_tags string no Style elements to exclude

Response:

{"task_id": "50f979f5-2b9e-4254-8653-c277644a31fa"}
curl -X POST https://api.senseaudio.cn/v1/song/music/create \
  -H "Authorization: Bearer $SENSEAUDIO_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "sensesong",
    "lyrics": "[verse] Your lyrics here...",
    "style": "pop",
    "vocal_gender": "f",
    "title": "My Song"
  }'

4. Poll Song (Async)

GET /v1/song/music/pending/:task_id

Response:

{
  "task_id": "50f979f5-...",
  "status": "SUCCESS",
  "response": {
    "task_id": "50f979f5-...",
    "data": [
      {
        "audio_url": "https://...",
        "lyrics": "...",
        "duration": 110
      }
    ]
  }
}

Status values: PENDING | SUCCESS | FAILED

curl https://api.senseaudio.cn/v1/song/music/pending/{task_id} \
  -H "Authorization: Bearer $SENSEAUDIO_API_KEY"

Python Example (Full Flow)

import requests
import time

API_KEY = "YOUR_API_KEY"
HEADERS = {"Authorization": f"Bearer {API_KEY}", "Content-Type": "application/json"}
BASE = "https://api.senseaudio.cn"

# Step 1: Generate lyrics
resp = requests.post(f"{BASE}/v1/song/lyrics/create",
    headers=HEADERS,
    json={"prompt": "一首关于夏天的流行歌曲", "provider": "sensesong"})
lyrics_data = resp.json()
lyrics_text = lyrics_data["data"][0]["text"]

# Step 2: Generate song
resp = requests.post(f"{BASE}/v1/song/music/create",
    headers=HEADERS,
    json={"model": "sensesong", "lyrics": lyrics_text, "style": "pop", "vocal_gender": "f"})
task_id = resp.json()["task_id"]

# Step 3: Poll for result
while True:
    resp = requests.get(f"{BASE}/v1/song/music/pending/{task_id}", headers=HEADERS)
    result = resp.json()
    if result["status"] == "SUCCESS":
        print("Audio URL:", result["response"]["data"][0]["audio_url"])
        break
    elif result["status"] == "FAILED":
        print("Failed")
        break
    time.sleep(5)


SenseAudio 音乐生成

SenseAudio 提供 AI 驱动的音乐生成 API,支持歌词生成和完整歌曲生成。标准工作流程:

  1. 生成歌词(同步或异步)
  2. 使用歌词生成歌曲(异步,返回 task_id
  3. 轮询获取结果

基础 URL: https://api.senseaudio.cn 鉴权: Authorization: Bearer $SENSEAUDIO_API_KEY


1. 音乐歌词生成请求

POST /v1/song/lyrics/create

  • 原始链接:https://senseaudio.cn/docs/song/lyrics_create
参数名 类型 必填 描述
prompt string 歌词生成提示词
provider string 模型,目前只支持 sensesong

同步响应示例:

{
  "data": [
    {
      "text": "[intro-medium] ; [verse] We stand upon the edge of dawn... ; [chorus] Rise up now...",
      "title": ""
    }
  ]
}

异步响应: 返回 task_id,需通过歌词轮询接口获取结果。


2. 音乐歌词轮询

GET /v1/song/lyrics/pending/:task_id

  • 原始链接:https://senseaudio.cn/docs/song/lyrics_pending

使用创建歌词任务得到的异步任务 ID 获取歌词数据。

响应示例:

{
  "task_id": "bcee6b21-dcf9-44d1-9b85-7bfef0e840db",
  "status": "SUCCESS",
  "response": {
    "task_id": "bcee6b21-dcf9-44d1-9b85-7bfef0e840db",
    "data": [{"text": "...", "title": ""}]
  }
}

任务状态:PENDING(处理中)| SUCCESS(成功)| FAILED(失败)


3. 音乐歌曲生成请求

POST /v1/song/music/create

  • 原始链接:https://senseaudio.cn/docs/song/music_create
参数名 类型 必填 描述
model string 模型,目前只能使用 sensesong
lyrics string 歌词内容
instrumental bool 是否为纯音乐(无人声)
style string 歌曲风格(如 "pop"、"rock")
style_weight string 风格权重,取值 0–1
title string 歌曲标题
vocal_gender string 人声性别:f 女性,m 男性
negative_tags string 排除的风格元素

响应示例:

{"task_id": "50f979f5-2b9e-4254-8653-c277644a31fa"}

4. 音乐歌曲轮询

GET /v1/song/music/pending/:task_id

  • 原始链接:https://senseaudio.cn/docs/song/music_pending

使用创建歌曲任务得到的异步任务 ID 获取歌曲数据。

响应示例:

{
  "task_id": "50f979f5-...",
  "status": "SUCCESS",
  "response": {
    "task_id": "50f979f5-...",
    "data": [
      {
        "audio_url": "https://...",
        "lyrics": "...",
        "duration": 110
      }
    ]
  }
}

任务状态:PENDING(处理中)| SUCCESS(成功)| FAILED(失败)


完整调用示例(Python)

import requests
import time

API_KEY = "YOUR_API_KEY"
HEADERS = {"Authorization": f"Bearer {API_KEY}", "Content-Type": "application/json"}
BASE = "https://api.senseaudio.cn"

# 第一步:生成歌词
resp = requests.post(f"{BASE}/v1/song/lyrics/create",
    headers=HEADERS,
    json={"prompt": "一首关于夏天的流行歌曲", "provider": "sensesong"})
lyrics_text = resp.json()["data"][0]["text"]

# 第二步:生成歌曲
resp = requests.post(f"{BASE}/v1/song/music/create",
    headers=HEADERS,
    json={"model": "sensesong", "lyrics": lyrics_text, "style": "pop", "vocal_gender": "f"})
task_id = resp.json()["task_id"]

# 第三步:轮询结果
while True:
    resp = requests.get(f"{BASE}/v1/song/music/pending/{task_id}", headers=HEADERS)
    result = resp.json()
    if result["status"] == "SUCCESS":
        print("音频地址:", result["response"]["data"][0]["audio_url"])
        break
    elif result["status"] == "FAILED":
        print("生成失败")
        break
    time.sleep(5)
Usage Guidance
This skill simply documents how to call SenseAudio's API and needs your SenseAudio API key. Before installing: (1) confirm you trust https://senseaudio.cn and are comfortable sending prompts/content there (audio and lyrics will be transmitted to their servers); (2) use a key with minimal privileges and monitor/rotate it if possible; (3) review SenseAudio's terms/privacy to understand data retention and copyright implications for generated audio; and (4) avoid reusing high-value credentials (do not put other service keys into SENSEAUDIO_API_KEY). The skill is instruction-only (no code install), which reduces installation risk, but the agent will make network calls to the provider when invoked.
Capability Analysis
Type: OpenClaw Skill Name: music-gen Version: 1.0.0 The skill bundle provides documentation and examples for integrating with the SenseAudio Music Generation API (api.senseaudio.cn). It requires a standard API key (SENSEAUDIO_API_KEY) and contains no evidence of malicious intent, data exfiltration, or unauthorized execution in SKILL.md or the provided Python examples.
Capability Assessment
Purpose & Capability
Name/description match the runtime instructions: the SKILL.md documents SenseAudio endpoints for lyrics and song generation and the only required secret is SENSEAUDIO_API_KEY, which is appropriate for a third-party API integration.
Instruction Scope
Instructions are scoped to calling SenseAudio REST endpoints, polling async tasks, and example code (curl/Python). They do not instruct reading local files, other environment variables, or transmitting data to unrelated endpoints.
Install Mechanism
No install spec and no code files (instruction-only), so nothing is written to disk or fetched during install — lowest-risk install footprint.
Credentials
Only one credential is required (SENSEAUDIO_API_KEY) and it is the primary credential used by the documented API calls. There are no unrelated or excessive environment variables declared.
Persistence & Privilege
Skill does not request always: true and uses default model invocation behavior. It does not request modifying other skills or system configuration.
How to Use
  1. Make sure OpenClaw is installed (local or Docker)
  2. Run the install command in chat: /install music-gen
  3. After installation, invoke the skill by name or use /music-gen
  4. Provide required inputs per the skill's parameter spec and get structured output
Version History
v1.0.0
Major update: Music skill now provides SenseAudio's AI music and lyrics generation API. - Supports generating AI-powered song lyrics (sync and async). - Enables full song creation with style and vocal controls. - Uses async task polling for both lyrics and music generation. - Includes detailed REST API documentation and Python sample code. - Requires SENSEAUDIO_API_KEY for authentication.
Metadata
Slug music-gen
Version 1.0.0
License MIT-0
All-time Installs 4
Active Installs 4
Total Versions 1
Frequently Asked Questions

What is Music Generation?

SenseAudio Music Generation API for creating AI-generated lyrics and songs. Supports lyrics generation, song generation with style/vocal control, and async t... It is an AI Agent Skill for Claude Code / OpenClaw, with 326 downloads so far.

How do I install Music Generation?

Run "/install music-gen" in the OpenClaw or Claude Code chat to install it in one step — no extra setup required.

Is Music Generation free?

Yes, Music Generation is completely free, licensed under MIT-0. You can download, install and use it at no cost.

Which platforms does Music Generation support?

Music Generation is cross-platform and runs anywhere OpenClaw / Claude Code is available (cross-platform).

Who created Music Generation?

It is built and maintained by scikkk (@scikkk); the current version is v1.0.0.

💬 Comments