For AI agents: this page is also available as Markdown at https://docs.refabric.com/api-reference/platform/tasks/list-task-examples.md, and the index of every page is https://docs.refabric.com/llms.txt.
Platform API › Tasks
List task examples
A task's examples in their shown order: the request that was sent and the files it sent and delivered.
https://api.refabric.com/v1/tasks/{name}/examplesimport requests
url = "https://api.refabric.com/v1/tasks/{name}/examples"
response = requests.get(url)
print(response.json()){
"items": []
}Authentication. No key: a task's examples are the same for every reader.
Common use cases
- Copy an example's
requestand send it as it is to see the task run. - Show what a task makes before anyone runs it.
Conflicts. A task that was removed answers 410 task_removed; an unknown name 404.
See also
GET /v1/tasks/{name}POST /v1/tasks/{name}
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.
- array<object>required
Every example shown for the task, by position. Empty when it has none.
- stringrequired
The example's id, stable while it is shown.
Example:
dex_4f1c - stringrequired
The task the request runs.
Example:
image.generate - integerrequired
Its place among the task's examples, first is 0.
Example:
0 - objectrequired
The request body exactly as it was sent to run the task, with each file it sent replaced by its copy in inputs. Send it as it is and the task runs again.
Example:
{"prompt":"A linen summer dress on a beach at golden hour"} - array<object>required
The files the request sent, in the order they appear in it.
- stringrequired
Where the file is. A public, permanent address you can open or download.
Example:
https://files.refabric.com/art/3f2a.png - stringrequired
The file's standard media type.
Example:
image/png - stringrequired
The request field the file was sent in, as a path into the request.
Example:
image
- array<object>required
The files the job delivered.
Example:
[{"media_type":"image/png","url":"https://example.com/docs/examples/image.generate/dex_4f1c-out-0.png"}]- stringrequired
Where the file is. A public, permanent address you can open or download.
Example:
https://files.refabric.com/art/3f2a.png - stringrequired
The file's standard media type.
Example:
image/png - stringrequirednullable
For a video, a still frame to show before it plays; null otherwise.
- stringrequired
A short note on what the example shows; may be empty.
Example:
Golden-hour light on linen.
- 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.