{"record":{"id":"b67264a6f855f68e","repo":"vercel/ai","slug":"transcriptionjobsubmissionfailed","errorCode":"TranscriptionJobSubmissionFailed","errorMessage":"Failed to submit transcription job to Rev.ai","messagePattern":"Failed to submit transcription job to Rev\\.ai","errorType":"error_code","errorClass":"AISDKError","httpStatus":null,"severity":"error","filePath":"packages/revai/src/revai-transcription-model.ts","lineNumber":161,"sourceCode":"    const { formData, warnings } = await this.getArgs(options);\n\n    const { value: submissionResponse } = await postFormDataToApi({\n      url: this.config.url({\n        path: '/speechtotext/v1/jobs',\n        modelId: this.modelId,\n      }),\n      headers: combineHeaders(this.config.headers?.(), options.headers),\n      formData,\n      failedResponseHandler: revaiFailedResponseHandler,\n      successfulResponseHandler: createJsonResponseHandler(\n        revaiTranscriptionJobResponseSchema,\n      ),\n      abortSignal: options.abortSignal,\n      fetch: this.config.fetch,\n    });\n\n    if (submissionResponse.status === 'failed') {\n      throw new AISDKError({\n        message: 'Failed to submit transcription job to Rev.ai',\n        name: 'TranscriptionJobSubmissionFailed',\n        cause: submissionResponse,\n      });\n    }\n\n    const jobId = submissionResponse.id;\n    const timeoutMs = 60 * 1000; // 60 seconds timeout\n    const startTime = Date.now();\n    const pollingInterval = 1000;\n    let jobResponse = submissionResponse;\n\n    while (jobResponse.status !== 'transcribed') {\n      // Check if we've exceeded the timeout\n      if (Date.now() - startTime > timeoutMs) {\n        throw new AISDKError({\n          message: 'Transcription job polling timed out',\n          name: 'TranscriptionJobPollingTimedOut',","sourceCodeStart":143,"sourceCodeEnd":179,"githubUrl":"https://github.com/vercel/ai/blob/69428b1f8b037e4d118fb4853428d5c4e620493c/packages/revai/src/revai-transcription-model.ts#L143-L179","documentation":"This error is thrown by revai-transcription-model.doGenerate when the HTTP response from Rev.ai's job-submission endpoint reports a failed status. It wraps the full submission response as the cause, so the underlying Rev.ai error detail is preserved. It means the transcription job was never accepted by Rev.ai.","triggerScenarios":"POST to Rev.ai's transcription endpoint returns submissionResponse.status === 'failed' — e.g. invalid API key, malformed media URL, unsupported file format, or payload rejected by Rev.ai.","commonSituations":"Expired or missing REV_AI_API_KEY, media file unreachable or in an unsupported codec, exceeding account quotas, transient Rev.ai API outages.","solutions":["Inspect error.cause (the raw submission response) for Rev.ai's detailed failure reason","Verify the REV_AI_API_KEY is valid and has quota","Check the media URL/file is publicly reachable and in a supported format","Retry on transient failures with backoff"],"exampleFix":"// before\nawait revai.transcriptionModel('general').doGenerate({ mediaUrl: 'https://private/file.mp3' });\n// after\n// expose the file publicly or upload bytes, and catch:\ntry { await model.doGenerate(opts); } catch (e) { console.error(e.cause); }","handlingStrategy":"try-catch","validationCode":"if (!process.env.REV_AI_API_KEY) throw new Error('REV_AI_API_KEY is not set');\nconst ok = await fetch(mediaUrl, { method: 'HEAD' }).then(r => r.ok).catch(() => false);\nif (!ok) throw new Error('Media URL is not reachable');","typeGuard":"function isTranscriptionJobSubmissionFailed(e) {\n  return typeof e === 'object' && e !== null && e.name === 'TranscriptionJobSubmissionFailed';\n}","tryCatchPattern":"try {\n  const result = await model.doGenerate(options);\n} catch (e) {\n  if (e.name === 'TranscriptionJobSubmissionFailed') {\n    console.error('Rev.ai submission failed:', e.cause);\n  } else throw e;\n}","preventionTips":["Validate the API key and media URL before submitting","Log e.cause to capture Rev.ai's detailed rejection reason","Monitor Rev.ai status for outages before large batch jobs"],"tags":["network","api-error","transcription","revai","job-submission"],"backgroundTag":"api-job-submission-failed","analyzedSha":"69428b1f8b037e4d118fb4853428d5c4e620493c","analyzedAt":"2026-08-30T12:32:21.016Z","schemaVersion":2},"datasetVersion":"2026-08-30T13:17:10.514Z"}