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.
授权
upstreamKey The API key of the upstream service. The proxy does not store it.
位置: header
请求主体
application/json
TypeScript 定义
在 TypeScript 中使用 request 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" } }'{}最后更新于