Quickstart

FreeGate speaks the OpenAI Chat Completions API. Anything that accepts a custom baseURL works without a shim.

1. Get a key

FreeGate is invite only. Redeem a code at /redeem, then sign in at /login with Discord or a passkey. The key itself is shown once, prefixed fg_live_. It authenticates API calls only · it is not a dashboard login.

2. Put the key in your environment

Keep the key out of command history and source files. Pick your platform:

export FREEGATE_API_KEY="fg_live_…"

3. Make a request

curl https://api.firesafety.men/v1/chat/completions \
  -H "Authorization: Bearer $FREEGATE_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "oss-20b",
    "messages": [{ "role": "user", "content": "Say hello in five words." }],
    "max_completion_tokens": 256
  }'

Reasoning models (gpt-oss, flint) spend completion tokens on thinking. A very small max_completion_tokens can return an empty content with finish_reason: "length" · use 256 or more for real answers.

4. Or use the OpenAI SDK (Node.js)

This is a JavaScript file, not a shell command. Save it as hello.mjs, then install the SDK and run it:

hello.mjs
import OpenAI from "openai";

const client = new OpenAI({
  baseURL: "https://api.firesafety.men/v1",
  apiKey: process.env.FREEGATE_API_KEY,
});

const completion = await client.chat.completions.create({
  model: "oss-20b",
  messages: [{ role: "user", content: "Say hello in five words." }],
  max_completion_tokens: 256,
});

console.log(completion.choices[0].message.content);
shell
npm install openai
node hello.mjs

Base URL: https://api.firesafety.men/v1 · any OpenAI-compatible client works.

5. List models

The list reflects your account's access, so it may be a subset of the catalog.

curl https://api.firesafety.men/v1/models \
  -H "Authorization: Bearer $FREEGATE_API_KEY"

What you should know

  • Output is capped. max_completion_tokens is clamped to the operator's ceiling · the live value is on status.
  • Tool calling works. tools and tool results are forwarded.
  • Images only on vision-capable models; other models return 400.
  • Budgets are per user, per model, per day. See rate limits.