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

# 你的下一个想法,有 API。

Reelway 提供两组互补的 HTTP 接口面,分别服务于「通用推理」与「创意生成」两类负载:

| 接口面              | 基址                                                                       | 适用                                               |
| ---------------- | ------------------------------------------------------------------------ | ------------------------------------------------ |
| **OpenAI 兼容推理面** | `https://api.reelway.ai/v1`                                              | 对话补全、LLM 模型列表;任何 OpenAI SDK 只需改 `baseURL` 即可直接使用 |
| **Sogni 兼容创作面**  | `https://rcn.reelway.ai`(REST)/ `wss://rcn.reelway.ai/socket`(WebSocket) | 图像/视频生成项目、媒体上传、资产库、个人 LoRA、创意工作流、持久对话运行、账户与余额    |

两组接口共用同一套 API Key(在[控制台 → API Keys](https://dashboard.reelway.ai/console/keys) 创建)。

## 第一次调用


**curl**

```bash
# 查询余额:验证 Key 可用
curl --fail-with-body https://rcn.reelway.ai/v4/account/balance \
  -H "api-key: $REELWAY_API_KEY"

# OpenAI 兼容对话补全
curl --fail-with-body https://api.reelway.ai/v1/chat/completions \
  -H "Authorization: Bearer $REELWAY_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "qwen3.6-35b-a3b-gguf-iq4xs",
    "messages": [{"role": "user", "content": "用一句话介绍 Reelway。"}]
  }'
```


**JavaScript**

```js
import OpenAI from 'openai';

const client = new OpenAI({
  baseURL: 'https://api.reelway.ai/v1',
  apiKey: process.env.REELWAY_API_KEY,
});

const completion = await client.chat.completions.create({
  model: 'qwen3.6-35b-a3b-gguf-iq4xs',
  messages: [{ role: 'user', content: '用一句话介绍 Reelway。' }],
});
console.log(completion.choices[0].message.content);
```


## 选择下一步

### 入门

- [快速开始](https://docs.reelway.ai/api-reference/getting-started.md) —— 基址、认证、版本、错误、限流、幂等与计费,适用于每一个端点
- [API Keys](https://docs.reelway.ai/api-reference/api-keys.md) —— 创建、复制、吊销与安全使用
- [生产集成](https://docs.reelway.ai/api-reference/production-integrations.md) —— 重试、恢复、超时与必须处理的错误

### 生成

- [生成配方](https://docs.reelway.ai/api-reference/direct-generation.md) —— `jobRequest` 帧提交图像与视频项目:t2i / t2v / i2v / flf2v / r2v
- [项目状态 API](https://docs.reelway.ai/api-reference/project-status.md) —— `GET /v2/projects/{id}`、`GET /v1/projects/{id}`、`GET /v1/jobs/list`
- [媒体工具与语音](https://docs.reelway.ai/api-reference/media-utilities.md) —— 上传预签名 URL、资产库状态机、CosyVoice 3 语音合成
- [个人 LoRA](https://docs.reelway.ai/api-reference/personal-loras.md) —— `POST /v1/loras/personal` 导入与目录

### 对话与智能体

- [对话补全](https://docs.reelway.ai/api-reference/chat-completions.md) —— `POST /v1/chat/completions`(OpenAI 兼容,支持流式)
- [直接工具执行](https://docs.reelway.ai/api-reference/tool-execution.md) —— `POST /v1/creative-agent/tools/execute`
- [LLM 模型](https://docs.reelway.ai/api-reference/llm-models.md) —— `GET /v1/models`
- [持久对话运行](https://docs.reelway.ai/api-reference/chat-runs.md) —— `POST /v1/chat/runs` 与 SSE 事件流
- [创意工作流](https://docs.reelway.ai/api-reference/workflows.md) —— `POST /v1/creative-agent/workflows` 多步 DAG 编排
- [工作流模板](https://docs.reelway.ai/api-reference/templates.md) —— `compose_workflow_template` 托管工具
- [回放记录](https://docs.reelway.ai/api-reference/replay.md) —— `POST /v1/replay/records`

### 媒体与账户

- [媒体与图像 URL](https://docs.reelway.ai/api-reference/media.md) —— `GET /v1/image|media/uploadUrl|downloadUrl`
- [余额与用量](https://docs.reelway.ai/api-reference/account-and-usage.md) —— `GET /v4/account/balance`、`GET /v1/transactions/list`

### 网络

- [节点分析](https://docs.reelway.ai/api-reference/worker-analytics.md) —— 节点车队观测与模型需求
- [模型与网络需求](https://docs.reelway.ai/api-reference/model-discovery.md) —— `GET /v1/model-catalog`、`GET /v1/model-demand`

### 资源

- [SDK 与资源](https://docs.reelway.ai/api-reference/sdks.md) —— `@reelway/client`、llms.txt、示例仓库

:::info 版本号混用是正常的
与 Sogni 一致,路径中同时存在 `/v1`、`/v2`、`/v4` 前缀(例如 `GET /v2/projects/{id}` 与 `GET /v4/account/balance`)。版本号附着于单个端点而非整个 API,请按本参考中给出的路径原样调用。
:::
