Skip to main content

Jobs API

Jobs represent asynchronous executions (pathway runs, receptor invocations). Start a run via POST /v1/pathways/:id/execute (Pathways) or POST /v1/jobs with { "pathway_id": "<uuid>", "input": { ... } }; both return job_id. Then poll GET /v1/jobs/:jobId/status or consume GET /v1/jobs/:jobId/stream (SSE).

Start pathway run

POST /v1/jobs
Body: pathway_id (required for stored pathway) or inline pathway, optional input or signal. Response: { "job_id": "...", "status": "pending" }.

List jobs

GET /v1/jobs
Query: pathway_id, receptor_id, status, limit, offset. Response: { "jobs": [...], "total", "limit", "offset" }. Workspace-scoped.

Get job status

GET /v1/jobs/:jobId/status
Returns status, progress, current_step, failedReason, result (when completed), waitingFor (when paused for input). Status is authoritative from BullMQ; an optional Redis key may be used internally for early “queued” visibility. Response fields: job_id, status (pending | running | completed | failed | waiting | paused), progress, current_step, failedReason, result, waitingFor, created_at, processed_at, finished_at.
const status = await auvy.jobs.getStatus(jobId)

Stream job progress

GET /v1/jobs/:jobId/stream
SSE stream; consume until a terminal event (complete or error). Same workspace check as status.

Cancel job

POST /v1/jobs/:jobId/cancel
Returns 400 if job is already completed or failed.

Resume job

POST /v1/jobs/:jobId/resume
Use for workflows that are waiting or paused (e.g. human node).

Submit input (waiting job)

POST /v1/jobs/:jobId/input
Body: { "input": { ... } }. Use when a run is waiting for user input; then resume.

Transcribe audio

POST /v1/transcribe
Uploads a single audio blob for asynchronous transcription and returns a job_id.
{
  "audio_base64": "base64-audio",
  "mime_type": "audio/webm"
}
Use auvy.jobs.transcribe(file) in the TypeScript SDK or the public receptor transcription route when you need share-token access.