Skip to main content
Relay speaks the OpenAI and Anthropic wire protocols, so you don’t need a new client library — point the official SDK you already use at Relay’s base URL and pass your relay key as the API key. Relay accepts the key whether the SDK sends it as a bearer token or an x-api-key header, so this just works.
Swap http://localhost:8080 for your relay’s public URL in production. The data plane is the inference port (8080 by default).

OpenAI shape

Anthropic shape

Streaming

Both SDKs stream as usual — Relay passes the event stream straight through.

Which models can I call?

The model you pass must be granted by your relay key’s policy and have an enabled host binding. List what your key can reach:
See Troubleshooting if a model returns 403 or 404.