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, and this page is available as Markdown at https://docs.reelway.ai/agents/index.md.

AI 智能体

Reelway 对智能体是「OpenAI 兼容 + 生成 API」的组合:文本规划与工具循环走 Intelligence 推理面,媒体生产走 rcn 生成面,两者共用同一把 Key 与同一个余额。

最短路径

import OpenAI from 'openai';
import { SogniClient } from '@reelway/client';

// 文本规划面
const llm = new OpenAI({ baseURL: 'https://api.reelway.ai/v1', apiKey: process.env.REELWAY_API_KEY });
// 媒体生产面(同一把 Key)
const sogni = await SogniClient.createInstance({ appId: 'agent-prod', network: 'fast', apiKey: process.env.REELWAY_API_KEY });

// 在智能体的工具实现里生成媒体:
const project = sogni.projects.create({ modelId: 'z_image_turbo_bf16', positivePrompt: '…' });
const urls = await project.waitForCompletion();

本节导览

建身份

为该智能体创建独立子 Key 并命名(如 agent-prod)。

接入

文本面改 baseURL;媒体面用 @reelway/client 或直调 REST/WS。

控成本

依赖单 Key 限额(402/1013)与幂等键,防失控重试。