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.

Search the docs with ⌘K, or start from one of the cards below.

Task APIsPlatform API
What it is forRunning a task: you send an input, a job makes files or a recordEverything around the jobs: tasks, jobs, files, prices, usage, reference data
AuthAn API key with the tasks:run scopeAn API key; some reads need no key (Authentication)
Example callPOST /v1/tasks/image.generateGET /v1/jobs/{job_id}

Start with a task call

  1. Create a key in Panel › Developers › Keys and set it as REFABRIC_API_KEY (Get your API key).
  2. 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
  1. The answer is 202 with a job_id and the URLs to poll, read and cancel the job. Read the result_url once the job has ended: each delivered design is one line of files, with its file id and its url (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.

Next steps