> For AI agents: the complete documentation index is available at https://docs.reelway.ai/llms.txt, the full documentation bundle is available at https://docs.reelway.ai/llms-full.txt.

# 你的第一张智能体图像


### 建 Key
在[控制台](https://dashboard.reelway.ai/console/keys)创建子 Key(如 `agent-prod`),明文仅显示一次。
### 初始化双面客户端
文本面用 OpenAI SDK 指向 `api.reelway.ai/v1`;媒体面用 `@reelway/client`(见[智能体首页](https://docs.reelway.ai/agents.md#%E6%9C%80%E7%9F%AD%E8%B7%AF%E5%BE%84))。
### 提交并等待
```js
const project = sogni.projects.create({
  modelId: 'z_image_turbo_bf16',
  positivePrompt: '黄昏水乡,倒影,胶片质感',
});
const [url] = await project.waitForCompletion();   // 48 小时签名 URL
```
### 转存
签名 URL 48 小时过期;生产系统在拿到 URL 后立即转存自有存储。

失败排查:模型不在目录(`400`/`1002`)、余额不足(`402`/`1005`)、Key 无效(`401`/`101`)。错误码总表见[快速开始](https://docs.reelway.ai/api-reference/getting-started.md)。
