AICOMBO
EN
  • CN
  • EN
EN
  • CN
  • EN
EN
  • CN
  • EN
  1. Native Vertex AI Format
  • 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
        POST
    • 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. Native Vertex AI Format

Gemini Chat

POST
https://api.aicombo.com/v1/publishers/google/models/{model_name}:{action}
Gemini content generation interface using the native Vertex AI protocol.
The {action} parameter unifies both non-streaming and streaming invocation modes:
generateContent → non-streaming, waits for the complete response and returns it all at once
streamGenerateContent / streamGenerateContent?alt=sse→ streaming, returns the generated content incrementally as SSE data frames
Two authentication methods are supported (choose one):
Header: x-goog-api-key
Query: ?key=

请求参数

Path 参数

Header 参数

Body 参数application/json必填

示例
{
  "contents": [
    {
      "role": "user",
      "parts": [
        {
          "text": "reply in one word: capital of France?"
        }
      ]
    }
  ]
}

请求示例代码

Shell
JavaScript
Java
Swift
Go
PHP
Python
HTTP
C
C#
Objective-C
Ruby
OCaml
Dart
R
请求示例请求示例
Shell
JavaScript
Java
Swift
cURL
curl --location 'https://api.aicombo.com/v1/publishers/google/models/:' \
--header 'x-goog-api-key: ' \
--header 'Content-Type: application/json' \
--data '{
  "contents": [
    {
      "role": "user",
      "parts": [
        {
          "text": "reply in one word: capital of France?"
        }
      ]
    }
  ]
}'

返回响应

🟢200Success
application/json
以下成功响应结构是 action=GenerateContent 时。
当 action=streamGenerateContent 时,每帧结构与本 Schema 相同,HTTP 传输时每帧前缀为 "data: ",帧间以空行分隔。
Bodyapplication/json

示例
{
  "candidates": [
    {
      "content": {
        "role": "model",
        "parts": [
          {
            "text": "Paris"
          }
        ]
      },
      "finishReason": "STOP",
      "avgLogprobs": -13.343818664550781
    }
  ],
  "usageMetadata": {
    "promptTokenCount": 9,
    "candidatesTokenCount": 1,
    "totalTokenCount": 121,
    "trafficType": "ON_DEMAND",
    "promptTokensDetails": [
      {
        "modality": "TEXT",
        "tokenCount": 9
      }
    ],
    "candidatesTokensDetails": [
      {
        "modality": "TEXT",
        "tokenCount": 1
      }
    ],
    "thoughtsTokenCount": 111
  },
  "modelVersion": "gemini-2.5-pro",
  "createTime": "2026-05-14T03:18:16.481821Z",
  "responseId": "-D4Fap20HYiQj8wP08ua4AU"
}
上一页
Gemini Chat
下一页
Native Claude Format
Built with