Skip to Content
API reference

Get a generation

GET
/v1/generations/{id}

One of your generations. With wait, the answer comes as soon as the status changes (queued to running, or the run is over), or after that many seconds with no change. Download result.image_url when the run is done: it is deleted after the first download, or 10 minutes after the run if nobody downloads it. After that the generation keeps its details, with result.expired true and no link.

Authorization

apiKey
headerAuthorizationBearer <tf_...>

Your API key from API keys, sent as Authorization: Bearer $TENSORFACTORY_API_KEY. Keep it on your server.

Path Parameters

id*string

The generation's id.

Formatuuid

Query Parameters

wait?integer

Whole seconds to hold the answer while the status stays the same and the run is not over.

Range0 <= value <= 10
Default0

Response Body

The generation.

application/json
  1. response
id*string

The generation's id.

Formatuuid
status*string

queued and running are not over yet. done, failed and cancelled are final.

Value in"queued""running""done""failed""cancelled"
model*string

The model id.

prompt*|

The prompt as you sent it, only while the run is queued or running. It is not kept once the run ends, and is then null. Camera angle: the pose drawn, in words (camera.pose), always.

aspect_ratio*string

The shape you asked for. auto for inpaint.

seed*integer

The seed the run used: the one you sent, or the random one we drew, so you can make the same image again.

steps*integer

Denoising steps.

mode?|

The mode the run used (auto resolved to the mode it picked), custom when you sent steps, null for camera angle, inpaint and runs made before modes.

image*|

The edited upload's asset_id.

image_2*|

The second upload the edit used.

image_3*|

The third upload the edit used.

transparent_background*boolean

Whether the background was asked to be removed.

camera?

Camera angle only. The pose drawn, your three numbers each at the nearest pose the model draws.

mask?|

Inpaint only. The mask's upload asset_id, null for an outpaint.

outpaint?|

Inpaint only. The margins added, {left, top, right, bottom}, null for a mask. result.width and result.height are the image with them.

price_usd*number

What the run costs. While queued or running, the table price it will be charged; once done, the price charged; 0 for a failed or cancelled run. See Pricing.

usage*|

Once done, the run's GPU time.

result*|

Once done, the files the run made. Download them when the run is done: it is deleted after the first download, or 10 minutes after the run if nobody downloads it. TensorFactory keeps the run's settings, not its prompt or files.

error*|

When the run failed: type is model_error, timed_out, node_lost (the GPU stopped answering), expired (the result was not read in time), background_removal_failed, bad_output (the result could not be stored, or the GPU that took a camera angle or inpaint run couldn't run that model yet) or real_person (the prompt names a real, identifiable person). A failed run costs nothing. Run it again.

created_at*string
Formatdate-time
started_at*|
Formatdate-time
finished_at*|
Formatdate-time
Example Request
curl -X GET 'https://tensorfactory.ai/v1/generations/0b8c6f0e-5d1a-4a3e-9c61-2f7d8e4b9a10'
Example Response
{  "id": "0b8c6f0e-5d1a-4a3e-9c61-2f7d8e4b9a10",  "status": "done",  "model": "qwen-image/text-to-image",  "prompt": null,  "aspect_ratio": "1:1",  "seed": 1834920211,  "steps": 4,  "mode": "fast",  "image": null,  "image_2": null,  "image_3": null,  "transparent_background": false,  "price_usd": 0.003,  "usage": {    "execution_s": 2.1,    "queue_s": 0.132,    "gpu_cost_usd": 0.00105,    "switch_s": 0  },  "result": {    "image_url": "https://tensorfactory.ai/v1/files/outputs/0b8c6f0e-5d1a-4a3e-9c61-2f7d8e4b9a10.png?expires=1794046209&signature=...",    "width": 1024,    "height": 1024,    "expires_at": "2026-11-07T10:10:09.000Z",    "expired": false,    "available_until": "2026-11-07T10:10:09.700Z",    "outputs": [      {        "url": "https://tensorfactory.ai/v1/files/outputs/0b8c6f0e-5d1a-4a3e-9c61-2f7d8e4b9a10.png?expires=1794046209&signature=...",        "mime": "image/png",        "name": "image"      }    ]  },  "error": null,  "created_at": "2026-11-07T10:00:00.000Z",  "started_at": "2026-11-07T10:00:01.200Z",  "finished_at": "2026-11-07T10:00:09.700Z"}