GlobalAiOpc

Gemini Native API

Gemini native interface for direct generateContent and streamGenerateContent integrations

POST/gw_llm_power/v1/models/{model}:generateContent
baseUrlhttp://apillm.globalaiopc.com/gw_llm_power
Compatible with the Gemini official documentation. You can integrate directly with the following reference:

Authentication

Get Key
Use the Authorization header for authentication.
cURL
Authorization: Bearer {{YOUR_API_KEY}}
Content-Type: application/json
Notes:
  • Authorization: API key in the format Bearer {{YOUR_API_KEY}}

Supported Models

The following models are supported, organized by model family and version type:

Gemini

Standard / Stable VersionOfficial VersionLow-cost Version
gemini-2.5-flash-lite--
gemini-2.5-progemini-2.5-pro-officialgemini-2.5-pro-low
gemini-3-flash-previewgemini-3-flash-preview-officialgemini-3-flash-preview-low
gemini-3.1-flash-lite-preview--
gemini-3.1-pro-previewgemini-3.1-pro-preview-officialgemini-3.1-pro-preview-low

Version Notes

Suffix / TypeDescription
no suffixStandard / stable version
-officialOfficial version
-lowLow-cost version

Multimodal Support

Image Analysis

All models support image analysis.

Video Analysis

All models support video analysis.

Request Path

The following Gemini native paths are supported:
  • POST /v1/models/{model}:generateContent
  • POST /v1/models/{model}:streamGenerateContent
Example full URL:
Text
http://apillm.globalaiopc.com/gw_llm_power/v1/models/gemini-3.1-pro-preview:generateContent

Request Parameters

contentsarrayrequired
Gemini native message content array. Each item usually contains role and parts
contents[].rolestring
Message role, commonly user or model
contents[].partsarrayrequired
Message part array. Commonly text objects, also supports Gemini native multimodal structures
contents[].parts[].textstring
Text content
generationConfig.temperaturenumber
Sampling temperature
generationConfig.topPnumber
Nucleus sampling parameter
generationConfig.maxOutputTokensinteger
Maximum output token count
systemInstruction.parts[].textstring
Optional system prompt

Response

Returns a Gemini native-style response.
candidates[].content.parts[].textstring
Generated text content
candidates[].finishReasonstring
Generation stop reason
usageMetadata.promptTokenCountinteger
Input token count
usageMetadata.candidatesTokenCountinteger
Output token count
usageMetadata.totalTokenCountinteger
Total token count

Notes

  1. Replace {model} in the path with the actual model name, for example gemini-3.1-pro-preview
  2. For streaming responses, use :streamGenerateContent
  3. Pass the API key using the Authorization header