OpenapiVisor
Cancels a queued or running render in the caller's org.
Cancels a queued or running render in the caller's org.
POST /v1/visor/fleet/jobs/{id}/cancel
| Address | https://api.hanzo.ai/v1/visor/fleet/jobs/{id}/cancel |
| Method | POST |
| Operation | cancelFleetJob |
| Auth | Authorization: Bearer $HANZO_API_KEY |
Cancels a queued or running render in the caller's org. The engine cancel is org-scoped, so a tenant can only ever cancel its OWN job: a job in another tenant's shard is 404, exactly like one that never existed. An already-finished job is 409.
Request
4 fields, body application/json (required).
| Field | In | Type | Required | Description |
|---|---|---|---|---|
id | path | string | yes | ID is the job (activity) id, from the URL path. |
id | body | string | — | ID is the job (activity) id, from the URL path. |
reason | body | string | — | Reason is recorded on the cancellation; empty records "canceled from console". |
run | body | string | — | Run is the run id; empty defaults to the job id, which is what the dispatcher sets (runId == activityId == prompt_id), so the common case sends no body. |
Response
| Status | Body | Meaning |
|---|---|---|
200 | jobCanceled | ok |
200 body — 2 fields.
| Field | In | Type | Always | Description |
|---|---|---|---|---|
canceled | body | string | — | Canceled is the job id that was canceled. |
run | body | string | — | Run is the run id the cancel was applied to. |
Failure carries the platform error shape — see Errors.
Examples
hanzo has no subcommand for this operation — the CLI serves only what cloud's live route table confirms. Use HTTP or an SDK.
import { Configuration, VisorApi } from 'hanzoai';
const api = new VisorApi(new Configuration({ accessToken: process.env.HANZO_API_KEY }));
const { data } = await api.cancelFleetJob({ id: 'id', id: "<id>", reason: "<reason>" });from hanzoai.cloud import ApiClient, Configuration
from hanzoai.cloud.api import VisorApi
client = ApiClient(Configuration(access_token=os.environ["HANZO_API_KEY"]))
result = VisorApi(client).cancel_fleet_job(id='id', id="<id>", reason="<reason>")cfg := cloud.NewConfiguration()
cfg.AddDefaultHeader("Authorization", "Bearer "+os.Getenv("HANZO_API_KEY"))
client := cloud.NewAPIClient(cfg)
resp, _, err := client.VisorAPI.CancelFleetJob(context.Background()).Execute()
if err != nil {
return err
}use hanzo_cloud::apis::{configuration::Configuration, visor_api};
let mut cfg = Configuration::new();
cfg.bearer_access_token = std::env::var("HANZO_API_KEY").ok();
let result = visor_api::cancel_fleet_job(&cfg, Default::default()).await?;import ai.hanzo.cloud.ApiClient;
import ai.hanzo.cloud.api.VisorApi;
ApiClient client = new ApiClient();
client.setRequestInterceptor(b -> b.header("Authorization", "Bearer " + System.getenv("HANZO_API_KEY")));
var result = new VisorApi(client).cancelFleetJob();curl -X POST https://api.hanzo.ai/v1/visor/fleet/jobs/<id>/cancel \
-H "Authorization: Bearer $HANZO_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"id": "<id>",
"reason": "<reason>"
}'Tool visor, op cancelFleetJob — POST the JSON-RPC envelope to https://api.hanzo.ai/v1/mcp.
curl -X POST https://api.hanzo.ai/v1/mcp \
-H "Authorization: Bearer $HANZO_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"jsonrpc": "2.0",
"id": 1,
"method": "tools/call",
"params": {
"name": "visor",
"arguments": {
"op": "cancelFleetJob",
"input": {
"id": "<id>",
"reason": "<reason>"
}
}
}
}'How is this guide?