DataEyesAI
Official SiteConsoleDocs HomeGetting StartedDeveloper ToolsAI Models API
Terms & Policies
Official SiteConsoleDocs HomeGetting StartedDeveloper ToolsAI Models API
Terms & Policies
  1. AI Models API
  • API Overview
  • Chat Completions
  • Responses
  • Messages (Claude)
  • Gemini (generateContent)
  • Embeddings
  • Image Models
    • Images
    • Gemini Image Generation
    • Grok Imagine Image
  • Midjourney format
    • Midjourney API Reference
    • Task query interface
    • Upload image
    • Get seed (Seed)
    • Submit Imagine task
    • Query tasks based on ID list
    • FaceSwap
    • Execute Action operation
    • /mj/submit/blend
    • Submit Describe task
    • Submit Modal
    • Refresh link
    • Edit image
    • Query task status by task ID
    • Get the seed of the task image
  • Video Model
    • FLUX Video Generation (flux-3-video)
    • Grok Video Generation
      • 00-Overview
      • 01-Text-to-Video
      • 02-Image-to-Video
      • 03-Reference-to-Video
      • 04-Video-Editing
      • 05-Video-Extension
    • Seedance Video Generation
      • 00-Overview
      • 01-Create-Video-Generation-Task
      • 02-Query-Video-Generation-Task
      • 03-Query-Video-Generation-Task-List
      • 04-Cancel-or-Delete-Task
      • Seedance Private Asset Library API Documentation
    • MiniMax-H3 Video Generation
      • 00-Overview
      • 01-Create-Video-Generation
      • 02-Create-Video-Regeneration
      • 03-Create-H3-Context-IR
      • 04-Query-Task
      • 05-List-Tasks
      • 06-Cancel-or-Delete-Task
    • Hailuo Video Generation
      • 00-Overview
      • 01-Text-to-Video-T2V
      • 02-Image-to-Video-I2V
      • 03-First-Last-Frame-FL2V
      • 04-Subject-Reference-S2V
      • 05-Query-Task-Status
      • 06-Video-Download
      • 99-Appendix-Camera-Movement-and-Webhooks
    • Jimeng Video Generation
      • 00-Overview
      • 01-3.0-Pro-Video-Generation
      • 02-720P-Text-to-Video
      • 03-720P-Image-to-Video-First-Frame
      • 04-720P-Image-to-Video-Start-End-Frame
      • 05-720P-Image-to-Video-Camera
      • 06-1080P-Text-to-Video
      • 07-1080P-Image-to-Video-First-Frame
      • 08-1080P-Image-to-Video-Start-End-Frame
      • 09-Error-Codes
    • Kling AI Video Generation
      • 00-Overview
      • 01-Text-to-Video
      • 02-Image-to-Video
      • 03-Omni-Video
      • 04-Multi-Image-to-Video
      • 05-Motion-Control
      • 06-Multi-Elements
      • 07-Video-Extension
      • 08-Lip-Sync
      • 09-Avatar
      • 10-Text-to-Audio
      • 11-Video-to-Audio
      • 12-TTS
      • 13-Custom-Voices
      • 14-Image-Recognition
      • 15-Element-Management
      • 16-Video-Effects
      • 17-Kling-4.0-Video-Generation
    • Vidu Video Generation
      • 00-Overview
      • 01-Text-to-Video
      • 02-Image-to-Video
      • 03-Reference-to-Video
      • 04-Start-End-Frame
      • 05-Multi-Frame
      • 06-Scene-Template
      • 07-Template-Story
      • 08-Query-Tasks
    • HappyHorse
      • HappyHorse Text-to-Video
      • HappyHorse Image-to-Video (First Frame)
      • HappyHorse Reference-to-Video
      • HappyHorse Video Editing
    • Wan Video Generation
      • 00-Overview.md
      • 01-Text-to-Video
      • 02-Image-to-Video
      • 03-Reference-to-Video
      • 04-Video-Editing
      • 05-First-Last-Frame-to-Video
      • 06-Motion-Transfer-and-Character-Swap
      • 07-Digital-Human-Video
      • 08-VACE-Video-Editing
      • 09-Query-Task
  • Audio API
    • Audio API
    • Gemini TTS API
    • Google DeepMind Lyria API
    • Elevenlabs Speech to Text API Reference
  1. AI Models API

Gemini (generateContent)

The native Google Gemini API for Gemini models. Use it to access Gemini-native tools such as Google Search, URL context, and code execution. Gemini CLI and the Google GenAI SDK use this API.
POST https://studio.dataeyes.ai/v1beta/models/{model}:generateContent
POST https://studio.dataeyes.ai/v1beta/models/{model}:streamGenerateContent?alt=sse
The model name goes in the path, for example /v1beta/models/gemini-3.8-flash:generateContent.

