Overview
No request body. Cancels only queued runs that have never been admitted or dispatched. Admission and cancellation are serialized atomically. Running/outcome-unknown work returns 409 run_not_cancelable. Already terminal runs return their current snapshot with 200, including outputs if applicable. Repeating cancellation needs no Idempotency-Key. A newly canceled run releases its commitment and emits its configured terminal webhook once (delivery retries remain possible). Foreign or non-v3 runs return 404.
Requires an API key. Send Authorization: Bearer YOUR_API_KEY. Authentication →
curl 'https://fusara.ai/api/v3/run/123456/cancel' \
--request POST \
-H "Authorization: Bearer $FUSARA_API_KEY"Parameters
- path
- Format: int64
- Minimum: 1
- Maximum: 4294967295
Responses
OK
Illustrative response. Prices, IDs and URLs come from your own request.
{
"id": 123456,
"status": "canceled",
"cost": {
"unit": "common_fuz",
"expected": "40.0000",
"status": "settled",
"charged": "0.0000"
}
}Numeric run ID. Use it for status, results, cancellation and matching webhooks.
- Format: int64
- Minimum: 0
- Maximum: 4294967295
queued or running while in progress; succeeded, failed or canceled when terminal.
Nested fields 4
Billing unit: common_fuz.
Total accepted estimate for this run, as a decimal string.
pending until billing is confirmed, then settled. Generation can finish before settlement.
chargedstringConfirmed final charge, as a decimal string. Omitted while pending; confirmed zero is 0.0000.
outputsobject[]Applicable outputs in their original order. Omitted when none exist; a failed run can still have usable partial outputs.
Nested fields 7
- Alternative values: "text", "json", "boolean", "image", "video", "audio", "media", "model_asset"
media_idintegerReusable account media ID when this output is a file.
- Format: int64
- Minimum: 0
- Maximum: 4294967295
urlstringDownload URL when the file is available. Save it before url_expires_at.
expiredbooleanTrue when the media is no longer available; its dead URL is omitted.
valueany JSON valueInline result: a string for type=text, a native JSON value for type=json, or a boolean for type=boolean. Empty strings, false and JSON null are valid values. Omitted for files and model assets.
- When type is "text": required; string
- When type is "json": required; any JSON value
- When type is "boolean": required; boolean
- When type is "image" or "video" or "audio" or "media" or "model_asset": must be omitted
model_asset_idinteger- Format: int64
- Minimum: 0
- Maximum: 4294967295
Response headers
Support/trace identifier for this HTTP request.