Work with this as data
Every API here is available over the APIs.io API and to AI agents over MCP.
MCP server
One button, every client — Claude, Cursor, VS Code and the rest.
https://apis.io/mcp
Tools for apis
7 MCP tools reach this
find_apisBrowse and filter every API in the catalog.get_api_artifactsOne API's artifacts, grouped by type.get_openapiThe primary OpenAPI for this API.find_similar_apisAPIs that look like this one.apis_io_searchSTART HERE — APIs, providers and tags for one query, each with its total.resolveTurn a domain, URL or GitHub org into the provider it belongs to.find_cohortsEvery scored population of providers in the catalog.
Call it yourself
curl for this page
This API
curl "https://apis.io/api/v1/apis/musicsforyou-com:musicsforyou-com-edit-api"
All apis
curl "https://apis.io/api/v1/apis?limit=25"
Calls without X-API-Key need no key. Calls with it need a paid plan — get a key.
Get an API key
Free tier, no form to fill in. Signing in shares your email address with us — we store it to create your key and to recognise you if you sign in with another provider. By signing up you are subscribing to the APIs.io and API Evangelist newsletters — you can unsubscribe from any issue. See our Privacy Policy and Terms.
A second provider on the same verified email joins the account you already have.
OpenAPI Specification
openapi: 3.2.0
info:
title: Taoyuan Music Edit API
version: 1.0.0
summary: '桃源:为一个人写一首歌 / Taoyuan: a finished song for one person, in about three minutes.'
description: '桃源(Taoyuan)音乐生成接口。一句话需求 → 歌词、风格、封面和两版完整歌曲(约 3 分钟)。适合 Agent、脚本和产品集成;同一套接口也以 MCP 形式提供(https://api.musicsforyou.com/mcp)。
典型流程:`POST /v1/prompts/compile`(免费,看歌词和风格)→ `POST /v1/generations`(扣 1 次)→ 轮询 `GET /v1/generations/{id}` 直到 `finished`。不想分步就用 `POST /v1/songs` 一次完成。
Taoyuan turns one sentence into a finished song: lyrics, style, cover art and two full candidate tracks in about three minutes. Typical flow: compile (free, preview lyrics and style) → generate (1 credit) → poll until finished. Or call `POST /v1/songs` to do it all in one request.
**Billing.** Generation and replace-section cost 1 credit each (one credit = one song with two candidates). Compile, revise, lint, get and list are free. Stems: the 2-track vocal/instrumental split is free once per song for non-members and unlimited for members; the 12-stem split is Pro only; neither costs credits. API and MCP calls draw only from prepaid API credits (never the Pro monthly allowance). Failed generations are refunded. New API keys come with 3 free credits.
**Rate limits.** Generation submissions: 5 per minute per IP. Compile/revise: 30 per hour per account (guests 5 per day per IP). **Errors.** Every failure is `{ success: false, code, error }`; branch on `code`.
Docs and keys: https://www.musicsforyou.com/developers · Plain-text guide for LLMs: https://www.musicsforyou.com/llms.txt'
termsOfService: https://www.musicsforyou.com/terms
contact:
name: Taoyuan support
email: 2368082693@qq.com
url: https://www.musicsforyou.com/developers
servers:
- url: https://api.musicsforyou.com
description: Production
security:
- ApiKeyBearer: []
- OAuth2:
- music
tags:
- name: Edit
description: 局部替换与分轨 / Replace a section, stems
paths:
/v1/generations/{id}/replace-section:
post:
operationId: replace_section
tags:
- Edit
summary: 只重做一段(扣 1 次)/ Redo one section (1 credit)
description: '只重做 `[startS, endS]`,其余保持不变。区间 ≥10 秒且 ≤ 原曲一半。返回新的 generation(parentId 指向原作品)。
Regenerates only the given range; the rest stays. Returns a new generation whose parentId is the original.'
security:
- ApiKeyBearer: []
- OAuth2:
- music
parameters:
- name: id
in: path
required: true
schema:
type: string
description: 原作品 id / source generation id
requestBody:
required: true
content:
application/json:
schema:
$ref: '#/components/schemas/ReplaceSectionRequest'
responses:
'202':
description: 已受理 / Accepted
content:
application/json:
schema:
$ref: '#/components/schemas/GenerationResponse'
'400':
description: '参数不合法 / Invalid parameters(code: INVALID_PARAMS 或 SPEC_INVALID,details 为 diagnostics)'
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
'401':
description: 未登录或 Key 无效 / Not authenticated(LOGIN_REQUIRED、INVALID_API_KEY)
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
'402':
description: 额度不足 / No credits
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
'404':
description: 不存在 / GENERATION_NOT_FOUND
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
'409':
description: 原作品未完成 / NOT_FINISHED
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
'429':
description: 请求过于频繁 / Rate limited(RATE_LIMIT_EXCEEDED、COMPILE_LIMIT)
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
'500':
description: 服务端错误 / Internal error
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
x-credit-cost: 1
x-mcp-tool: replace_section
/v1/tracks/{id}/stems:
post:
operationId: separate_stems
tags:
- Edit
summary: 分轨 / Stem separation
description: '`separate_vocal`(人声 + 伴奏两轨):每首歌免费分离一个版本,会员不限。`split_stem`(12 轨):Pro 会员权益。都不扣生成次数。返回 202,结果在 clips[].stems(用 GET 刷新)。
`separate_vocal` (vocals + instrumental) is free once per song for non-members, unlimited for members. `split_stem` (12 stems) is Pro only. Neither costs generation credits. Poll GET /v1/tracks/{id}/stems until clips[].stems.status is finished.'
security:
- ApiKeyBearer: []
- OAuth2:
- music
parameters:
- name: id
in: path
required: true
schema:
type: string
description: generation id
requestBody:
required: true
content:
application/json:
schema:
$ref: '#/components/schemas/StemsRequest'
responses:
'202':
description: 已受理 / Accepted
content:
application/json:
schema:
$ref: '#/components/schemas/GenerationResponse'
'400':
description: '参数不合法 / Invalid parameters(code: INVALID_PARAMS 或 SPEC_INVALID,details 为 diagnostics)'
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
'401':
description: 未登录或 Key 无效 / Not authenticated(LOGIN_REQUIRED、INVALID_API_KEY)
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
'402':
description: PRO_REQUIRED 或 STEMS_ONE_PER_SONG
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
'409':
description: 原作品未完成 / NOT_FINISHED
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
'429':
description: 请求过于频繁 / Rate limited(RATE_LIMIT_EXCEEDED、COMPILE_LIMIT)
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
'500':
description: 服务端错误 / Internal error
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
'501':
description: 供应商不支持 / UNSUPPORTED
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
x-credit-cost: 0
x-mcp-tool: separate_stems
get:
operationId: get_stems
tags:
- Edit
summary: 刷新分轨状态(免费)/ Refresh stem status (free)
security:
- ApiKeyBearer: []
- OAuth2:
- music
parameters:
- name: id
in: path
required: true
schema:
type: string
description: generation id
responses:
'200':
description: OK
content:
application/json:
schema:
$ref: '#/components/schemas/GenerationResponse'
'401':
description: 未登录或 Key 无效 / Not authenticated(LOGIN_REQUIRED、INVALID_API_KEY)
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
'404':
description: 不存在 / GENERATION_NOT_FOUND
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
x-credit-cost: 0
components:
schemas:
UiLanguage:
type: string
enum:
- zh
- en
- ja
description: 界面/解释文字语言 / Language of explanations
Section:
type: object
properties:
id:
type: string
kind:
type: string
enum:
- intro
- verse
- pre_chorus
- chorus
- post_chorus
- bridge
- instrumental
- outro
label:
type: string
examples:
- Verse 1
- Chorus
cues:
type: array
items:
type: string
description: 段落级表演提示 / Performance cues
lines:
type: array
items:
type: string
description: 歌词行;器乐段为空 / Lyric lines, empty for instrumental sections
usedFactIds:
type: array
items:
type: string
required:
- id
- kind
- label
- cues
- lines
- usedFactIds
Clip:
type: object
properties:
id:
type: string
audioUrl:
type: string
format: uri
description: 完整音频(finished 后可用)/ Full audio URL once finished
streamAudioUrl:
type:
- string
- 'null'
format: uri
imageUrl:
type:
- string
- 'null'
format: uri
sourceImageUrl:
type:
- string
- 'null'
format: uri
title:
type:
- string
- 'null'
duration:
type:
- number
- 'null'
description: 秒 / seconds
tags:
type:
- string
- 'null'
lyrics:
type:
- string
- 'null'
modelName:
type:
- string
- 'null'
stems:
oneOf:
- $ref: '#/components/schemas/ClipStems'
- type: 'null'
required:
- id
- audioUrl
description: 一首候选 / One candidate track. Each generation returns two.
Generation:
type: object
properties:
id:
type: string
status:
$ref: '#/components/schemas/GenerationStatus'
source:
$ref: '#/components/schemas/GenerationSource'
parentId:
type:
- string
- 'null'
model:
type:
- string
- 'null'
title:
type:
- string
- 'null'
inputPrompt:
type: string
spec:
oneOf:
- $ref: '#/components/schemas/GenerationSpec'
- type: 'null'
clips:
type: array
items:
$ref: '#/components/schemas/Clip'
description: finished 时通常 2 首 / Usually 2 candidates when finished
coverUrl:
type:
- string
- 'null'
format: uri
description: 正式封面 / Cover image
cover:
oneOf:
- $ref: '#/components/schemas/Cover'
- type: 'null'
errorCode:
type:
- string
- 'null'
errorMessage:
type:
- string
- 'null'
creditSource:
type:
- string
- 'null'
enum:
- monthly
- credit
- unlimited
createdAt:
type: string
format: date-time
finishedAt:
type:
- string
- 'null'
format: date-time
required:
- id
- status
- source
- parentId
- model
- title
- inputPrompt
- spec
- clips
- coverUrl
- cover
- errorCode
- errorMessage
- creditSource
- createdAt
- finishedAt
description: 一次生成任务 / A generation job. Poll until status is finished or failed.
CompositionPlan:
type: object
properties:
title:
type: string
titleAlternatives:
type: array
items:
type: string
centralIdea:
type: string
hook:
type:
- string
- 'null'
genre:
type: object
properties:
primary:
type: string
accents:
type: array
items:
type: string
required:
- primary
- accents
tempo:
type: object
properties:
feel:
type: string
bpmHint:
type:
- number
- 'null'
required:
- feel
- bpmHint
instruments:
type: array
items:
type: object
properties:
name:
type: string
role:
type: string
enum:
- lead
- rhythm
- harmony
- accent
required:
- name
- role
vocal:
type:
- object
- 'null'
properties:
gender:
type:
- string
- 'null'
enum:
- m
- f
texture:
type: string
required:
- gender
- texture
sections:
type: array
items:
$ref: '#/components/schemas/Section'
styleDraft:
type: object
properties:
identity:
type: string
mood:
type: string
rhythm:
type: string
instrumentation:
type: string
production:
type: string
required:
- identity
- mood
- rhythm
- instrumentation
- production
exclusions:
type: array
items:
type: string
explanation:
type: string
required:
- title
- titleAlternatives
- centralIdea
- hook
- genre
- tempo
- instruments
- vocal
- sections
- styleDraft
- exclusions
- explanation
description: 作曲方案 / Composition plan
VocalPreference:
type: string
enum:
- m
- f
- duet
- choir
description: 人声偏好 / Vocal preference
ErrorResponse:
type: object
properties:
success:
type: boolean
const: false
code:
type: string
description: 稳定的错误码,按它分支 / Stable machine-readable code
examples:
- LOGIN_REQUIRED
- NEED_TOPUP
- SPEC_INVALID
- COMPILE_LIMIT
- GENERATION_NOT_FOUND
- FORBIDDEN
- PROVIDER_REJECTED
- PROVIDER_TIMEOUT
- PROVIDER_UNAVAILABLE
- IDEMPOTENCY_CONFLICT
- PRO_REQUIRED
- STEMS_ONE_PER_SONG
- NOT_FINISHED
- UNSUPPORTED
- RATE_LIMIT_EXCEEDED
- INVALID_PARAMS
- INTERNAL_ERROR
error:
type: string
description: 给人看的说明(中文为主)/ Human-readable message
details:
description: 可选的附加信息,SPEC_INVALID 时是 diagnostics 数组 / Optional extra data
required:
- success
- code
- error
description: 统一错误信封 / Error envelope. All failures use this shape.
Rendered:
type: object
properties:
model:
type: string
description: 供应商模型 id / Provider model id
instrumental:
type: boolean
title:
type: string
style:
type: string
description: 英文风格标签,逗号分隔 / English style tags, comma separated
lyrics:
type:
- string
- 'null'
description: 带 [Verse]/[Chorus] 段落标记的歌词 / Lyrics with section markers
negativeTags:
type:
- string
- 'null'
vocalGender:
type:
- string
- 'null'
enum:
- m
- f
duration:
type:
- number
- 'null'
description: 秒 / seconds
required:
- model
- instrumental
- title
- style
- lyrics
- negativeTags
- vocalGender
- duration
description: 可直接提交生成的字段 / Fields ready to submit to generate_music
IntentSpec:
type: object
properties:
kind:
type: string
enum:
- song
- instrumental
sceneId:
type:
- string
- 'null'
genreRefs:
type: array
items:
type: string
lyricLanguage:
oneOf:
- $ref: '#/components/schemas/LyricLanguage'
- type: 'null'
vocalPreference:
oneOf:
- $ref: '#/components/schemas/VocalPreference'
- type: 'null'
moods:
type: array
items:
type: string
tempoFeel:
type:
- string
- 'null'
artistRefs:
type: array
items:
type: object
properties:
name:
type: string
requestedTraits:
type: array
items:
type: string
required:
- name
- requestedTraits
facts:
type: array
items:
$ref: '#/components/schemas/PersonalFact'
exclusions:
type: array
items:
type: object
properties:
term:
type: string
sourceQuote:
type: string
required:
- term
- sourceQuote
durationSeconds:
type:
- number
- 'null'
assumptions:
type: array
items:
type: string
clarification:
type:
- object
- 'null'
properties:
question:
type: string
field:
type: string
required:
- question
- field
required:
- kind
- sceneId
- genreRefs
- lyricLanguage
- vocalPreference
- moods
- tempoFeel
- artistRefs
- facts
- exclusions
- durationSeconds
- assumptions
- clarification
description: 解析出的意图 / Parsed intent
CompileRequestEcho:
type: object
properties:
userText:
type: string
uiLanguage:
$ref: '#/components/schemas/UiLanguage'
sceneId:
type:
- string
- 'null'
lyricLanguage:
oneOf:
- $ref: '#/components/schemas/LyricLanguage'
- type: 'null'
vocalPreference:
oneOf:
- $ref: '#/components/schemas/VocalPreference'
- type: 'null'
instrumental:
type:
- boolean
- 'null'
durationSeconds:
type:
- number
- 'null'
userLyrics:
oneOf:
- $ref: '#/components/schemas/UserLyrics'
- type: 'null'
clarificationAnswer:
type:
- string
- 'null'
required:
- userText
- uiLanguage
ClipStems:
type: object
properties:
mode:
type: string
enum:
- separate_vocal
- split_stem
status:
type: string
enum:
- pending
- finished
- failed
taskId:
type: string
files:
type: object
additionalProperties:
type: string
format: uri
description: 轨名 → 音频地址(vocals, instrumental, drums, bass…)/ stem name → audio URL
error:
type:
- string
- 'null'
requestedAt:
type: string
format: date-time
finishedAt:
type:
- string
- 'null'
format: date-time
required:
- mode
- status
- taskId
- files
- requestedAt
StemsRequest:
type: object
properties:
clipId:
type: string
mode:
type: string
enum:
- separate_vocal
- split_stem
default: separate_vocal
description: separate_vocal = 人声/伴奏两轨;split_stem = 12 轨(Pro)/ separate_vocal = vocals + instrumental; split_stem = 12 stems (Pro only)
required:
- clipId
Diagnostic:
type: object
properties:
code:
type: string
severity:
type: string
enum:
- error
- warning
- info
path:
type: string
message:
type: string
autoFixable:
type: boolean
required:
- code
- severity
- path
- message
- autoFixable
Cover:
type: object
properties:
status:
type: string
url:
type:
- string
- 'null'
format: uri
artworkUrl:
type:
- string
- 'null'
format: uri
styleId:
type:
- string
- 'null'
conceptId:
type:
- string
- 'null'
titleSafeZone:
type:
- string
- 'null'
latencyMs:
type:
- number
- 'null'
errorCode:
type:
- string
- 'null'
updatedAt:
type:
- string
- 'null'
required:
- status
- url
- artworkUrl
Provenance:
type: object
properties:
compilerVersion:
type: string
parserModel:
type:
- string
- 'null'
composerModel:
type:
- string
- 'null'
knowledgeIds:
type: array
items:
type: string
llmCalls:
type: number
cached:
type: boolean
required:
- compilerVersion
- parserModel
- composerModel
- knowledgeIds
- llmCalls
- cached
GenerationSpec:
type: object
properties:
schemaVersion:
type: string
const: '3.0'
id:
type: string
revision:
type: integer
parentSpecId:
type:
- string
- 'null'
status:
type: string
enum:
- ready
- needs_input
- needs_revision
description: ready 可提交;needs_input 看 question 追问;needs_revision 看 error 级 diagnostics / ready = submit; needs_input = ask `question`; needs_revision = fix error diagnostics
profileId:
type: string
request:
$ref: '#/components/schemas/CompileRequestEcho'
intent:
oneOf:
- $ref: '#/components/schemas/IntentSpec'
- type: 'null'
composition:
oneOf:
- $ref: '#/components/schemas/CompositionPlan'
- type: 'null'
rendered:
oneOf:
- $ref: '#/components/schemas/Rendered'
- type: 'null'
diagnostics:
type: array
items:
$ref: '#/components/schemas/Diagnostic'
question:
type:
- object
- 'null'
properties:
question:
type: string
field:
type: string
required:
- question
- field
explanation:
type: string
description: 给用户看的解释 / Explanation for the end user
provenance:
$ref: '#/components/schemas/Provenance'
required:
- schemaVersion
- id
- revision
- parentSpecId
- status
- profileId
- request
- intent
- composition
- rendered
- diagnostics
- question
- explanation
- provenance
description: 编译结果(GenerationSpec v3)。原样回传给 POST /v1/generations 即可生成 / Compiled spec; pass it back unchanged to generate.
GenerationSource:
type: string
enum:
- web
- api
- revise
- replace
- agent
- legacy
LyricLanguage:
type: string
enum:
- zh
- yue
- en
- ja
description: 歌词语言 / Lyric language (yue = Cantonese)
GenerationResponse:
type: object
properties:
success:
type: boolean
const: true
generation:
$ref: '#/components/schemas/Generation'
required:
- success
- generation
GenerationStatus:
type: string
enum:
- queued
- submitted
- generating
- finished
- failed
description: queued → submitted → generating → finished | failed
ReplaceSectionRequest:
type: object
properties:
clipId:
type: string
description: 要改的候选 / Which clip to edit
startS:
type: number
minimum: 0
description: 起点(秒)/ Start, seconds
endS:
type: number
minimum: 0
description: 终点(秒)。区间 ≥10 秒且 ≤ 原曲一半 / End, seconds. Range must be ≥10 s and ≤ half the song
sectionLyrics:
type: string
maxLength: 3000
default: ''
description: 这一段的新歌词;纯音乐留空 / New lyrics for the section; empty for instrumental
fullLyrics:
type:
- string
- 'null'
maxLength: 10000
description: 替换后的完整歌词 / Full lyrics after the change
style:
type:
- string
- 'null'
maxLength: 1000
required:
- clipId
- startS
- endS
PersonalFact:
type: object
properties:
id:
type: string
kind:
type: string
enum:
- person
- relationship
- date
- place
- memory
- phrase
- trait
value:
type: string
sourceQuote:
type: string
inclusion:
type: string
enum:
- required
- optional
preservation:
type: string
enum:
- exact
- semantic
preferredSection:
type: string
enum:
- chorus
- verse
- bridge
- any
required:
- id
- kind
- value
- sourceQuote
- inclusion
- preservation
- preferredSection
UserLyrics:
type: object
properties:
text:
type: string
maxLength: 10000
description: 用户自带歌词 / User-supplied lyrics
action:
type: string
enum:
- preserve
- edit
description: preserve 一字不改;edit 允许润色 / preserve = keep verbatim, edit = may polish
required:
- text
- action
securitySchemes:
ApiKeyBearer:
type: http
scheme: bearer
bearerFormat: ty_live_…
description: '开发者 API Key,以 `ty_live_` 开头,在 https://www.musicsforyou.com/developers 创建。请求头 `Authorization: Bearer ty_live_…`。
API keys start with `ty_live_`; create one at https://www.musicsforyou.com/developers. Send as `Authorization: Bearer ty_live_…`.'
OAuth2:
type: oauth2
description: 给 ChatGPT / claude.ai 等连接器用的授权码流程 / Authorization-code flow for connector platforms.
flows:
authorizationCode:
authorizationUrl: https://www.musicsforyou.com/oauth/authorize
tokenUrl: https://api.musicsforyou.com/oauth/token
scopes:
music: 编译、生成、查询作品与额度 / Compile, generate, read tracks and credits
x-taoyuan:
mcp:
url: https://api.musicsforyou.com/mcp
transport: streamable-http
auth: 'Authorization: Bearer ty_live_…'
llmsTxt: https://www.musicsforyou.com/llms.txt
developers: https://www.musicsforyou.com/developers
openapi:
v31: https://api.musicsforyou.com/openapi.json
v30: https://api.musicsforyou.com/openapi-coze.json
credits:
generate_music: 1
create_song: 1
replace_section: 1
compile_music_prompt: 0
revise_generation_prompt: 0
get_generation: 0
list_tracks: 0
list_presets: 0
get_credit_balance: 0
separate_stems: 2-track free once per song for non-members, unlimited for members; 12-stem Pro only; no credits
rateLimits:
generate: 5 / minute / IP
compile: 30 / hour / account; guests 5 / day / IP
packs:
- id: api-100
currency: CNY
price: 300
credits: 100
- id: api-10-usd
currency: USD
price: 9.9
credits: 10
- id: api-50-usd
currency: USD
price: 39
credits: 50
agentNotes:
- Show the user the compiled title, lyrics and style before spending a credit.
- Poll get_generation every 5–10 s; a song usually takes 1–3 minutes. Or use POST /v1/songs with waitSeconds.
- Always pass idempotencyKey when retrying generate_music.
- Songs made through the API may be used commercially by the key owner.