暂无账号
统一管理多个账号,视频优先使用可用额度账号。
暂无账号
按功能折叠展示,需要测试哪个就打开哪个。
等待请求...
等待 SSE...
等待文字...
等待请求...
等待请求...
等待请求...
等待上传...
等待上传...
等待请求...
本项目提供 OpenAI 风格接口,把 Dola 的聊天、图片、视频、音乐、上传能力统一成 HTTP API。默认服务地址:http://127.0.0.1:9090。
DOLA_API_KEY 后,请求带 Authorization: Bearer 你的KEY。Content-Type: application/json。multipart/form-data,字段名为 file。data[0].url 取。图片支持 url 或 b64_json。Authorization: Bearer sk-local-test Content-Type: application/json
curl http://127.0.0.1:9090/v1/models \ -H "Authorization: Bearer sk-local-test"
dola-websystem/user/assistant/tool/functionfalse 非流式;true SSE 流式curl http://127.0.0.1:9090/v1/chat/completions \
-H "Authorization: Bearer sk-local-test" \
-H "Content-Type: application/json" \
-d '{"model":"dola-web","messages":[{"role":"user","content":"OK"}],"stream":false}'curl -N http://127.0.0.1:9090/v1/chat/completions \
-H "Content-Type: application/json" \
-d '{"model":"dola-web","messages":[{"role":"user","content":"hello"}],"stream":true}'dola-web supports OpenAI-style content array with image_url. Use data:image/png;base64,... or an http(s) image URL; the adapter uploads it to Dola first.
{
"model": "dola-web",
"messages": [{
"role": "user",
"content": [
{"type": "text", "text": "Describe this image"},
{"type": "image_url", "image_url": {"url": "data:image/png;base64,..."}}
]
}],
"stream": true
}dola-web-image1/v1/images/upload 的 uriurlcurl http://127.0.0.1:9090/v1/images/generations \
-H "Content-Type: application/json" \
-d '{"prompt":"cat astronaut","size":"1024x1024","response_format":"url"}'取图:data[0].url 或 data[0].b64_json。
dola-web-videocurl http://127.0.0.1:9090/v1/video/generations \
-H "Content-Type: application/json" \
-d '{"prompt":"beach sunset cinematic","ratio":"16:9","duration":10}'curl http://127.0.0.1:9090/v1/video/generations \
-H "Content-Type: application/json" \
-d '{"prompt":"image transition","ref_image_keys":["tos-cn-i-x/a.png","tos-cn-i-x/b.png"],"ratio":"9:16","duration":10}'取视频:data[0].url。生成通常需要 1-3 分钟。
dola-web-musicai_lyric 自动歌词;custome_lyric 自定义歌词curl http://127.0.0.1:9090/v1/audio/generations \
-H "Content-Type: application/json" \
-d '{"prompt":"happy electronic product launch","genre":"electronic","mood":"happy","generation_type":"ai_lyric"}'取音频:data[0].url。如果提示 SkillMusicGen=9未开放,需换有音乐入口的 Dola 账号并重新获取 cookie。
file,最大 10MB;返回 uri 和 cdn_url。POST /v1/files上传普通文件,字段 file,可选 purpose。GET /v1/files/download?uri=...把 Dola/TOS URI 换成临时下载链接。curl http://127.0.0.1:9090/v1/images/upload \ -F "file=@C:/Users/CJ/Desktop/ref.png" curl "http://127.0.0.1:9090/v1/files/download?uri=tos-cn-i-x/a.png"
GET /ui/account-pool:读取账号池。POST /ui/account-pool/accounts:添加账号,JSON: {"name":"A","cookie":"sessionid=xxx","enabled":true}。POST /ui/account-pool/probe:探测并更新 available / expired / failed。DELETE /ui/account-pool/accounts/{id}:删除单个账号。POST /ui/account-pool/delete:批量删除,JSON: {"ids":["acct_xxx"]}。POST /ui/account-pool/clear-failed:清除失效/异常账号。response.data[0].url 或 response.data[0].b64_json。response.data[0].url。response.data[0].url,可能含 title / duration / lyrics / cover_url。DOLA_API_KEY 和 Authorization: Bearer。每行一个账号:账号名|Cookie;也支持JSON 数组。
每次创建一个独立临时浏览器环境。导入后自动关闭临时环境,不需要退出 Dola 账号,已导入 Cookie 不会被主动吊销。
Cookie 只保存在本地 .env,页面只显示脱敏值。