Setup
On first use, read setup.md for integration guidelines.
When to Use
User wants to generate music with Udio. Agent can use API wrappers for programmatic generation, browser automation for direct platform interaction, or guide prompt engineering.
Architecture
Memory at ~/udio/. See memory-template.md for structure.
CODEBLOCK0
Quick Reference
| Topic | File |
|---|
| Setup | INLINECODE3 |
| Memory |
memory-template.md |
| API usage |
api.md |
| Browser automation |
browser.md |
| Prompt crafting |
prompts.md |
| Style tags |
styles.md |
| Lyrics guide |
lyrics.md |
Core Rules
1. Choose the Right Approach
| Situation | Method |
|---|
| Programmatic generation, batch jobs | API wrapper |
| User wants to browse and listen |
Browser automation |
| Just need prompt help | Prompt engineering only |
2. API Requires Auth Token
Udio has no official public API. Community wrappers use the internal API:
- - Token:
sb-api-auth-token cookie from udio.com - Token expires: refresh if 401 errors occur
- See
api.md for setup instructions
3. Structure Prompts in Layers
[genre] [subgenre] [mood] [instruments] [voice] [era/influence]
Example: "indie folk melancholic acoustic guitar female vocals 90s"
4. Extend Songs Strategically
Udio generates ~30 second clips. Build full songs:
- 1. Create initial clip with strong hook
- Extend 2-3 times with consistent style
- Add outro with ending indicators
- Target 2-4 minutes total
5. Save Successful Seeds
Same prompt + different seed = different result. When close to desired output:
- - Note the seed number
- Try adjacent seeds (seed +/- 1)
- Document working combinations
API Integration
Python Wrapper (Recommended)
CODEBLOCK2
CODEBLOCK3
TypeScript/Node Wrapper
CODEBLOCK4
CODEBLOCK5
Complete Song Sequence
CODEBLOCK6
Browser Automation
When API isn't available or user prefers visual interaction:
Navigate to Udio
CODEBLOCK7
Get Auth Token (for API use)
- 1. Open DevTools:
Cmd+Option+I (Mac) or F12 (Windows) - Go to Application tab > Cookies > udio.com
- Find INLINECODE14
- Copy the value
Generate Music via UI
- 1. Navigate to create page
- Enter prompt in text field
- Adjust settings (instrumental, duration)
- Click generate
- Wait for completion (~30-60 seconds)
- Download or extend
Prompt Patterns
By Genre
| Genre | Prompt Pattern |
|---|
| Electronic | INLINECODE15 |
| Rock |
[sub]rock [energy] [guitars] [drums] [vocals] [decade] |
| Hip Hop |
hip hop [subgenre] [beat style] [sample type] [era] |
| Jazz |
jazz [subgenre] [instruments] [setting] [mood] |
| Classical |
classical [period] [ensemble] [mood] [dynamics] |
Mood Combinations
| Energy | Mood Stack |
|---|
| High + Positive | euphoric energetic uplifting triumphant |
| Low + Positive |
peaceful calm serene contemplative |
| High + Negative | aggressive chaotic intense dark |
| Low + Negative | melancholic somber mournful introspective |
| Complex | bittersweet nostalgic hopeful yearning |
Voice Control
CODEBLOCK8
Common Traps
| Trap | Problem | Solution |
|---|
| Vague prompts | "good music" = random | Be specific: genre, mood, instruments |
| Contradictions |
"upbeat sad" confuses model | Pick consistent descriptors |
| Token expiry | 401 errors | Re-extract from browser cookies |
| Too many keywords | 20+ terms dilute focus | Use 5-10 key descriptors |
| No seed tracking | Can't reproduce good results | Log seeds for successful generations |
| Abrupt extensions | Jarring transitions | Match style/key in extend prompts |
Extension Strategy
Building Full Tracks
| Phase | Duration | Prompt Additions |
|---|
| Intro | 0-30s | "intro, building, atmospheric" |
| Verse/Main |
30s-2m | Original prompt |
| Bridge | 2m-2:30 | "variation, bridge, key change" |
| Outro | Final 30s | "outro, ending, fade, resolution" |
Ending Indicators
Add to final extend/outro:
- - "fade out" / "fading"
- "song ending" / "conclusion"
- "final chorus" / "last verse"
- "resolution" / "outro"
Data Storage
This skill creates ~/udio/ on first use:
- - memory file — Preferences, successful prompts, token location reference
- projects folder — Per-project tracking with seeds and URLs
- songs folder — Downloaded audio files (optional)
All data stays local. Auth tokens should be stored in system keychain, not plain text.
Scope
This skill does:
- - Generate music via community API wrappers (requires auth token)
- Navigate udio.com with browser automation (user must be logged in)
- Craft optimized prompts for Udio's model (no token needed)
- Track projects, seeds, and successful patterns locally
- Download generated audio files to INLINECODE21
This skill does NOT:
- - Store auth tokens in plain text (must use keychain/credential manager)
- Bypass Udio's rate limits or terms of service
- Access files outside INLINECODE22
- Auto-extract tokens without user guidance
Security Notes
Auth Token: The sb-api-auth-token cookie grants API access to your Udio account. Handle it like a password:
- - Store in system keychain, never in plain text
- Token expires after ~7 days of inactivity
- Re-extract if you get 401 errors
Community Wrappers: The Python and Node wrappers are community-maintained (not official Udio software). Review their source code before installing:
- - Python: github.com/flowese/UdioWrapper
- Node: github.com/josephgodwinkimani/udio-wrapper
Prompt-Only Mode: If you prefer not to use API or share tokens, this skill works in prompt-only mode — just help with crafting effective prompts without any API calls.
External Endpoints
| Endpoint | Data Sent | Purpose |
|---|
| api.udio.com | Prompts, lyrics | Music generation (via wrappers) |
| udio.com |
Browser session | Direct platform access |
Auth token is sent with API requests. No other data leaves the machine.
Trust
By using this skill with API wrappers, prompts and lyrics are sent to Udio's servers for music generation. Only use if you trust Udio with your creative content. Review Udio's terms of service at udio.com/terms.
Related Skills
Install with
clawhub install <slug> if user confirms:
- -
audio — Audio processing and editing - INLINECODE26 — Combine music with video content
- INLINECODE27 — Audio format conversion
Feedback
- - If useful: INLINECODE28
- Stay updated: INLINECODE29
设置
首次使用时,请阅读 setup.md 了解集成指南。
使用时机
用户希望使用 Udio 生成音乐。智能体可使用 API 封装器进行程序化生成、通过浏览器自动化直接操作平台,或指导提示词工程。
架构
记忆文件位于 ~/udio/。结构参见 memory-template.md。
~/udio/
├── [memory.md] # 首次使用时创建:偏好设置、认证令牌位置
├── [projects/] # 按项目追踪歌曲
└── [songs/] # 下载的音频文件
快速参考
memory-template.md |
| API 使用 | api.md |
| 浏览器自动化 | browser.md |
| 提示词编写 | prompts.md |
| 风格标签 | styles.md |
| 歌词指南 | lyrics.md |
核心规则
1. 选择正确的方法
| 场景 | 方法 |
|---|
| 程序化生成、批量任务 | API 封装器 |
| 用户希望浏览和试听 |
浏览器自动化 |
| 仅需提示词帮助 | 仅提示词工程 |
2. API 需要认证令牌
Udio 没有官方公开 API。社区封装器使用内部 API:
- - 令牌:来自 udio.com 的 sb-api-auth-token cookie
- 令牌过期:若出现 401 错误则刷新
- 设置说明参见 api.md
3. 分层构建提示词
[流派] [子流派] [情绪] [乐器] [人声] [年代/影响]
示例:独立民谣 忧郁 原声吉他 女声 90年代
4. 策略性扩展歌曲
Udio 生成约 30 秒的片段。构建完整歌曲:
- 1. 创建带有强记忆点的初始片段
- 以一致风格扩展 2-3 次
- 添加带有结束指示的尾奏
- 目标总时长 2-4 分钟
5. 保存成功的种子
相同提示词 + 不同种子 = 不同结果。接近理想输出时:
- - 记录种子编号
- 尝试相邻种子(种子 +/- 1)
- 记录有效组合
API 集成
Python 封装器(推荐)
bash
pip install udio_wrapper
python
from udio_wrapper import UdioWrapper
使用认证令牌初始化
udio = UdioWrapper(your-sb-api-auth-token)
创建歌曲
song = udio.create_song(
prompt=电子 氛围 缓拍 梦幻 合成器音垫,
seed=-1, # -1 表示随机
custom_lyrics=可选歌词
)
扩展歌曲
extended = udio.extend(
prompt=加入鼓和贝斯,增强能量,
audio
conditioningpath=song[song_path],
audio
conditioningsong_id=song[id]
)
添加尾奏
outro = udio.add_outro(
prompt=轻柔淡出,收尾,
audio
conditioningpath=extended[song_path],
audio
conditioningsong_id=extended[id]
)
TypeScript/Node 封装器
bash
npm install udio-wrapper
typescript
import { createUdioWrapper } from udio-wrapper;
const client = await createUdioWrapper(your-auth-token);
const song = await client.createSong({
prompt: 独立摇滚 欢快 充满活力 吉他,
seed: 12345,
customLyrics: 可选歌词
});
const completed = await client.waitForCompletion(song.id);
console.log(下载 URL:, completed.url);
完整歌曲序列
python
一次调用生成前奏 + 扩展 + 尾奏
complete = udio.create
completesong(
short_prompt=宁静的原声吉他旋律,
extend_prompts=[
加入钢琴和柔和的弦乐,
引入轻打击乐,逐渐增强
],
outro_prompt=轻柔收尾,渐弱,
num_extensions=2,
custom
lyricsshort=开头段落...,
custom
lyricsextend=[中间部分..., 桥段...],
custom
lyricsoutro=最后歌词...
)
浏览器自动化
当 API 不可用或用户偏好视觉交互时:
导航至 Udio
browser action=open targetUrl=https://www.udio.com profile=openclaw
获取认证令牌(用于 API)
- 1. 打开开发者工具:Cmd+Option+I(Mac)或 F12(Windows)
- 进入 Application 标签 > Cookies > udio.com
- 找到 sb-api-auth-token
- 复制该值
通过界面生成音乐
- 1. 导航至创建页面
- 在文本框中输入提示词
- 调整设置(纯音乐、时长)
- 点击生成
- 等待完成(约 30-60 秒)
- 下载或扩展
提示词模式
按流派
| 流派 | 提示词模式 |
|---|
| 电子 | 电子 [子流派] [情绪] 合成器 [质感] [年代] |
| 摇滚 |
[子]摇滚 [能量] [吉他] [鼓] [人声] [年代] |
| 嘻哈 | 嘻哈 [子流派] [节拍风格] [采样类型] [年代] |
| 爵士 | 爵士 [子流派] [乐器] [场景] [情绪] |
| 古典 | 古典 [时期] [乐团] [情绪] [力度] |
情绪组合
| 能量 | 情绪堆叠 |
|---|
| 高 + 积极 | 欣快 充满活力 振奋 胜利 |
| 低 + 积极 |
平和 宁静 宁静 沉思 |
| 高 + 消极 | 侵略性 混乱 强烈 黑暗 |
| 低 + 消极 | 忧郁 阴沉 哀伤 内省 |
| 复杂 | 苦乐参半 怀旧 充满希望 渴望 |
人声控制
女声
女声 空灵 女高音 气声
男声
男声 低沉 粗哑 情感丰富
合唱
合唱 和声 福音 有力 颂歌
无人声
纯音乐 无演唱 无人声
常见陷阱
| 陷阱 | 问题 | 解决方案 |
|---|
| 模糊提示词 | 好音乐 = 随机 | 具体说明:流派、情绪、乐器 |
| 矛盾描述 |
欢快悲伤 使模型困惑 | 选择一致的描述词 |
| 令牌过期 | 401 错误 | 从浏览器 cookie 重新提取 |
| 关键词过多 | 20+ 个词稀释重点 | 使用 5-10 个关键描述词 |
| 未记录种子 | 无法复现好结果 | 记录成功生成的种子 |
| 生硬扩展 | 突兀的过渡 | 在扩展提示词中匹配风格/调性 |
扩展策略
构建完整曲目
| 阶段 | 时长 | 提示词补充 |
|---|
| 前奏 | 0-30秒 | 前奏,渐入,氛围感 |
| 主歌/主体 |
30秒-2分 | 原始提示词 |
| 桥段 | 2分-2分30秒 | 变奏,桥段,转调 |
| 尾奏 | 最后30秒 | 尾奏,结束,渐弱,收尾 |
结束指示
在最终扩展/尾奏中添加:
- - 渐弱 / 淡出
- 歌曲结束 / 收尾
- 最后副歌 / 最后一段
- 收束 / 尾奏
数据存储
本技能在首次使用时创建 ~/udio/:
- - 记忆文件 — 偏好设置、成功提示词、令牌位置参考
- 项目文件夹 — 按项目追踪种子和 URL
- 歌曲文件夹 — 下载的音频文件(可选)
所有数据保留在本地。认证令牌应存储在系统钥匙串中,而非明文。
范围
本技能可以:
- - 通过社区 API 封装器生成音乐(需要认证令牌)
- 通过浏览器自动化导航 udio.com(用户必须已登录)
- 为 Udio 模型编写优化提示词(无需令牌)
- 在本地追踪项目、种子和成功模式
- 将生成的音频文件下载至 ~/udio/songs/
本技能不可以: