Skip to Content
aicentos
Tham chiếu APIAPI ChatOpenAI

Định dạng Responses

Cập nhật lần cuối:

Chat — định dạng OpenAI gốc

POST /responses

Xác thực

Lưu API Key vào biến môi trường AICENTOS_API_KEY; các ví dụ shell dùng giá trị của biến trong header Authorization: Bearer.

API Key lấy từ mục "Quản lý token" trong Console

Vị trí: header

Nội dung yêu cầu

application/json

Định nghĩa kiểu TypeScript

Sử dụng kiểu request body trong TypeScript

Nội dung phản hồi

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": "Giới thiệu bản thân trong một câu"  }'
{
  "id": "string",
  "object": "response",
  "status": "completed",
  "output": [],
  "usage": {}
}
{
  "error": {
    "message": "Incorrect API key provided",
    "type": "authentication_error",
    "code": "invalid_api_key"
  }
}