# 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.glam` · **Task:** `image.glam` · **Scope:** `tasks:run` · **Category:** Image editing

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.

## Quick start

```python
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())
```

```javascript
const headers = {
  Authorization: `Key ${process.env.REFABRIC_API_KEY}`,
  "Content-Type": "application/json",
};

const job = await fetch("https://api.refabric.com/v1/tasks/image.glam", {
  method: "POST",
  headers,
  body: JSON.stringify({
    "image": "art:9f2c01",
    "prompt": "make the lipstick a deep red"
  }),
}).then((r) => r.json());
console.log(job.job_id);

let status = job;
while (status.lifecycle !== "terminal") {
  await new Promise((r) => setTimeout(r, 5000));
  status = await fetch(job.status_url, { headers }).then((r) => r.json());
}

console.log(await fetch(job.result_url, { headers }).then((r) => r.json()));
```

```bash
curl -X POST "https://api.refabric.com/v1/tasks/image.glam" \
  -H "Authorization: Key $REFABRIC_API_KEY" \
  -H "Content-Type: application/json" \
  -H "Prefer: wait=60" \
  -d '{"image":"art:9f2c01","prompt":"make the lipstick a deep red"}'
```

## Input schema

- `prompt` (string, _required_) — 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`
- `image` (string, _required_, pattern: ^(https://|art:|file:).+$) — 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.
  Example: `art:9f2c01`

## Required-fields example

```json
{
  "image": "art:9f2c01",
  "prompt": "make the lipstick a deep red"
}
```

## Full example

```json
{
  "image": "art:9f2c01",
  "prompt": "make the lipstick a deep red"
}
```

## Output schema

- `files` (array<object>, _optional_) — One file: the image with that one detail changed. Pass it on to another edit to continue from it.

## Response example

```json
{
  "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

```json
{
  "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.

## 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_accepted`
- `invalid_request`
- `not_found`
- `permission_denied`
- `insufficient_credits`
- `content_refused`
- `processing_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.

## 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
