API referenceProvider proxy
Proxy a provider-native model request
The body and successful response retain the selected provider's native format. The gateway validates the configured path and model, injects provider credentials through Cloudflare AI Gateway, applies limits, and streams the upstream response without buffering.
Authorization
GatewayBearer AuthorizationBearer <token>
A gateway access token or server application API key.
In: header
Path Parameters
app*string
provider*string
Value in
- "openai"
- "anthropic"
- "xai"
- "gemini"
- "perplexity"
path*string
Header Parameters
x-app-version?string
Required for issuer/App Attest clients; optional for server API keys.
x-end-user-id?string
Optional configured end-user identity for server applications.
Request Body
application/json
TypeScript Definitions
Use the request body type in TypeScript.
Provider-native JSON request. Consult the selected provider's API reference for the exact shape.
Response Body
application/json
application/json
application/json
application/json
application/json
application/json
application/json
curl -X POST "https://example.com/v1/apps/string/proxy/openai/string" \ -H "Content-Type: application/json" \ -d '{ "property1": null, "property2": null }'null