API docsAPI reference

LTX-2.5 Pro · Quote

Choose API quotes or frontend quotes: the API returns costs for currently available providers; frontend quotes read prices and billing fields from models and recalculate locally when inputs change.

POST/api/v1/quotePublic · No API key
ltx-2.5-proVideo · LightricksModel details & pricing

Endpoints for this model

Select a provider to see its effective parameter limits. Automatic routing chooses a provider that supports your input. Examples include defaults and required inputs; replace example media URLs with accessible files.

API quotes

Call POST /api/v1/quote with Content-Type: application/json. No API key is required and no credits are charged. This endpoint supports video, image and audio generation. Chat costs use token counts, as described under frontend quotes.

Required body fields: model (model slug) and input (generation parameters). Supply prompt, duration, resolution, num_images and other fields declared by the model, using the same parameters as generation creation. Optional provider pins a channel; optional project is a project ID used to resolve custom model names. Without provider, the endpoint quotes automatic routing candidates.

The providers array contains provider, unit, quantity, price_usd, original_price_usd and credits, in server routing order; its first entry is the automatic route’s first choice. unavailable lists rejected providers and reasons; handle the returned error if the request fails or no provider is available. For metered audio, the quote is a reservation; final charges use actual usage.

Frontend quotes

Read prices: request GET /api/v1/models, optionally filtering by type. In the standard catalog, select a model by slug from data, then a channel from providers, and read that channel’s prices, params and billing. For GET /api/v1/models?project=PROJECT_ID, read these fields directly from the selected model in data. Reads are public and require no API key; project catalogs enforce their configured domain restrictions for cross-origin access.

Price fields

FieldMeaning and use
prices[].unitBilling unit: request, second, image, kchar (1,000 characters), or input_token / output_token (one million tokens).
prices[].priceMicrosUnit price in micro-USD. 1,000,000 micro-USD = 1 USD; token prices cover one million tokens.
prices[].conditionsConditions such as resolution or mode. For tokens, min_input_tokens is the input-length threshold, defaulting to 0.
paramsSupported inputs for the selected provider. Use type, required, default, options and min/max to validate inputs and apply defaults.
billing.modelParamsModel-level parameter definitions, used to validate user input first.
billing.upstreamParamsOptional. When present, these definitions determine the final validated input and defaults.
billing.characterBillingOptional character settings: fields to count, block size for rounding up, and minimum billable characters.
billing.meteringOptional audio usage settings: outputTokenHold reserves output tokens; providerCost=true means final cost must be reported by the provider.
billing.creditsPerUsdCredits per dollar. When null, do not calculate gateway credits. Do not multiply prices[].credits by quantity.
billing.priceScopegateway means gateway prices; project means resale prices with the project ratio already applied.
billing.versionThe current calculation contract is version 1. Stop quoting and refresh the catalog for an unsupported version.
billing.unavailableReasonA nonempty value means this configuration cannot be quoted. Show the reason rather than a free price.
prices[].originalMicrosOptional list price for display only; it does not determine the amount charged.
fromMicrosStarting unit price in the model list, not a request total. Use the selected provider’s prices for a quote.
maxMicrosHighest unit price in the model list (unit in maxUnit), not a request total. Use the selected provider’s prices for a quote.

Before calculating: prepare inputs and select a price

Prepare input: billing.version=1 is the current calculation contract; a nonempty billing.unavailableReason prevents quoting. Validate model input against billing.modelParams, then validate and apply defaults using the channel’s params types, required, default, options and min/max constraints. If billing.upstreamParams exists, its validated input and defaults are final. Ignore a field unsupported by the channel or upstream only when its value equals the model default; otherwise reject it. Derive mode as image or text from whether image/images fields in the final parameter definitions have a value; do not trust a user-supplied mode.

For request, second, image and character billing, match every prices[].conditions entry against the final input, comparing values as strings. Choose the matching rule with the most conditions; keep response order for ties. For tokens, use the input-length tiers below.

Per request (request)

Quantity is 1 per request. Total micro-USD = round(priceMicros × 1), independent of duration or image count. Example: a unit price of 20,000 micro-USD costs $0.02 per request.

Per second (second)

Use input.duration after applying defaults, with a minimum of 1. If neither the input nor the model provides a value, use 1. Total micro-USD = round(priceMicros × seconds). Example: 50,000 micro-USD per second for 8 seconds costs $0.40. Duration must still satisfy the model’s constraints.

Per image (image)

Use input.num_images after applying defaults, with a minimum of 1. If neither the input nor the model provides a value, use 1. Total micro-USD = round(priceMicros × image count). Example: 30,000 micro-USD per image for 4 images costs $0.12. The count must still satisfy the model’s constraints.

Per character count (kchar)

