Skip to main content
The fastest way to use Relay is the OpenAI SDK against https://api.pipellm.ai/v1. Other protocols are available later if you already use Anthropic or Gemini clients.
1

Create an API key

  1. Sign in at console.pipellm.ai
  2. Add balance
  3. Create an API key
Export it in your shell:
2

Install the OpenAI SDK

3

Send a chat request

Replace gpt-5 with any ID from GET /v1/models.

What to do next

Streaming

Stream tokens as they are generated.

Images

Generate and edit images.

Video

Create an async video task and poll until it completes.

API Reference

Endpoint paths, parameters, and response shapes.

Other protocols

If your app already speaks Anthropic or Gemini, keep that SDK and change the base URL. See Routing & Protocols when you need a converter route instead of the native path.