DEV Community

LavieVibe
LavieVibe

Posted on

Testing AI APIs with a prepaid OpenAI-compatible gateway

When I started building RelayDock, the main problem I wanted to solve was not raw model price.

Developers can already go directly to model providers when they know exactly what they need.

The harder first-time experience is usually more practical:

  • Which provider account should I create first?
  • How much do I need to fund before testing?
  • Where do I see token usage and request cost?
  • How do I avoid managing several API keys while still experimenting?

RelayDock is my attempt at a smaller first step:

  • one OpenAI-compatible base URL
  • one API key
  • $2 / $5 prepaid top-ups
  • request-level model, token, latency, and cost records
  • budget model routes for bots, automations, and small SaaS features

It is not meant to be the cheapest possible route if you already optimize directly across providers. It is meant to make the first API purchase and first test easier to reason about.

The setup is intentionally familiar:

import OpenAI from "openai";

const client = new OpenAI({
  apiKey: "rd_live_YOUR_KEY",
  baseURL: "https://relaydock.onrender.com/v1"
});
Enter fullscreen mode Exit fullscreen mode

I am looking for feedback from builders who have shipped bots, automations, or small AI features: would this kind of prepaid gateway make the first testing step easier, or would you always prefer going directly to providers?

Project link: https://relaydock.onrender.com/openai-compatible-api-key

Top comments (0)