Language Models
Call the platform's LLMs via a unified chat completion interface. Compatible with OpenAI, Claude, and Gemini request formats, with streaming, function calling, and vision support.
Call the platform's language models (LLM) for text conversation, content generation, function calling, and multimodal understanding. The gateway auto-detects the inbound request format and is compatible with OpenAI Chat Completions, Claude Messages, and native Gemini formats — just point your existing SDK's baseURL at https://apione.org, no adapter layer needed.
- Base URL:
https://apione.org - Primary endpoint (recommended):
POST /v1/chat/completions(OpenAI format) - Compatible endpoints:
POST /v1/messages(Claude Messages format) /POST /v1beta/models/{model}:generateContent(native Gemini format) - Authentication:
Authorization: Bearer sk-xxxxxxxxxxxx(Claude format uses thex-api-keyheader; Gemini format uses thex-goog-api-keyheader or a?key=query param)
Unlike image/video generation, chat completion is a synchronous API: non-streaming requests return the full result in one response, no
task_idpolling needed. Setstream: truefor SSE streaming.
Three Request Formats
| Format | Endpoint | Auth | Use Case |
|---|---|---|---|
| OpenAI | POST /v1/chat/completions | Authorization: Bearer <key> | Existing OpenAI SDK / LangChain projects — just switch baseURL |
| Claude | POST /v1/messages | x-api-key: <key> + anthropic-version | Existing Anthropic SDK projects — just switch baseURL |
| Gemini | POST /v1beta/models/{model}:generateContent | x-goog-api-key: <key> or ?key=<key> | Existing Google GenAI SDK projects — just switch baseURL |
Request Example (OpenAI format)
curl --request POST \
--url https://apione.org/v1/chat/completions \
--header 'Authorization: Bearer sk-xxxxxxxxxxxx' \
--header 'Content-Type: application/json' \
--data '{
"model": "gpt-5.4",
"messages": [
{ "role": "system", "content": "You are a helpful assistant" },
{ "role": "user", "content": "Write an opening line for a sci-fi novel" }
],
"temperature": 0.7,
"max_tokens": 2000,
"stream": false
}'Key Parameters: messages, stream, temperature, top_p, max_tokens / max_completion_tokens, reasoning_effort (low/medium/high, some reasoning models), tools / tool_choice (function calling), response_format (e.g. {"type":"json_object"} for JSON mode), n, seed, stop, frequency_penalty / presence_penalty
Vision: pass an
image_urlitem insidemessages[].content(same as OpenAI Vision format) — public URLs and Base64 Data URIs are both supported, subject to the selected model's multimodal capability.
Streaming (stream: true)
With "stream": true, the response is text/event-stream; each data: chunk is an incremental JSON delta identical to OpenAI's streaming format, ending with data: [DONE].
Supported Models
Billed by token usage. Currently verified models in active use:
| Provider | Models |
|---|---|
| OpenAI GPT | gpt-5.5, gpt-5.4, gpt-5.2, gpt-4o |
| Google Gemini | gemini-3-pro, gemini-3-flash, gemini-3.5-flash, gemini-3.1-flash-lite |
The gateway is a multi-channel architecture and may also route to Claude, DeepSeek, and other model channels. The actual available set depends on live site configuration — query
GET /v1/modelsfor the authoritative, up-to-date list.
List Available Models
GET https://apione.org/v1/modelsReturns OpenAI format by default. Send x-api-key + anthropic-version headers for Claude format, or x-goog-api-key / ?key= for Gemini format.
Common Error Codes
| HTTP | type | Description |
|---|---|---|
| 400 | invalid_request_error | Invalid request parameters |
| 401 | authentication_error | Authentication failed, check API Key |
| 402 | payment_required | Insufficient balance |
| 429 | rate_limit_error | Too many requests, retry later |
| 500 | server_error | Internal server error |