curl -X POST https://your-domain.com/v1/chat/completions \
-H "Authorization: Bearer pbg_your_key" \
-H "Content-Type: application/json" \
-H "Idempotency-Key: order-001" \
-d '{
"model": "gemini-3.1-flash-image-preview-2k",
"messages": [{"role": "user", "content": "A quiet bookstore at dusk"}],
"stream": false,
"extra_body": {"imageConfig": {"aspectRatio": "16:9"}}
}'/v1/account/balance查询当前可用积分
/v1beta/models/{model}:generateContentGoogle Gemini 原生生图
/v1/chat/completionsOpenAI 兼容同步生图
/v1/generate提交异步图片任务
/v1/tasks/{task_id}查询异步任务状态
/v1/models查看可用模型与价格
/v1/tasks/{task_id}/file鉴权下载生成结果