SuperAPI AI Directory

space-gemini-image

Design & creation

View repository

Updated 10-16 07:25

About this skill

Gemini Image Generation

Use this Skill when the user expresses an intent to draw (such as "draw a...", "generate an image...", "help me create...").

Invocation Steps

1. Read Configuration

  • Read config/secrets.md to get the API Key

2. Construct the prompt

Mode prompt format Example
Text-to-image 描述文字 一只可爱的橘猫
Image-to-image 图片URL 描述文字 https://xxx.jpg 画类似风格
Multi-image reference URL1 URL2 描述文字 https://a.jpg https://b.jpg 融合两张图

Image-to-image requires uploading an image first; refer to tips/image-upload.md。

3. Call the API

curl -s -X POST "https://api.apicore.ai/v1/images/generations" \
  -H "Authorization: Bearer API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "模型名称",
    "prompt": "提示词",
    "size": "尺寸比例",
    "n": 1
  }'

4. Return the result

Extract from the response data[0].url and return it to the user.

Reference Documents

  • tips/image-upload.md - Image upload method
  • tips/chinese-text.md - Chinese text processing techniques