Cancel a generation
Stops a queued or running generation. It ends cancelled and costs nothing.
A generation that is already over is answered as it is.
apiKeyAuthorizationBearer <tf_...>Your API key from API keys, sent as Authorization: Bearer $TENSORFACTORY_API_KEY. Keep it on your server.
id*stringThe generation's id.
uuidThe generation after the cancel.
application/json- response
id*stringThe generation's id.
uuidstatus*stringqueued and running are not over yet. done, failed and cancelled are final.
"queued""running""done""failed""cancelled"model*stringThe 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*stringThe shape you asked for. auto for inpaint.
seed*integerThe seed the run used: the one you sent, or the random one we drew, so you can make the same image again.
steps*integerDenoising 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*booleanWhether 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*numberWhat 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*stringdate-timestarted_at*|date-timefinished_at*|date-timecurl -X POST 'https://tensorfactory.ai/v1/generations/0b8c6f0e-5d1a-4a3e-9c61-2f7d8e4b9a10/cancel'{ "id": "0b8c6f0e-5d1a-4a3e-9c61-2f7d8e4b9a10", "status": "cancelled", "model": "qwen-image/text-to-image", "prompt": null, "aspect_ratio": "1:1", "seed": 402117736, "steps": 4, "mode": "fast", "image": null, "image_2": null, "image_3": null, "transparent_background": false, "price_usd": 0, "usage": null, "result": null, "error": null, "created_at": "2026-11-07T10:00:00.000Z", "started_at": null, "finished_at": "2026-11-07T10:00:02.000Z"}Delete a generation DELETE
Deletes one of your generations: its settings, the finished image, and the uploads no other generation uses. A queued or running one is cancelled first. The credit ledger keeps amounts and references only.
Create an upload POST
Creates an upload slot and answers `201` with a signed `upload_url`. `PUT` the file there with every header in `upload_headers` within 15 minutes, then use `asset_id` as `image`, `image_2` or `image_3` in an edit. TensorFactory doesn't keep uploads: one is deleted when the run that uses it ends, or 30 minutes after it is made if no run uses it. Upload the file again for each edit.