Saltar al contenido
Lumean

Descripciones en inglés

La interfaz de la sección está traducida a su idioma, pero las descripciones de operaciones, esquemas y errores solo existen en ruso y en inglés: aquí se muestra la versión en inglés.
GET/orders/{order}/dub/quote

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 them tokens_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 is currency_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 (reason is 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 explicit voice_id/model_id (the template snapshot of the source order or the chosen template_id; voice_id: null means 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.

Parámetros

Los valores se escriben directamente en la línea de la solicitud y la URL se arma sola. Abajo están el tipo, la obligatoriedad y los valores permitidos de cada parámetro.

GEThttps://api.lumean.app/api/public/orders//dub/quote
  • stringen la rutaobligatorio

    Order UUID — 36 characters shaped like 9f8b2c1a-4d3e-4f5a-8b9c-0d1e2f3a4b5c, not a number.

    Take it from the id field: POST /orders returns it on creation and GET /orders lists it. Someone else’s order will not open with your key — you get a 404.

    El valor va directamente a la línea de solicitud de arriba.

  • stringen la consultaopcional≤ 16 caracteres

    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.

  • array<string>en la consultaobligatorio

    Quote for a batch of languages (target_languages[]=en&target_languages[]=de): the total for all languages (the subscription quota is spent by the first languages, the rest of each is PAYG) and the per_language breakdown. At most max_languages_per_request from the options, no repeats; together with target_language gives 422.

  • stringen la consultaopcional≤ 64 caracteres

    The dub voice. Optional: the price does not depend on the voice; without it defaults.voice_id holds the voice the dub will use.

  • stringen la consultaopcional≤ 64 caracteres

    The dub model from the options' models. Optional.

  • stringen la consultaopcional≤ 64 caracteres

    Your template of the same service as the source: defaults show its voice and model. Someone else's template or a template of another service gives 422.

  • stringen la consultaopcional≤ 120 caracteres

    Name of the future order; does not affect the price.

Respuestas posibles

200

The quote.

Ejemplo de cuerpo
{
  "success": true,
  "message": "string",
  "data": "string"
}
Campos de la respuesta
successobligatorio

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.

boolean
messageobligatorio

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.

string
dataobligatorio

The response payload.

string
401

The key is missing, unknown, disabled or expired.

Analizar esta respuesta
Ejemplo de cuerpo
{
  "success": false,
  "message": "API key is missing. Provide it in the X-API-KEY header.",
  "data": null
}
Campos de la respuesta
successobligatorio

Always false in error responses.

boolean
messageobligatorio

Error text in the key's language (set through the X-Locale header).

string
dataobligatorio

Always null when the request is rejected before processing.

admite null
null
403

The key lacks the required permission, or the object belongs to another user.

Analizar esta respuesta
Ejemplo de cuerpo
{
  "success": false,
  "message": "This API key does not have permission to perform this action."
}
Campos de la respuesta
successobligatorio

Always false in error responses.

boolean
messageobligatorio

Error text in the key's language (set through the X-Locale header).

string
404

The order is not found or does not belong to the key owner.

Analizar esta respuesta
Ejemplo de cuerpo
{
  "success": false,
  "message": "Resource not found."
}
Campos de la respuesta
messageobligatorio

Error overview.

string
422

The same source refusals as dub creation: reason dub_source_unavailable, dub_source_too_long, dub_same_language, service_not_found; field validation errors.

Analizar esta respuesta
Ejemplo de cuerpo
{
  "message": "string",
  "errors": {
    "key": [
      "string"
    ]
  }
}
Campos de la respuesta
messageobligatorio

A summary of the validation errors in words, in the response language (X-Locale).

string
errorsobligatorio

A per-field breakdown: the key names a request field, the value lists the complaints about it.

object
*opcional
claves arbitrarias
array<string>
429

More than 60 quotes per minute per key.

Analizar esta respuesta
Ejemplo de cuerpo
{
  "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
}
Campos de la respuesta
successobligatorio

Always false in error responses.

boolean
messageobligatorio

Error text in the key's language (set through the X-Locale header).

string
reasonobligatorio

Machine-readable failure reason — branch on this, not on the message text.

string
error_codeobligatorio

The same machine-readable code as in reason — a second name for the field. The values always match; branch on either.

string
retry_afteropcional

How many seconds to wait before retrying (the same value is in the Retry-After header).

admite null
integer
503

Dubbing of this kind is temporarily not accepted.

Ejemplo de cuerpo
{
  "success": false,
  "message": "Service temporarily unavailable."
}
Campos de la respuesta
successobligatorio

Always false in error responses.

boolean
messageobligatorio

Error text in the key's language (set through the X-Locale header).

string

Eventos que genera

El progreso llega por WebSocket: no hace falta sondear el pedido en bucle. Para suscribirse se necesita el mismo permiso que para leer pedidos.

Esta página para IA

Abrir .mdllm.md

versión de la API 1.0.0