For AI agents: this page is also available as Markdown at https://docs.refabric.com/task-api-reference/image.face_fix.md, and the index of every page is https://docs.refabric.com/llms.txt.
Image editing
Fix the face in an image
Redo the face in a finished shoot image so it matches the model it was shot with, leaving the pose, the garment and the background as they are. Delivered as one image file.
Endpoint: POST https://api.refabric.com/v1/tasks/image.face_fixTask: image.face_fixScope: 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.face_fix",
headers=headers,
json={
"image": "art:9f2c01",
},
).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
A finished image of a model: from
photoshoot.create,mannequin_photoshoot.create, or an edit of one. The model is known from the image's shoot, else frommodel; an image with neither is refused (image_has_no_model) before anything is charged. 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 - stringoptional
The model the image shows, as a
model:<id>handle (GET /v1/refs/model). An image from a shoot, or an edit of one, already carries its model; sendmodelfor any other picture (an upload, a url).pattern: ^model:.+$
Output schema
- array<object>optional
One file: the image with the face redone. Pass it on to another edit to continue from it.
Required-fields example
{
"image": "art:9f2c01"
}Full example
{
"image": "art:9f2c01"
}Response example
{
"job_id": "d2b3c4d500004000800000000000000d",
"lifecycle": "queued",
"status_url": "http://v3-api.refabric.com/v1/jobs/d2b3c4d500004000800000000000000d",
"result_url": "http://v3-api.refabric.com/v1/jobs/d2b3c4d500004000800000000000000d/result",
"cancel_url": "http://v3-api.refabric.com/v1/jobs/d2b3c4d500004000800000000000000d/cancel"
}Result example
{
"job_id": "d2b3c4d500004000800000000000000d",
"files": [
{
"file": "art:9f2c05",
"url": "https://files.example.com/image.face_fix/1.png",
"media_type": "image/png",
"task": "image.face_fix",
"job_id": "d2b3c4d500004000800000000000000d",
"created_at": "2026-10-01T09:25:31Z"
}
],
"has_more": false
}The image is a photoshoot frame, so its model is known from the shoot. An upload, or any image no shoot or model change made, is refused with image_has_no_model (422).
Send a finished image of a model and the face is redone to match the model it was shot with; the pose, the garment and the background stay. The model is known from the shoot, through every later edit; for any other image, send `model`.
Built for
- A shoot image whose face drifted from the model
- The model's face put back after other edits
- An upload given the face of one of your models
What you get
- One image with the face redone to match the model.
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 the face should look like the model again. Use image.glam when you want one feature changed, such as the lipstick or an earring.
Errors
field_not_acceptedinvalid_requestnot_foundpermission_deniedinsufficient_creditscontent_refusedprocessing_failedimage_has_no_model
Related
photoshoot.create· It runs before: its result is this input.mannequin_photoshoot.create· It runs before: its result is this input.image.change_background· It does a neighbouring job.
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.face_fix/llms.txt
- https://api.refabric.com/v1/tasks/image.face_fix/openapi.json
GET https://api.refabric.com/v1/tasks/image.face_fix