# Taoyuan (桃源) — a finished song for one person > Taoyuan turns one sentence ("a warm birthday song for my mom who loves singing in the kitchen") into a finished song: title, lyrics that only use what the user said, English style tags, cover art and two full candidate tracks, in about three minutes. It is available as a REST API, an MCP server, and a website. Lyrics can be in Chinese, Cantonese, English or Japanese. Songs can be up to 6 minutes; instrumental-only is supported; you can redo one section of a finished song or split it into stems. Base URLs - API: https://api.musicsforyou.com - MCP (Streamable HTTP): https://api.musicsforyou.com/mcp - Website / keys / purchase: https://www.musicsforyou.com/developers - OpenAPI 3.1: https://api.musicsforyou.com/openapi.json - OpenAPI 3.0.3 (for Coze/扣子, Dify and other importers): https://api.musicsforyou.com/openapi-coze.json - Full guide: https://www.musicsforyou.com/llms-full.txt - Source / Claude Desktop package / examples: https://github.com/JerryYangAI/taoyuan-mcp (npm: taoyuan-mcp) Authentication - Create an API key at https://www.musicsforyou.com/developers (sign in first). Keys start with `ty_live_`. New keys come with 3 free credits. - Send it as `Authorization: Bearer ty_live_...` on every request (REST and MCP). - Connector platforms (ChatGPT, claude.ai) can add the MCP URL and sign in when prompted instead of pasting a key. Billing (simple rules) - 1 credit = one generation = one song with two candidate tracks. - Costs 1 credit: `POST /v1/generations` (generate_music), `POST /v1/songs` (create_song), `POST /v1/generations/{id}/replace-section` (replace_section). - Free: compile, revise, lint, get, list, presets, capabilities, credits, usage. - Stems: 2-track vocal/instrumental split is free once per song for non-members and unlimited for members; 12-stem split is Pro only. Neither costs credits. - API and MCP calls use prepaid API credits only. Failed generations are refunded automatically. - Packs: api-100 ¥300 / 100 credits; api-10-usd US$9.90 / 10; api-50-usd US$39 / 50. Buy at https://www.musicsforyou.com/developers. Quick start — MCP (one curl) curl -s https://api.musicsforyou.com/mcp \ -H 'Content-Type: application/json' -H 'Accept: application/json, text/event-stream' \ -H 'Authorization: Bearer ty_live_...' \ -d '{"jsonrpc":"2.0","id":1,"method":"tools/call","params":{"name":"get_credit_balance","arguments":{}}}' Claude Code: claude mcp add --transport http taoyuan https://api.musicsforyou.com/mcp --header "Authorization: Bearer ty_live_..." Quick start — REST, one shot (compile + generate + wait in one call) curl -s https://api.musicsforyou.com/v1/songs \ -H 'Content-Type: application/json' -H 'Authorization: Bearer ty_live_...' \ -d '{"text":"A warm birthday song for my mom who loves singing in the kitchen","uiLanguage":"en","waitSeconds":120}' # 200 when finished, 202 if still running (then GET /v1/generations/{id}?waitSeconds=60) # generation.clips[0].audioUrl, generation.clips[1].audioUrl, generation.coverUrl Quick start — REST, step by step (preview lyrics before spending a credit) 1. POST /v1/prompts/compile {"text":"...","uiLanguage":"en"} -> {"spec":{...}} (free) - spec.status = "ready": show spec.rendered.title / lyrics / style to the user - spec.status = "needs_input": ask spec.question.question, call again with "clarificationAnswer" - to change something: POST /v1/prompts/revise {"spec":spec,"instruction":"stronger chorus"} (free) 2. POST /v1/generations {"spec":spec,"idempotencyKey":"order-123"} -> 202 {"generation":{"id":...}} (1 credit) 3. GET /v1/generations/{id}?waitSeconds=60 until generation.status is "finished" (or "failed"); or SSE at /v1/generations/{id}/events MCP tools (same names as OpenAPI operationIds) compile_music_prompt (free) · revise_generation_prompt (free) · generate_music (1 credit) · get_generation (free) · replace_section (1 credit) · separate_stems (see billing) · list_tracks (free) · list_presets (free) · get_credit_balance (free) Errors: every failure is {"success":false,"code":"...","error":"..."}. Branch on code: LOGIN_REQUIRED, INVALID_API_KEY, NEED_TOPUP (buy credits), SPEC_INVALID, COMPILE_LIMIT, RATE_LIMIT_EXCEEDED, GENERATION_NOT_FOUND, PRO_REQUIRED, PROVIDER_TIMEOUT. Rate limits: generation submissions 5/min per IP; compile and revise 30/hour per account (guests 5/day per IP). Rules: do not submit lyrics you do not own; prohibited content is screened. Songs generated through the API may be used commercially by the key owner. Support: 2368082693@qq.com. Terms: https://www.musicsforyou.com/terms ## For people (not developers) - What it is: tell Taoyuan who the song is for and one or two true details; in about 30 seconds you see the title and full lyrics (free); confirm and two complete versions with cover art are generated in 1–3 minutes. Lyrics only use facts you gave. - Prices: One Song ¥19.9 (3 generations); Taoyuan Pro ¥399/year (30 generations a month, commercial licence). Seeing lyrics is free. Website: https://www.musicsforyou.com (zh), https://www.musicsforyou.com/en (en), https://www.musicsforyou.com/ja (ja). iOS App "Taoyuan: For Someone Important"; WeChat mini program 桃源. - Occasion guides (what to include, what it sounds like, cost): https://www.musicsforyou.com/en/for/birthday-song-for-mom , /en/for/birthday-song-for-dad , /en/for/wedding-song-for-couple , /en/for/anniversary-song-for-wife , /en/for/song-for-best-friend , /en/for/graduation-song-for-friend , /en/for/farewell-song-for-colleague , /en/for/lullaby-for-baby , /en/for/song-for-grandparents , /en/for/company-anniversary-song , /en/for/memorial-song , /en/for/podcast-intro-music , /en/for/drama-scene-music , /en/for/vlog-background-music-custom (Chinese versions without the /en prefix). - Connect guides per agent: https://www.musicsforyou.com/en/mcp/claude-code , /en/mcp/claude-desktop , /en/mcp/claude-ai , /en/mcp/chatgpt , /en/mcp/cursor , /en/mcp/codex-cli , /en/mcp/windsurf , /en/mcp/coze , /en/mcp/dify - AI short-drama scoring: the render_music_cue MCP tool returns an instrumental cue for one scene at a given length (3–600 s), with ten scene profiles (opening, ending, chase, confession, twist, suspense, flashback, daily, transition, climax). A licensed engine (ElevenLabs Music, model MUSIC_V2_5) is available per account. - Whole-episode scoring: plan_episode_sound turns a scene list (one sentence + seconds per scene, up to 10) into one cue plan per scene on a timeline for free; render approved cues with generate_music; export_episode_timeline returns FCPXML (Final Cut / DaVinci Resolve), an ffmpeg mix script and a CSV; mix_episode (free, login) mixes the same cues on the server into one loudness-normalised WAV + MP3 and reports trims and gaps. Skill: ai-drama-sound-director.