Edit an image

On this page

What it does #

Building block image Queued

Change a photo by describing the change — swap the background, restyle, combine two references — no masks or layers.

Alias
oneup/image-edit
How it runs
Queued — Runs in the background — you get a link when it is ready.
What it takes and what it gives
Text + Image → Image

Built for #

  • Product retouching
  • Background swaps
  • Style variations

Not for #

  • Pixel-exact retouching with a mask: you describe the change, you do not paint it.
  • More than two reference pictures at once.
  • Making a picture from words alone: use oneup/image-generate-lite or oneup/image-generate-pro.

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.

Sample output #

No sample is published yet. When there is one, it will be a real result OneUpAI made, shown here with the request that made it.

What you send, what you get back #

You send #

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 you can set #

SettingType and limitsWhat it means
prompt requiredtext, 1–2000 charactersWhat to change, in plain language (no masks needed).
image_size optionalgroupOutput dimensions; omitted = matched to the reference. Billed megapixels = ceil(width x height / 1e6), capped at 4 MP by unit bounds.
image_size.width requiredwhole number, 256–2048
image_size.height requiredwhole number, 256–2048
image_urls requiredlistOne 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 optionaltext, one of: jpeg, pngFile type of the result; jpeg when omitted.

The request #

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"
  ]
}'

What comes back #

How it comes back
a file, on a link
File type
image/jpeg (you can also ask for image/png)
Resolution
the size you ask for
Each link works for
1 hour; read the result again for a fresh link

The response #

An example of the response, as the API reference shows it (placeholders, not a real run):

{
  "ticket": "oneup_req_SuaNFGGC0b4MGIeOrp78KFRXfR",
  "status": "QUEUED"
}

The request answers at once with a ticket. Poll GET /v1/queue/status/{ticket} until it says COMPLETED, then read GET /v1/queue/result/{ticket}: its full body follows the output schema under Schemas.

How long it takes #

Not yet measured: a time shows here once 50 runs have finished in 30 days.

What it costs #

13 credits (first megapixel) + 4 per additional

≈ $0.14 at the Concierge rate

For $1 you can run this about 6–7 times, depending on your plan.

Worked prices (Concierge rate) #

  • one edit at 1 megapixel: 13 credits, about $0.14
  • one edit at 4 megapixels: 25 credits, about $0.27

Limits #

  • prompt: 1–2000 characters
  • image_urls: 1–2 items
  • Each side of the picture: 256–2048 pixels
  • Picture size: 1–4 megapixels
  • Each uploaded file: up to 2 GB

Use it with #

Natural next steps and companions:

  • Sharpen a small picture oneup/image-upscale — Give it a picture that is too small for the screen it is going on and get back the same picture at twice the size, sharpened — a listing photo, a logo, an old scan.
  • Photo to video clip oneup/video-animate-lite — Bring a still photo to life as a short motion clip.
  • Rendered short video oneup/render-timeline — Cut your photos and clips into a finished short — cuts, punch-ins, captions, seamless transitions — the same result every time.

Schemas #

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
}
Show output schema (JSON)
{
  "type": "object",
  "required": [
    "assets"
  ],
  "properties": {
    "assets": {
      "type": "array",
      "items": {
        "type": "object",
        "required": [
          "asset_id",
          "content_type",
          "size_bytes",
          "url"
        ],
        "properties": {
          "url": {
            "type": "string"
          },
          "asset_id": {
            "type": "string"
          },
          "size_bytes": {
            "type": "integer",
            "minimum": 1
          },
          "content_type": {
            "type": "string",
            "pattern": "^image/"
          }
        },
        "additionalProperties": true
      },
      "minItems": 1
    }
  },
  "additionalProperties": true
}
Limits, as GET /v1/models gives them
{
  "chars": {
    "prompt": {
      "max": 2000,
      "min": 1
    }
  },
  "items": {
    "image_urls": {
      "max": 2,
      "min": 1
    }
  },
  "megapixels": {
    "max": 4,
    "min": 1
  },
  "image_side_px": {
    "max": 2048,
    "min": 256
  },
  "upload_bytes_max": 2000000000
}
What comes back, as GET /v1/models gives it
{
  "type": "image/jpeg",
  "delivery": "file",
  "resolution": "as_requested",
  "type_options": [
    "image/jpeg",
    "image/png"
  ],
  "link_expires_in_s": 3600
}

Previously called #

This model has had no other name.

Changelog #

  • Version 1 (Sep 4, 2026): First version.

Every change, newest first, on the changelog

Other image capabilities #

Measure how far away everything is #

Give it a photograph and get back a picture of its depth: what is near is bright, what is far is dark. That is what lets a still photograph be moved through like a filmed shot instead of slid around like a postcard.

1 credit

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.

7 credits (first megapixel) + 4 per additional

Make a detailed picture #

Describe a scene and get back a detailed, natural-looking picture at the size of your frame. Slower than the fast picture model, and better on faces, textures and small detail.

4 credits

Sharpen a small picture #

Give it a picture that is too small for the screen it is going on and get back the same picture at twice the size, sharpened — a listing photo, a logo, an old scan.

3 credits