Skip to content
Execution

Durable jobs

Queue work, resume progress, cancel jobs, and retrieve results.

Queue long-running API work through POST /api/v1/jobs. All seven operations support durable execution, idempotent creation, cursor pagination, cancellation, polling, stored SSE replay, sandbox mode, and signed webhook delivery. Jobs and recoverable results are retained for 30 days. Durable workers require their migrations and runtime configuration before activation.

Create job
curl https://deepsearch.app/api/v1/jobs \
  -H "Authorization: Bearer $DEEPSEARCH_API_KEY" \
  -H "Content-Type: application/json" \
  -H "Idempotency-Key: demo-job-1" \
  -d '{
    "operation": "dossier",
    "input": {
      "person": { "name": "Ada Lovelace" },
      "format": "json"
    },
    "sandbox": true
  }'

Events are a finite replay by default. Use follow=1 to follow progress and after or Last-Event-IDto resume. Follow connections end after four minutes; reconnect explicitly using the last event ID. Cancellation stops remaining work at a checkpoint; work already delivered can remain charged.

POST /api/v1/jobs

Create a queued background job.

GET /api/v1/jobs

List the caller's recent jobs.

GET /api/v1/jobs/{id}

Fetch status, errors, and final result.

GET /api/v1/jobs/{id}/events

Replay or follow stored Server-Sent Events, resuming after an event ID.

POST /api/v1/jobs/{id}/cancel

Cancel an account-owned queued or running job.