> ## 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.

# 快速开始

## 快速开始：先生成一张图片

1. **获取 API Key。** 注册或登录 LuluLab，在「我的 Key」中复制。把 Key 只保存在服务器环境变量中。 [前往我的 Key](https://www.lululab.ai/keys)
2. **确认积分。** 生成会消耗积分。可先调用报价接口，再决定是否提交。
3. **提交任务。** 运行下面的命令，记下响应中的 id。
4. **查询结果。** 用任务 id 查询，直到 status 为 Succeeded，再读取 output。

> [!NOTE]
>
> 示例使用 macOS / Linux 命令行。先执行 export LULULAB\_API\_KEY="你的 luk- 开头的 Key"；不要把真实 Key 写进前端网页或公开仓库。Authorization 请求头直接使用原始 Key，不加 Bearer 前缀。

```bash 提交图片任务 theme={null}
curl -X POST https://customer.lululab.ai/tasks \
  -H "Authorization: $LULULAB_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "workflowId": "ImageGenV2",
    "input": {
      "model": "gpt-image-2-5-flare",
      "prompt": "Studio product photo of a ceramic cup on a clean table",
      "aspectRatio": "1:1",
      "resolution": "1K"
    },
    "attributes": { "saveGeneratedAssets": true, "creationSource": "api" }
  }'
```

* [上传参考素材](https://docs.lululab.ai/cn/uploads.md)
* [查询任务与错误](https://docs.lululab.ai/cn/task-results.md)
* [接口参考](https://docs.lululab.ai/cn/reference.md)


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