Unsupported media type
The request body is in a format this endpoint does not read.
Why it happens
- A missing or different
Content-Type. The endpoint readsapplication/rayfold+json,application/jsonand the binaryapplication/rayfold; the MCP endpoint readsapplication/json; the uploads route readsapplication/octet-streamand nothing else. - Only these types are accepted so that a web page on another site cannot send a form that the server would act on.
What to do
- Set
Content-Type: application/rayfold+jsonon the request. The client libraries do this for you.
What it looks like
Inside a batch, the operation's frame carries it:
json
{
"id": 1,
"error": {
"code": "invalid_argument",
"message": "Content-Type text/plain is not accepted; send application/rayfold+json"
},
"fin": true
}retryable appears only where it differs from the code's default, which is the one at the top of this page.
When the whole request is refused over HTTP, the answer is a problem document:
json
{
"type": "https://eddyboutros.github.io/rayfold/errors/unsupported_media_type",
"title": "unsupported media type",
"status": 415,
"detail": "Content-Type text/plain is not accepted; send application/rayfold+json",
"code": "invalid_argument"
}See also all error types and the errors chapter of the specification.