@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:- Create a project (its
developmentandproductionenvironments are created for you). - Add and validate an OpenAI provider credential (BYOK). See Providers & BYOK.
- Create a secret key (
rd_sk_…) for the environment you want to call.
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.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
4. Run it
Point the SDK at your secret key and run the file: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.