Перейти к содержимому
EN

Quote an image

POST
/images/price
curl --request POST \
--url https://api.mixen.ai/v1/images/price \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{ "model": "gpt-image-1", "prompt": "a red cat", "size": "1024x1024" }'

Price of POST /images/generations for the same body, without generating or charging. Computed with the same formula as the actual charge (per image × n).

Media typeapplication/json
ImageGenRequest
object
model
required
Model

Image model id from GET /models, or dall-e-3 / gpt-image-1.

string
prompt
required
Prompt
string
n
N

Number of images (1-4).

integer
default: 1 >= 1 <= 4
size
Any of:
string
aspect_ratio
Any of:
string
resolution
Any of:
string
background
Any of:
string
output_format
Any of:
string
quality
Any of:
string
response_format
Any of:
string
Example
{
"model": "gpt-image-1",
"prompt": "a red cat",
"size": "1024x1024"
}

Successful Response

Media typeapplication/json
Examplegenerated
example

Validation Error

Media typeapplication/json
HTTPValidationError
object
detail
Detail
Array<object>
ValidationError
object
loc
required
Location
Array
msg
required
Message
string
type
required
Error Type
string
input
Input
ctx
Context
object
Examplegenerated
{
"detail": [
{
"loc": [
"example"
],
"msg": "example",
"type": "example",
"input": "example",
"ctx": {}
}
]
}