Base URL
https://api.useinfergate.com/v1
Keep keys server-side.
Never embed a complete InferGate API Key in browser code, mobile bundles, screenshots, support messages, or source control.
1. Get the account model list
Call this endpoint first and select only a returned model.
cURL
curl https://api.useinfergate.com/v1/models \
-H "Authorization: Bearer $INFERGATE_API_KEY"2. Responses API
cURL
curl https://api.useinfergate.com/v1/responses \
-H "Authorization: Bearer $INFERGATE_API_KEY" \
-H "Content-Type: application/json" \
-d '{"model":"gpt-5.4-mini","input":"Reply with: ready"}'JavaScript
import OpenAI from "openai";
const client = new OpenAI({
apiKey: process.env.INFERGATE_API_KEY,
baseURL: "https://api.useinfergate.com/v1",
});
const response = await client.responses.create({
model: "gpt-5.4-mini",
input: "Reply with: ready",
});
console.log(response.output_text);Python
import os
from openai import OpenAI
client = OpenAI(
api_key=os.environ["INFERGATE_API_KEY"],
base_url="https://api.useinfergate.com/v1",
)
response = client.responses.create(
model="gpt-5.4-mini",
input="Reply with: ready",
)
print(response.output_text)3. Chat Completions
cURL
curl https://api.useinfergate.com/v1/chat/completions \
-H "Authorization: Bearer $INFERGATE_API_KEY" \
-H "Content-Type: application/json" \
-d '{"model":"gpt-5.4-mini","messages":[{"role":"user","content":"Reply with: ready"}]}'Set "stream": true to receive a server-sent event stream.
4. Image generation
gpt-image-2 requires paid model access.
cURL
curl https://api.useinfergate.com/v1/images/generations \
-H "Authorization: Bearer $INFERGATE_API_KEY" \
-H "Content-Type: application/json" \
-d '{"model":"gpt-image-2","prompt":"A precise black ink diagram of a network gateway on white paper"}'Access and availability errors
| HTTP | Code | Meaning |
|---|---|---|
| 403 | access_denied | The account has not completed a qualifying real payment for this model. |
| 503 | model_unavailable | The requested model is explicitly unavailable; do not silently substitute it. |
Paid model access remains after the paid balance reaches zero. A full refund or chargeback can revoke it when no other valid payment remains. InferGate is independent from OpenAI and other model providers.