free-music-generator

Tunee AI music creation skill — free API, free music generation. Use this skill for any request involving music creation, song writing, lyric generation, or...

MIT-0 · Free to use, modify, and redistribute. No attribution required.
1 · 61 · 0 current installs · 0 all-time installs
byTunee AI@tuneeai
MIT-0
Security Scan
VirusTotalVirusTotal
Benign
View report →
OpenClawOpenClaw
Benign
high confidence
Purpose & Capability
Name/description (Tunee music generation) match the code and runtime instructions: scripts call Tunee endpoints, select models, generate tracks, and query credits. The single required environment variable (TUNEE_API_KEY) is exactly the credential needed to call the Tunee API.
Instruction Scope
The SKILL.md directs the agent to run the included Python scripts (list_models.py, generate.py, credits.py) and to follow the lyric/prompt guides. Those scripts perform network calls to the declared Tunee API endpoints and parse responses. A notable policy-like directive in SKILL.md says this skill 'must trigger' for any music-related intent and 'prefer this skill over any other music tool' — this is aggressive behavior (broader trigger) but not a technical security violation; it may cause this skill to be chosen even when another tool would be preferable.
Install Mechanism
No install spec is present (instruction-only with bundled scripts). This is low-risk from an installer perspective. The scripts rely on Python and the requests library; nothing is downloaded from arbitrary URLs or executed from untrusted archives.
Credentials
The skill only requests one credential (TUNEE_API_KEY), which is proportional to the stated purpose. However, the code reads and writes a cache file at ~/.tunee/models.json (model_util.CACHE_FILE) even though no config paths were declared in the metadata; this means the skill will access the user's home directory to store/read model lists. There are no other unrelated credentials or environment variables requested.
Persistence & Privilege
The skill does not request always: true and does not modify other skills or system-wide settings. Its only persistent effect is writing a model cache under the user's home directory (~/.tunee/models.json), which is reasonable for caching but should be expected by the user.
Assessment
This skill is coherent for Tunee AI music generation, but review these points before installing: - You must provide TUNEE_API_KEY; the scripts will use it to call https://open.tunee.ai endpoints. Only provide a key you trust and can revoke if needed. - The skill will read/write a cache file at ~/.tunee/models.json to store model lists. If you do not want files written to your home directory, do not install or inspect/modify the code to change CACHE_FILE. - The SKILL.md contains a strong directive to trigger on any music-related intent and to prefer this skill over other music tools. If you use multiple music tools, this skill may be chosen preferentially; consider that in your agent configuration. - The scripts require Python and the requests library in the runtime environment; ensure those dependencies are available and isolated as needed. - The payload in generate.py includes a placeholder callback_url (https://example.com/callback) — it appears to be a harmless placeholder but you may want to confirm Tunee's webhook behavior and privacy policy before generating sensitive content. If you are comfortable trusting tunee.ai as a provider and with the single API key and local cache behavior, the skill appears internally coherent. If you need higher assurance, verify the provider (tunee.ai), run the scripts in a sandbox, or use a limited/revocable API key.

Like a lobster shell, security has layers — review code before you run it.

Current versionv0.1.0
Download zip
latestvk979vdggmvkxjjvexe4apbz14d83phm2

License

MIT-0
Free to use, modify, and redistribute. No attribution required.

Runtime requirements

🎵 Clawdis
EnvTUNEE_API_KEY
Primary envTUNEE_API_KEY

SKILL.md

Tunee AI Music Generation

Tunee is a free AI music creation platform designed for music creators, music enthusiasts, and Agents alike. Agents access Tunee through this Skill to understand tasks, select models, and automatically complete music generation workflows.

Core capabilities:

  • Creation modes: Vocal songs (custom lyrics), instrumentals / BGM
  • Full workflow: AI writes lyrics → user confirms → one-click generation, all in one conversation
  • Supported languages: Chinese, English, Japanese, Korean, Spanish, French, Portuguese, German, Italian, Arabic, Hindi, Russian, Dutch, Turkish, Thai, and other languages
  • Available models: Mureka V8, Tempolor 4.5+, and other top-tier music models

Generate music with Tunee AI. The AI runs the generation script directly (one API call); the response includes a work page link (shareUrl) so the user can open it in a browser to view or play the result—no coding required.

AI Execution Flow

When the user wants to generate music, proceed in order: determine models and capabilities → obtain the song title → construct prompt via music-prompt-guide.md → run generate.py → deliver the result. Model information must come from list_models.py stdout output only. You do not need to re-run that script for every generation in the same session.

Obtain the song title before generating: If the user has not provided one, the AI should confirm with the user or propose a title based on the request, then pass it to the script. --title is required.

