Skip to Content
aicentos
API 介面聊天介面OpenAI

Responses 格式

最後更新於:

聊天(Chat)原生 OpenAI 格式

POST /responses

驗證

將 API Key 存入環境變數 AICENTOS_API_KEY;shell 範例會將其值展開至 Authorization: Bearer 標頭。

在控制台「權杖管理」取得的 API 金鑰

位置:header

請求主體

application/json

TypeScript 型別定義

在 TypeScript 中使用 request body 型別

回應主體

application/json

application/json

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

curl -X POST "https://aicentos.com/v1/responses" \
  -H "Authorization: Bearer $AICENTOS_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{    "model": "gpt-5",    "input": "用一句話介紹你自己"  }'
{
  "id": "string",
  "object": "response",
  "status": "completed",
  "output": [],
  "usage": {}
}
{
  "error": {
    "message": "Incorrect API key provided",
    "type": "authentication_error",
    "code": "invalid_api_key"
  }
}