> ## Documentation Index
> Fetch the complete documentation index at: https://docs.lululab.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# 接口参考

统一地址： `https://customer.lululab.ai`。使用 Authorization: API\_KEY 认证，不加 Bearer 前缀。所有创作任务都通过 POST /tasks 提交，workflowId 选择具体能力。

| 用途 | 方法与路径 | 说明 |
| - | - | - |
| 申请上传地址 | `POST /uploads` | 获得 presignedUrl 和文件 id |
| 查询上传文件 | `GET /files` | 可选；取得素材 location 和 mimeType |
| 预估积分 | `POST /billing/estimates` | 提交前调用；实际以服务端结算为准 |
| 获取报价 | `POST /billing/quotes` | 可选；返回 quoteId 可在提交任务时使用 |
| 创建任务 | `POST /tasks` | 返回任务 id 和初始状态 |
| 查询任务 | `GET /tasks/{id}` | 查询状态、output 和错误 |
| 任务列表 | `GET /tasks` | 支持分页和 workflowId 过滤 |

报价示例：

```bash 图片积分预估 theme={null}
curl -X POST https://customer.lululab.ai/billing/estimates \
  -H "Content-Type: application/json" \
  -d '{ "items": [{
    "workflowId": "ImageGenV2",
    "input": { "model": "gpt-image-2-5-flare", "resolution": "1K", "imageCount": 1 }
  }] }'
```

如需取得带有效期的报价，可用相同参数申请 quote；响应中的 id 可作为任务的 quoteId。

```bash 获取图片任务报价 theme={null}
curl -X POST https://customer.lululab.ai/billing/quotes \
  -H "Authorization: $LULULAB_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "workflowId": "ImageGenV2",
    "input": { "model": "gpt-image-2-5-flare", "resolution": "1K", "imageCount": 1 }
  }'
```

### 提交任务的通用字段

| 字段 / 类型 | 必填 | 可选值与说明 |
| - | - | - |
| `workflowId` (`string`) | 是 | ImageGenV2 · VideoGenV2 · SalesVideoPromptV3 · VideoCreationV1 · ProductImagePromptV1 · 选择要执行的能力；商品类任务需要先策划、再生成。 |
| `input` (`object`) | 是 | 工作流专属参数；见下方各能力的字段表。 |
| `attributes.saveGeneratedAssets` (`boolean`) | 否 | true · false · 生成任务可设为 true，以保存产物。 |
| `attributes.creationSource` (`string`) | 否 | api · 可选的来源标记，示例使用 api。 |
| `quoteId` (`UUID`) | 否 | 如先调用 /billing/quotes，可填写返回的报价 ID。 |


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.