No free generations. Log in to buy One Song for ¥19.9 or start a Pro year for ¥399.Login / Sign Up

    API · MCP · OpenAPI

    Developers

    Plug Taoyuan into your agent, script or product: one sentence, about three minutes, a finished song. REST, MCP and OpenAPI, one pool of credits.

    What an agent can do with Taoyuan

    Taoyuan writes a song for one person. Hand it the user's sentence, get the title, lyrics and style first (free), then generate two full versions in about three minutes.

    A song for one person

    Birthdays, weddings, confessions, anniversaries. Lyrics only use what the user said.

    Two versions in ~3 minutes

    Every generation returns two complete candidates with audio, lyrics and cover art.

    Several languages

    Lyrics in Chinese, Cantonese, English or Japanese; instrumental-only works too.

    Edit a section, split stems

    Redo just the 30-second chorus; separate vocals and instrumental, or split into 12 stems.

    Three steps
    1. 1
      compile
      free

      One sentence → title, lyrics, style tags. Show it to the user; revise if needed.

    2. 2
      generate
      1 credit

      Submit the spec; get a generation id right away.

    3. 3
      poll
      free

      Poll until finished and read both audioUrls. Or use POST /v1/songs to do it all in one call.

    Quick start

    Pick your platform. Every option uses the same key: replace ty_live_… with yours.

    No key yet? Create one under "API keys" below. New keys come with 3 free generations.

    One line in the terminal. Then say "write a birthday song for my mom" and Claude will compile first, then generate.

    claude mcp add --transport http taoyuan https://api.musicsforyou.com/mcp --header "Authorization: Bearer ty_live_..."
    bash

    Tools and endpoints

    MCP tool names match the OpenAPI operationIds. Full schemas are in the OpenAPI document.

    NameCostPurposeREST
    compile_music_prompt
    free
    Sentence → spec (title, style, lyrics, duration). If status=needs_input, call again with clarificationAnswerPOST /v1/prompts/compile
    revise_generation_prompt
    free
    Apply a one-line change to a specPOST /v1/prompts/revise
    generate_music
    1 credit
    Submit spec or rendered fields; returns a generation id; two candidatesPOST /v1/generations
    create_song
    1 credit
    One shot: compile + generate + wait, up to 180 sPOST /v1/songs
    get_generation
    free
    Poll status; clips[].audioUrl when finished. Supports waitSeconds long-pollingGET /v1/generations/{id}
    replace_section
    1 credit
    Redo only [startS, endS]; at least 10 s, at most half the songPOST /v1/generations/{id}/replace-section
    separate_stems
    see note
    Vocals/instrumental: free once per song, unlimited for members; 12 stems: Pro. No credits either wayPOST /v1/tracks/{id}/stems
    list_tracks
    free
    Your songs, pagedGET /v1/tracks
    list_presets
    free
    Scene / genre idsGET /v1/presets
    get_credit_balance
    free
    Available credits and purchase linkGET /v1/me/credits

    Every error is { success: false, code, error }. Branch on code: NEED_TOPUP means no credits; SPEC_INVALID carries diagnostics in details.

    API keys

    Keys start with ty_live_ and are shown in full only once. Up to 10 per account. New keys come with 3 free generations.

    Credits and purchase

    API and MCP generations use prepaid credits only, never the Pro monthly allowance. 1 credit = one song (two candidates). Failed generations are refunded.

    API credits
    Available
    —
    Last 30 days
    API / MCP
    —
    Website
    —
    Chat assistant
    —
    Total
    —
    Packs
    Cards, WeChat Pay and Alipay for CNY packs; international cards for USD packs.

    Rules

    Rate limits

    Per key: 5 generations or section replacements per minute; 30 compiles or revisions per hour. Over the limit you get 429; retry a little later.

    Content

    Do not submit lyrics or works you do not have rights to. Prohibited content is screened and rejected without charge.

    Commercial use

    Songs generated through the API may be used commercially by the key owner.

    Support

    Questions or suggestions: [email protected]. We reply.