Text-to-Music and Interpretation consume Characters. Nothing is charged by a read call: the cost is always quoted first, then reserved when you accept the quote. Quotes are free.
Always quote, never estimate
Both products expose acapabilities endpoint and a quotes endpoint. Read the rate from capabilities and the exact amount from quotes.
POST /sound_clone/api/v1/music/projects/{projectId}/quotesPOST /sound_clone/api/v1/interpretation/projects/{projectId}/quotes
The formulas
Text-to-Music
durationSec is the project’s selected duration (60, 90, 120 or 180). The rate is the account’s ratePerMinute from capabilities.
Interpretation
account.charactersPerMinutePerLanguage for the account’s plan, and durationMs is the detected duration of the frozen source. Charging is per new target language: adding a language to an existing project only charges for the language being added, not for the ones that already exist.
Plan rates
These are the current plan rates published by the service. Always prefer the value returned for the specific account. Text-to-Music —ratePerMinute
Interpretation —
charactersPerMinutePerLanguage
Worked examples
Text-to-Music, PRO plan, 90-second songReading the numbers safely
Request bodies are different: send numbers as JSON numbers (durationSec: 90, size: 18432611, expectedVersion: 1). Do not send strings just because responses use strings.
The quote response
A quote tells you the price and whether the account can afford it:
Music answers the same questions with
affordable, shortfall, remainingAfterGeneration and balances, plus ratePerMinute, rateVersion and quotedCharacters.
The balance fields are per response and per product, so do not apply one product’s wording to the other:
- Interpretation exposes
balanceState, which isAVAILABLEorLEDGER_UNAVAILABLE, plusavailableCharactersandestimatedRemainingCharacters. When the shared ledger read is unavailable, the two amounts arenullandbalanceStateisLEDGER_UNAVAILABLE— a state, not a zero and not a guess. - Text-to-Music exposes
balances(which may itself benullwhen the balance cannot be read) and has nobalanceStatefield at all. account.accessStateis a different question again: for Interpretation it is one ofENABLED,FREE_LOCKED,ENTERPRISE_UNRESOLVED,SYNCINGorUNRESOLVED; for Text-to-Music it isENABLEDorDISABLED.
Quote lifetime and invalidation
- A quote lives for
quoteTtlSeconds— normally 600 seconds (10 minutes). - Using an expired quote fails: Music
47006, Interpretation47108. - Changing the inputs invalidates the quote. For Music that includes editing or regenerating the arrangement; an invalidated quote later fails with
47007.
ALL_TARGETS_EXIST (Interpretation)
If every requested language already exists for the frozen source, the quote returns:
existingTargets and use the targets that already exist. Never call the generation endpoint with a null quoteId.
Reservation, settlement and release
Charging is a three-phase lifecycle managed by the shared Characters ledger:- Quote — free. It only prices the work.
- Reserve — when you accept the quote, the amount is reserved for that operation. In Music you receive
reservedCharactersand one job; in Interpretation each target language gets its own reservation and its ownreservationCycle. - Settle or release — after the real outcome, the reservation is settled (the Characters are consumed) or released (the Characters go back).
- Each Interpretation target language settles or is released independently. One language may settle while another is released — that is the
PARTIAL_READYcase, and it is not a billing error. - Interpretation’s
billingStateisSETTLED,RESERVED,RELEASEDorUNPRICED, derived from the reservation and the target state. - A generation is settled at most once per target; retries run against the server’s plan and never double-charge.
Not enough Characters
When the balance does not cover the quote:affordableisfalseandshortfalltells you how much is missing.- Accepting the quote anyway fails with Music
47005or Interpretation47110.
Testing without spending real Characters
There is no “test mode” endpoint. The examples in this repository are written so they can run against a local deterministic stub server that replies with the documented response shapes, which is how they are validated without consuming real Characters or calling a real provider. PointMYVOCAL_API_BASE_URL at your stub to do the same.
