BrenzuriStart free
Endpoints: jobs
Reference

Endpoints: jobs

A status snapshot, an event stream, and three steering routes.

On this page

A job is the work behind an article or a site read. Read its status with GET /jobs/{id}, follow the event stream, or register a webhook for job.done and job.failed.

Steps of an article job#

The times are the planning estimates the estimate route returns, not promises.
StepWhat it doesOptionalTypical time
findSearches the domains chosen for the subject.no14 s
groupGroups results by origin before anything is read.no6 s
readReads one page per origin.no39 s
checkChecks claims across origins.no31 s
writeWrites the article.no48 s
seoWrites the SEO fields. Only when the brief asks.yes4 s
qaReads the finished text back against the sources.no9 s
illustrateMakes the illustration. Only when the brief asks.yes40 s
sourcesReads the article’s sources again. It is the first step of a job that adds languages, and is not part of a job that starts from a brief.no20 s

Steps of a language version#

Each language version of a brief adds its own steps after the steps of the article, in the order the languages were asked. The id ends in the language code, as write-es. They are all optional: a person can skip one, and a job skips one on its own instead of failing.

See [Write in several languages](/docs/guides/languages).
Language stepWhat it doesSkipping itTypical time
write-<code>Writes the article again in that language from the same claims, not translated sentence by sentence.No version in that language; its credit is released.48 s
seo-<code>Writes the SEO fields in that language. Only when the brief asks for SEO fields.The version has no SEO fields.4 s
qa-<code>Reads the text back against the sources.No version in that language; its credit is released.9 s

When a step fails#

A failed step pauses the job instead of ending it. Retry the step, skip it if it is optional, or cancel. A job left paused for an hour is failed and its credits released. Provider outages are waited out with a growing delay, from one minute to fifteen, for up to 24 hours before the job gives up with reason: provider_gave_up.

GET/api/v1/jobs/{id}

  • Scoperead
  • Credits free

Read where a job is now: its status, the step it is on and every step with its status. This is the route to poll when you cannot hold an event stream open.

Path

NameTypeDescription
idstringThe job id, jobId from starting an article or a read.

Response

200The Job status. No credit or balance figure is in it.

JSON
{
  "id": "C8A41E07-52B9-4D36-8F1A-0B7E9D3C6A25",
  "kind": "article",
  "status": "running",
  "step": "check",
  "stepIndex": 3,
  "steps": [
    {
      "id": "find",
      "name": "Searching your domains",
      "status": "done",
      "optional": false
    },
    {
      "id": "group",
      "name": "Grouping by origin",
      "status": "done",
      "optional": false
    },
    {
      "id": "read",
      "name": "Reading one page per origin",
      "status": "done",
      "optional": false
    },
    {
      "id": "check",
      "name": "Checking claims across origins",
      "status": "running",
      "optional": false
    },
    {
      "id": "write",
      "name": "Writing",
      "status": "todo",
      "optional": false
    },
    {
      "id": "seo",
      "name": "Writing the SEO fields",
      "status": "todo",
      "optional": true
    },
    {
      "id": "qa",
      "name": "Reading the finished text back",
      "status": "todo",
      "optional": false
    }
  ],
  "startedAt": "2026-10-06T12:00:03Z",
  "articleId": "9F3B1C2A-6D4E-4B7A-8C15-2E0A7D91B3F4"
}

Errors

StatusCodeWhen
404not_foundNo such job, or one a key or an agent cannot see: only article jobs and site reads are shown to a credential.
  • status is queued, running, paused, done, failed or cancelled. A job is finished when it is done, failed or cancelled; paused means a step failed and the job waits to be steered.
  • step is absent once the job has finished. error carries the cause when a job failed or was cancelled.
  • Polling every 3 to 5 seconds is enough: a job takes minutes. The route counts against the 60 requests a minute of the credential.
curl "$BRENZURI_URL/api/v1/jobs/$JOB_ID" \
  -H "Authorization: Bearer $BRENZURI_KEY"
Example request

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

  • Scoperead
  • Credits free

Follow a job as a server-sent event stream. It replays what has happened and then streams new events. The stream closes after done, or after a refunded that ends a failed or cancelled job.

