Quote a job
POST/v1/quote
The exact AI Credits a request would cost, and whether your wallet covers it now. Nothing runs and nothing is charged.
Needs the read scope.
Body
| Field | Type | Description |
|---|---|---|
typerequired | string | The job type.One of "image.generate", "image.edit", "image.upscale", "image.multi_angles", "video.generate", "video.edit", "video.upscale". |
requestrequired | object | The body you would send to that endpoint. |
Example
curl -X POST https://www.luce.space/api/v1/quote \
-H "Authorization: Bearer $LUCE_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"type": "image.upscale",
"request": {
"image": "file_O57EAQfNx6UbXJxr",
"scale": 4
}
}'Response
HTTP 200.
{
"object": "quote",
"type": "image.upscale",
"credits": 8,
"covered": true,
"prepaid": 8,
"pay_as_you_go": 0
}Errors
| code | When |
|---|---|
invalid_param | A field has a wrong type or an out-of-range value; param names it. |
invalid_input | An input image or video can't be used (unreachable, too large, wrong type, or an upload not completed). |