We collect minimal analytics to understand how the site is used. If you decline, we do not load analytics.
Docs/Endpoints//v1/jobs/{job_id}
GETDELETE/v1/jobs/{job_id}

Poll async jobs for status, progress, result, and errors. Same resource supports cancelling a job while it is still queued. Auth: X-API-Key on both methods.

JobsGET · pollDELETE · cancel queued

GET — Poll job

Returns a single JSON object for the job. input_s3_key and input_s3_bucket are not exposed; the API includes a presigned pdf_url for the source PDF (default expiry 3600s in _make_presigned_url).

Post-processing on read applies only to door-detector: result.doors / result.doors_found are filtered. TOC and content-extractor results are returned as stored.

id
string
Job UUID.
status
string
queued, processing, complete, failed, cancelled, …
model
string
toc-parser, content-extractor, door-detector, …
model_version
string
Model version string.
tier
string
When applicable.
cached
boolean
When applicable.
cached_from_job_id
string
When applicable.
queued_at
timestamp
When the job was queued.
processing_started_at
timestamp
When processing began.
completed_at
timestamp
When the job finished.
processing_time_ms
integer
Recorded processing duration.
input_page_count
integer
Input metadata.
input_file_size_bytes
integer
Input metadata.
input_source
string
Input metadata.
progress
string
Human-readable status string.
result
object | null
null until complete (or absent); shape depends on model.
error_code
string
On failure.
webhook_url
string
If set on submit.
webhook_delivered_at
timestamp
If delivered.
expires_at
timestamp
Job row expiry; GET requires expires_at > now().
pdf_url
string
Presigned GET for the job PDF.

Worker failures (e.g. URL_UNREACHABLE, PDF_CORRUPT, INTERNAL_ERROR) appear as status: failed with error_code on this object.

GET — Code examples

curl -s https://api.anchorgrid.ai/v1/jobs/7c9e6679-7425-40de-944b-e07fc1f90ae7 \
  -H "X-API-Key: <your-api-key>"

GET — Response — 200 OK

Shape varies by lifecycle stage; see the preview panel for queued vs complete examples.

GET — Errors

404
Unknown id, another account’s job, or expires_at ≤ now() — same response in all cases (anti-enumeration).

DELETE — Cancel job

Cancels a job only while status === "queued". Same auth and ownership rules as GET.

curl -X DELETE https://api.anchorgrid.ai/v1/jobs/7c9e6679-7425-40de-944b-e07fc1f90ae7 \
  -H "X-API-Key: <your-api-key>"
job_id
string (UUID)
The cancelled job.
status
string
cancelled

DELETE — Errors

404
Same as GET — missing job or not your account.
409
JOB_NOT_CANCELLABLE — already processing, complete, failed, etc.

Credits

Submitting jobs (for example spec parse or content-extract) consumes SPEC credits; polling GET /v1/jobs and DELETE /v1/jobs do not.

Typical spec workflow

  1. POST /v1/documentsdocument_id
  2. POST /v1/specs/parse/document → TOC job_id
  3. GET /v1/jobs/{toc_job_id} until complete → result.divisions / section codes
  4. POST /v1/specs/content-extract with job_id: TOC job id and section_codes and/or division_codes
  5. GET /v1/jobs/{content_job_id} until complete → result.sections

Response Preview

200 OK
{
  "id": "7c9e6679-7425-40de-944b-e07fc1f90ae7",
  "status": "queued",
  "model": "toc-parser",
  "model_version": "toc-parser-v1.0.0",
  "progress": "Queued",
  "result": null,
  "queued_at": "2025-03-01T18:00:00.000Z",
  "processing_started_at": null,
  "completed_at": null,
  "processing_time_ms": null,
  "pdf_url": "https://s3.example.com/presigned-get…"
}