Path

NameTypeDescription
idstringThe job id, jobId from starting an article or a read.

Response

200 text/event-streamFrames of id: <sequence> and data: <Job event JSON>. A comment line : brenzuri job <id> opens the stream.

Stream
: brenzuri job C8A41E07-52B9-4D36-8F1A-0B7E9D3C6A25

id: 1
data: {"details":[{"tag":"ok","text":"3 domains searched"}],"kind":"step","ms":14210,"status":"done","stepId":"find","summary":"8 results"}

id: 2
data: {"details":[{"tag":"ok","text":"2 independent origins"}],"kind":"step","ms":6120,"status":"done","stepId":"group","summary":"5 results · 2 origins"}

: ping is sent as  data: {"kind":"ping"}  every 20 s, and every 5 s with "queued" while waiting

id: 9
data: {"articleId":"9F3B1C2A-6D4E-4B7A-8C15-2E0A7D91B3F4","kind":"done"}

Errors

StatusCodeWhen
404not_foundNo such job.
  • Send Last-Event-ID with the last sequence you saw to resume without replaying.
  • An article job opens with one todo event for each step of its plan, language version steps included, so a client can draw the whole list before the first step runs.
  • A refunded event with reason: "unused" comes just before done. It carries the credits of the language versions that were skipped, failed or came back empty, and does not close the stream. A refunded without that reason means the job failed or was cancelled.
  • ping events keep the connection alive: every 20 seconds, and every 5 seconds with queued (the position) while the job waits. They carry no sequence number.
  • A failed step does not close the stream. The job pauses and the stream stays open until the step is steered, or until the job is failed and refunded.
  • For a snapshot instead of a stream, read the job status, or use a webhook.

POST/api/v1/jobs/{id}/steps/{stepId}/retry

  • Scopeedit
  • Credits free
  • Role edit

Run the failed step again. A step that has failed more than 3 times, or failed terminally, settles the job as failed and releases the credits.

Path

NameTypeDescription
idstringThe job id, jobId from starting an article or a read.
stepIdstringThe step that failed: find, group, read, check, write, seo, qa or illustrate; sources for a job that adds languages; or a language step such as write-es.

Response

204No body.

Errors

StatusCodeWhen
409job_not_pausedThe job is running; there is nothing to retry.
409step_mismatchThe failed step is a different one.
409job_settledThe job has already finished.
curl -X POST "$BRENZURI_URL/api/v1/jobs/$JOB_ID/steps/$STEP_ID/retry" \
  -H "Authorization: Bearer $BRENZURI_KEY"
Example request

POST/api/v1/jobs/{id}/steps/{stepId}/skip

  • Scopeedit
  • Credits free
  • Role edit

Skip a failed optional step (seo, illustrate, or a language version step such as write-es) and let the job carry on. Steps that affect what the article claims about its sources cannot be skipped.

Path

NameTypeDescription
idstringThe job id, jobId from starting an article or a read.
stepIdstringThe failed step.

Response

204No body.

Errors

StatusCodeWhen
400step_not_optionalThe step cannot be skipped.
409job_not_pausedThe job is running.
409step_mismatchThe failed step is a different one.
409job_settledThe job has already finished.
  • Skipping the write- or qa- step of a language leaves that language out: its other steps are skipped with it, no article is made for it, and its credit is released when the job finishes. Skipping its seo- step keeps the version and leaves its SEO fields out.
curl -X POST "$BRENZURI_URL/api/v1/jobs/$JOB_ID/steps/$STEP_ID/skip" \
  -H "Authorization: Bearer $BRENZURI_KEY"
Example request

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

  • Scopeedit
  • Credits releases the hold
  • Role edit

Cancel a job. The credits it held are released and job.failed is raised with failure: "cancelled".

Path

NameTypeDescription
idstringThe job id, jobId from starting an article or a read.

Response

204No body.

Errors

StatusCodeWhen
409job_settledThe job has already finished.
curl -X POST "$BRENZURI_URL/api/v1/jobs/$JOB_ID/cancel" \
  -H "Authorization: Bearer $BRENZURI_KEY"
Example request