The unit price covers 1,000 characters. By default, count input.prompt using JavaScript string length, not bytes; some emoji count as 2. With billing.characterBilling, sum the string lengths of fields, round up to a multiple of block when configured, then apply minimum. The final count is at least 1 character.

Quantity = billable characters / 1,000; total micro-USD = round(priceMicros × quantity). Example: 1,200 characters with block=1,000 and minimum=1,000 bills 2,000 characters. At 100,000 micro-USD per thousand, the total is $0.20. Without block, do not round up to whole thousands.

Per token (input_token / output_token)

Input and output have separate prices, each per 1,000,000 tokens. For each unit, choose the highest min_input_tokens threshold reached by the input token count; an omitted threshold is 0, and ties keep response order. The output price tier also depends on the input count.

Total micro-USD = ceil(input price × input tokens / 1,000,000 + output price × output tokens / 1,000,000). Add both costs before rounding up. Example: input price 1,000,000 and output price 2,000,000 micro-USD, with 1,000 input and 500 output tokens, costs $0.002. Token counts are not character counts; unknown output usage is only an estimate.

Audio reservation: when billing.metering exists, estimate input tokens as the UTF-8 byte length of prompt concatenated with style_instructions plus 256, and use outputTokenHold for output tokens. Apply the token formula to reserve funds. Final settlement uses actual usage; providerCost=true requires the provider’s cost report.

Convert totals to dollars and credits

Above, round means rounding to integer micro-USD with Math.round; ceil means rounding up with Math.ceil. Dollars = total micro-USD / 1,000,000. When billing.creditsPerUsd is non-null, credits = max(1, ceil(dollars × creditsPerUsd - 1e-9)). The minimum is 1 credit; subtracting 1e-9 avoids extra credits from floating-point error. Example: $0.40 at 250 credits per dollar is 100 credits.

Project prices and estimate validity

Project prices: billing.priceScope=project means unit prices already include the resale ratio; do not apply it again. billing.creditsPerUsd=null, so these prices cannot determine gateway credits. POST /quote returns gateway prices and credits even with project supplied; it excludes project resale markup.

Consistency: these rules match backend calculations for the same price configuration, pinned provider and input. Catalogs are cached for 60 seconds; refresh after price changes. Frontend estimates do not lock prices. Routing also considers availability, priority and circuit breakers, so a local minimum is not a guaranteed charge. Invalid input, unsupported versions or missing prices must show an unavailable quote, not a free price.

Input parameters

JSON body
model
stringRequired

Model slug from the catalog. Project keys may use a project-specific model slug.

Allowed values:"ltx-2.5-pro"
input
objectRequired

Model-specific input object. See the selected model reference for required fields, defaults and limits.

provider
stringOptional

Optional provider slug. Omit for automatic routing; project settings may pin the provider.

project
stringOptional

Optional project ID. Use its published model catalog and routing configuration.

input.prompt
stringRequired
input.image_url
string<uri>Optional

Optional start image (image-to-video)

input.end_image_url
string<uri>Optional
input.duration
enumOptional
Default:6
Allowed values:6810
input.resolution
enumOptional
Default:"1080p"
Allowed values:"720p""1080p"
input.aspect_ratio
enumOptional
Default:"16:9"
Allowed values:"16:9""9:16"
input.generate_audio
booleanOptional
Default:true

Response fields

model
string

Model slug from the catalog. Project keys may use a project-specific model slug.

input
object

Model-specific input object. See the selected model reference for required fields, defaults and limits.

providers
array

Available providers in server routing order, with unit, quantity, price_usd, original_price_usd and credits. The first entry is the automatic route's first choice.

unavailable
array

Rejected providers and the reason each cannot serve the request.

Examples (pseudocode)

API quotes
parameters.model ← selected model slug
parameters.input ← prompt, duration, resolution and other generation fields
parameters.provider ← selected provider (optional)
parameters.project ← project ID (optional)
result ← POST /api/v1/quote with parameters as the JSON body
On failure, display error; on success, display price_usd and credits from providers
Use unavailable to explain why other providers were excluded
Frontend quotes
catalog ← GET /api/v1/models (add project for a project catalog)
source ← selected model’s provider; for a project, select the model directly
input ← validate, apply defaults and derive mode using params and billing
rule ← match prices conditions; for tokens, select context tiers
quantity ← derive from unit and input; use billing.metering for audio holds
total micros ← ordinary: round(unit price × quantity); tokens: ceil(input cost + output cost)
dollars ← total micros / 1,000,000
credits ← if creditsPerUsd is non-null: max(1, ceil(dollars × creditsPerUsd - 1e-9))
Display estimate; recalculate locally on input changes without calling /quote

Use with AI

Give your coding assistant the documentation index or the full API reference, including live model parameters.