图片系列Gemini
Gemini 原生格式
Gemini 兼容的图像生成接口,路径带尾部斜杠。
Gemini 兼容的图像生成接口,路径带尾部斜杠。
Authorization
bearerAuth AuthorizationBearer <token>
使用 Authorization Bearer API Key 进行鉴权。
In: header
Path Parameters
model*string
Gemini 兼容接口路径中的模型 ID。
Request Body
application/json
TypeScript Definitions
Use the request body type in TypeScript.
Response Body
application/json
application/json
curl -X POST "https://example.com/v1beta/models/gemini-2.5-flash:generateContent/" \ -H "Content-Type: application/json" \ -d '{ "contents": [ { "role": "user", "parts": [ { "text": "生成一张 ModelSell 控制台插图。" } ] } ] }'{
"candidates": [
{}
],
"promptFeedback": {},
"usageMetadata": {}
}{
"error": {
"code": "string",
"message": "string",
"request_id": "string"
}
}