Skip to main content
POST
/
v1
/
jobs
/
{job_id}
/
retry
from retab import Retab

client = Retab()

retried_job = client.jobs.retry("job_V1StGXR8_Z5jdHi6B-myT")

print(retried_job.status)  # queued
{
  "id": "job_V1StGXR8_Z5jdHi6B-myT",
  "object": "job",
  "status": "queued",
  "endpoint": "/v1/documents/extract",
  "request": {
    "document": {
      "filename": "invoice.pdf",
      "url": "data:application/pdf;base64,..."
    },
    "json_schema": { ... },
    "model": "retab-small"
  },
  "response": null,
  "error": null,
  "created_at": 1705420800,
  "started_at": null,
  "completed_at": null,
  "expires_at": 1706025600,
  "organization_id": "org_abc123",
  "metadata": {"batch_id": "batch_001"}
}
from retab import Retab

client = Retab()

retried_job = client.jobs.retry("job_V1StGXR8_Z5jdHi6B-myT")

print(retried_job.status)  # queued
{
  "id": "job_V1StGXR8_Z5jdHi6B-myT",
  "object": "job",
  "status": "queued",
  "endpoint": "/v1/documents/extract",
  "request": {
    "document": {
      "filename": "invoice.pdf",
      "url": "data:application/pdf;base64,..."
    },
    "json_schema": { ... },
    "model": "retab-small"
  },
  "response": null,
  "error": null,
  "created_at": 1705420800,
  "started_at": null,
  "completed_at": null,
  "expires_at": 1706025600,
  "organization_id": "org_abc123",
  "metadata": {"batch_id": "batch_001"}
}

Path Parameters

job_id
string
required
The unique identifier of the job to retry.

Retry Behavior

Retry resets the existing job in place and keeps the same job_id. Retry is supported when the current status is:
  • failed
  • cancelled
  • expired if artifact cleanup has not already completed
On success, Retab clears the previous error, removes the previous response, refreshes expires_at, and requeues the job for execution. If task dispatch is temporarily delayed after the retry is accepted, the API returns 503 with "Retry queued; dispatch is delayed". The retry still succeeded, so poll the same job_id.

Authorizations

Api-Key
string
header
required

Path Parameters

job_id
string
required

Query Parameters

access_token
string | null

Response

Successful Response

Core Job object following OpenAI-style specification.

Represents a single asynchronous job that can be polled for status and result retrieval.

endpoint
enum<string>
required
Available options:
/v1/documents/extract,
/v1/documents/parse,
/v1/documents/split,
/v1/documents/classify,
/v1/schemas/generate,
/v1/edit/agent/fill,
/v1/edit/templates/fill,
/v1/edit/templates/generate,
/v1/evals/extract/process,
/v1/evals/split/process,
/v1/evals/classify/process,
/v1/evals/extract/extract,
/v1/evals/extract/split
organization_id
string
required
id
string
object
string
default:job
Allowed value: "job"
status
enum<string>
default:validating
Available options:
validating,
queued,
in_progress,
completed,
failed,
cancelled,
expired
error
JobError · object

Error details when job fails.

warnings
JobWarning · object[] | null
created_at
integer
started_at
integer | null
completed_at
integer | null
expires_at
integer
metadata
Metadata · object
cloud_task_name
string | null
cancelled
boolean
default:false
attempt_count
integer
default:0
last_attempt_at
integer | null
last_failure_code
string | null
request
Request · object
response
JobResponse · object

Response stored when job completes successfully.

request_gcs_paths
null