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

# 快速入门

> 几分钟内接入 AI Platform OpenAPI

# 快速开始

通过统一的异步接口生成图片与视频。

## 第一步：获取 API 密钥

1. [注册账号](https://sigrunai.com/register)
2. 打开 [API 密钥](https://sigrunai.com/console?tab=apikeys)
3. 创建密钥并妥善保存（仅显示一次）

## 第二步：账号充值

1. 打开 [充值](https://sigrunai.com/recharge)
2. 完成支付后即可调用

## 第三步：记录基础地址

控制台展示的 API 基础地址形如（不含路径）：

```text theme={null}
https://sigrunai.com
```

接口路径以 `/v1` 开头。鉴权方式：`Authorization: Bearer <API Key>`。

### 图片示例（GPT Image 2）

```bash theme={null}
curl -X POST 'https://sigrunai.com/v1/images' \
  -H 'Authorization: Bearer sk_xxx' \
  -H 'Content-Type: application/json' \
  -d '{
    "model": "gpt-image-2",
    "prompt": "一只在阳光下奔跑的金毛犬，写实风格",
    "quality": "medium",
    "n": 1
  }'
```

### 视频示例（Seedance 2.0 MD）

```bash theme={null}
curl -X POST 'https://sigrunai.com/v1/videos' \
  -H 'Authorization: Bearer sk_xxx' \
  -H 'Content-Type: application/json' \
  -d '{
    "model": "seedance2.0-md",
    "prompt": "一只猫在草地上奔跑，跟拍镜头",
    "duration": 5,
    "aspect_ratio": "16:9"
  }'
```

成功时响应为 `{ "code": 20000, "msg": "...", "data": { "task_id": "...", "status": "queued", ... } }`。

## 第四步：轮询任务

```bash theme={null}
curl -X GET 'https://sigrunai.com/v1/images/{task_id}' \
  -H 'Authorization: Bearer sk_xxx'
```

视频任务将路径改为 `/v1/videos/{task_id}`。当 `status` 为 `completed` 时，从 `data.result.image_url` 或 `data.result.video_url` 取结果。

## 下一步

<Card title="查看 API 文档" icon="book" href="/zh/api-reference/introduction">
  模型参数、计费与状态说明
</Card>


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