API Reference

The Syntopen API is OpenAI-compatible. Drop-in replace your baseURL and you're done.

Authentication

Send your key in the Authorization header:

Authorization: Bearer sk-syn-...

Create keys in the dashboard. Keys are shown once at creation; we never store the plaintext.

Endpoints

POST /api/v1/chat/completions

Generate a chat completion. Accepts the same payload as OpenAI's endpoint plus a few extras.

curl https://opensyntx.teksura.ru/api/v1/chat/completions \
  -H "Authorization: Bearer $SYNTOPEN_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "openai/gpt-4o-mini",
    "messages": [
      {"role": "system", "content": "You are concise."},
      {"role": "user", "content": "What is the capital of France?"}
    ],
    "stream": false
  }'

Streaming

Set stream: true. The response is server-sent events with chat.completion.chunk objects, terminated by data: [DONE].

GET /api/v1/models

List all models available to you.

curl https://opensyntx.teksura.ru/api/v1/models -H "Authorization: Bearer $SYNTOPEN_KEY"

Using the OpenAI SDK

import OpenAI from "openai";

const client = new OpenAI({
  apiKey: process.env.SYNTOPEN_KEY,
  baseURL: "https://opensyntx.teksura.ru/api/v1",
});

const r = await client.chat.completions.create({
  model: "anthropic/claude-3-5-sonnet",
  messages: [{ role: "user", content: "Hello" }],
});

Errors

StatusCodeMeaning
400invalid_requestBad payload (Zod validation failed)
401invalid_api_keyMissing or invalid bearer token
402insufficient_balanceTop up your balance
404model_not_foundUnknown model id
429rate_limit_exceededPer-key RPM exceeded
500internal_errorBug on our side

Rate limits

Default 60 requests per minute per key. Adjustable per key in the dashboard. Responses include X-RateLimit-Limit, -Remaining, -Reset headers when limited.

Available models (10)

Model idContextInput / 1MOutput / 1M
anthropic/claude-3-5-haiku200,000$0.80$4.00
anthropic/claude-3-5-sonnet200,000$3.00$15.00
anthropic/claude-3-opus200,000$15.00$75.00
google/gemini-1.5-flash1,000,000$0.07$0.30
google/gemini-1.5-pro2,000,000$1.25$5.00
google/gemini-2.0-flash-exp1,000,000$0.00$0.00
openai/gpt-4o128,000$2.50$10.00
openai/gpt-4o-mini128,000$0.15$0.60
openai/o1200,000$15.00$60.00
openai/o1-mini128,000$3.00$12.00