Edit an image
image Queued Runs in the background — you get a link when it is ready.
Change a photo by describing the change — swap the background, restyle, combine two references — no masks or layers.
Built for
Built for
- Product retouching
- Background swaps
- Style variations
How it works
You provide
One or two reference images and a sentence saying what should change and what should stay.
You get back
One edited image that keeps the parts you did not mention.
What this means for you
- Say what to change in plain words — the rest stays put.
- Bring up to two references to combine or match a style.
- Priced by the megapixel, like our other images.
Try it
Details
What you can set
| Setting | Type and limits | What it means |
|---|---|---|
prompt required | text, 1–2000 characters | What to change, in plain language (no masks needed). |
image_size optional | group | Output dimensions; omitted = matched to the reference. Billed megapixels = ceil(width x height / 1e6), capped at 4 MP by unit bounds. |
image_size.width required | whole number, 256–2048 | |
image_size.height required | whole number, 256–2048 | |
image_urls required | list | One or two reference images: uploaded file_urls from /v1/uploads (validated for ownership) or external image URLs. Two at most — reference megapixels are part of the wholesale cost. |
output_format optional | text, one of: jpeg, png | File type of the result; jpeg when omitted. |
- What you get back
- An image (PNG or JPEG)
- Limits
- megapixels: 1–4
- How it runs
- Queued — Runs in the background — you get a link when it is ready.
- Alias
oneup/image-edit
For developers
The same request as an API call, with this capability's example input:
curl -X POST https://api.oneupai.com/v1/queue/submit/oneup/image-edit \
-H "Authorization: Bearer $ONEUP_API_KEY" \
-H "Idempotency-Key: $(uuidgen)" \
-H "Content-Type: application/json" \
-d '{
"prompt": "swap the background for a bright kitchen, keep the product exactly as is",
"image_urls": [
"https://example.com/product.jpg"
]
}'Show input schema (JSON)
{
"type": "object",
"required": [
"prompt",
"image_urls"
],
"properties": {
"prompt": {
"type": "string",
"maxLength": 2000,
"minLength": 1,
"description": "What to change, in plain language (no masks needed)."
},
"image_size": {
"type": "object",
"required": [
"width",
"height"
],
"properties": {
"width": {
"type": "integer",
"maximum": 2048,
"minimum": 256
},
"height": {
"type": "integer",
"maximum": 2048,
"minimum": 256
}
},
"description": "Output dimensions; omitted = matched to the reference. Billed megapixels = ceil(width x height / 1e6), capped at 4 MP by unit bounds.",
"additionalProperties": false
},
"image_urls": {
"type": "array",
"items": {
"type": "string",
"maxLength": 2048,
"minLength": 1
},
"maxItems": 2,
"minItems": 1,
"description": "One or two reference images: uploaded file_urls from /v1/uploads (validated for ownership) or external image URLs. Two at most — reference megapixels are part of the wholesale cost."
},
"output_format": {
"enum": [
"jpeg",
"png"
],
"type": "string",
"description": "File type of the result; jpeg when omitted."
}
},
"additionalProperties": false
}Other image capabilities
Quick image
Turn a short written description into a picture, fast.
1 credit per megapixel
Premium image
Our highest-quality picture from a written description — for hero shots and covers.
6 credits (first megapixel) + 3 per additional