Onrix AI API Docs
控制台Console

Onrix AI API

一个与 OpenAI 兼容的 AI 网关。把任意 OpenAI SDK 的 Base URL 指向下面的地址,用你的 Onrix AI 密钥认证即可调用。 An OpenAI-compatible AI gateway. Point any OpenAI SDK at the base URL below and authenticate with your Onrix AI key.

Base URL
https://api.getarriveready.com/v1

简介Overview

Onrix AI 暴露标准的 OpenAI 风格接口:对话补全 /chat/completions、图像生成 /images/generations、图像编辑 /images/edits。请求与响应体与 OpenAI 官方一致,因此你可以直接复用官方 openai SDK,只改 base_urlapi_key Onrix AI exposes standard OpenAI-style endpoints: chat completions /chat/completions, image generation /images/generations, and image edits /images/edits. Request and response shapes match OpenAI, so you can reuse the official openai SDK and only change base_url and api_key.

认证Authentication

在控制台创建 API 密钥(形如 sk-…),通过 Authorization 请求头以 Bearer 方式传入。 Create an API key (looks like sk-…) in the console and pass it as a Bearer token in the Authorization header.

HTTP header
Authorization: Bearer sk-your-onrix-key
🔑 密钥即用即计费,请妥善保管;泄露后请在控制台立即删除并重建。 🔑 Keys are billed on use — keep them secret. If leaked, delete and re-create it in the console immediately.

模型Models

当前提供以下模型: The following models are currently available:

模型Model 类型Type 端点Endpoint 说明Notes
gpt-5.5对话Chat/chat/completions旗舰,最强推理Flagship, strongest reasoning
gpt-5.4对话Chat/chat/completions通用均衡General-purpose, balanced
gpt-5.4-mini对话Chat/chat/completions轻量,低延迟低成本Lightweight, low latency & cost
gpt-image-1图像Image/images/generations · /images/edits文生图 / 图生图Text-to-image / image edits
gpt-image-2图像Image/images/generations · /images/edits新一代图像模型Next-gen image model

POST  对话补全Chat Completions

POST /v1/chat/completions

用于 gpt-5.5 / gpt-5.4 / gpt-5.4-mini。设 "stream": true 可获得 SSE 流式输出。 For gpt-5.5 / gpt-5.4 / gpt-5.4-mini. Set "stream": true for SSE streaming.

cURL
curl https://api.getarriveready.com/v1/chat/completions \
  -H "Authorization: Bearer sk-your-onrix-key" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "gpt-5.5",
    "messages": [
      {"role": "system", "content": "You are a helpful assistant."},
      {"role": "user", "content": "Hello!"}
    ]
  }'

POST  图像生成Image Generation

POST /v1/images/generations

用于 gpt-image-1 / gpt-image-2,由文本提示词生成图像。返回 base64 或 URL(取决于模型)。 For gpt-image-1 / gpt-image-2 — generate images from a text prompt. Returns base64 or a URL depending on the model.

cURL
curl https://api.getarriveready.com/v1/images/generations \
  -H "Authorization: Bearer sk-your-onrix-key" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "gpt-image-2",
    "prompt": "A minimalist product photo of a ceramic mug on linen",
    "size": "1024x1024",
    "n": 1
  }'

POST  图像编辑Image Edits

POST /v1/images/edits

图生图 / 局部重绘。以 multipart/form-data 上传原图(及可选蒙版),配合提示词修改。 Image-to-image / inpainting. Upload the source image (and optional mask) as multipart/form-data together with a prompt.

cURL
curl https://api.getarriveready.com/v1/images/edits \
  -H "Authorization: Bearer sk-your-onrix-key" \
  -F model=gpt-image-1 \
  -F image=@source.png \
  -F prompt="Add a soft morning light from the left" \
  -F size=1024x1024
💡 参考图 / 线稿 / 蒙版必须走 /images/edits(multipart),不要塞进 /images/generations 的 JSON 体。 💡 Reference images / sketches / masks must use /images/edits (multipart) — do not put them in the /images/generations JSON body.

错误与限流Errors & limits

接口返回标准 HTTP 状态码,错误体为 OpenAI 风格的 JSON: Endpoints return standard HTTP status codes; error bodies use OpenAI-style JSON:

{ "error": { "message": "...", "type": "..." } }
状态码Status含义Meaning
401密钥缺失或无效Missing or invalid API key
402额度不足,请充值Insufficient quota — top up
429触发速率限制,请退避重试Rate limited — back off and retry
400请求参数错误Invalid request parameters
额度、用量与账单请在 控制台 查看与管理。 View and manage quota, usage and billing in the console.