Files
nexus/wiki/entities/Gemini.md
2026-04-28 08:02:54 +08:00

40 lines
1.3 KiB
Markdown
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
---
title: "Gemini API"
type: entity
tags: ["google", "image-generation", "ai", "gemini", "carousel"]
sources: ["marketing-carousel-growth-engine", "我用-gemini-3-一口气做了-10-个应用-附教程"]
last_updated: 2026-04-26
---
## Definition
Google 的多模态 AI 模型 API支持文本和图像生成。在 [[marketing-carousel-growth-engine]] 中用于生成 TikTok/Instagram 轮播图。
## Key Details
- **Model**: `gemini-3.1-flash-image-preview`
- **API**: Google Generative Language API
- **Credential**: `GEMINI_API_KEY` 环境变量(免费层可用)
- **Key**: https://aistudio.google.com/app/apikey
## Usage in Carousel Growth Engine
- **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
## 技术规格
| 参数 | 值 |
|------|-----|
| 分辨率 | 768×1376 (9:16 竖版) |
| 格式 | JPGTikTok 拒绝 PNG |
| 视觉连贯性 | 第一张定义 DNA后续图生图 |
| 免费层 | 可用(需 Google AI Studio API Key |
## Aliases
- Gemini
- Google Gemini
- Gemini 3.1 Flash Image