Skip to main content
Slow NDI operations return a Job. You can wait for completion, read the latest state, stream progress, cancel active work, or list past jobs through client.jobs.

Submit and wait

jobs.wait polls until the job is terminal. Its default timeout is 300 seconds. A timeout stops waiting but does not cancel the server-side job.

Choose inline wait or polling

Job-creating methods accept wait_seconds. This asks the server to hold the submission response open for up to 300 seconds:
The document method returns a Job whether the work finishes inline or keeps running. wait_seconds is a server-side hold-open window. The timeout passed to jobs.wait is the SDK’s total polling budget. Neither timeout cancels the job.

Retrieve job status

Use jobs.get when you control polling or need the latest state once.
Treat status values as open-ended. Use job.is_terminal or the exported JobStatus members instead of assuming this table can never grow.

Handle failures and timeouts

By default, jobs.wait throws JobFailedError for failed or cancelled jobs and JobTimeoutError when its local wait budget expires. Both errors carry the last job state.
Set raise_on_failure: false when you prefer to inspect a failed or cancelled job as a normal return value.

Cancel a job

Only queued or running jobs can be cancelled. Cancelling a terminal job throws ConflictError with code job_not_cancellable.

List and paginate jobs

jobs.list returns one cursor page, newest first. Filter by workspace, kind, status, or creation time.
Use iterAll to traverse every page without managing cursors.

Stream progress

jobs.events yields Server-Sent Events until the job becomes terminal or the server closes the stream.
Events are a latency convenience, not a completion guarantee. Always confirm the final state with jobs.get or jobs.wait. Pass last_event_id when reconnecting to continue the event sequence.

Result retention

The job row can outlive its result payload. Check job.result_state before using an older result. When retention has removed the payload, artifact reads throw ResultExpiredError.
The TypeScript SDK does not currently wrap GET /v1/jobs/{id}/request, DELETE /v1/jobs/{id}, or PATCH /v1/jobs/{id}. Call those REST endpoints directly when you need request inspection, soft deletion, or updates.

Methods

Next steps