For AI agents: a documentation index is available at the root level at /llms.txt and /llms-full.txt. Append /llms.txt to any URL for a page-level index, or .md for the markdown version of any page.
Ask AIPlaygroundLoginFree API Key
HomeAPI ReferenceVoice AgentSpeech-to-TextText-to-SpeechIntelligenceSelf-Hosted Deployments
HomeAPI ReferenceVoice AgentSpeech-to-TextText-to-SpeechIntelligenceSelf-Hosted Deployments
    • Getting Started with Speech to Text
  • Pre-Recorded Audio
    • Getting Started
    • Feature Overview
    • Template Apps
      • Automatically Generating WebVTT & SRT Captions
      • Automatically Transcribe and Summarize Phone Calls
      • Getting Started with Deepgram Whisper Cloud
      • Generating and Saving Transcripts From the Terminal
      • Using Callbacks to Return Transcripts to Your Server
      • When Callback Is Not Received
      • When To Use Multichannel and Diarization
      • When To Use Keywords and Search
  • Streaming Audio
    • Compare Flux to Nova-3
  • Models and Languages
    • Models & Languages Overview
    • Languages Support
    • Language Detection
    • Multilingual Codeswitching
    • Model Options
    • Version
  • Formatting
    • Speaker Diarization
    • Dictation
    • Filler Words
    • Measurements
    • Numerals
    • Paragraphs
    • Profanity Filtering
    • Punctuation
    • Redaction
    • Smart Formatting
    • Supported Entity Types
    • Utterances
    • Utterance Split
  • Custom Vocabulary
    • Find and Replace
    • Keyterm Prompting
    • Keywords
    • Search
  • Media Input Settings
    • Channels
    • Encoding
    • Multichannel
    • Sample Rate
  • Results Processing
    • Understanding Word Confidence Scores
    • STT Callback
    • STT Tagging
    • Extra Metadata
  • Migrating
    • Migrating From Amazon Web Services (AWS) Transcribe to Deepgram
    • Migrating From Google Speech-to-Text (STT) to Deepgram
    • Migrating From OpenAI Whisper to Deepgram
    • Migrating from AssemblyAI Speech-to-Text to Deepgram
LogoLogo
Ask AIPlaygroundLoginFree API Key
On this page
  • Express.js bodyParser / Next.js API Routes
  • bodyParser Solution
  • Next.js API Routes Solution
  • NGINX
  • NGINX Solution
Pre-Recorded AudioTips and Tricks

When Callback Is Not Received

How to troubleshoot issues when a callback is not received.
Was this page helpful?
Previous

When To Use Multichannel and Diarization

Compare Deepgram's Multichannel and Diarization features to better understand when to use each feature.
Next
Built with

More often than not, requests that include a callback URL should receive an asynchronous response, even if the callback receives an error.

When attempting to transcribe a large audio file, there are multiple reasons you may not receive your transcription.

Express.js bodyParser / Next.js API Routes

Some serverless, including popular architecture like Express.s, use bodyParser to understand the body of the request being passed to your application.

By default, bodyParser includes a small default maximum payload size of 100kb, to responsibly limit impact of memory allocation on the server running your application. Essentially, you knowingly need to increase this, and hopefully understand what that would mean for the architecture you’re working on. Especially for serverless environments.

If this limit is reached when Deepgram attempts a callback request, bodyParser will return a 413 Request Entity Too Large response. Your server will most likely log the errors occurance, as it rejects the request from Deepgram.

bodyParser Solution

For bodyParser being used as middleware, you need to configure the parser with a new limit.

JavaScript
1// parse application/json
2jsonParser = bodyParser.json({
3 limit: '1mb' // raise from 100kb to 1mb
4})
5
6// parse raw
7rawParser = bodyParser.raw({
8 limit: '1mb' // raise from 100kb to 1mb
9})

Next.js API Routes Solution

To resolve this error in in Next.js API Routes, you need to configure the parser with a new limit. At the top of your API Routes file, include additional config.

JavaScript
1export const config = {
2 api: {
3 bodyParser: {
4 sizeLimit: '1mb', // raise from 100kb to 1mb
5 },
6 }
7}

NGINX

Many hosted servers, particularly NGINX based servers, have a maximum payload size for incoming requests. For example, NGINX has a default maximum payload size of 1 MB, which could be insufficient for larger transcripts.

A server will reject a callback due to the transcript size exceeding the payload limit, returning a 413 code and the message Request entity too large/Content too large/Payload too large, depending on which server receives the large payload.

NGINX Solution

To resolve the “Payload too large” issue for NGINX, follow these steps:

  1. Confirm the server’s maximum payload size: Determine if the server you are using has a maximum payload size limit. NGINX servers, for example, typically have a maximum payload size of 1 MB by default.
  2. Adjust NGINX server configuration: You can modify the NGINX configuration to increase the maximum payload size. Locate and edit the NGINX configuration file, typically named nginx.conf, and find the client_max_body_size directive (or add it, if it’s missing). Adjust its value to accommodate your transcript size. For example, if your transcript is 5 MB, you may set the value to 5m or higher.
  3. Restart the server: After modifying the server configuration, save the changes and restart the server to apply the new settings. If you are running a Linux server, the command service nginx reload will restart the NGINX server.
  4. Retry the transcription request: Once the server is restarted, attempt the transcription again. Ensure the transcript size now falls within the updated maximum payload limit. If successful, the 413: Payload too large error should no longer occur.