Table of contents

Job Status Functions

Job Status Functions

pollJobStatus

pollJobStatus(apiBaseUrl, jobId, options?, headers?): Promise<JobStatusResponse>

Polls job status until completion or timeout. This function continuously checks the status of a job until it completes, fails, or times out.

Parameters

NameTypeDescription
apiBaseUrlstringThe API base URL
jobIdstringThe ID of the job to poll
optionsJobStatusOptionsPolling options
headersRecord<string, string>Optional headers for authentication (e.g., API key)

Returns

Promise<JobStatusResponse>

Promise that resolves with the final job status