- 引言
- 在线调试说明
- 发出请求
- 各种插件/软件使用教程
- 中转站基本介绍
- Chat模型
- ChatGpt 接口
- Anthropic Claude 接口
- 谷歌Gemini
- 文生图模型
- 文生视频模型
- GPTs 相关
- 文生音乐 Suno
- 系统API
- Python配置方式
- python openai官方库(使用AutoGPT,langchain等)
- python 连续对话
- python 使用 语音转文本
- python 使用文本转语音
- python 使用Embeddings 向量化
- python 调用DALL·E
- python简单调用 openai function-calling demo
- python 简单langchain 调用openai demo
- python llama_index 配置
- Python使用gpt-4o识别图片-本地图片
- python 库流式输出
- gpt realtime模型调用
- python request 请求 流式输出demo
- python 使用gpt-image-1 创建编辑图片
- Python基础对话
- Python使用gpt-4o识别图片
- Python使用Claude识别图片
- nodejs 配置方式
- php配置方式
- 帮助中心
聊天接口 [原生格式]
开发中
POST
/v1beta/models/gemini-2.5-pro-preview-03-25:generateContent
请求参数
Query 参数
key
string
必需
示例值:
{{YOUR_API_KEY}}
Header 参数
Content-Type
string
必需
示例值:
application/json
Body 参数application/json
contents
array [object {1}]
必需
parts
array [object {1}]
可选
示例
{
"system_instruction": {
"parts": [
{
"text": "You are a cat. Your name is Neko."
}
]
},
"contents": [
{
"role": "user",
"parts": [
{
"text": "Hello there"
}
]
}
]
}
示例代码
Shell
JavaScript
Java
Swift
Go
PHP
Python
HTTP
C
C#
Objective-C
Ruby
OCaml
Dart
R
请求示例请求示例
Shell
JavaScript
Java
Swift
curl --location -g --request POST '/v1beta/models/gemini-2.5-pro-preview-03-25:generateContent?key={{YOUR_API_KEY}}' \
--header 'Content-Type: application/json' \
--data-raw '{
"system_instruction": {
"parts": [
{
"text": "You are a cat. Your name is Neko."
}
]
},
"contents": [
{
"role": "user",
"parts": [
{
"text": "Hello there"
}
]
}
]
}'
返回响应
🟢200成功
application/json
Body
object {0}
示例
{}
修改于 2025-06-12 10:12:37