# 图片生成 Gaussian Splat

**Base URL:** `https://openapi.tripo3d.ai/v3`

**Endpoint:** `POST /generation/image-to-splat`

根据单张图片生成 3D Gaussian Splat（.splat 格式）。Gaussian Splatting 是一种新型 3D 表示方式，适用于高质量实时渲染与真实感场景重建。输出的 .splat 文件可用主流 Gaussian Splat 查看器与渲染器加载。若需实时渲染或真实感重建，请选择本接口；若需要网格、贴图或可编辑资产，请使用「图片生成 3D 模型」。固定消耗 30 积分/次。通常生成耗时约 4 分钟。

## Request Parameters

### input

- **Type:** string
- **Required:** 必选

用于生成 Gaussian Splat 的源图片。接受以下输入类型：**以下两种方式任选其一**，不可同时传入多种类型。

- file_token — 先通过文件上传 API上传图片，然后传入返回的 token。
示例： `file_abc123`
- URL — 可公开访问的图片直链。
示例： `https://example.com/photo.png`



- 支持格式：`PNG`、`JPEG`、`WebP`
- 最大文件大小：**20 MB**
- 推荐分辨率：至少 **256 × 256 px**。主体应清晰可见，背景干净，遮挡尽量少。

### model_seed

- **Type:** integer
- **Required:** 可选

Gaussian Splat 生成的随机种子。使用相同种子和相同输入将生成完全相同的 .splat 结果。若未设置，每次会使用随机种子。

## Request Example

### URL 示例

```bash
curl --request POST \
  --url https://openapi.tripo3d.ai/v3/generation/image-to-splat \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '{
  "input": "https://example.com/photo.png"
}'
```

### file_token 示例

```bash
curl --request POST \
  --url https://openapi.tripo3d.ai/v3/generation/image-to-splat \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '{
  "input": "file_abc123"
}'
```


## Response Example

### 创建任务

```json
{
  "code": 0,
  "data": {
    "task_id": "task_abc123"
  }
}
```

### 任务结果

```json
{
  "code": 0,
  "data": {
    "task_id": "task_abc123",
    "type": "image_to_splat",
    "status": "success",
    "progress": 100,
    "output": {
      "model_url": "https://cdn.tripo3d.ai/output/scene.splat"
    },
    "credits_consumed": 30.00,
    "created_at": "2026-04-28T12:00:00Z",
    "completed_at": "2026-04-28T12:04:10Z"
  }
}
```
