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_…" export FREEGATE_API_KEY="fg_live_…" $env: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
}' 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
}' $headers = @{ Authorization = "Bearer $env:FREEGATE_API_KEY" }
$body = @{
model = "oss-20b"
messages = @(@{ role = "user"; content = "Say hello in five words." })
max_completion_tokens = 256
} | ConvertTo-Json -Depth 5
Invoke-RestMethod -Uri "https://api.firesafety.men/v1/chat/completions" `
-Method Post -Headers $headers -ContentType "application/json" -Body $body
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:
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); 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" curl https://api.firesafety.men/v1/models \
-H "Authorization: Bearer $FREEGATE_API_KEY" curl.exe https://api.firesafety.men/v1/models `
-H "Authorization: Bearer $env:FREEGATE_API_KEY" What you should know
- Output is capped.
max_completion_tokensis clamped to the operator's ceiling · the live value is on status. - Tool calling works.
toolsand 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.