Get started

Quickstart

ModGate is a drop-in OpenAI-compatible gateway for 200+ models. You'll get an API key, point any OpenAI SDK at our base URL, and prefix the model with a vendor. That's it.

1. Create an API key

Sign in to the console and click Create key. Pick a quota window (daily, monthly, yearly, or unlimited) and copy the secret — it's only shown once.

Create your key →

2. Make your first request

ModGate speaks the OpenAI Chat Completions schema, so any official SDK works. Set baseURL to https://api.modgat.com/v1 and use your ModGate key.

curl https://api.modgat.com/v1/chat/completions \
  -H "Authorization: Bearer $FORGE_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "claude-4.5-sonnet",
    "messages": [
      { "role": "user", "content": "Plan a 3-day Lisbon trip." }
    ]
  }'
import OpenAI from "openai";

const ai = new OpenAI({
  baseURL: "https://api.modgat.com/v1",
  apiKey: process.env.FORGE_KEY,
});

const res = await ai.chat.completions.create({
  model: "gemini-3-pro",
  messages: [{ role: "user", content: "ship it" }],
});

console.log(res.choices[0].message.content);
from openai import OpenAI

ai = OpenAI(
    base_url="https://api.modgat.com/v1",
    api_key=os.environ["FORGE_KEY"],
)

res = ai.chat.completions.create(
    model="openai/gpt-5",
    messages=[{"role": "user", "content": "ship it"}],
)
print(res.choices[0].message.content)

3. Stream the response

Pass stream: true and read Server-Sent Events. ModGate forwards SSE frames identically to OpenAI's wire format.

const stream = await ai.chat.completions.create({
  model: "claude-4.5-sonnet",
  stream: true,
  messages: [{ role: "user", content: "Write a haiku." }],
});

for await (const chunk of stream) {
  process.stdout.write(chunk.choices[0]?.delta?.content ?? "");
}

What's next

Need help? Email support@modgat.dev or open a ticket from the console. We respond inside one business day on Team and within an hour on Enterprise.