For AI agents: this page is also available as Markdown at https://docs.refabric.com/task-api-reference/image.glam.md, and the index of every page is https://docs.refabric.com/llms.txt.
Image editing
Change one detail of an image
Change one thing you name in a finished image — the lipstick, a button, an earring — and leave the rest untouched. Delivered as one image file.
Endpoint: POST https://api.refabric.com/v1/tasks/image.glamTask: image.glamScope: tasks:runCategory: Image editing
Quick start
import os
import time
import requests
headers = {"Authorization": f"Key {os.environ['REFABRIC_API_KEY']}"}
job = requests.post(
"https://api.refabric.com/v1/tasks/image.glam",
headers=headers,
json={
"image": "art:9f2c01",
"prompt": "make the lipstick a deep red",
},
).json()
print(job["job_id"])
while True:
status = requests.get(job["status_url"], headers=headers).json()
if status["lifecycle"] == "terminal":
break
time.sleep(5)
print(requests.get(job["result_url"], headers=headers).json())cURL waits for the result with Prefer: wait; when the job outlives the wait, it answers 202 with the job's URLs.
Input schema
- stringrequired
The one thing to change, in your own words ('make the lipstick red'). Required and not blank; name a single feature.
Example:
make the lipstick a deep red - stringrequired
The finished image to change. As one string: a URL, a file from an earlier result (
art:…or its url) or an upload (file:…). If it is one of your files placed in a project or on a design in the Refabric app, the result is filed there too.pattern: ^(https://|art:|file:).+$
Example:
art:9f2c01
Output schema
- array<object>optional
One file: the image with that one detail changed. Pass it on to another edit to continue from it.
Required-fields example
{
"image": "art:9f2c01",
"prompt": "make the lipstick a deep red"
}Full example
{
"image": "art:9f2c01",
"prompt": "make the lipstick a deep red"
}Response example
{
"job_id": "d2b3c4d500004000800000000000000e",
"lifecycle": "queued",
"status_url": "http://v3-api.refabric.com/v1/jobs/d2b3c4d500004000800000000000000e",
"result_url": "http://v3-api.refabric.com/v1/jobs/d2b3c4d500004000800000000000000e/result",
"cancel_url": "http://v3-api.refabric.com/v1/jobs/d2b3c4d500004000800000000000000e/cancel"
}Result example
{
"job_id": "d2b3c4d500004000800000000000000e",
"files": [
{
"file": "art:9f2c06",
"url": "https://files.example.com/image.glam/1.png",
"media_type": "image/png",
"task": "image.glam",
"job_id": "d2b3c4d500004000800000000000000e",
"created_at": "2026-10-01T09:31:12Z"
}
],
"has_more": false
}Name one detail in prompt; everything else comes back unchanged.
Name one thing to change in a finished image — the lipstick, a button, an earring — and that thing is changed while the rest of the image is left as it is. Name one feature per request.
Built for
- Make-up and accessory changes on a shoot image
- A small detail fixed without a new shoot
- Versions of one image that differ in one detail
What you get
- One image with the detail you named changed.
Prompting
Write one short instruction that names a single feature and its change ('make the lipstick red', 'turn the buttons gold'). Say only what changes; the image already shows everything else.
Specs
| Input formats | Images, each one string: a URL, an upload (file:…) or a file from an earlier result (art:…). Upload types and sizes: GET /v1/meta limits.upload. |
|---|---|
| Input count | image: one |
| Output format | Files: each one line with its url and its media_type, in the job's result. |
| Outputs per job | One image file per job. |
Choosing a task
- Use this when a small detail should change: make-up, a button, jewellery. Use image.change_texture when a garment should take on the texture, print and colour of a fabric you have.
Errors
field_not_acceptedinvalid_requestnot_foundpermission_deniedinsufficient_creditscontent_refusedprocessing_failed
Related
photoshoot.create· It runs before: its result is this input.image.face_fix· It does a neighbouring job.image.upscale· It runs after: it takes this task's result.
Good to know
Pricing: Estimate a request before you run it, or see the price of each option.
For agents and code generation
- https://api.refabric.com/v1/tasks/image.glam/llms.txt
- https://api.refabric.com/v1/tasks/image.glam/openapi.json
GET https://api.refabric.com/v1/tasks/image.glam