Relay an API request
Sends body to the upstream endpoint url with the caller's key and streams the JSON or SSE response back unchanged, including the upstream status. For anthropic, the key goes upstream as x-api-key with anthropic-version: 2023-06-01, plus anthropic-beta: fast-mode-2026-02-01 when body contains speed; otherwise as Authorization. Redirects are not followed and cookies are not forwarded. The upstream request times out after 250 seconds, and cancelling the call cancels it.
Authorization
upstreamKey The API key of the upstream service. The proxy does not store it.
In: header
Request Body
application/json
TypeScript Definitions
Use the request body type in TypeScript.
Response Body
application/json
application/json
application/json
application/json
application/json
application/json
application/json
application/json
curl -X POST "https://example.com/api/proxy" \ -H "Content-Type: application/json" \ -d '{ "url": "https://api.example.com/v1/chat/completions", "format": "openai", "body": { "model": "string" } }'{}Last updated on