Skip to main content
POST
Estimate credits for a model request
What one request to one model would cost, without running it.
An estimate is not a reservation. It cannot know how many tokens a model will actually emit, so treat it as an order of magnitude rather than a quote.

Authorizations

Authorization
string
header
required

API key in format: Bearer inf_***

Path Parameters

slug
string
required

Model slug used in /v1 requests (e.g. gpt-4o)

Body

application/json
n
number

Number of outputs (images/videos). Defaults to 1.

size
string

Image size, e.g. "1024x1024" or a provider label ("1K").

quality
string

Image quality (DALL-E standard|hd, GPT Image low|medium|high|auto).

steps
number

Diffusion steps (per_megapixel FLUX models).

imageInputCount
number

Number of source images (per_image edit mode). 1 for edits, 0 for generate.

characters
number

TTS character count.

durationSeconds
number

Video/STT duration in seconds.

resolution
string

Video resolution tier ("720p" | "1080p" | "4k").

maxOutputTokens
number

Upper bound of output tokens for text models.

totalTokens
number

Total tokens for embedding/rerank models.

Response

Authoritative pre-request credit estimate. Reuses the same pricing logic as the credit hold/settle path (1 credit = $0.01).

credits
number | null

Estimated credits this request would cost. null when the model has no active price (unknown — not free).

Example:

2