API Reference

OpenAI 兼容 API

PionicAI 提供 OpenAI 兼容入口 https://api.pionicai.com/v1。支持 OpenAI 兼容客户端、SDK、编程 Agent 和部分聊天客户端接入。

基础信息

Base URLhttps://api.pionicai.com/v1
认证方式Authorization: Bearer YOUR_API_KEY
API Key 来源PionicAI 控制台令牌页面
日志查询https://api.pionicai.com/usage-logs

常见接口路径

/v1/models查看模型列表,能否返回取决于当前 Key 权限和平台配置。
/v1/chat/completions兼容 Chat Completions 的客户端使用。
/v1/responses支持 Responses API 的工具可使用。
/v1/images/generations图片生成接口。
/v1/images/edits图片编辑/图生图接口。

curl 示例:Chat Completions

curl https://api.pionicai.com/v1/chat/completions \
  -H "Authorization: Bearer sk-your-pionicai-key" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "your-model-name",
    "messages": [{"role": "user", "content": "hello"}]
  }'

curl 示例:Responses

curl https://api.pionicai.com/v1/responses \
  -H "Authorization: Bearer sk-your-pionicai-key" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "your-model-name",
    "input": "用一句话介绍 PionicAI"
  }'

排查顺序

  • 401:Key 缺失、复制不完整、填成登录密码。
  • 404:接口路径错误、模型名错误、当前分组没有模型。
  • 429:触发频率限制、额度限制或上游限流。
  • 5xx:上游或平台临时异常,稍后重试并查看日志。