# 欢乐动 API 调用文档

请求基地址：`https://image.huanledongai.com/api`

鉴权请求头（任选其一）：

```
Authorization: Bearer sk-xxxxxxxx
X-API-Key: sk-xxxxxxxx
```

## 1) Gemini Edit

- 方法：`POST`
- 路径：`/api/v1/gemini-edit`
- 查询：`GET /api/v1/gemini-edit/:id`

```bash
curl -X POST "https://image.huanledongai.com/api/v1/gemini-edit" \
  -H "Authorization: Bearer sk-xxxxxxxx" \
  -H "Content-Type: application/json" \
  -d '{
    "prompt": "把图里的背景换成白色棚拍背景",
    "model": "gemini3pro",
    "image_urls": ["https://example.com/input.jpg"],
    "aspect_ratio": "1:1"
  }'
```

## 2) Video

- 方法：`POST`
- 路径：`/api/v1/video`
- 查询：`GET /api/v1/video/:id`

```bash
curl -X POST "https://image.huanledongai.com/api/v1/video" \
  -H "Authorization: Bearer sk-xxxxxxxx" \
  -H "Content-Type: application/json" \
  -d '{
    "prompt": "一只白猫在窗边晒太阳，电影感",
    "model": "rhart-video-g",
    "duration": "6s",
    "aspect_ratio": "16:9"
  }'
```

## 3) Pinterest 图搜图

- 方法：`POST`
- 路径：`/api/v1/visual-search/pinterest`

```bash
curl -X POST "https://image.huanledongai.com/api/v1/visual-search/pinterest" \
  -H "Authorization: Bearer sk-xxxxxxxx" \
  -H "Content-Type: application/json" \
  -d '{
    "image_url": "https://example.com/ref.jpg",
    "region": "US"
  }'
```

## 4) Pinterest 文搜图

- 方法：`POST`
- 路径：`/api/v1/visual-search/pinterest/text`

```bash
curl -X POST "https://image.huanledongai.com/api/v1/visual-search/pinterest/text" \
  -H "Authorization: Bearer sk-xxxxxxxx" \
  -H "Content-Type: application/json" \
  -d '{
    "query": "minimalist logo inspiration"
  }'
```

## 常见状态码

- `200` 成功
- `400` 参数错误
- `401/403` 鉴权失败
- `429` 限流触发
- `500` 服务错误
