Cancel an extraction
Stops the extraction. Pages already scraped and tokens already used stay billed.
POST
/v1/vision/extracts/{job_id}/cancel
Stops the extraction. Pages already scraped and tokens already used stay billed.
Authentication
Bearer Token (b3os_sk_ API key or b3os_pat_ token) API Key (cookie: __Host-b3os_session)
Path Parameters
job_id
string
required
path
The extraction job ID (`job_…`).
Example:
"job_01m5t3vh38hw2qyvr3fx3tx6vm"Responses
200
The canceled job.
application/jsonid
string
REQUIRED
object
string
REQUIRED
Enum:
jobstatus
string
REQUIRED
`queued` → `running` → one of the terminal statuses `succeeded`, `failed` or `canceled`. A job never leaves
a terminal status.
Enum:
queued, running, succeeded, failed, canceledcreated_at
string (date-time)
REQUIRED
updated_at
string (date-time)
REQUIRED
started_at
string (date-time) | null
finished_at
string (date-time) | null
progress
object
How far a job has got, in the job's own unit (pages, items, steps).
completed
integer
REQUIRED
Units finished, successfully or not.
failed
integer
Units that failed (included in `completed`).
total
integer | null
Units expected, when known.
unit
string
REQUIRED
What is counted, such as `pages`, `items` or `steps`.
result
object
data
unknown
REQUIRED
The extracted data, matching your schema.
sources
string[]
REQUIRED
Pages the data came from.
Array of:
string
error
object
An RFC 9457 problem. `code` is stable and listed in the errors catalog; `type` links to its entry. `detail`
is human-readable and may change. Extension members appear only for the codes that document them; ignore
members you do not recognize.
type
string (uri)
REQUIRED
`https://docs.beta.b3os.org/errors#<code>`.
title
string
REQUIRED
Short summary of the problem type.
status
integer
REQUIRED
The HTTP status code, repeated for convenience.
code
string
REQUIRED
Stable machine-readable error code from the errors catalog.
detail
string
REQUIRED
Explanation of this occurrence. Never contains secrets.
instance
string
The request ID (`req_…`) of the request that failed. Include it when you contact support.
errors
object[]
Validation problems, one per field (`invalid_request` and the other codes that list `errors`).
Array of:
pointer
string
REQUIRED
Where the problem is: a JSON pointer into the request body (`/url`, `/steps/0/uses`), or `#query/<name>`,
`#path/<name>` or `#header/<name>` for parameters.
detail
string
REQUIRED
What is wrong there.
reason
string
Finer-grained cause for codes that document one (`unauthorized`, `forbidden`, `egress_denied`, `upstream_unreachable`, …).
required_scope
string
The scope that was missing (`forbidden` with `reason: scope`).
retry_after_s
integer
Same value as the `Retry-After` header, for clients that only read the body.
limit
object
The limit an error refers to. IDs and current values are listed by `GET /v1/limits`.
id
string
REQUIRED
Limit ID, such as `vision.scrape.rpm` or `sandboxes.concurrent`.
limit
number
REQUIRED
The limit's value.
unit
string
REQUIRED
What the limit counts, such as `requests`, `sandboxes`, `vcpu` or `MiB`.
window_s
integer
Window length in seconds for rate limits and quotas.
current
number
Current usage against the limit, when known.
current_status
string
The object's current status, for state conflicts such as `sandbox_not_running`.
upstream_status
integer
The HTTP status the upstream returned (`upstream_error`, `action_output_invalid`).
step
string
The failed step, as a step ID (routines), an index (`act`) or a path such as `beats/2/do/0` (render).
pack_error
object
The error a pack's error mapping chose (`upstream_error` from pack actions).
code
string
REQUIRED
message
string
REQUIRED
retryable
boolean
REQUIRED
timing
object
Server-side phase durations in milliseconds with microsecond resolution: the same phases as the
`Server-Timing` header, keyed `<phase>_ms`. `total_ms` is always present. Phase names are product-specific
and documented per operation. Example values in this reference are illustrative, not measurements.
total_ms
number
REQUIRED
expires_at
string (date-time) | null
When the job's results are deleted (retention); `null` while the job is not terminal.
metadata
object
Up to 16 string key-value pairs you attach to an object for your own use. Keys are 1 to 40 characters of
`A-Z a-z 0-9 _ . : -`; values are at most 500 characters. B3OS never interprets them.
webhook
object
Where to deliver this job's events. Deliveries are `POST`s of a `WebhookEvent` signed with
`B3OS-Signature: t=<unix seconds>,v1=<hex HMAC-SHA256 of "<t>.<raw body>">` using the endpoint's secret
(`POST /v1/webhooks/secret`). Failed deliveries are retried with backoff for 24 hours. Delivery goes
through the egress guard, so private and loopback addresses are refused.
url
string (uri)
REQUIRED
An `https://` URL.
events
string[]
Event types to deliver. Defaults to the terminal events (`job.succeeded`, `job.failed`, `job.canceled`); `["*"]` delivers every event.
Array of:
string
kind
string
REQUIRED
Enum:
vision.extract
400
The request failed validation (`invalid_request`, `invalid_url`).
401
Missing, malformed, expired or revoked credentials (`unauthorized`).
403
Authenticated but not allowed (`forbidden`, `egress_denied`).
404
No such job in this project (`job_not_found`).
409
The job already finished (`job_already_finished`).
429
A rate, concurrency or quota limit applies (`rate_limited`, `concurrency_limited`, `quota_exceeded`).
500
Something failed inside B3OS (`internal`). Retry with backoff.
503
The node or the product is not available right now (`node_unavailable`, `product_unavailable`, `capacity_unavailable`).
curl -X POST 'https://beta-api.b3os.org/v1/vision/extracts/job_01m5t3vh38hw2qyvr3fx3tx6vm/cancel' \ -H 'Authorization: Bearer YOUR_API_TOKEN'
const response = await fetch('https://beta-api.b3os.org/v1/vision/extracts/job_01m5t3vh38hw2qyvr3fx3tx6vm/cancel', { method: 'POST', headers: { "Authorization": "Bearer YOUR_API_TOKEN" }});const data = await response.json();console.log(data);
import requestsheaders = { 'Authorization': 'Bearer YOUR_API_TOKEN'}response = requests.post('https://beta-api.b3os.org/v1/vision/extracts/job_01m5t3vh38hw2qyvr3fx3tx6vm/cancel', headers=headers)print(response.json())
200
Response
{ "id": "job_01m5t3vh38hw2qyvr3fx3tx6vm", "object": "job", "kind": "vision.extract", "status": "canceled", "created_at": "2026-10-25T18:20:00.000Z", "updated_at": "2026-10-25T18:20:01.000Z", "started_at": "2026-10-25T18:20:00.004Z", "finished_at": "2026-10-25T18:20:01.000Z", "error": { "type": "https://docs.beta.b3os.org/errors#job_canceled", "title": "Job canceled", "status": 409, "code": "job_canceled", "detail": "Canceled by key_01m5t5gb92a5zncjx654gevx4p" }, "expires_at": "2026-11-01T18:20:01.000Z", "metadata": {}}
API Playground
Try this endpoint
POST
/v1/vision/extracts/{job_id}/cancel