◆ Documentation

Get started in minutes

OpenAI-compatible REST API. Drop your existing client in by changing the base URL.

Authentication

All requests must include a Bearer token in the Authorization header. Get your API key from the Telegram bot.

Authorization: Bearer ogt-xxxxxxxxxxxxxxxx

Base URL

Set this as the base URL in any OpenAI-compatible client:

https://api.opengate.host/v1

Endpoints

Available routes — fully OpenAI-compatible:

POST/v1/chat/completions
POST/v1/images/generations
POST/v1/responses
GET/v1/models

cURL Example

Send a chat completion request from your terminal:

curl https://api.opengate.host/v1/chat/completions \
  -H "Authorization: Bearer ogt-xxx" \
  -H "Content-Type: application/json" \
  -d '{"model":"claude-opus-4.7","messages":[{"role":"user","content":"Hi"}]}'

Python

Use the official OpenAI SDK with a custom base URL:

from openai import OpenAI

client = OpenAI(
    base_url="https://api.opengate.host/v1",
    api_key="ogt-xxx"
)

response = client.chat.completions.create(
    model="claude-opus-4.7",
    messages=[{"role": "user", "content": "Hello"}]
)

Node.js

Same drop-in approach with the JavaScript SDK:

import OpenAI from "openai";

const client = new OpenAI({
  baseURL: "https://api.opengate.host/v1",
  apiKey: "ogt-xxx"
});

const res = await client.chat.completions.create({
  model: "gpt-5.5",
  messages: [{ role: "user", content: "Hi" }]
});