Açıklamalar İngilizce
Dub quote
The price of dubbing a finished order BEFORE creating it — nothing is charged and the
key's token pool is not spent. The parameters are the same as for
POST /orders/{order}/dub, all optional: the price depends only on the source characters.
source_chars— source characters (the paid length of its latest chunk versions);tokens— tokens to be charged, of themtokens_from_quota— from the subscription quota,tokens_from_payg— beyond it (PAYG),lmc_cost_minor— the PAYG top-up in LMC minor units (the unit iscurrency_asset);price_lumc_minor— the full dub price in LMC minor units, even when the quota pays;allowed/reason— whether the order would go through right now (reasonis the same code creation would return:insufficient_balance,token_quota_exceeded— the key's token quota is short, and so on);defaults— the voice and model the dub uses without an explicitvoice_id/model_id(the template snapshot of the source order or the chosentemplate_id;voice_id: nullmeans the default voice is no longer available — pass your own);source_template— the source order's template,templates— your templates of the same service to take a voice from (template_id).
The figures match the actual charge unless the quota or balance changes between the quote and the order. Limit — 60 quotes per minute per key.
Required key permission: orders.read.
Parametreler
Değerler doğrudan istek satırına yazılır ve URL kendiliğinden oluşur. Aşağıda her parametrenin türü, zorunlu olup olmadığı ve izin verilen değerleri var.
- stringyoldazorunlu
Order UUID — 36 characters shaped like
9f8b2c1a-4d3e-4f5a-8b9c-0d1e2f3a4b5c, not a number.Take it from the
idfield:POST /ordersreturns it on creation andGET /orderslists it. Someone else’s order will not open with your key — you get a404.Değer doğrudan yukarıdaki istek satırına yerleşir.
- stringsorgudaisteğe bağlı≤ 16 karakter
The dub language from the options'
languages(GET /orders/dubbing/options). Optional: the price does not depend on the language; when passed, the quote checks in advance that it is allowed and differs from the source language. - stringsorgudaisteğe bağlı≤ 64 karakter
The dub voice. Optional: the price does not depend on the voice; without it
defaults.voice_idholds the voice the dub will use. - stringsorgudaisteğe bağlı≤ 64 karakter
The dub model from the options'
models. Optional. - stringsorgudaisteğe bağlı≤ 64 karakter
Your template of the same service as the source:
defaultsshow its voice and model. Someone else's template or a template of another service gives422. - stringsorgudaisteğe bağlı≤ 120 karakter
Name of the future order; does not affect the price.
Olası yanıtlar
200The quote.
The quote.
{
"success": true,
"message": "string",
"data": {
"source_order_id": "string",
"source_language": "string",
"target_language": "string",
"source_chars": 1,
"tokens": 1,
"tokens_from_quota": 1,
"tokens_from_payg": 1,
"lmc_cost_minor": 1,
"lmc_cost_formatted": 1,
"price_lumc_minor": 1,
"price_lumc_formatted": 1,
"currency_asset": {
"code": "string",
"precision": 1
},
"defaults": {
"template_id": "string",
"voice_id": null,
"model_id": "string"
},
"source_template": {
"id": "string",
"name": "string"
},
"templates": [
{
"id": "string",
"name": "string",
"voice_id": "string",
"model_id": "string"
}
],
"allowed": true,
"reason": "string"
}
}Success flag. Branch on the HTTP status code instead: any 2xx response carries true here, while an error comes back in a different shape that need not contain this field at all.
A human-readable note in the account language. Fine to show to a user; do not parse it — the wording changes without notice and is not an error code.
datazorunluThe response payload.
object
The response payload.
The source order.
The source language (auto — unknown; a match with the dub language is then caught by the worker and refunded).
The dub language from the request, or null.
Source characters — the paid length of its latest chunk versions. The price is based on them.
Tokens to be charged for the dub.
How many tokens come from the subscription quota.
How many tokens beyond the quota the balance pays (PAYG).
The PAYG top-up in LMC minor units (real = value / 10^currency_asset.precision). 0 — the quota covers it all.
lmc_cost_minor in whole LMC.
The full dub price in LMC minor units — even when the quota pays. For showing the price in the user's currency.
price_lumc_minor in whole LMC.
currency_assetzorunluThe unit of the *_minor amounts — LMC. Use precision to convert minor units into whole LMC.
object
The unit of the *_minor amounts — LMC. Use precision to convert minor units into whole LMC.
Asset code of the amounts.
LMC decimals: real = value / 10^precision.
defaultszorunluWhat the dub uses without explicit voice_id/model_id.
object
What the dub uses without explicit voice_id/model_id.
The template whose settings are used (the request template_id); null — the source order's template snapshot.
The default dub voice. null — the voice is no longer available (removed from the catalog, clone deleted): pass voice_id.
The default dub model.
source_templatezorunluThe source order's template (null — the order has no template).
null olabilirobject
The source order's template (null — the order has no template).
Template id.
Template name.
templateszorunluYour templates of the same service as the source — candidates for template_id. Newest first, up to 100.
array<object>
Your templates of the same service as the source — candidates for template_id. Newest first, up to 100.
Template id — the value for template_id.
Template name.
The template voice.
The template model.
true — an order with these parameters would go through right now (quota and balance suffice).
Why it would not go through (allowed: false): the same code creation would return, e.g. insufficient_balance or token_quota_exceeded (the key's token quota is short).
401The key is missing, unknown, disabled or expired.
The key is missing, unknown, disabled or expired.
{
"success": false,
"message": "API key is missing. Provide it in the X-API-KEY header.",
"data": null
}Always false in error responses.
Error text in the key's language (set through the X-Locale header).
Always null when the request is rejected before processing.
403The key lacks the required permission, or the object belongs to another user.
The key lacks the required permission, or the object belongs to another user.
{
"success": false,
"message": "This API key does not have permission to perform this action."
}Always false in error responses.
Error text in the key's language (set through the X-Locale header).
404The order is not found or does not belong to the key owner.
The order is not found or does not belong to the key owner.
{
"success": false,
"message": "Resource not found."
}Error overview.
422The same source refusals as dub creation: reason dub_source_unavailable, dub_source_too_long, dub_same_language, service_not_found; field validation errors.
The same source refusals as dub creation: reason dub_source_unavailable, dub_source_too_long, dub_same_language, service_not_found; field validation errors.
{
"message": "string",
"errors": {
"key": [
"string"
]
}
}A summary of the validation errors in words, in the response language (X-Locale).
errorszorunluA per-field breakdown: the key names a request field, the value lists the complaints about it.
object
A per-field breakdown: the key names a request field, the value lists the complaints about it.
429More than 60 quotes per minute per key.
More than 60 quotes per minute per key.
{
"success": false,
"message": "Too many attempts. Please wait a moment and try again.",
"reason": "rate_limit_exceeded",
"error_code": "rate_limit_exceeded",
"retry_after": 30
}Always false in error responses.
Error text in the key's language (set through the X-Locale header).
Machine-readable failure reason — branch on this, not on the message text.
The same machine-readable code as in reason — a second name for the field. The values always match; branch on either.
How many seconds to wait before retrying (the same value is in the Retry-After header).
503Dubbing of this kind is temporarily not accepted.
Dubbing of this kind is temporarily not accepted.
{
"success": false,
"message": "Service temporarily unavailable."
}Always false in error responses.
Error text in the key's language (set through the X-Locale header).
Bunun ürettiği olaylar
İlerleme WebSocket üzerinden gelir: siparişi döngüde yoklamak gerekmez. Abonelik, siparişleri okumakla aynı izni gerektirir.
İlgili içerik
Düz anlatımla
Komşu işlemler
Daha fazla
Yapay zekâ için bu sayfa
API sürümü 1.0.0