Skill站外收录 @skilllib/skill-2117939930272410495
gemini-image
提供基于文本描述生成高质量图像的能力,支持多种宽高比与分辨率选择,可结合参考图实现风格迁移和图像编辑,适用于需要定制化视觉内容生成的创意设计与开发场景。
数据与分析 AI 技能
Skills.MD
# 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:
| Language | Reference File |
|----------|------------------------|
| Python | `references/python.md` |
**Instructions:** When implementing Gemini image generation, read the corresponding language reference file for complete code patterns and examples.
---
## Model Information
| Property | Value |
|----------------------|------------------------------|
| Model ID | `gemini-3-pro-image-preview` |
| Cost | ~$0.134 per image (2K) |
| Max Reference Images | 5+ (high fidelity) |
| Resolutions | 1K, 2K, 4K |
## Supported Aspect Ratios
| Ratio | Use Case |
|--------|----------------------------|
| `1:1` | Square, social media posts |
| `2:3` | Portrait photos |
| `3:2` | Landscape photos |
| `3:4` | Portrait, mobile screens |
| `4:3` | Standard display |
| `4:5` | Instagram portrait |
| `5:4` | Large format |
| `9:16` | Vertical video, stories |
| `16:9` | Widescreen, presentations |
| `21:9` | Ultra-wide, cinematic |
## Image Sizes
| Size | Resolution | Use Case |
|------|------------|-------------------------------|
| `1K` | ~1024px | Thumbnails, previews |
| `2K` | ~2048px | Standard output (recommended) |
| `4K` | ~4096px | High-quality prints |
**Important:** Use uppercase "K" (not "1k", "2k", "4k").
---
## Environment Setup
```bash
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
| Issue | Solution |
|----------------------|-------------------------------------------------------------|
| "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 limits | Add delays between requests; use exponential backoff |
---
## Pricing Comparison
| Model | Cost per Image |
|----------------------------|----------------|
| gemini-3-pro-image-preview | ~$0.134 |
| gemini-2.5-flash-image | ~$0.039 |
评论 0
还没有评论,来抢沙发。
相关内容
同类或同场景的收录内容
building-with-kafka-strimzi
在 Kubernetes 上构建基于 Apache Kafka 的事件驱动系统,支持高可靠的消息传递、事务性处理与精确一次语义,结合 Strimzi 运营商实现集群自动化管理,利用 Schema Registry 保障事件模式演进,适用于微服务间解耦通信与实时数据流处理场景。
站外数据与分析
609 0.0
personal-tool-builder
专注于从个人真实痛点出发快速构建实用工具,涵盖命令行程序、本地优先应用和自动化脚本的开发与演进,强调先满足自身需求再逐步扩展,通过持续自用打磨功能,避免过度设计,确保工具简洁有效且长期可维护。
站外商业与营销
196 0.0
threejs-lighting
实现三维场景中的光照与阴影控制,支持多种光源类型及环境光照明,提供从基础布光到高级阴影优化的完整方案,适用于需要真实感渲染或性能平衡的可视化项目。
站外效率工具
442 0.0
aggregation-helper
提供数据聚合场景的自动化辅助能力,涵盖 SQL 查询编写、统计分析建模、可视化方案设计及商业智能配置,支持从需求理解到生产级代码生成的全流程指导。
站外效率工具数据与分析
217 0.0
举报「gemini-image」
举报信息仅审核团队可见,同一资产 24 小时内仅可举报一次