Skip to navigation

Limits

The limits of each Expression Measurement endpoint, and the error a request or frame outside each one returns.

Audio upload takes up to 25 MB of 16-bit, 16 kHz mono audio, a little over 13 minutes, and image upload takes JPEG images of up to 2 MB each, up to 25 MB in all. Realtime sessions take up to 1 second of audio per second or 3 video frames per second, and each organization can make up to 600 requests per minute. Limits that both endpoints of a media type share are listed once, before each endpoint’s table. Each table names the error a request, frame or message outside that limit returns. See Errors for what each code means.

Audio

Both audio endpoints share these limits. Audio upload and Audio realtime explain them.

LimitValueOutside the limit
Audio format16-bit PCM, 16 kHz, monoaudio_decode_failed on upload, config_invalid in session.update
Measurement interval3000 to 10000 ms of speech, default 3000config_invalid
Measurement windowUp to the most recent 10 seconds of the utteranceNo error. Earlier speech is in earlier measurements.

Audio upload

LimitValueOutside the limit
ContainerA WAV file or headerless samplesunsupported_media_type
Request size25 MB, a little over 13 minutes of audioaudio_too_long

Audio realtime

LimitValueOutside the limit
Audio frameUp to 320 KB (10 seconds) of whole headerless samplesinvalid_audio_frame
Message size1 MiB (1,048,576 bytes) for any WebSocket messagemessage_too_large, which ends the session
Send rate1 second of audio per secondrate_limited

Video

Both video endpoints share these limits. Image upload and Video realtime explain them.

LimitValueOutside the limit
Image formatJPEGunsupported_media_type on upload, invalid_image_frame in realtime
Pixels per image8,294,400 (3840x2160)image_too_large on upload, invalid_image_frame in realtime
Faces measured per image2 by default, the largest. Contact support to raise it.No error. Other faces are listed without scores.
Faces listed per image32No error. The least confident faces past 32 are left out.
Detection threshold0 to 1, default 0.9config_invalid
Minimum face sizeAt least 1 pixel, default 60config_invalid

Image upload

LimitValueOutside the limit
Image size2 MBimage_too_large
Request size25 MB for the whole multipart bodyimage_too_large

Video realtime

LimitValueOutside the limit
Message size2 MB for any WebSocket messagemessage_too_large, which ends the session
Send rate3 frames per secondrate_limited
Consecutive measurement failures5internal_error on the fifth, which ends the session

Runs

LimitValueOutside the limit
Page size1 to 200 runs or events per page, default 50invalid_request

Rate limits

LimitValueOutside the limit
Requests600 per minute per organization429 Too Many Requests

The limit counts requests to every Expression Measurement endpoint over a sliding 60-second window: audio and image uploads, realtime handshakes and run requests alike. Every API key in an organization shares it. Frames sent within a realtime session do not count toward it; the session’s send rate limits them instead: 1 second of audio per second for audio and 3 frames per second for video. A 429 carries a Retry-After header with the number of seconds to wait before retrying. See Handling errors.

There is no separate limit on how many uploads or realtime sessions an organization runs at once. When the service is at capacity, an upload is refused with 503 server_busy and a Retry-After header.

Scores and sessions

  1. Each score array has its own cutoff. Vocal expressions are included when judged present, voice attributes at 0.725 or above, and face scores above 0.1. See Reading probabilities.
  2. Realtime sessions close after 30 seconds without a usable media frame. See Connection behavior.

Next steps