For AI agents: this page is also available as Markdown at https://docs.refabric.com/index.md, and the index of every page is https://docs.refabric.com/llms.txt.
Build with Refabric
Run fashion tasks — designs, photoshoots, edits, videos and production files — from your own code with one HTTP API.
Refabric's API runs the same tasks as the Refabric app. You send a task its input, Refabric runs it as a job, and you get files and records back that you can pass straight into the next task.
Refabric runs 27 tasks today, in 6 categories.
Design generation · 2 tasks
Makes new designs and patterns from your words, reference images or a moodboard.
Image editing · 9 tasks
Changes one thing in an image you send — its background, frame, face, pose, fabric, views or finish — and keeps the rest.
Photoshoots · 3 tasks
Turns product photos into shoot photos: on a model, on a ghost mannequin or on a mannequin.
Video · 1 task
Turns an image into a short video.
Production prep · 5 tasks
Takes what production needs from an image: its materials, colours or print, a larger copy, or a vector file.
Records & libraries · 7 tasks
Makes the records and library items other tasks take: moodboards, brand kits, range plans, fabrics, poses and backgrounds.
Search the docs with ⌘K, or start from one of the cards below.
| Task APIs | Platform API | |
|---|---|---|
| What it is for | Running a task: you send an input, a job makes files or a record | Everything around the jobs: tasks, jobs, files, prices, usage, reference data |
| Auth | An API key with the tasks:run scope | An API key; some reads need no key (Authentication) |
| Example call | POST /v1/tasks/image.generate | GET /v1/jobs/{job_id} |
Task API Reference
Every task, its inputs, outputs and errors, grouped by category.
Quick Start
Run your first job and read its files.
Calling tasks
Submit and poll, wait for the answer, or get a webhook.
Records & libraries
Moodboards, fabrics, brand kits, poses and backgrounds that tasks reuse.
Start with a task call
- Create a key in Panel › Developers › Keys and set it as
REFABRIC_API_KEY(Get your API key). - Submit a task:
import os, requests
r = requests.post(
"https://api.refabric.com/v1/tasks/image.generate",
headers={"Authorization": f"Key {os.environ['REFABRIC_API_KEY']}"},
json={"prompt": "a navy linen shirt dress, studio photo"},
)
print(r.status_code, r.json()) # 202 and the job's handle- The answer is
202with ajob_idand the URLs to poll, read and cancel the job. Read theresult_urlonce the job has ended: each delivered design is one line offiles, with itsfileid and itsurl(Asynchronous jobs).
Turn records into products
A task can make a record — a moodboard, a fabric, a brand kit, a range plan — instead of a plain
image. A record has an id (moodboard:…) that later tasks take as input, so one run feeds the next.
Recipes chain tasks this way, step by step.