API 接入参考

面向直接调用接口的脚本与应用:配置鉴权,并通过 Responses 发送请求。

端点

Base URL 使用 `https://reverix.ai/v1`;API 密钥通过 `Authorization: Bearer` 请求头发送。模型 ID 请从模型广场选择,并确认当前密钥可用。

https://reverix.ai/v1

列出模型

curl https://reverix.ai/v1/models \ -H "Authorization: Bearer YOUR_REVERIX_API_KEY"

发送 Responses 请求

支持的模型优先使用 Responses。请将 `MODEL_FROM_YOUR_CONSOLE` 替换为当前密钥可用、且支持 Responses 的模型 ID;使用客户端时,还需确认客户端支持该协议。

curl https://reverix.ai/v1/responses \ -H "Authorization: Bearer YOUR_REVERIX_API_KEY" \ -H "Content-Type: application/json" \ -d '{"model":"MODEL_FROM_YOUR_CONSOLE","input":"Hello"}'

Python SDK

from openai import OpenAI client = OpenAI( api_key="YOUR_REVERIX_API_KEY", base_url="https://reverix.ai/v1", ) response = client.responses.create( model="MODEL_FROM_YOUR_CONSOLE", input="Hello", ) print(response.output_text)

轮换密钥

如密钥泄露,请在「API 密钥」中禁用旧密钥,创建新密钥,并更新相关客户端的配置。