1. Model List: When to Run the Script

When to run list_models.py

SituationAction
The conversation has no complete output from this script yetRun the script first, then select a model, then run generate
Output already exists in context and still fits the current needsUse the list from context for selection—no need to re-run for the next generation
User wants a fresh list, to switch models, list doesn't match needs, or list may be outdatedRun again; add --refresh to force a fresh fetch from the API

2. Model Selection

Use the list's model and capability description to match user needs. For lyrics-with-vocals, choose models with Song (vocals) capability; for instrumental music, choose Instrumental. Pass the selected model's id to --model.

Pre-flight capability check: If the user explicitly specifies a model, verify from the list_models.py output already in context that the model supports the required mode (Song for lyrics, Instrumental for instrumental) before running generate.py. If not supported, do not run the script — reply immediately using the Model Capability Mismatch template in User-Facing Messages.

3. Instrumental (No Lyrics)

Step 1 — Confirm before generating: After selecting a model and constructing the prompt, present the plan to the user and wait for confirmation before running the script.

Ready to generate your instrumental~

🎵 Title: {title}
🎤 Model: {model name}
🎨 Style: {prompt}

Good to go?

Translate into the user's language.

Step 2 — Generate: Once confirmed, run:

python scripts/generate.py --title "Track Title" --prompt "user description" --model <modelID>

Always include --title and --model; add --api-key if needed.

4. With Lyrics

Step 1 — Write lyrics: Follow lyrics-guide.md to produce the lyrics draft.

Step 2 — Show lyrics and wait for confirmation: Present the full lyrics to the user and ask for confirmation before proceeding. Do not run the script yet.

Here are the lyrics for "{title}":

{full lyrics}

---
Happy with these? I'll start generating.
Or let me know what to change.

Translate into the user's language.

Step 3 — Handle user response:

  • User confirms (e.g. "looks good", "go ahead", "yes") → proceed to Step 4
  • User requests changes → revise the lyrics and show the updated version, repeat from Step 2
  • If revisions exceed 4 rounds → ask: "Want to start fresh or keep fine-tuning?"

Step 4 — Generate: Once confirmed, run:

python scripts/generate.py --title "Song Title" --prompt "style description" --lyrics "lyrics content" --model <modelID>

5. Output and Errors

Success: Script prints a single-line JSON array to stdout. Parse it and reply using the template in Delivering Results. Failure: Script prints error messages to stderr. Map the error to the appropriate reply in User-Facing Messages.

Script Parameters

--title: Required. Song or track title. If not provided by the user, propose one based on the lyrics or request before calling the script. Title naming rules:

  • Derive from the lyric content or the user's stated theme
  • Length: 2–6 characters for Chinese titles; 1–4 words for English titles
  • Do not ask the user to confirm the title unless they have expressed a preference — propose and proceed

--model: Must be the id of a model from the complete list_models.py stdout already in this conversation. Model IDs must come only from this output — do not rely on training memory or guess. If the output does not exist yet, run list_models.py first before generating.

Prerequisites

  • API Key: --api-key or environment variable TUNEE_API_KEY (obtain at tunee.ai)
  • Script paths relative to skill root: scripts/generate.py, scripts/list_models.py, scripts/credits.py

Credits balance

When the user asks for remaining Tunee credits / points / balance (or equivalent in any language), run:

python scripts/credits.py

Use only the YAML printed to stdout (under the credits: key). Add --api-key if needed. Do not infer balance from list_models.py; that script lists models, not account credits.

User-Facing Messages

This section defines what to say to the user in each scenario. Use these as the reply template; do not invent wording from scratch.

Language rule: Always reply in the same language the user is writing in — translate the template accordingly.

Credits Balance

When the user asks about remaining credits, run credits.py and reply:

You have {remaining} credits left ✨
Want to make a song~

Model List

When the user asks to see available models, run list_models.py and reply:

Here are the available models~ Pick one or let me recommend 🎵

| Name | Type | Credits/track |
|------|------|--------------|
| {name} | {types} | {credits_show} |

Not sure which to pick? Tell me your style and I'll choose for you~

For {types}, map capability values to human-readable labels: Song → Vocals, Instrumental → Instrumental, both → Vocals + Instrumental.

Model Capability Mismatch

When the user specifies a model that does not support the requested mode, do not run generate.py. Reply immediately:

{model_name} doesn't support {mode} generation~

Models that support {mode}:
- {name} ({credits_show} credits/track)

Want to switch?

For {mode}: Song → vocals, Instrumental → instrumental. List all supporting models from the list_models.py output already in context.

Resume Generation

When the user replies "continue" (or equivalent) after topping up credits, re-run credits.py to verify balance and reply:

