使用 Gemini 模型生成图片。
Documentation Index
Fetch the complete documentation index at: https://docs.anyfast.ai/llms.txt
Use this file to discover all available pages before exploring further.
API 密钥
对话轮次数组。每轮包含 role 和 parts。 part 可以是文本提示词或 inline_data 图片(base64)。 如需使用参考图,在同一个 parts 数组中同时传入 text 和 inline_data。
[
{
"role": "user",
"parts": [
{
"text": "Hi, this is a picture of me. Can you add a llama next to me?"
},
{
"inline_data": {
"mime_type": "image/jpeg",
"data": "iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAYAAAAfFcSJAAAADUlEQVR42mNk+M9QDwADhgGAWjR9awAAAABJRU5ErkJggg=="
}
}
]
}
]