Docs

Документация API

ElysiumAI gateway поддерживает OpenAI, Anthropic, Gemini и rout.my-compatible aliases на одном PAYG-провайдере.

Base URLs

OpenAI: https://your-domain.com/v1

Anthropic: https://your-domain.com/anthropic/v1

Gemini: https://your-domain.com/compatible/v1beta

OpenAI-compatible

Chat Completions, Responses, embeddings, images, audio, rerank, moderations and realtime use the /v1 base URL.

curl https://your-domain.com/v1/chat/completions \
  -H "Authorization: Bearer sk-your-ElysiumAI-key" \
  -H "Content-Type: application/json" \
  -d '{"model":"gpt-4.1-mini","messages":[{"role":"user","content":"Hello"}]}'

Anthropic-compatible

Claude SDKs can use the Rout-style /anthropic/v1/messages alias, or the legacy /v1/messages route.

curl https://your-domain.com/anthropic/v1/messages \
  -H "x-api-key: sk-your-ElysiumAI-key" \
  -H "anthropic-version: 2023-06-01" \
  -H "Content-Type: application/json" \
  -d '{"model":"claude-3-5-sonnet-latest","max_tokens":256,"messages":[{"role":"user","content":"Hello"}]}'

Gemini-compatible

Gemini SDKs can point to /compatible/v1beta. The native /v1beta alias is kept too.

curl "https://your-domain.com/compatible/v1beta/models/gemini-2.5-flash:generateContent?key=sk-your-ElysiumAI-key" \
  -H "Content-Type: application/json" \
  -d '{"contents":[{"parts":[{"text":"Hello"}]}]}'

OpenAI SDK

Any OpenAI-compatible SDK can point to the ElysiumAI /v1 base URL.

import OpenAI from "openai";

const client = new OpenAI({
  apiKey: process.env.ElysiumAI_API_KEY,
  baseURL: "https://your-domain.com/v1",
});

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

Endpoint Matrix

AreaMethodRoutePurpose
OpenAIGET/v1/modelsList models
OpenAIGET/v1/models/{model}Retrieve model
OpenAIPOST/v1/chat/completionsChat Completions
OpenAIPOST/v1/completionsLegacy Completions
OpenAIPOST/v1/responsesResponses API
OpenAIPOST/v1/responses/compactResponses compaction
AnthropicPOST/anthropic/v1/messagesRout-style Messages alias
AnthropicPOST/v1/messagesLegacy Messages alias
AnthropicGET/anthropic/v1/modelsAnthropic model list
GeminiGET/compatible/v1beta/modelsRout-style Gemini model list
GeminiPOST/compatible/v1beta/models/{model}:{action}generateContent, streamGenerateContent, embedContent, batchEmbedContents
GeminiGET/v1beta/modelsNative Gemini alias
GeminiPOST/v1beta/models/{model}:{action}Native Gemini relay
EmbeddingsPOST/v1/embeddingsOpenAI embeddings
EmbeddingsPOST/v1/engines/{model}/embeddingsEngine-style embeddings
ImagesPOST/v1/images/generationsImage generation
ImagesPOST/v1/images/editsImage edits
ImagesGET/embed/image:{model}Raw image bytes for HTML/Markdown
AudioPOST/v1/audio/transcriptionsSpeech to text
AudioPOST/v1/audio/translationsTranslate audio
AudioPOST/v1/audio/speechText to speech
VideoPOST/v1/video/generationsAsync video generation
VideoGET/v1/video/generations/{task_id}Fetch video task
VideoPOST/v1/videosOpenAI-style video create
VideoGET/v1/videos/{task_id}OpenAI-style video retrieve
VideoGET/v1/videos/{task_id}/contentProxy video content
VideoPOST/kling/v1/videos/text2videoKling text to video
VideoPOST/kling/v1/videos/image2videoKling image to video
OtherPOST/v1/rerankRerank
OtherPOST/v1/moderationsModerations
OtherGET/v1/realtimeOpenAI Realtime WebSocket
TasksPOST/mj/submit/imagineMidjourney-compatible tasks
TasksPOST/suno/submit/{action}Suno-compatible tasks

Embed Images

For HTML or Markdown image embedding, pass the API key in the query string because browsers cannot attach Authorization headers to image tags.

<img src="https://your-domain.com/embed/image:gpt-image-1?key=sk-your-ElysiumAI-key&prompt=marine%20gateway" alt="generated" />

Account And Admin

AreaRoutePurpose
Profile/profileOwn profile, password and 2FA
Analytics/dashboardBalance, spend graph and recent requests
Top Up/dashboard/top-upWallet balance and payment history
PAYG/pricingWallet top-ups and model pricing
Admin/adminProviders, models, users, logs, payments and platform settings

Errors And Billing

401/403 means the API key, session or role is not valid for the route.

429 means request, model or global rate limits are active.

PAYG usage is charged from wallet quota and audited in /api/log/self and admin ledger views.

Payment top-up settings are served by GET /api/user/topup/info.