Skip to main content
Retrieve the latest status and output for any asynchronous job. Use this endpoint after submitting long-running generation or extraction requests to poll progress or fetch final results.

Path parameters

  • jobId — Required identifier returned when you created the job.

Sample request

curl https://api.worklet.cloud/v1/jobs/job_01hx9q9 \

Response

{
  "jobId": "job_01hx9q9",
  "jobType": "extract/pdf",
  "status": "completed",
  "createdAt": "2025-03-18T01:24:07.123Z",
  "updatedAt": "2025-03-18T01:24:53.904Z",
  "statusUrl": "https://api.worklet.cloud/v1/jobs/job_01hx9q9",
  "result": {
    "chunks": [
      {
        "id": "chunk_001",
        "text": "Horizon overview...",
        "page": 1,
        "segmentIndex": 0
      }
    ]
  },
  "events": ["job.completed"]
}

Status values

  • queued — Job accepted and awaiting processing.
  • processing — Work is currently underway.
  • completed — Job finished successfully; result is populated.
  • failed — Job terminated with an error; inspect error for details.

Register job-specific webhook

curl https://api.worklet.cloud/v1/jobs/job_01hx9q9/webhooks \
  -X POST \
  -H "Content-Type: application/json" \
  -d '{
    "url": "https://hooks.example.com/horizon/jobs",
    "events": ["job.completed"],
    "secret": "whsec_*******"
  }'
Returns 202 Accepted. Horizon delivers a signed payload when the job reaches a terminal state. Use account-level webhooks for global automation and job-level webhooks for ad-hoc callbacks tied to a single job.

Usage notes

  • statusUrl mirrors this endpoint, so you can poll either the returned URL or call GET /jobs/{jobId} directly.
  • Horizon retains job results for at least 24 hours; persist critical outputs in your own storage.
  • Webhook notifications (account-level or job-level) include the same payload as this endpoint.