总账号数
{{ stats.pool?.total_accounts ?? 0 }}
活跃账号
{{ stats.pool?.active_accounts ?? 0 }}
并发槽位
{{ stats.pool?.free_slots ?? 0 }} / {{ stats.pool?.total_slots ?? 0 }}
运行中
{{ stats.tasks?.running ?? 0 }}
已完成
{{ stats.tasks?.done ?? 0 }}
失败
{{ stats.tasks?.failed ?? 0 }}
平均耗时
{{ stats.tasks?.avg_time_seconds ?? 0 }}s
总积分
{{ fmtNum(credits.grand_total) }}
每视频所需积分
{{ credits.credits_per_video }}
账号负载
{{ acc.user_id.slice(0,24) }}…
{{ acc.status }}
并发 {{ acc.active_tasks }}/6 · 积分 {{ fmtNum(acc.credit_total) }} · 余 {{ fmtNum(acc.remaining_videos) }} 个
暂无账号
添加账号
{{ addMsg.text }}
服务器将从当前 IP 登录 OpenArt,自动获取 cookie,无需手动复制。
每行一个账号,格式:
邮箱----密码(四个减号分隔),或 邮箱----密码----备注
{{ batchProgress }}
{{ r.ok ? '✓' : '✗' }} {{ r.email }}: {{ r.msg }}
账号列表({{ accounts.length }} 个)
| 用户ID | 状态 | 并发 | 任务 | 积分余额 | 可生成 | 今日消耗 | 操作 |
|---|---|---|---|---|---|---|---|
|
{{ acc.note || '' }}
|
{{ acc.status }} | {{ acc.active_tasks }}/6 | {{ acc.total_tasks }} (失败 {{ acc.failed_tasks }}) | {{ fmtNum(acc.credit_total) }} | {{ fmtNum(acc.remaining_videos) }} | {{ fmtNum(acc.daily_credits_consumed) }} |
|
| 暂无账号,请添加 | |||||||
提交生成任务
{{ genResult.text }}
task_id: {{ genResult.task_id }}
🎵
@audio{{ ref.n }}
×
图片:jpg/png/webp | 音频:wav/mp3(2~15秒)
预计消耗 {{ credits.credits_per_video }} 积分 · 成本约 ¥{{ credits.cost_per_video_cny }}
API Key 管理
Key 修改后立即生效,旧 Key 立即失效
客户端 API Key
调用 /api/generate、/api/task/* 时携带:X-API-Key: <key>
当前状态:
已设置({{ cfg.api_key }})
未设置(所有请求不验证)
管理端 Admin Key
访问账号管理、积分刷新等敏感接口时使用。留空则与客户端 Key 相同。
当前状态:
已单独设置({{ cfg.admin_key }})
未设置(与客户端 Key 相同)
新 Key 已生成,请立即复制(关闭后不再显示完整 Key)
{{ newKeyResult }}
登录凭据
修改后下次登录生效,当前 session 保持有效
队列 & 并发设置
修改后立即生效,无需重启
{{ stats.pool?.used_slots ?? 0 }} / {{ stats.pool?.total_slots ?? 0 }}
并发槽占用
{{ stats.pool?.waiting_tasks ?? 0 }} / {{ cfg.max_waiting_tasks }}
排队等待
{{ stats.pool?.free_slots ?? 0 }}
空闲槽位
最大排队等待数
所有账号并发槽全满时,允许在队列中等待的最大任务数。超出则立即返回"队列已满"。设为 0 表示不允许排队(满载直接拒绝)。
个任务(当前账号总并发上限:{{ stats.pool?.total_slots ?? 0 }} 个)
代理设置
✓ 连通 HTTP {{ proxyResult.openart.status }}
{{ proxyResult.openart.latency_ms }}ms
✗ 失败:{{ proxyResult.openart.error }}
via {{ proxyResult.openart.proxy }}
✓ 连通 HTTP {{ proxyResult.gcs.status }}
{{ proxyResult.gcs.latency_ms }}ms
✗ 失败:{{ proxyResult.gcs.error }}
via {{ proxyResult.gcs.proxy }}
{{ cfgMsg.text }}
实时日志
{{ logConnected ? '● 已连接' : '○ 未连接' }}
暂无日志
{{ line }}
鉴权说明
所有接口均需在请求 Header 中携带
X-API-Key:
X-API-Key: oak_your_api_key_here
客户端 API Key
用于:提交任务、查询任务、查看统计
管理端 Admin Key
用于:账号管理、积分刷新、系统配置
提交任务
提交后立即返回
task_id,
用 GET /api/task/{task_id} 轮询结果。
满载时最多 3 个任务进入等待队列,超出返回 429。
① URL 引用(JSON)
POST /api/generate
Content-Type: application/json
X-API-Key: <api_key>
{
"prompt": "[@image1]是环境,男子[@image2]对女子[@image3]说@audio1的台词",
"duration": 10, // 视频时长(秒),默认 5
"aspect_ratio": "16:9", // 画幅,默认 16:9
"refs": [
{ "type": "image", "url": "https://..." }, // → @image1
{ "type": "image", "url": "https://..." }, // → @image2
{ "type": "image", "url": "https://..." }, // → @image3
{ "type": "audio", "url": "https://..." } // → @audio1(2~15秒)
]
}
// 返回
{ "task_id": "uuid", "status": "pending" }
② 本地文件上传(multipart)
POST /api/generate-with-file
Content-Type: multipart/form-data
X-API-Key: <api_key>
prompt=[@image1]是环境,[@image2]是男子,使用@audio1音色
duration=10
aspect_ratio=16:9
refs=[{"type":"image","url":"https://..."}] // 可选,URL引用排在文件前
image_files=<File> // 多次该字段 → @image1, @image2, ...
audio_files=<File> // 多次该字段 → @audio1, @audio2, ...
// 编号规则:refs URL在前,本地文件在后,分别连续编号
查询任务
GET /api/task/{task_id}
X-API-Key: <api_key>
// 返回示例
{
"id": "uuid",
"status": "done", // pending | generating | upscaling | done | failed
"url_480p": "https://cdn.openart.ai/...",
"url_720p": "https://cdn.openart.ai/...",
"credit_cost": 625,
"error_msg": null,
"created_at": 1748282400,
"started_at": 1748282405,
"finished_at": 1748282480
}
GET /api/tasks?limit=50&status=done // 列出所有任务(可按状态过滤)
账号管理(需 Admin Key)
// 添加账号
POST /api/accounts
X-API-Key: <admin_key>
{ "cookie": "__Secure-next-auth.session-token=...", "user_id": "user_xxx", "note": "备注" }
// 删除账号
DELETE /api/accounts/{id}
// 禁用 / 启用
PATCH /api/accounts/{id}/disable
PATCH /api/accounts/{id}/enable
// 刷新积分(逐个随机延迟 3~8s,防封号)
POST /api/accounts/refresh-all-credits
POST /api/accounts/{id}/refresh-credits
// 查看所有账号
GET /api/accounts
系统配置(需 Admin Key)
// 获取当前配置
GET /api/config
// 更新配置(热生效,无需重启)
PATCH /api/config
{ "openart_proxy": "http://ip:port", "gcs_proxy": "http://ip:port", "max_waiting_tasks": 3 }
// 生成新 API Key
POST /api/config/generate-key?key_type=api // 客户端 Key
POST /api/config/generate-key?key_type=admin // 管理端 Key
// 测试代理连通性
POST /api/config/test-proxy?proxy_type=openart
POST /api/config/test-proxy?proxy_type=gcs
// 统计
GET /api/stats
状态码说明
| 状态码 | 含义 |
|---|---|
| 200 | 成功 |
| 401 | API Key 无效或未提供 |
| 429 | 队列已满(所有并发槽+等待槽均满),稍后重试 |
| 503 | 无可用账号(未添加或全部禁用) |
| 400 | 参数错误(如音频时长不在 2~15s 范围等) |