Sume 413 payload_too_large and 415: shrink the body, send JSON

413 means the request body is over the API limit. 415 means the body was not application/json, shown in details.received_content_type.

4 min readSume
All posts

413 payload_too_large means the request body is larger than the configured API limit; 415 unsupported_media_type means the body was not application/json, with the sent type in details.received_content_type (read 2026-10-06 in the errors docs).

How do I fix each?

For 413, send a media URL instead of embedding the file in the body. For 415, set Content-Type: application/json.

What should I do in practice?

Both errors are caught before any generation starts.

  • Pass media by public HTTPS URL.
  • Set the Content-Type header explicitly.
  • Read details in the error body.

Sources

Related posts

More in Developers

All Developers posts

Written by Sume