Skip to main content

Managing Denoising Jobs

client.denoise.jobs lets you list, retrieve, delete, and refresh URLs for past denoising jobs.


jobs.list()

client.denoise.jobs.list(params?: ListDenoiseJobsParams): Promise<PaginatedList<DenoisingJob>>

Parameters

PropertyTypeDefaultDescription
limitnumber20Jobs per page
offsetnumber0Pagination offset
statusJobStatusFilter: pending, processing, completed, failed
sortBystringcreated_atcreated_at, completed_at, or processing_time_ms
sortOrder'asc' | 'desc''desc'Sort direction

Example

const page = await client.denoise.jobs.list({ status: 'completed', limit: 5 });

for (const job of page.items) {
console.log(job.jobId, job.processingTimeMs + 'ms', job.outputUrl);
}

jobs.get()

client.denoise.jobs.get(jobId: string): Promise<DenoisingJob>

Example

const job = await client.denoise.jobs.get('job_abc123');

if (job.status === 'completed') {
console.log('Output:', job.outputUrl);
if (job.outputPurged) console.warn('Output was auto-deleted (ephemeral)');
}

jobs.delete()

Permanently deletes a job and its stored audio files.

client.denoise.jobs.delete(jobId: string): Promise<void>

Example

await client.denoise.jobs.delete('job_abc123');

jobs.refreshUrls()

Refresh expired presigned URLs for both input and output files. URLs expire after 24 hours.

client.denoise.jobs.refreshUrls(jobId: string): Promise<DenoiseRefreshedUrls>

Response

{
jobId: string;
inputUrl: string | null;
inputUrlExpiresAt: string | null;
outputUrl: string | null;
outputUrlExpiresAt: string | null;
outputEphemeral: boolean;
}

Example

const refreshed = await client.denoise.jobs.refreshUrls('job_abc123');
console.log('Fresh output URL:', refreshed.outputUrl);

DenoisingJob shape

{
jobId: string;
status: 'pending' | 'processing' | 'completed' | 'failed';
createdAt: string;
startedAt: string | undefined;
completedAt: string | undefined;
processingTimeMs: number | undefined;
audioDurationSeconds: number | undefined;
realTimeFactor: number | undefined;
processingMetadata: ProcessingMetadata | undefined;
inputUrl: string | null;
inputUrlExpiresAt: string | null;
inputFileSize: number | undefined;
outputUrl: string | null;
outputUrlExpiresAt: string | null;
outputEphemeral: boolean;
outputFileSize: number | undefined;
outputFormat: OutputFormat | undefined;
outputPurged: boolean;
errorCode: string | undefined;
errorMessage: string | undefined;
}