API One Doc

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 the x-api-key header; Gemini format uses the x-goog-api-key header 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_id polling needed. Set stream: true for SSE streaming.

Three Request Formats

FormatEndpointAuthUse Case
OpenAIPOST /v1/chat/completionsAuthorization: Bearer <key>Existing OpenAI SDK / LangChain projects — just switch baseURL
ClaudePOST /v1/messagesx-api-key: <key> + anthropic-versionExisting Anthropic SDK projects — just switch baseURL
GeminiPOST /v1beta/models/{model}:generateContentx-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_url item inside messages[].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:

ProviderModels
OpenAI GPTgpt-5.5, gpt-5.4, gpt-5.2, gpt-4o
Google Geminigemini-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/models for the authoritative, up-to-date list.

List Available Models

GET https://apione.org/v1/models

Returns 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

HTTPtypeDescription
400invalid_request_errorInvalid request parameters
401authentication_errorAuthentication failed, check API Key
402payment_requiredInsufficient balance
429rate_limit_errorToo many requests, retry later
500server_errorInternal server error

On this page