Synrel

Chat Completions API

Call OpenAI models using the Chat Completions API.

Get Your API Key

Go to the API Keys page to create your API key.

API Base URL

https://tokenoff.com/api

Usage

OpenAI models support the /v1/chat/completions endpoint, fully compatible with the OpenAI Chat Completions API.

curl

curl https://tokenoff.com/api/v1/chat/completions \
  -H "Authorization: Bearer your_api_key_here" \
  -H "Content-Type: application/json" \
  -d '{
      "model": "gpt-5.4",
      "messages": [
          {"role": "user", "content": "Hello"}
      ]
  }'

Python

from openai import OpenAI

client = OpenAI(
  api_key="your_api_key_here",
  base_url="https://tokenoff.com/api/v1",
)

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

print(response.choices[0].message.content)

TypeScript

import OpenAI from "openai";

const client = new OpenAI({
  apiKey: "your_api_key_here",
  baseURL: "https://tokenoff.com/api/v1",
});

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

console.log(response.choices[0].message.content);

Supported Models

On this page