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-billing-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 Billing 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: Billing
description: 额度购买 / Buying credits
paths:
/api/billing/api-pack/checkout:
post:
operationId: get_purchase_link
tags:
- Billing
summary: 获取 API 额度包付款链接 / Get a checkout link for an API credit pack
description: '余额不足时调用:返回一个 Stripe 付款页链接,用户在浏览器付款后额度自动到账(通常 1 分钟内)。packId:api-10-usd(US$9.9 / 10 次)、api-50-usd(US$39 / 50 次)、api-100(¥300 / 100 次)。
Call when credits run out. Returns a Stripe Checkout URL; after the user pays in a browser the credits are added automatically (usually within a minute).'
security:
- ApiKeyBearer: []
- OAuth2:
- music
requestBody:
required: true
content:
application/json:
schema:
type: object
required:
- packId
properties:
packId:
type: string
enum:
- api-10-usd
- api-50-usd
- api-100
responses:
'200':
description: 付款链接 / Checkout link
content:
application/json:
schema:
type: object
properties:
success:
type: boolean
url:
type: string
format: uri
orderId:
type: string
packId:
type: string
credits:
type: integer
amount:
type: integer
description: 最小货币单位(分 / 美分)
currency:
type: string
enum:
- cny
- usd
'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'
x-credit-cost: 0
x-mcp-tool: get_purchase_link
components:
schemas:
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.
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.