1. Chat
AboAI
English
  • 中文
  • English
  • Home Page
  • AboAi-API
    • Model
      • Native OpenAI Format
      • Native Gemini Format
    • Chat
      • Native OpenAI Format
        POST
      • Native Gemini Format
        POST
      • Native Claude Format
        POST
      • Responses Request (openai)
        POST
    • Audio
      • Native OpenAI Format TTS
      • Native Gemini Format TTS
    • Images
      • Native OpenAI Format Image Generation
      • Native Gemini Format Image Generation
      • Native OpenAI Format Image Editing (JSON)
      • Native OpenAI Format Image Editing (Multipart)
    • Video
      • Seedance2.0 format
        • Create Video Generation Task
        • Query Video Generation Task Status
    • Vector
      • Embeddings
        • Create Embedding
    • Translation
      • Speech Translation
  • AI application
    • AboAI API Integration with Claude Code
    • AboAI API Integration with Cursor
    • AboAI API Integration with Codex-cli
    • AboAI API Integration with Codex Desktop
    • AboAI API Integration with Hermes Agent
  1. Chat

Native OpenAI Format

POST
/v1/chat/completions
POST /v1/chat/completions

Request

Authorization
Bearer Token
Provide your bearer token in the
Authorization
header when making requests to protected resources.
Example:
Authorization: Bearer ********************
or
Header Params

Body Params application/json

Examples

Responses

🟢200
application/json
Bodyapplication/json

🟠400
🔴500
Request Request Example
Shell
JavaScript
Java
Swift
cURL
curl --location 'https://api.aboai.ai/v1/chat/completions' \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{
    "model": "GPT-5.2-Chat",
    "messages": [
        {
            "role": "developer",
            "content": "You are a helpful assistant."
        },
        {
            "role": "user",
            "content": "Hello!"
        }
    ]
}'
Response Response Example
200 - Default
{
    "id": "chatcmpl-B9MBs8CjcvOU2jLn4n570S5qMJKcT",
    "object": "chat.completion",
    "created": 1741569952,
    "model": "gpt-5.4",
    "choices": [
        {
            "index": 0,
            "message": {
                "role": "assistant",
                "content": "Hello! How can I assist you today?",
                "refusal": null,
                "annotations": []
            },
            "logprobs": null,
            "finish_reason": "stop"
        }
    ],
    "usage": {
        "prompt_tokens": 6,
        "completion_tokens": 0,
        "total_tokens": 6
    },
    "service_tier": "default"
}
Modified at 2026-06-16 03:00:40
Previous
Native Gemini Format
Next
Native Gemini Format
Built with