Point the OpenAI and Anthropic client libraries at Relay
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.
SDK
Base URL
Endpoint it calls
OpenAI
http://localhost:8080/openai/v1
/openai/v1/chat/completions
Anthropic
http://localhost:8080/anthropic
/anthropic/v1/messages
Swap http://localhost:8080 for your relay’s public URL in production. The
data plane is the inference port (8080 by default).