スキル一覧に戻る
tyrchen

gemini-image

by tyrchen

gemini-imageは、other分野における実用的なスキルです。複雑な課題への対応力を強化し、業務効率と成果の質を改善します。

103🍴 66📅 2026年1月23日
GitHubで見るManusで実行

SKILL.md


name: gemini-image description: Reference guide for using google-genai Python library to generate images with gemini-3-pro-image-preview model. Use this skill when building new projects that need Gemini image generation capabilities, to understand the correct API patterns, configuration options, and best practices.

Gemini Image Generation Guide

Reference for generating images with Google's gemini-3-pro-image-preview model.

Language References

Load the appropriate reference based on the project's language:

LanguageReference File
Pythonreferences/python.md

Instructions: When implementing Gemini image generation, read the corresponding language reference file for complete code patterns and examples.


Model Information

PropertyValue
Model IDgemini-3-pro-image-preview
Cost~$0.134 per image (2K)
Max Reference Images5+ (high fidelity)
Resolutions1K, 2K, 4K

Supported Aspect Ratios

RatioUse Case
1:1Square, social media posts
2:3Portrait photos
3:2Landscape photos
3:4Portrait, mobile screens
4:3Standard display
4:5Instagram portrait
5:4Large format
9:16Vertical video, stories
16:9Widescreen, presentations
21:9Ultra-wide, cinematic

Image Sizes

SizeResolutionUse Case
1K~1024pxThumbnails, previews
2K~2048pxStandard output (recommended)
4K~4096pxHigh-quality prints

Important: Use uppercase "K" (not "1k", "2k", "4k").


Environment Setup

export GOOGLE_API_KEY='your-api-key-here'

Core Capabilities

1. Text-to-Image Generation

Generate images from text descriptions with configurable aspect ratio and resolution.

2. Style Transfer with Reference Images

Pass reference images to maintain consistent style across generations. Supports up to 5+ images for high fidelity.

3. Image Editing

Modify existing images based on text instructions (add/remove elements, style changes).

4. Batch Generation

Generate multiple style candidates or variations.


Prompt Engineering Tips

Be Descriptive

Bad:  "cat, sunset"
Good: "A fluffy orange tabby cat sitting on a wooden fence,
       watching a vibrant sunset over rolling hills.
       Warm golden and pink light illuminates the scene.
       Photorealistic style with soft focus background."

Specify Visual Elements

  • Lighting: "soft morning light", "dramatic side lighting", "golden hour"
  • Style: "oil painting", "watercolor", "3D render", "photorealistic"
  • Mood: "serene", "dramatic", "whimsical", "mysterious"
  • Composition: "close-up portrait", "wide landscape", "bird's eye view"
  • Camera: "35mm lens", "shallow depth of field", "wide angle"

For Style Transfer

When using reference images, be explicit about what to transfer:

  • "Match the color palette and brushstroke style of the reference"
  • "Keep the artistic mood and lighting from the reference image"

Common Issues

IssueSolution
"No image generated"Check prompt for content policy violations; simplify prompt
"Invalid image_size"Use uppercase: "1K", "2K", "4K"
"API key not found"Set GOOGLE_API_KEY environment variable
Rate limitsAdd delays between requests; use exponential backoff

Pricing Comparison

ModelCost per Image
gemini-3-pro-image-preview~$0.134
gemini-2.5-flash-image~$0.039

スコア

総合スコア

50/100

リポジトリの品質指標に基づく評価

SKILL.md

SKILL.mdファイルが含まれている

+20
LICENSE

ライセンスが設定されている

0/10
説明文

100文字以上の説明がある

0/10
人気

GitHub Stars 100以上

+5
最近の活動

3ヶ月以内に更新がある

0/10
フォーク

10回以上フォークされている

+5
Issue管理

オープンIssueが50未満

+5
言語

プログラミング言語が設定されている

+5
タグ

1つ以上のタグが設定されている

0/5

レビュー

💬

レビュー機能は近日公開予定です