415 Unsupported Media Type: causes and the fix
A 415 Unsupported Media Type error means the server refused your request body's format. Fix the Content-Type header: send JSON as application/json.

A 415 Unsupported Media Type error means the server refused your request because it doesn't accept the format of the body you sent. The fix is to send the body in a format the endpoint accepts and label it with a matching Content-Type header; for a JSON API, that means a JSON body with Content-Type: application/json.
The HTTP definition is quoted from MDN's 415 Unsupported Media Type page and each client's defaults from its own docs; the Sume behavior comes from its Errors and spend and Create a run docs. All were read on 2026-09-27.
Why am I getting 415 Unsupported Media Type?
Because of how the body is labeled or encoded. MDN says the problem may come from the request's Content-Type or Content-Encoding, or from the server processing the content itself. Its two examples are the everyday ones: a JSON body sent with no Content-Type header at all, and a JSON body labeled application/x-www-form-urlencoded.
Some servers are strict about the exact value, too. MDN's example: writing UTF8 instead of UTF-8 for the charset can make a server consider the media type invalid.
Switching to multipart/form-data to attach a file is the same mistake on a JSON API. On Sume, generation requests take media as public HTTPS URLs inside the JSON body instead.
How do I fix 415 in curl, fetch, axios, and Python Requests?
Each client picks a Content-Type when you don't set one, and that default is what the server sees:
| Client | What it sends unless you say otherwise | Send JSON with |
|---|---|---|
curl -d | application/x-www-form-urlencoded | -H "Content-Type: application/json", or --json (curl 7.82.0 and later) |
| fetch with a string body | text/plain;charset=UTF-8, unless you set Content-Type | headers: { "Content-Type": "application/json" } |
fetch with URLSearchParams or FormData | application/x-www-form-urlencoded;charset=UTF-8 or multipart/form-data | A JSON.stringify(...) string body plus the header above |
| axios | JSON for a plain object; form encoding for URLSearchParams | A plain object as data |
Python Requests data= | Form encoding for a dict; no Content-Type at all for a string | json=payload instead of data= |
What does Sume's 415 response tell me?
Sume's API takes JSON request bodies: every create needs Content-Type: application/json, and its docs list 415 unsupported_media_type for a body that was not sent as application/json. The error echoes the type the server received in details.received_content_type, and today it also lists what the API accepts in details.supported. In current code, a curl -d call without the header gets a response like this (abridged):
{
"error": {
"code": "unsupported_media_type",
"message": "Send the request body as application/json.",
"retryable": false,
"next_action": "fix_input",
"details": {
"received_content_type": "application/x-www-form-urlencoded",
"supported": ["application/json"]
}
}
}Should I retry a 415?
Not as is. The same body with the same header gets the same answer, and today the error is marked not retryable, with next_action set to fix_input. On a Format run create, a 4xx means nothing ran and nothing was charged, so fix the header and send again.
Is unsupported_media_type from a media tool the same error?
No. On Sume's trim, filter and audio-detach tools, the same error.code means the video_url you passed does not serve a video: the tool's HEAD check of the file found another type. In current code that refusal comes back as HTTP 400, not 415, and it is about the file, not your request's header. Those tools take a video on Sume's media host, such as an earlier Sume job's output. The error index by surface lists the other codes, and the headers reference covers every header the API reads.
Sources
- MDN: 415 Unsupported Media Type (read 2026-09-27)
- curl man page (read 2026-09-27)
- WHATWG Fetch Standard (read 2026-09-27)
- axios: x-www-form-urlencoded format (read 2026-09-27)
- axios: Request config (read 2026-09-27)
- Requests: Quickstart (read 2026-09-27)
- Errors and spend
- Create a run
- Errors and rate limits
- Video trim
- API reference
Related posts
More in Developers
- Batch transcription API: transcribe many audio files
Batch transcription by API is a loop: one speech-to-text job per file, keyed by the file's id, collected by webhook or polling. How it works on Sume.
- Bulk image generation: script hundreds of AI images via API
Send one image request per row, each with its own Idempotency-Key, async mode, and up to four images per call. Your plan's concurrency sets the pace.
- Can multiple people use the same API key?
They can, but they then share its rate limit, usage record, and revocation. Give each person or service its own key, and know what stays shared.
- Create a talking avatar using Python with the Sume API
Create a talking avatar in Python with Requests: generate the avatar, poll its job, send it a script to speak, then read the finished video's URL.
Written by Sume