Skip to main content
GET
Get model pricing
Returns pricing metadata for one model. The pricing payload is intentionally flexible because some models expose fixed pricing and others can produce an exact estimate only when you include sample input. Use this endpoint before expensive, dynamic, or user-controlled generations: long videos, large batches, high-resolution renders, long narration, or any flow where you want to show cost before spending credits. For a final pre-run estimate of one or more node payloads, use POST /v1/nodes/estimate-credits.

Authorization

string
required
Bearer API key. Format: Bearer gx_your_api_key.

Path parameters

string
required
Model ID or sub-model ID from GET /v1/models, such as nano-banana-pro-text.

Query parameters

string
Optional URL-encoded JSON object representing the model input. Build it from fields returned by GET /v1/models/{modelId} /schema. When supplied and supported by the pricing model, the response includes an exact estimatedCost. If the sample contains unsupported option values, the response explains what to fix instead of quoting a fallback cost.

Request

Always JSON-encode and URL-encode sampleInput; do not send raw { / } characters in the URL.

Response

Returns a model-specific pricing object. The exact shape depends on the model’s pricing strategy, so handle fields defensively.
string
Echoed model ID.
string
Present when sampleInput was sufficient for an exact quote. Formatted in credits, for example "2.50M".
string
Present when there is no exact estimatedCost. Human-readable pricing summary, such as fixed, tiered, variable, or usage-based pricing.
string
Explanation of how the model calculates cost and which input fields can affect it.
object
Programmatic pricing configuration. Common type values include fixed, tiered, per_second, per_minute, per_character, per_megapixel, and variable.
string
Guidance about whether an exact estimate was computed, whether sampleInput needs to be corrected, or whether the model settles credits after execution.
string
Returned in the response body when pricing cannot be resolved for the model. Treat this as an unknown model ID and rediscover IDs from the model list/search endpoints.

Response example — exact estimate

Response example — pricing structure

Errors

Estimate semantics

Use the returned pricing metadata and model schema for current options and pricing rules. Estimates based on defaults or unavailable media information can differ from the final charge. Display returned credit amounts directly; do not apply an additional platform multiplier.

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Path Parameters

modelId
string
required

Model ID or sub-model ID from the model list/search endpoints.

Query Parameters

sampleInput
string

Optional URL-encoded JSON object with model input fields. Use it to request an exact estimate when supported. URL-encoded JSON object.

Response

Pricing metadata or pricing-helper error body.

modelId
string
required
estimatedCost
string
costSummary
string
pricingApproach
string
pricingDetails
object
note
string