GET /v1/openapi/{provider} is the document we want to feed to @hey-api/openapi-ts. The operations that stream, and the operations that upload a file, are described as a JSON body and a JSON 200.
Fetched 2026-11-04.
OpenAI (GET /v1/openapi/openai, 38 paths). No path uses text/event-stream, multipart/form-data, an audio type, or application/octet-stream.
| Operation | Request content | 200 content |
|---|
POST /chat/completions | application/json | application/json |
POST /responses | application/json | application/json |
POST /audio/transcriptions | application/json | application/json |
Transcriptions take a file. The document has a JSON file property.
Anthropic POST /v1/messages: the 200 content is application/json only. stream is a boolean on the JSON body. The SSE event stream is not a response content type. Required header anthropic-version is present, which is right.
A client generated from this document calls JSON.parse on an SSE body and sends audio as JSON.
Ask#
When the upstream operation streams, put the real stream media type on the 200 response (text/event-stream, or whatever that provider returns). When the call uploads a file, declare multipart/form-data.