Skip to content

Commit e782d44

Browse files
committed
Update README
1 parent 2c74126 commit e782d44

File tree

2 files changed

+90
-0
lines changed

2 files changed

+90
-0
lines changed

README.md

Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -247,6 +247,51 @@ curl -X POST http://localhost:2048/generate-speech \
247247

248248
**返回格式**: 音频数据以 Base64 编码的 WAV 格式在 `candidates[0].content.parts[0].inlineData.data` 中返回。
249249

250+
### 图片生成 (Imagen 3)
251+
252+
```bash
253+
curl -X POST http://localhost:2048/generate-image \
254+
-H "Content-Type: application/json" \
255+
-d '{
256+
"prompt": "A beautiful sunset over mountains",
257+
"model": "imagen-3.0-generate-002",
258+
"number_of_images": 1,
259+
"aspect_ratio": "16:9"
260+
}'
261+
```
262+
263+
**端点**: `POST /generate-image`
264+
265+
### 视频生成 (Veo 2)
266+
267+
```bash
268+
curl -X POST http://localhost:2048/generate-video \
269+
-H "Content-Type: application/json" \
270+
-d '{
271+
"prompt": "A drone flying over a forest",
272+
"model": "veo-2.0-generate-001",
273+
"aspect_ratio": "16:9",
274+
"duration_seconds": 5
275+
}'
276+
```
277+
278+
**端点**: `POST /generate-video`
279+
280+
### Nano Banana (Gemini 图片生成)
281+
282+
```bash
283+
curl -X POST http://localhost:2048/nano/generate \
284+
-H "Content-Type: application/json" \
285+
-d '{
286+
"model": "gemini-2.5-flash-image",
287+
"contents": [{"parts": [{"text": "A cute cat wearing a tiny hat"}]}]
288+
}'
289+
```
290+
291+
**端点**: `POST /nano/generate`
292+
293+
**详细文档**: 参见 [媒体生成指南](docs/media-generation-guide.md)
294+
250295
### Ollama 兼容层
251296

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

README_en.md

Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -241,6 +241,51 @@ curl -X POST http://localhost:2048/generate-speech \
241241

242242
**Response Format**: Audio data is returned as Base64-encoded WAV format in `candidates[0].content.parts[0].inlineData.data`.
243243

244+
### Image Generation (Imagen 3)
245+
246+
```bash
247+
curl -X POST http://localhost:2048/generate-image \
248+
-H "Content-Type: application/json" \
249+
-d '{
250+
"prompt": "A beautiful sunset over mountains",
251+
"model": "imagen-3.0-generate-002",
252+
"number_of_images": 1,
253+
"aspect_ratio": "16:9"
254+
}'
255+
```
256+
257+
**Endpoint**: `POST /generate-image`
258+
259+
### Video Generation (Veo 2)
260+
261+
```bash
262+
curl -X POST http://localhost:2048/generate-video \
263+
-H "Content-Type: application/json" \
264+
-d '{
265+
"prompt": "A drone flying over a forest",
266+
"model": "veo-2.0-generate-001",
267+
"aspect_ratio": "16:9",
268+
"duration_seconds": 5
269+
}'
270+
```
271+
272+
**Endpoint**: `POST /generate-video`
273+
274+
### Nano Banana (Gemini Image Generation)
275+
276+
```bash
277+
curl -X POST http://localhost:2048/nano/generate \
278+
-H "Content-Type: application/json" \
279+
-d '{
280+
"model": "gemini-2.5-flash-image",
281+
"contents": [{"parts": [{"text": "A cute cat wearing a tiny hat"}]}]
282+
}'
283+
```
284+
285+
**Endpoint**: `POST /nano/generate`
286+
287+
**Detailed Documentation**: See [Media Generation Guide](docs/media-generation-guide.md)
288+
244289
### Ollama Compatibility Layer
245290

246291
The project also provides Ollama format API compatibility:

0 commit comments

Comments
 (0)