Upscale an image
POST/v1/images/upscale
Enlarge an image 2× or 4× with added detail.
The price depends on the input's size (up to 1500 px, 3000 px, or larger on the longest edge). POST /v1/quote gives the exact price for your image.
Needs the generate scope. Creates a job of type image.upscale; send an Idempotency-Key to retry safely.
Body
| Field | Type | Description |
|---|---|---|
imagerequired | string | An image: a file id from POST /v1/files (file_…), the id of an earlier job whose output to use (job_…), or a public https:// URL (PNG, JPEG or WebP). |
scale | integer | How many times larger.One of 2, 4.Default 2. |
style | string | creative adds detail; precise stays closest to the original.One of "creative", "precise".Default "creative". |
creativity | integer -10–10 | For creative: how much new detail to invent.Default 0. |
metadata | object | Up to 20 keys of your own (string → string, values up to 500 characters). Stored on the job and returned with it and in webhooks. |
Example
curl -X POST https://www.luce.space/api/v1/images/upscale \
-H "Authorization: Bearer $LUCE_API_KEY" \
-H "Content-Type: application/json" \
-H "Idempotency-Key: $(uuidgen)" \
-d '{
"image": "job_api7QmVZk2rT9wXs1bYc",
"scale": 4
}'Response
HTTP 202. The job starts queued or running; GET /v1/jobs/{id} or a webhook tells you when it ends.
{
"id": "job_api7QmVZk2rT9wXs1bYc",
"object": "job",
"type": "image.upscale",
"status": "queued",
"livemode": true,
"created_at": "2026-11-24T10:15:02.114Z",
"completed_at": null,
"cost": {
"credits": 5,
"prepaid": 5,
"pay_as_you_go": 0
},
"output": null,
"error": null,
"metadata": {
"order_id": "A-1042"
}
}Errors
| code | When |
|---|---|
invalid_body | The body isn't valid JSON or misses a required field. |
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). |
mode_unavailable | This mode isn't offered on the API. |
insufficient_balance | Prepaid AI Credits can't cover the job and pay as you go is off. |
monthly_cap_reached | The job would pass this month's pay-as-you-go cap. |
payment_past_due | Pay as you go is paused after a failed payment. |
idempotency_conflict | The Idempotency-Key was used before with a different body. |
rate_limited | Too many requests; wait for Retry-After seconds. |