Roadie sits in front of OpenAI. You send a message with the first-party @roadie/sdk, Roadie forwards it to OpenAI using your own provider key (BYOK), and returns the reply — with the same call metered, attributed, and logged in your project. This is the shortest path from an empty folder to a response.

Prerequisites

In the dashboard:
  1. Create a project (its development and production environments are created for you).
  2. Add and validate an OpenAI provider credential (BYOK). See Providers & BYOK.
  3. Create a secret key (rd_sk_…) for the environment you want to call.
You will need Node 20+.

1. Install the SDK

2. Construct the client

The client reads your secret key from the environment and targets Roadie’s hosted gateway () by default. A secret key grants full access to your project’s data plane, so keep it on the server — never ship it in a browser or mobile app.
The SDK throws if it detects an rd_sk_… key in a browser-like environment. Client apps use client tokens instead.

3. Send a message and read the reply

chat.create sends your message and returns the normalized response. The assistant’s reply is on res.message.content as ordered parts; join their text to get the string. Put it together in one runnable file:
send.ts
model takes an explicit provider/model id like openai/gpt-4o, or a project alias that fails over across providers — see Models, aliases & fallback.

4. Run it

Point the SDK at your secret key and run the file:
You should see OpenAI’s one-sentence answer printed to your terminal.

What you got

In a few lines you installed @roadie/sdk, constructed a client from your secret key, sent one chat message, and printed OpenAI’s reply. Roadie forwarded the call to OpenAI with your BYOK key and metered it in your project — no OpenAI key in your code. From here, grow it into a real backend with streaming, embeddings, per-user attribution, and typed error handling.

Next steps

Build a Node chat backend

Grow this into a server backend with streaming, embeddings, end-user attribution, and typed errors.

OpenAI drop-in quickstart

Already have OpenAI code? Keep it and change two lines — the base URL and the key.

Models, aliases & fallback

Route by alias so a provider outage fails over to another provider automatically.