Skip to main content

Managing Transcription Jobs

client.asr.jobs lets you list, retrieve, delete, and refresh URLs for past transcription jobs.


jobs.list()

List the authenticated user's transcription jobs, newest-first.

client.asr.jobs.list(params?: ListASRJobsParams): Promise<PaginatedList<TranscriptionJob>>

Parameters

PropertyTypeDefaultDescription
limitnumber20Number of jobs to return
offsetnumber0Pagination offset
statusJobStatusFilter by status: pending, processing, completed, failed
sortOrder'asc' | 'desc''desc'Sort direction

Example

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

console.log(`${page.total} total jobs`);

for (const job of page.items) {
console.log(job.jobId, job.status, job.transcriptionPreview);
}

// Paginate
if (page.hasMore) {
const next = await client.asr.jobs.list({ limit: 10, offset: 10 });
}

Response — PaginatedList<TranscriptionJob>

{
items: TranscriptionJob[];
total: number;
limit: number;
offset: number;
hasMore: boolean;
}

jobs.get()

Retrieve a single transcription job by ID.

client.asr.jobs.get(jobId: string): Promise<TranscriptionJob>

Example

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

if (job.status === 'completed') {
console.log(job.transcriptionText);
} else if (job.status === 'failed') {
console.error(job.errorCode, job.errorMessage);
}

jobs.delete()

Permanently delete a transcription job and its associated audio files from storage.

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

Example

await client.asr.jobs.delete('job_abc123');
console.log('Job deleted');

jobs.refreshUrls()

Presigned download URLs for input audio files expire after 24 hours. Call this to generate a fresh URL without re-uploading.

client.asr.jobs.refreshUrls(jobId: string): Promise<ASRRefreshedUrls>

Response

{
jobId: string;
inputUrl: string | undefined;
inputUrlExpiresAt: string | undefined;
}

Example

const refreshed = await client.asr.jobs.refreshUrls('job_abc123');
console.log('New URL (valid 24h):', refreshed.inputUrl);

TranscriptionJob shape

{
jobId: string;
status: 'pending' | 'processing' | 'completed' | 'failed';
isStreaming: boolean;
transcriptionText: string | undefined;
transcriptionPreview: string | undefined; // First ~100 chars
detectedLanguage: string | undefined;
qualityScore: number | undefined;
audioMetadata: AudioMetadata | undefined;
processingTimeMs: number | undefined;
inputUrl: string | undefined;
inputUrlExpiresAt: string | undefined;
inputFileSize: number | undefined;
createdAt: string;
startedAt: string | undefined;
completedAt: string | undefined;
errorCode: string | undefined;
errorMessage: string | undefined;
}