Skip to content

Commit 2c74126

Browse files
committed
feat: 支援NanoBanana、Imagen、Veo
1 parent 979b7df commit 2c74126

17 files changed

+1845
-9
lines changed

README.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,8 @@
2424

2525
- **OpenAI 兼容 API**: 完全兼容 OpenAI 格式的 `/v1/chat/completions` 端点
2626
- **TTS 语音生成**: 支持 Gemini 2.5 TTS 模型的单/多说话人音频生成
27+
- **图片生成**: 支持 Imagen 3 和 Gemini 2.5 Flash (Nano Banana) 图片生成
28+
- **视频生成**: 支持 Veo 2 视频生成,包含图片转视频功能
2729
- **智能模型切换**: 通过 `model` 字段动态切换 AI Studio 中的模型
2830
- **反指纹检测**: 使用 Camoufox 浏览器降低被检测风险
2931
- **图形界面启动器**: 功能丰富的 **网页** 启动器,简化配置和管理
@@ -274,6 +276,7 @@ AIStudio2API/
274276
│ ├── config/ # 配置管理
275277
│ ├── models/ # 数据模型
276278
│ ├── tts/ # TTS 语音生成模块
279+
│ ├── media/ # 媒体生成模块 (Imagen/Veo/Nano)
277280
│ ├── proxy/ # 流式代理
278281
│ └── static/ # 静态资源
279282
├── data/ # 运行时数据目录
@@ -352,6 +355,8 @@ cp .env.example .env
352355
## 📅 开发计划
353356

354357
-**TTS 支持**: 已适配 `gemini-2.5-flash/pro-preview-tts` 语音生成模型
358+
-**媒体生成**: 已支持 Imagen 3、Veo 2、Nano Banana 图片/视频生成
359+
- **点击逻辑统一**: 将 `_safe_click` 方法提取到全局 `operations.py`,统一所有控制器的点击操作
355360
- **文档完善**: 更新并优化 `docs/` 目录下的详细使用文档与 API 规范
356361
- **一键部署**: 提供 Windows/Linux/macOS 的全自动化安装与启动脚本
357362
- **Docker 支持**: 提供标准 Dockerfile 及 Docker Compose 编排文件,简化部署流程

README_en.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,8 @@
2424

2525
- **OpenAI Compatible API**: Fully compatible with OpenAI format `/v1/chat/completions` endpoint
2626
- **TTS Speech Generation**: Supports Gemini 2.5 TTS models for single/multi-speaker audio generation
27+
- **Image Generation**: Supports Imagen 3 and Gemini 2.5 Flash (Nano Banana) image generation
28+
- **Video Generation**: Supports Veo 2 video generation, including image-to-video
2729
- **Smart Model Switching**: Dynamically switch models in AI Studio via the `model` field
2830
- **Anti-Fingerprint Detection**: Uses Camoufox browser to reduce detection risk
2931
- **GUI Launcher**: Feature-rich **web** launcher for simplified configuration and management
@@ -268,6 +270,7 @@ AIStudio2API/
268270
│ ├── config/ # Configuration management
269271
│ ├── models/ # Data models
270272
│ ├── tts/ # TTS Speech Generation modules
273+
│ ├── media/ # Media Generation modules (Imagen/Veo/Nano)
271274
│ ├── proxy/ # Streaming proxy
272275
│ └── static/ # Static resources
273276
├── data/ # Runtime data directory
@@ -346,10 +349,13 @@ Issues and Pull Requests are welcome!
346349
## 📅 Development Roadmap
347350

348351
-**TTS Support**: Adapted `gemini-2.5-flash/pro-preview-tts` speech generation models
352+
-**Media Generation**: Supports Imagen 3, Veo 2, Nano Banana image/video generation
353+
- **Unified Click Logic**: Extract `_safe_click` method to global `operations.py`, unify click operations across all controllers
349354
- **Documentation**: Update and optimize documentation in `docs/` directory
350355
- **One-Click Deployment**: Provide fully automated install and launch scripts for Windows/Linux/macOS
351356
- **Docker Support**: Provide standard Dockerfile and Docker Compose orchestration files
352357
- **Go Refactoring**: Migrate core proxy service to Go for improved concurrency and reduced resource usage
353358
- **CI/CD Pipeline**: Establish GitHub Actions automated testing and build release process
354359
- **Unit Testing**: Increase test coverage for core modules (especially browser automation)
355360
- **Load Balancing**: Support multi-Google account rotation pool for higher concurrency limits
361+

docs/api-usage.md

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -259,6 +259,22 @@ curl -X POST http://localhost:2048/generate-speech \
259259

260260
**详细文档**: 参见 [TTS 使用指南](tts-guide.md)
261261

262+
### 图片/视频生成
263+
264+
**端点**:
265+
- `POST /generate-image` - Imagen 图片生成
266+
- `POST /generate-video` - Veo 视频生成
267+
- `POST /nano/generate` - Nano Banana 图片生成
268+
269+
支持 Imagen 3、Veo 2 和 Gemini 2.5 Flash 进行图片/视频生成。
270+
271+
**支持的模型**:
272+
- Imagen: `imagen-3.0-generate-002`
273+
- Veo: `veo-2.0-generate-001`
274+
- Nano Banana: `gemini-2.5-flash-image`
275+
276+
**详细文档**: 参见 [媒体生成指南](media-generation-guide.md)
277+
262278
### Ollama 兼容层
263279

264280
项目还提供 Ollama 格式的 API 兼容:

docs/development-guide.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -61,6 +61,13 @@ AIStudio2API/
6161
│ │ ├── models.py # TTS 数据模型
6262
│ │ ├── tts_controller.py # TTS 页面控制器
6363
│ │ └── tts_processor.py # TTS 请求处理器
64+
│ ├── media/ # 媒体生成模块
65+
│ │ ├── __init__.py # 模块初始化
66+
│ │ ├── models.py # 媒体数据模型
67+
│ │ ├── nano_controller.py # Nano Banana 控制器
68+
│ │ ├── imagen_controller.py# Imagen 控制器
69+
│ │ ├── veo_controller.py # Veo 控制器
70+
│ │ └── media_processor.py # 媒体请求处理器
6471
│ ├── proxy/ # 流式代理服务
6572
│ │ ├── runner.py # 代理服务入口
6673
│ │ ├── server.py # 代理服务器

0 commit comments

Comments
 (0)