JSONResponse (default, with fast ORJSONResponse as an option), HTMLResponse, PlainTextResponse, RedirectResponse, FileResponse (sends a file from disk), StreamingResponse (sends chunks as they are produced, used for large files and LLM tokens), and Response for custom bytes and headers.
Set response_class on the decorator for documentation, or return a response object directly to bypass response model serialization.
Loading…