OpenAI-compatible · Anthropic native · Gemini native

API Reference

One key, three protocols, cross-translation included. This page is the English quickstart; the full Chinese reference lives on api.html. A machine-readable spec is available at openapi.json.

Quickstart

Create an API key in the console (shown once — save it). Every request uses Authorization: Bearer <key>.

from openai import OpenAI

client = OpenAI(
    base_url="https://omniaxis.cc/v1",
    api_key="OM_API_KEY",
)

resp = client.chat.completions.create(
    model="<model id from the models page>",
    messages=[{"role": "user", "content": "Hello"}],
)
print(resp.choices[0].message.content)

Anthropic and Google SDKs point at https://omniaxis.cc (no /v1 — the SDK appends the protocol path).

Endpoints

MethodPathNotes
POST/v1/chat/completionsOpenAI Chat; stream: true for SSE.
POST/v1/responsesOpenAI Responses (Codex-style, incl. server state on capable channels).
POST/v1/messagesAnthropic Messages; /v1/messages/count_tokens for native counting (free).
POST/v1beta/models/{model}:generateContentGemini; streaming via :streamGenerateContent?alt=sse. Also /v1beta/openai/* (Google's OpenAI-compat prefix).
POST/v1/completionsLegacy completions compat layer: single prompt, no suffix/echo/logprobs.
POST/v1/embeddingsOpenAI-compatible embeddings.
POST/v1/images/generationsImage generation, billed per image, n 1-4.
GET/v1/models, /v1/models/{model}Scoped model catalog with context window and capabilities.

Streaming semantics

  • Cross-protocol combinations are translated incrementally (text, tool arguments, reasoning deltas) — not buffered-until-done.
  • During long silences (e.g. extended thinking) the gateway emits SSE comment frames : ping. Standard SDKs ignore them; skip colon-prefixed lines in hand-rolled parsers.
  • If the upstream dies mid-stream the gateway never fakes a terminal event — you get an in-stream error frame instead. Content already delivered is billed.
  • If your client disconnects, the gateway keeps reading upstream to collect final usage and bills what was actually delivered.

Errors

Non-2xx responses carry { "error": { "message", "type" } }. Frequent types:

StatustypeMeaning
400invalid_requestBad model id, JSON shape, or entry not available for this model.
400protocol_not_supportedNo channel in this group serves that protocol for the model — switch protocol entry.
401invalid_authenticationKey invalid, disabled, or expired.
402insufficient_quotaBalance exhausted — top up in the console.
429rate_limitedUser or upstream rate limit; Retry-After included.
502/503upstream_error / no_available_channelUpstream unavailable; failed requests are not billed.

Bring your own key

In the console you can attach your own official OpenAI / Anthropic / Gemini API key. Requests then prefer your own upstream and are billed at a reduced service fee (default 5% of the platform price); if your key fails, the request falls back to platform channels at the normal price. Keys are validated against the official model list on attach and stored encrypted.