GPTACG - New
  1. Gemini原生格式
GPTACG - New
  • OpenAI兼容格式
    • 普通对话
      POST
    • 识图模型
      POST
    • 流式输出
      POST
    • 结构化输出
      POST
    • Fouctions调用
      POST
    • 嵌入模型
      POST
    • 审查模型
      POST
    • Dalle绘图模型
      POST
    • tts文本转语音
      POST
    • 新绘图模型(逆向+流式)
      POST
    • 新response端点o3-pro
      POST
  • Anthropic原生格式
    • 普通对话
      POST
    • 思考设置
      POST
    • 图像识别
      POST
    • 函数调用
      POST
  • Gemini原生格式
    • 普通对话
      POST
    • 图像生成
      POST
    • 音频生成
      POST
    • 结构化输出
      POST
    • 思考设置
      POST
    • 函数调用
      POST
    • PDF文件识别
      POST
    • 图像识别
      POST
    • 视频识别
      POST
    • Imagen图像生成 Copy
      POST
  • 列出支持的模型
    GET
  1. Gemini原生格式

函数调用

POST
https://api.gptacg.top/v1beta/models/gemini-2.0-flash:generateContent

请求参数

Query 参数
key
string 
可选
Header 参数
Content-Type
string 
可选
示例值:
application/json
Body 参数application/json
object {0}
示例
{
    "contents": [
        {
            "role": "user",
            "parts": [
                {
                    "text": "Schedule a meeting with Bob and Alice for 03/27/2025 at 10:00 AM about the Q3 planning."
                }
            ]
        }
    ],
    "tools": [
        {
            "functionDeclarations": [
                {
                    "name": "schedule_meeting",
                    "description": "Schedules a meeting with specified attendees at a given time and date.",
                    "parameters": {
                        "type": "object",
                        "properties": {
                            "attendees": {
                                "type": "array",
                                "items": {
                                    "type": "string"
                                },
                                "description": "List of people attending the meeting."
                            },
                            "date": {
                                "type": "string",
                                "description": "Date of the meeting (e.g., '2024-07-29')"
                            },
                            "time": {
                                "type": "string",
                                "description": "Time of the meeting (e.g., '15:00')"
                            },
                            "topic": {
                                "type": "string",
                                "description": "The subject or topic of the meeting."
                            }
                        },
                        "required": [
                            "attendees",
                            "date",
                            "time",
                            "topic"
                        ]
                    }
                }
            ]
        }
    ]
}

示例代码

Shell
JavaScript
Java
Swift
Go
PHP
Python
HTTP
C
C#
Objective-C
Ruby
OCaml
Dart
R
请求示例请求示例
Shell
JavaScript
Java
Swift
curl --location --request POST 'https://api.gptacg.top/v1beta/models/gemini-2.0-flash:generateContent?key=' \
--header 'Content-Type: application/json' \
--data-raw '{
    "contents": [
        {
            "role": "user",
            "parts": [
                {
                    "text": "Schedule a meeting with Bob and Alice for 03/27/2025 at 10:00 AM about the Q3 planning."
                }
            ]
        }
    ],
    "tools": [
        {
            "functionDeclarations": [
                {
                    "name": "schedule_meeting",
                    "description": "Schedules a meeting with specified attendees at a given time and date.",
                    "parameters": {
                        "type": "object",
                        "properties": {
                            "attendees": {
                                "type": "array",
                                "items": {
                                    "type": "string"
                                },
                                "description": "List of people attending the meeting."
                            },
                            "date": {
                                "type": "string",
                                "description": "Date of the meeting (e.g., '\''2024-07-29'\'')"
                            },
                            "time": {
                                "type": "string",
                                "description": "Time of the meeting (e.g., '\''15:00'\'')"
                            },
                            "topic": {
                                "type": "string",
                                "description": "The subject or topic of the meeting."
                            }
                        },
                        "required": [
                            "attendees",
                            "date",
                            "time",
                            "topic"
                        ]
                    }
                }
            ]
        }
    ]
}'

返回响应

🟢200成功
application/json
Body
object {0}
示例
{}
修改于 2025-07-03 06:40:20
上一页
思考设置
下一页
PDF文件识别
Built with