AICOMBO
EN
  • CN
  • EN
EN
  • CN
  • EN
EN
  • CN
  • EN
  1. Completions
  • User Guide
  • Audio
    • Text to Speech
      POST
    • Gemini Native
      POST
  • Chat
    • Native OpenAI Format
      • ChatCompletions Format
      • Responses Format
      • Responses Async Task Retrieval
      • Responses Async Task Deletion
      • Responses Async Task Retrieval (Streaming)
    • Native Gemini Format
      • Gemini Chat
    • Native Vertex AI Format
      • Gemini Chat
    • Native Anthropic Format
      • Native Claude Format
      • Native Claude Format - Token Count
  • Completions
    • Native OpenAI Format
      POST
  • Images
    • Gemini Format
      • Responses Format
      • OpenAI Compatible
  • Models
    • List Models
      • Native OpenAI Format
      • Native Gemini Format
  1. Completions

Native OpenAI Format

POST
https://api.aicombo.com/v1/completions
Create a text completion based on the given prompt

请求参数

Header 参数

Body 参数application/json必填

示例
{
  "model": "gemini-2.5-pro",
  "messages": [
    {
      "role": "user",
      "content": "Hello"
    }
  ]
}

请求示例代码

Shell
JavaScript
Java
Swift
Go
PHP
Python
HTTP
C
C#
Objective-C
Ruby
OCaml
Dart
R
请求示例请求示例
Shell
JavaScript
Java
Swift
curl --location 'https://api.aicombo.com/v1/completions' \
--header 'Authorization: Bearer ' \
--header 'Content-Type: application/json' \
--data '{
  "model": "gemini-2.5-pro",
  "messages": [
    {
      "role": "user",
      "content": "Hello"
    }
  ]
}'

返回响应

🟢200Success
application/json
Bodyapplication/json

示例
{
  "id": "chatcmpl-202605130746402027000VQZp62By",
  "model": "gemini-2.5-pro",
  "object": "chat.completion",
  "created": 1778658409,
  "choices": [
    {
      "index": 0,
      "message": {
        "role": "assistant",
        "content": "Hello! I'm glad to help you. What can I do for you?"
      },
      "finish_reason": "stop"
    }
  ],
  "usage": {
    "prompt_tokens": 2,
    "completion_tokens": 931,
    "total_tokens": 933,
    "prompt_tokens_details": {
      "cached_tokens": 0,
      "text_tokens": 2,
      "audio_tokens": 0,
      "image_tokens": 0
    },
    "completion_tokens_details": {
      "text_tokens": 0,
      "audio_tokens": 0,
      "reasoning_tokens": 916
    },
    "input_tokens": 0,
    "output_tokens": 0,
    "input_tokens_details": null,
    "claude_cache_creation_5_m_tokens": 0,
    "claude_cache_creation_1_h_tokens": 0
  }
}
上一页
Native Claude Format - Token Count
下一页
Responses Format
Built with