gemini-image
Compare original and translation side by side
🇺🇸
Original
English🇨🇳
Translation
ChineseGemini Image Generation
Gemini 图像生成
Use this skill when user expresses intent to generate images (e.g., "draw a...", "generate an image...", "create a picture...").
当用户表达出生成图像的意图时使用此技能(例如:“画一只……”、“生成一张图像……”、“创建一幅画……”)。
Steps
步骤
1. Read Configuration
1. 读取配置
- Read to get API Key
config/secrets.md
- 读取获取API Key
config/secrets.md
2. Construct Prompt
2. 构建提示词
| Mode | Prompt Format | Example |
|---|---|---|
| Text-to-Image | | |
| Image-to-Image | | |
| Multi-Image Reference | | |
For image-to-image, upload local images first. See .
tips/image-upload.md| 模式 | 提示词格式 | 示例 |
|---|---|---|
| 文本转图像 | | |
| 图像转图像 | | |
| 多图像参考 | | |
对于图像转图像模式,请先上传本地图片。详见。
tips/image-upload.md3. Call API
3. 调用API
bash
curl -s -X POST "https://api.apicore.ai/v1/images/generations" \
-H "Authorization: Bearer API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "model_name",
"prompt": "prompt_text",
"size": "aspect_ratio",
"n": 1
}'bash
curl -s -X POST "https://api.apicore.ai/v1/images/generations" \
-H "Authorization: Bearer API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "model_name",
"prompt": "prompt_text",
"size": "aspect_ratio",
"n": 1
}'4. Return Result
4. 返回结果
Extract from response and return to user.
data[0].url从响应中提取并返回给用户。
data[0].urlReference Docs
参考文档
- - Image upload methods
tips/image-upload.md - - Chinese text handling tips
tips/chinese-text.md
- - 图片上传方法
tips/image-upload.md - - 中文文本处理技巧
tips/chinese-text.md