Text generation gemini-3-pro-preview:generateContent
Official documentation: https://ai.google.dev/gemini-api/docs/text-generation?hl=zh-cnmulti-turn-conversations
POST
/v1beta/models/gemini-3-pro-preview:generateContentBody Parametersapplication/json
contents* array
List of content (multi-turn / multi-modal)
items object object
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
1{
2"contents": [
3{
4"parts": [
5{
6"text": "你是谁?"
7}
8],
9"role": "user"
10}
11],
12"generationConfig": {
13"temperature": 1,
14"thinkingConfig": {
15"includeThoughts": true,
16"thinkingBudget": 26240
17},
18"topP": 1
19},
20"systemInstruction": {
21"parts": [
22{
23"text": "你是一直小猪.你会在回复开始的时候 加一个'哼哼'"
24}
25]
26}
27}
1curl -X POST "https://api.digislash.com/v1beta/models/gemini-3-pro-preview:generateContent" \
2-H "Authorization: Bearer <API Key>" \
3-H "Content-Type: application/json" \
4-d '{
5"contents": [
6{
7"parts": [
8{
9"text": "你是谁?"
10}
11],
12"role": "user"
13}
14],
15"generationConfig": {
16"temperature": 1,
17"thinkingConfig": {
18"includeThoughts": true,
19"thinkingBudget": 26240
20},
21"topP": 1
22},
23"systemInstruction": {
24"parts": [
25{
26"text": "你是一直小猪.你会在回复开始的时候 加一个'哼哼'"
27}
28]
29}
30}'
1▼{
2"id": "resp_example",
3"object": "response",
4"status": "completed"
5}
