桃源 Account API

额度与用量 / Credits and usage

GitHub OpenAPI

Operations 2

GET /v1/me/credits 可用额度(免费)/ Credit balance (free) #
GET /v1/me/usage 近 30 天用量(免费)/ Last 30 days usage (free) #

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.
All 92 tools →

Call it yourself

curl for this page
This API
curl "https://apis.io/api/v1/apis/musicsforyou-com:musicsforyou-com-account-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

musicsforyou-com-account-api-openapi.yml Raw ↑
openapi: 3.2.0
info:
  title: Taoyuan Music Account 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: Account
  description: 额度与用量 / Credits and usage
paths:
  /v1/me/credits:
    get:
      operationId: get_credit_balance
      tags:
      - Account
      summary: 可用额度(免费)/ Credit balance (free)
      description: 'API / MCP 生成只消耗 `extraCredits`(预付额度)。购买:https://www.musicsforyou.com/developers


        API and MCP generations draw from `extraCredits` only. Buy more at https://www.musicsforyou.com/developers.'
      security:
      - ApiKeyBearer: []
      - OAuth2:
        - music
      - {}
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CreditsResponse'
      x-credit-cost: 0
      x-mcp-tool: get_credit_balance
  /v1/me/usage:
    get:
      operationId: get_usage
      tags:
      - Account
      summary: 近 30 天用量(免费)/ Last 30 days usage (free)
      security:
      - ApiKeyBearer: []
      - OAuth2:
        - music
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/UsageResponse'
        '401':
          description: 未登录或 Key 无效 / Not authenticated(LOGIN_REQUIRED、INVALID_API_KEY)
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
      x-credit-cost: 0
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.
    UsageResponse:
      type: object
      properties:
        success:
          type: boolean
          const: true
        since:
          type: string
          format: date-time
        bySource:
          type: object
          additionalProperties:
            type: integer
          description: 近 30 天按来源计数:web / api / agent / revise / replace
        apiCount30d:
          type: integer
        totalCount30d:
          type: integer
        extraCredits:
          type: integer
        plan:
          type: string
      required:
      - success
      - since
      - bySource
      - apiCount30d
      - totalCount30d
      - extraCredits
      - plan
    CreditsResponse:
      type: object
      properties:
        success:
          type: boolean
          const: true
        plan:
          type: string
          enum:
          - guest
          - free
          - pro
          - vip
          - admin
        remaining:
          type: integer
          description: 当前可用生成次数(API 只能用 extraCredits)/ Generations available; API calls draw from extraCredits only
        monthlyCount:
          type: integer
        monthlyLimit:
          type:
          - integer
          - 'null'
        extraCredits:
          type: integer
          description: 预付额度 / Prepaid credits usable by API and MCP
        planExpiresAt:
          type:
          - string
          - 'null'
          format: date-time
        todayCount:
          type: integer
        totalCount:
          type: integer
        trial:
          type:
          - object
          - 'null'
          properties:
            credits:
              type: integer
            grantedAt:
              type: string
              format: date-time
        requiresLogin:
          type: boolean
      required:
      - success
      - plan
      - remaining
      - extraCredits
      - requiresLogin
  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.