For AI agents: this page is also available as Markdown at https://docs.refabric.com/api-reference/platform/tasks/read-a-task.md, and the index of every page is https://docs.refabric.com/llms.txt.
Platform API › Tasks
Read a task
One task, exactly as GET /v1/tasks lists it.
https://api.refabric.com/v1/tasks/{name}import requests
url = "https://api.refabric.com/v1/tasks/{name}"
response = requests.get(url)
print(response.json()){
"name": "image.generate",
"title": "Generate an image",
"description": "Makes one.",
"category": "design_generation",
"inputSchema": {},
"outputSchema": {},
"unit": "image",
"status": "deprecated",
"docs": null
}Authentication. No key: a published task is the same for every reader.
Common use cases
- Read one task's schema before you send it a job.
Conflicts. A task that was removed answers 410 task_removed; an unknown name 404.
See also
GET /v1/tasksGET /v1/tasks/{name}/examples
Authorization
No key needed.
Parameters
Path parameters
- stringrequired
Header parameters
- stringoptional
The contract version you wrote against (a date). Absent: the current version.
format: date
- stringoptional
Your own id for this request; we answer it back under X-Client-Request-ID.
max length 128
Response
200 — Done: the answer is in the body.
- stringrequired
The task's name; run it at its path.
Example:
image.generate - objectrequired
What a run takes: the request body's JSON Schema.
follows https://json-schema.org/draft/2020-12/schema
- stringoptionalnullable
The task's name in words.
Example:
Generate an image - stringoptionalnullable
What the task does, in one sentence.
Example:
Makes one. - stringoptionalnullable
What kind of work a task does — the group it is listed under in the task catalogue.
Values
design_generation— Makes new designs and patterns from your words, reference images or a moodboard.image_editing— Changes one thing in an image you send — its background, frame, face, pose, fabric, views or finish — and keeps the rest.photoshoots— Turns product photos into shoot photos: on a model, on a ghost mannequin or on a mannequin.video— Turns an image into a short video.production_prep— Takes what production needs from an image: its materials, colours or print, a larger copy, or a vector file.records_libraries— Makes the records and library items other tasks take: moodboards, brand kits, range plans, fabrics, poses and backgrounds.
Example:
design_generation - objectoptionalnullable
What a job's result holds: its files'
dataas a JSON Schema.follows https://json-schema.org/draft/2020-12/schema
- stringoptionalnullable
What one unit of the task's work is.
Example:
image - stringoptionalnullable
Present when the task is on its way out.
Values
deprecated— It still runs, and will be removed; its page says when.
Example:
deprecated - objectoptionalnullable
The task page's words.
- stringrequired
The page's opening paragraph.
Example:
Makes a design. - array<string>required
What the task is for.
Example:
["Concepts."] - array<string>required
What a job delivers, one sentence each.
Example:
["One image."] - objectrequired
How many files a job delivers and in which order.
Example:
{"count":"One file per image.","count_depends_on":["image_count"]}- stringrequired
How many files a job delivers, in words.
Example:
One file per image. - array<string>required
The input fields the count depends on.
Example:
["image_count"] - stringoptionalnullable
The files' order.
Example:
The order of `images`. - stringoptionalnullable
When a file asked for is not delivered.
Example:
A pose that cannot be made.
- array<object>required
The Specs table, in its order.
Example:
[{"key":"output_format","text":"PNG","title":"Output format"}]- stringrequired
Which row.
Values
input_formats— Input formatsinput_count— Input countoutput_format— Output formatoutput_resolution— Output resolutionaspect_ratios— Aspect ratiosoutputs_per_job— Outputs per jobwatermark— Watermarkcommercial_use— Commercial usecontent_checks— Content checksreproducibility— Reproducibility
Example:
output_format - stringrequired
The row's title.
Example:
Output format - stringrequired
What the row says.
Example:
PNG
- array<string>required
Good to know about this task.
- array<string>required
Every error code a call of the task can answer (
GET /v1/errors).Example:
["invalid_request"] - array<object>optionalnullable
How it differs from neighbouring tasks.
- stringrequired
The other task.
Example:
image.edit - stringrequired
When to use this task.
Example:
You want a new design. - stringrequired
When to use the other one.
Example:
You want to change one thing.
- stringoptionalnullable
How to write the prompt.
Example:
Name the garment.
- 401 — No valid API key was sent.
- 403 — Your key or your plan does not allow this.
- 404 — Nothing has this address.
- 410 — This was removed.
- 429 — Too many requests: wait for the number of seconds in the Retry-After header.
- 500 — Something went wrong on our side; retry, and quote the request id if it keeps happening.