Endpoint#
Endpoint
POST https://api.xpluse.plus/gemini/v1beta/models/{model}:generateContent
POST https://api.xpluse.plus/gemini/v1beta/models/{Models}:streamGenerateContentCall Google Gemini models through the Gemini native API. DataMind AI is compatible with the Google GenAI SDK and supports function calling, code execution, Grounding, and image generation/editing.
Authentication#
Header
x-goog-api-key: <your DATAMIND_API_KEY>Basic request#
cURL
curl "https://api.xpluse.plus/gemini/v1beta/models/google/gemini-3.1-flash-lite-preview:generateContent" \
-H "x-goog-api-key: $DATAMIND_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"contents": [{"parts": [{"text": "Implement a simple web server in Python"}]}]
}' Python
from google import genai
client = genai.Client(
api_key="<your DATAMIND_API_KEY>",
http_options={"api_version": "v1beta", "base_url": "https://api.xpluse.plus/gemini"}
)
response = client.models.generate_content(
model="google/gemini-3.1-flash-lite-preview",
contents="Implement a simple web server in Python"
)
print(response.text)TypeScript
import { GoogleGenAI } from '@google/genai'
const ai = new GoogleGenAI({
apiKey: '<your DATAMIND_API_KEY>',
httpOptions: { apiVersion: 'v1beta', baseUrl: 'https://api.xpluse.plus/gemini' }
})
const response = await ai.models.generateContent({
model: 'google/gemini-3.1-flash-lite-preview',
contents: 'Implement a simple web server in Python'
})
console.log(response.text)Streaming response#
Python
response = client.models.generate_content_stream(
model="google/gemini-3.1-flash-lite-preview",
contents="Write an article about AI"
)
for chunk in response:
print(chunk.text, end="", flush=True)Multimodal input#
Gemini natively supports multimodal input, including images, audio, and video:
Python
import base64
with open("photo.jpg", "rb") as f:
image_data = base64.b64encode(f.read()).decode()
response = client.models.generate_content(
model="google/gemini-3.1-flash-lite-preview",
contents=[
{"text": "Describe the contents of this image"},
{"inline_data": {"mime_type": "image/jpeg", "data": image_data}}
]
)Response example#
JSON
{
"candidates": [{
"content": {"role": "model", "parts": [{"text": "..."}]},
"finishReason": "STOP"
}],
"ModelsVersion": "google/gemini-3.1-flash-lite-preview",
"usageMetadata": {"promptTokenCount": 12, "candidatesTokenCount": 256, "totalTokenCount": 268}
}Supported models#
| Model | Description |
|---|---|
google/gemini-3.1-pro-preview | Strongest reasoning |
google/gemini-3-pro-preview | Balanced performance |
google/gemini-3.1-flash-lite-preview | Fast and cost-effective |
google/gemini-3.1-flash-image-preview | Image generation and editing |
Last updated on June 22, 2026