Bun 1.4 fetch request compression: should Sume API calls use gzip?

Bun 1.4 can compress fetch request bodies. Sume's docs do not describe compressed requests, so leave it off and send media as public HTTPS URLs.

5 min readSume
All posts

Leave Bun 1.4's fetch request compression off for Sume API calls unless you have tested it against your own workspace. The Bun 1.4 release post lists fetch() request compression with gzip, brotli, zstd and deflate, but Sume's public docs describe request bodies only as application/json, document 413 payload_too_large for a body over the configured API limit and 415 unsupported_media_type for a non-JSON body, and say nothing about a Content-Encoding on requests.

Bun's side is from the Bun 1.4 release post, read 2026-10-03; Sume's side is from Errors and rate limits and Jobs and results. I did not send a compressed request to Sume, so whether it would be accepted is unverified.

Why is there little to gain?

Sume submit bodies are small JSON: a prompt, options and, for image or video input, a public HTTPS URL to the media rather than the media bytes. The errors docs describe input media as a public HTTPS image URL that Sume fetches itself, and image_not_fetchable or input_media_unreachable as the failures when it cannot. A compressed JSON prompt saves little next to that, and a rejected request costs you a retry.

What do the statuses mean if I try it anyway?

Test it with a request you can afford to fail, and read the error envelope: it includes error.code, a message and a request_id that is safe to share with Sume support. If the call fails after you enable compression and succeeds without it, turn it off. Do not compare by resubmitting a paid job: reuse the same Idempotency-Key with the same payload, which returns the original job, and note that the same key with a different payload returns 409 idempotency_conflict.

Statuses from Sume's errors page that matter to a request-body change, read 2026-10-03.
Status and codeSume's meaningClient behavior
400 invalid_requestBody, query, path or headers are invalidFix the request before retrying
413 payload_too_largeBody exceeds the configured API limitSend a smaller body or a URL instead of bytes
415 unsupported_media_typeBody was not application/jsonSend JSON with the right content-type
409 idempotency_conflictSame key, different operation or payloadReuse keys only for exact retries
429 rate_limitedToo many requests in the windowBack off using retry-after

Sources

Related posts

More in Developers

All Developers posts

Written by Sume