Authentication#

Use any one of the following:
MethodExample
x-goog-api-key header (SDK default)x-goog-api-key: sk-xxx
Authorization headerAuthorization: Bearer sk-xxx
key URL parameter...:generateContent?key=sk-xxx

Quick example#

cURL
Python
Node.js
Response:
{
  "candidates": [
    {
      "content": {
        "role": "model",
        "parts": [
          {
            "text": "I am Gemini, a large language model built by Google, designed to assist you with a wide variety of tasks.",
            "thoughtSignature": "…"
          }
        ]
      },
      "finishReason": "STOP"
    }
  ],
  "usageMetadata": {
    "promptTokenCount": 13,
    "candidatesTokenCount": 23,
    "thoughtsTokenCount": 323,
    "totalTokenCount": 359
  },
  "modelVersion": "gemini-3.8-flash"
}
Gemini 3 models think before answering by default. Tokens used for thinking are reported in thoughtsTokenCount.

Request parameters#

ParameterTypeRequiredDescription
contentsarrayYesConversation content. Each item has a role (user or model) and a parts array
systemInstructionobjectNoSystem instruction, for example {"parts": [{"text": "..."}]}
generationConfigobjectNoGeneration settings. See the table below
toolsarrayNoTools: functionDeclarations, googleSearch, urlContext, codeExecution
Common generationConfig fields:
FieldDescription
temperatureSampling temperature
maxOutputTokensMaximum output tokens
thinkingConfigThinking settings, for example {"thinkingLevel": "low"}. Add "includeThoughts": true to return a thought summary
responseMimeTypeSet to application/json to output JSON
responseSchemaConstrains the JSON structure, used together with responseMimeType
parts can contain text (text), public files (fileData), Base64 files (inlineData), and function results (functionResponse).

Streaming#

Use :streamGenerateContent?alt=sse. Each data: chunk is a fully structured response fragment. Use the usageMetadata in the last chunk as the final usage.
Python SDK example:

Thinking#

thinkingLevel controls how deeply the model thinks (low, high). Set includeThoughts to true to return a thought summary.
The thought summary is a part marked "thought": true, placed before the answer:
{
  "parts": [
    { "text": "**My Thought Process on Resolving the Deception** …", "thought": true },
    { "text": "… The person telling the truth is **B**. …", "thoughtSignature": "…" }
  ]
}

Structured output#

The returned text:
"{\"name\":\"John Smith\",\"age\":28,\"city\":\"Seattle\",\"job\":\"product manager\"}"

Function calling#

Step 1: Declare the function
The model returns a functionCall:
{
  "parts": [
    {
      "functionCall": { "name": "get_weather", "args": { "city": "Shanghai" } },
      "thoughtSignature": "…"
    }
  ]
}
Step 2: Send the function result back
In contents, include the original question, the part returned by the model (unchanged, including thoughtSignature), and a functionResponse, in that order:
{
  "contents": [
    {"role": "user", "parts": [{"text": "What's the weather like in Shanghai today?"}]},
    {"role": "model", "parts": [
      {"functionCall": {"name": "get_weather", "args": {"city": "Shanghai"}}, "thoughtSignature": "…"}
    ]},
    {"role": "user", "parts": [
      {"functionResponse": {"name": "get_weather", "response": {"city": "Shanghai", "weather": "Cloudy", "temperature": 22}}}
    ]}
  ],
  "tools": [ …same as step 1… ]
}
The model then answers using the function result.

Built-in tools#

ToolSyntaxWhat it does
Google Search"tools": [{"googleSearch": {}}]Searches the web before answering. Sources are in groundingMetadata
URL context"tools": [{"urlContext": {}}]Reads the URLs in the prompt. Results are in urlContextMetadata
Code execution"tools": [{"codeExecution": {}}]Writes and runs Python code, returning executableCode and codeExecutionResult
Google Search
URL context
Code execution
groundingMetadata in the response (excerpt):
{
  "webSearchQueries": ["2026 Nobel Prize in Physics winner"],
  "groundingChunks": [
    { "web": { "uri": "https://vertexaisearch.cloud.google.com/grounding-api-redirect/…", "title": "nobelprize.org" } }
  ]
}

Image and PDF input#

Public URL (fileData)
Local file (inlineData)
PDFs work the same way: set mimeType to application/pdf.

FAQ#

404 error
400 error on the second function-calling turn
Usage is higher than expected
Can I call Gemini with the OpenAI format?
Previous
Messages (Claude)
Next
Embeddings