Docs Native format /v1beta/models/gemini-2.5-flash:generateContent
API reference

google search

Official documentation: https://ai.google.dev/gemini-api/docs/document-processing?hl=zh-cn

POST/v1beta/models/gemini-2.5-flash:generateContent

Body Parametersapplication/json

contents* array

Responses

200 application/json
response-200 object
400 Bad request or validation failed application/json
response-400 object
properties
error* object
401 Missing or invalid API Key application/json
response-401 object
Request Body Example google search
1{
2"contents": [
3{
4"role": "user",
5"parts": [
6{
7"text": "今天重庆天气如何?"
8}
9]
10}
11],
12"tools": [
13{
14"googleSearch": {}
15}
16]
17}
Code Sample cURL
1curl -X POST "https://api.digislash.com/v1beta/models/gemini-2.5-flash:generateContent" \
2-H "Authorization: Bearer <API Key>" \
3-H "Content-Type: application/json" \
4-d '{
5"contents": [
6{
7"role": "user",
8"parts": [
9{
10"text": "今天重庆天气如何?"
11}
12]
13}
14],
15"tools": [
16{
17"googleSearch": {}
18}
19]
20}'
Response
1▼{
2"id": "resp_example",
3"object": "response",
4"status": "completed"
5}