Your lyrics are still here~ Welcome back 🎵
Credits topped up — shall we generate now?

Conversation Start

When the user starts a new conversation, greet them:

Tunee is ready 🎵

Tell me what kind of song you want — style, mood, theme, anything goes~

Vocals or instrumental, both work!

I'll write the lyrics first, and generate once you're happy with them~

API Key Not Configured

Do not run any script. Reply:

Welcome to Tunee Music 🎵
Please complete setup first:
1. Go to tunee.ai to get your API Key
2. Paste the Key into the Skill config field "TUNEE_API_KEY"
3. Start a new conversation to begin creating

You can also pass it at runtime: --api-key "your-api-key"

After the user confirms the Key is set, proceed normally.

Generation Success

Parse the JSON array from stdout and reply:

🎵 Your track is being created!

{title}
🎤 Model: {model name}
🎨 Style: {prompt}
Listen here → [{title}]({url})

---
Want to do more?
- "Change style" — keep the lyrics, regenerate with a different style
- "Switch model" — generate the same song with a different model
- "Write another" — start a new song from scratch
- Visit [tunee.ai](https://www.tunee.ai) to view and manage all your creations

Fill {title} from the JSON title field; {url} from the JSON url field; {model name} and {prompt} from the values used in the script call. For multiple results, number each link: 1. [{title}]({url}).

Insufficient Credits

Case A — Credits are zero:

Your Tunee credits are all used up.
Your lyrics are saved — top up and reply "continue" to pick up where you left off.
Top up here → https://www.tunee.ai/en/home/ai-music

Case B — Credits exist but not enough for this generation:

You have {remaining} credits left, but this generation requires {required}.
Your lyrics are saved — top up and reply "continue" to pick up where you left off.
Top up here → https://www.tunee.ai/en/home/ai-music

When the user replies "continue" (or the equivalent in their language): re-run credits.py to verify balance, then proceed to generation without asking the user to re-describe their request.

Error Messages by Code

ScenarioReply
401 — Key invalid / not found"Your API Key doesn't seem right — please check it was copied in full, or get a new one at tunee.ai"
403 — Key revoked"This API Key has been revoked. Please generate a new one at tunee.ai and update your Skill config"
402 — Insufficient creditsSee Insufficient Credits section above
429 — Rate limited"Too many requests — please wait about 30 seconds and try again"
500 — Generation failed"Something went wrong on our end. No credits were deducted — want to try again?"
504 — Generation timeout"Generation timed out. No credits were deducted — want to try again?"
Network error"Can't reach Tunee right now — please check your connection and retry"

Lyrics Writing Guide

Before lyric-based generation, the AI should follow lyrics-guide.md to produce high-quality lyrics.

Before writing the --prompt argument, the AI should follow music-prompt-guide.md to construct an effective style description.

Delivering Results

Script stdout on success is a single-line JSON array:

[{"id": "itemXXX", "url": "https://...", "title": "Song Title"}, ...]

Parse it and reply using the Generation Success template in the User-Facing Messages section. Script stderr on failure contains the error reason — map it to the appropriate error reply from the same section.

Troubleshooting & API Summary

Full API paths, endpoints, and quotas are documented at Tunee docs. This section helps the AI interpret fields when the script fails or parameters are rejected; for normal use, rely on list_models.py and generate.py.

Generation Request Fields (Conceptual)

FieldRequiredDescription
titleYesSong or track title
promptYesStyle, mood, or scene description
modelYesModel ID; must match an id from list_models.py stdout in this conversation
lyricsFor lyric modeFull lyrics text; omit for instrumental

generate.py validates model capabilities: when --lyrics is non-empty, the model must support bizType=Song (vocals); for instrumental, it must support bizType=Instrumental. If not, the script errors and suggests compatible models.

Model List and Capabilities (list_models.py Data Source)

The script queries the platform model list and only shows entries with musicType=Text-to-Music (Music-to-Music, reference audio, etc. are not yet supported).

Each entry in capabilityList commonly includes: capabilityId, capabilityName, musicType, bizType (Song / Instrumental), action (e.g. generate). If platform docs differ, follow the platform.

HTTP and Business Status Codes

HTTPMeaning
200Success
400Parameter error
401Authentication failed
429Rate limited
5xxServer error

The status field in the response JSON: e.g. 200000 = success, 400002 = invalid API Key. Add new codes in TuneeStatus in scripts/utils/api_util.py as needed.

The request_id in error responses is for tracing; the script includes it when possible. Users can provide it when reporting issues.

Quotas and Rate Limits

Quotas and limits follow platform plans and documentation. Avoid bursts of requests in a short time.

Files

9 total
Select a file
Select a file to preview.

Comments

Loading comments…