Skip to Content
aicentos
API 接口模型接口

模型列表(OpenAI 兼容)

OpenAI 兼容的模型列表接口:查询当前可用的模型

最后更新于:

OpenAI 兼容格式的模型列表接口。

GET /v1/models

鉴权

Bearer Token:API Key 在控制台「令牌管理」获取,放在请求头 Authorization。

请求

export AICENTOS_API_KEY="sk-your-aicentos-api-key"

curl "https://aicentos.com/v1/models" \
  -H "Authorization: Bearer $AICENTOS_API_KEY"

响应

{
  "object": "list",
  "data": [
    {
      "id": "gpt-4o-mini",
      "object": "model",
      "created": 1715000000,
      "owned_by": "openai"
    }
  ]
}

鉴权失败时返回 invalid_api_key 错误,排查方法见错误处理:

{
  "error": {
    "message": "Incorrect API key provided",
    "type": "authentication_error",
    "code": "invalid_api_key"
  }
}

本页内容