访问地址:国内 https://4sapi.org、https://4stoken.com;海外https://4sapi.top、https://4sapi.com、https://us.4sapi.com;纯 API 专线https://4sapi.ai;北美低延迟https://4sapi.net。详见《国内外直连域名》。
gemini-2.5-flash-image、gemini-3.1-flash-image-c、gemini-3-pro-image-c、gemini-nano-banana-2.1-ccurl --location 'https://4sapi.org/v1beta/models/gemini-3.1-flash-image-preview:generateContent' \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{
"contents": [
{
"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": "<把图片文件转成 base64 填这里>"
}
}
]
}
],
"generationConfig": {
"responseModalities": [
"TEXT",
"IMAGE"
]
}
}'{}