Update nexus wiki content
This commit is contained in:
@@ -1,39 +1,37 @@
|
||||
---
|
||||
title: "Gemini API"
|
||||
title: "Gemini"
|
||||
type: entity
|
||||
tags: ["google", "image-generation", "ai", "gemini", "carousel"]
|
||||
sources: ["marketing-carousel-growth-engine", "我用-gemini-3-一口气做了-10-个应用-附教程"]
|
||||
last_updated: 2026-04-26
|
||||
entity_type: "AI Model"
|
||||
tags: ["ai", "gemini", "google", "multimodal", "image-generation"]
|
||||
last_updated: 2026-05-01
|
||||
---
|
||||
|
||||
## Definition
|
||||
## Overview
|
||||
|
||||
Google 的多模态 AI 模型 API,支持文本和图像生成。在 [[marketing-carousel-growth-engine]] 中用于生成 TikTok/Instagram 轮播图。
|
||||
Gemini 是 Google 开发的系列多模态 AI 模型,支持文本、代码、图像生成和理解等多种任务。在 AI 图片生成场景中,Gemini 支持多轮对话中的风格上下文传递,适合生成风格一致的系列图片。
|
||||
|
||||
## Key Details
|
||||
## Key Capabilities
|
||||
|
||||
- **Model**: `gemini-3.1-flash-image-preview`
|
||||
- **API**: Google Generative Language API
|
||||
- **Credential**: `GEMINI_API_KEY` 环境变量(免费层可用)
|
||||
- **Key**: https://aistudio.google.com/app/apikey
|
||||
- **多模态理解**:同时处理文本、图像、视频等多种输入
|
||||
- **图片生成**:Gemini Image Gen 支持通过文本提示词生成图片
|
||||
- **风格上下文**:在多轮对话中保持视觉风格一致性
|
||||
- **长上下文**:支持处理长篇文档和复杂指令
|
||||
|
||||
## Usage in Carousel Growth Engine
|
||||
## Usage in Image Generation
|
||||
|
||||
- **Slide 1**: 纯文本 prompt 生成首张幻灯片,定义视觉 DNA
|
||||
- **Slides 2-6**: 图生图模式,以 slide-1.jpg 作为 `--input-image` 参考输入,保持视觉连贯性
|
||||
- **Output**: 768x1376 (9:16) JPG 格式轮播图
|
||||
- **Script**: `generate-slides.sh` 编排管道,`generate_image.py`(Python via `uv`)调用 API
|
||||
在 AI 图片生成场景中,Gemini 的核心优势是通过多轮对话传递风格上下文:
|
||||
|
||||
## 技术规格
|
||||
1. 对话开始时设置系统级风格指令(System Prompt)
|
||||
2. 先生成第一张图片作为风格基准
|
||||
3. 后续图片通过 STYLE LOCK 块引用上一张的风格参数
|
||||
4. 支持用参考图锁定视觉基准(效果最强)
|
||||
|
||||
| 参数 | 值 |
|
||||
|------|-----|
|
||||
| 分辨率 | 768×1376 (9:16 竖版) |
|
||||
| 格式 | JPG(TikTok 拒绝 PNG) |
|
||||
| 视觉连贯性 | 第一张定义 DNA,后续图生图 |
|
||||
| 免费层 | 可用(需 Google AI Studio API Key) |
|
||||
## Related Concepts
|
||||
|
||||
## Aliases
|
||||
- Gemini
|
||||
- Google Gemini
|
||||
- Gemini 3.1 Flash Image
|
||||
- [[StyleSeed]]:Gemini 图片风格一致性的核心技术手段
|
||||
- [[StyleLock]]:Gemini 多轮对话中强制风格比对的检查机制
|
||||
- [[ReferenceImageConsistency]]:用 Gemini 生成的第一张图作为后续图的视觉基准
|
||||
|
||||
## Sources
|
||||
|
||||
- [[如何让AI生成风格一致的图片]]
|
||||
|
||||
Reference in New Issue
Block a user