Skip to main content
POST
Quoting is free. The price is per new target language: adding a language to an existing project charges only for the language being added.
string
required
API key for authentication.

Path

string
required
The project identifier. The source must already be ready.

Body

number
Optional. If present and different from the current version, the request is rejected with 47109.
array
required
The languages to price. Must not be empty.

Response

string | null
Pass this to the generation endpoint. null when state is ALL_TARGETS_EXIST.
string
Project identifier.
number
Draft version the quote was based on.
string
Source duration, as a string.
string
The plan the rate came from.
string
Rate version label.
number
The rate applied, per language.
string | null
Characters per new language, as a string.
array
The languages you asked for.
array
Languages that already exist for this source: { language, characters, targetId, state, action }.
array
Languages that will be created and charged.
array
The languages a submission would create and reserve now. This field is the same content as newTargets, kept under its pre-decision name — it is not a union of existingTargets and newTargets, and it excludes languages the project already carries.
string
Total charge, as a string. "0" for ALL_TARGETS_EXIST.
string | null
Available balance, as a string.
string | null
Projected balance, as a string.
string | null
AVAILABLE or LEDGER_UNAVAILABLE for this response, or null. It describes the balance fields of this response only; a LEDGER_UNAVAILABLE value means availableCharacters and estimatedRemainingCharacters are null rather than guessed.
string
ACTIVE, ALL_TARGETS_EXIST or CHANGED.
string | null
When the quote expires (time to live quoteTtlSeconds, normally 600 seconds).
ALL_TARGETS_EXIST is a successful quote, not an error. quoteId is null and totalCharacters is "0" — read existingTargets and never call the generation endpoint with a null quoteId. All Characters values are JSON strings; convert them before comparing.

Common errors

  • code = 47101: targetLanguages is missing or empty.
  • code = 47109: the quote is no longer valid for this settings version, or the version changed.
  • code = 47108: the quote has expired.
  • code = 47103: the source is not ready yet.
  • code = 47119: an ENTERPRISE account has no configured contract rate.
  • code = 47128: the plan is not entitled to generate.
  • code = 47102: the project does not exist or is not owned by your account.