See the swagger docs: https://swagger.io/docs/specification/describing-request-body/file-upload/ And the petstore example: ~~~ "requestBody": { "content": { "application/octet-stream": { "schema": { "type": "string", "format": "binary" } } } }, ~~~