cURL
curl --request POST \ --url https://www.666api.ai/v1/chat/completions \ --header 'Authorization: Bearer <token>' \ --header 'Content-Type: application/json' \ --data ' { "model": "gemini-3-pro-image-preview", "stream": false, "messages": [ { "role": "user", "content": "draw a cat" } ], "extra_body": { "google": { "image_config": { "aspect_ratio": "16:9", "image_size": "2K" } } } } '
{ "id": "chatcmpl-20251211160744809365000fdOhL0KY", "model": "gemini-3-pro-image-preview", "object": "chat.completion", "created": 1765440499, "choices": [ { "index": 0, "message": { "role": "assistant", "content": "" }, "finish_reason": "stop" } ], "usage": { "prompt_tokens": 4, "completion_tokens": 1359, "total_tokens": 1363 } }
Gemini 图片生成
使用 Bearer Token 认证。 格式: Authorization: Bearer sk-xxxxxx
Authorization: Bearer sk-xxxxxx
Show child attributes
成功