manbuwl LLM 网关 📡 我的模型状态

manbuwl LLM 网关

统一中转 · 同时兼容 OpenAIAnthropic 两种协议

聊天 · 图片生成/编辑 · 语音合成(TTS) · 语音识别(ASR) · 文字识别(OCR) 一站接入

把官方地址换成下面的 Base URL + 你的 API Key 即可
📡 查看「我的模型状态」(凭你的 Key 看可用模型与今日用量)→
https://models.manbuwl.com/v1
https://models.manbuwl.com
🔑 所有示例里的 sk-xxxxxxxxxxxx 都是占位符,请替换成你自己的 API Key。模型列表用你的 Key 调用 GET /v1/models 获取(仅需有效 Key,不受额度限制)。

一、OpenAI 兼容接入 OpenAI Compatible

样例工具:aichat(命令行 LLM 客户端)

编辑 ~/.config/aichat/config.yaml,新增一个 openai-compatible 客户端:

# ~/.config/aichat/config.yaml
clients:
  - type: openai-compatible
    name: manbuwl
    api_base: https://models.manbuwl.com/v1
    api_key: sk-xxxxxxxxxxxx

然后直接对话(模型名用网关里的模型 ID):

aichat -m manbuwl:altkpl-Qwen3.7-Plus "用一句话介绍你自己"

或者用 curl / 任意 OpenAI SDK

curl https://models.manbuwl.com/v1/chat/completions \
  -H "Authorization: Bearer sk-xxxxxxxxxxxx" \
  -H "Content-Type: application/json" \
  -d '{"model":"altkpl-Qwen3.7-Plus","messages":[{"role":"user","content":"你好"}]}'

Python SDK:OpenAI(base_url="https://models.manbuwl.com/v1", api_key="sk-xxxxxxxxxxxx")

二、OpenAI Responses API 接入 OpenAI Responses

端点:POST /v1/responses  ·  鉴权:与 OpenAI 相同 Authorization: Bearer <key>(也兼容 x-api-key) ·  请求体:OpenAI Responses API 原生格式(input 是 item 数组或纯字符串,输出上限字段是 max_output_tokens),不是 Chat Completions 格式。任选一个模型 ID 即可调用。

cURL 示例

curl https://models.manbuwl.com/v1/responses \
  -H "Authorization: Bearer sk-xxxxxxxxxxxx" \
  -H "Content-Type: application/json" \
  -d '{"model":"altkpl-Qwen3.7-Plus","input":"你好"}'

Python(OpenAI SDK)

from openai import OpenAI
client = OpenAI(base_url="https://models.manbuwl.com/v1", api_key="sk-xxxxxxxxxxxx")
resp = client.responses.create(model="altkpl-Qwen3.7-Plus", input="你好")
print(resp.output_text)

说明:① 任何模型都能走 /v1/responses,网关自动转换到后端协议;② 配置了 responses_base_url 的后端(如 ds-deepseek-v4-flash-res,原生 Responses + 服务端搜索)直接原样透传,内置工具 / reasoning 零损耗;③ 可选参数:max_output_tokensreasoning={effort:...}temperaturestream

三、Anthropic 兼容接入 Anthropic Compatible

样例工具:Claude Code(Anthropic 官方 CLI)

设置环境变量指向本网关,然后正常使用 claude

export ANTHROPIC_BASE_URL=https://models.manbuwl.com
export ANTHROPIC_AUTH_TOKEN=sk-xxxxxxxxxxxx
export ANTHROPIC_MODEL=claude-sonnet-4-6
claude

或者用 curl / Anthropic SDK

curl https://models.manbuwl.com/v1/messages \
  -H "x-api-key: sk-xxxxxxxxxxxx" \
  -H "anthropic-version: 2023-06-01" \
  -H "Content-Type: application/json" \
  -d '{"model":"claude-sonnet-4-6","max_tokens":1024,"messages":[{"role":"user","content":"你好"}]}'

四、语音合成 TTS OpenAI Compatible

端点:POST /v1/audio/speech  ·  请求体:JSON  ·  返回:二进制音频流,不是 JSON。用法与 OpenAI audio.speech 一致。

请求参数

字段必填说明
modelminimax-speech-2.8-turboaltkpl-qwen-audio-3.0-tts-plushs-seed-tts-2.0or-openai-gpt-audio-mini-tts 或旧的 qwen3-tts-flash;传 OpenAI 的 tts-1/tts-1-hd 仍会降级到旧模型
input要合成的文本。⚠️ 文本放这里,不是 text 也不是 prompt
voiceMiniMax 默认 male-qn-jingying;Qwen-Audio 默认 longanlingxin;火山默认擎苍 zh_male_qingcang_uranus_bigtts;OpenRouter Chat Audio 默认 onyx。MiniMax/Qwen/火山均接受 OpenAI 标准音色名,MiniMax/火山也可直接传各自已开通的原生音色 ID
response_formatMiniMax 支持 mp3 / wav / pcm;Qwen-Audio 支持 mp3 / pcm / wav / opus;火山支持 mp3 / pcm / opus;OpenRouter Chat Audio 只支持 wav / pcm(未填时返回 WAV)
speed0.52.0,默认 1.0。火山自动换算为原生语速参数
instructionsQwen-Audio 与 OpenRouter Chat Audio 可用;MiniMax、火山当前没有等价能力,传非空值会明确返回 400

cURL 示例

curl https://models.manbuwl.com/v1/audio/speech \
  -H "Authorization: Bearer sk-xxxxxxxxxxxx" \
  -H "Content-Type: application/json" \
  -d '{"model":"altkpl-qwen-audio-3.0-tts-plus","input":"漫步无垠,你好世界","voice":"alloy","response_format":"mp3"}' \
  --output speech.mp3

火山 Seed TTS(擎苍 2.0)示例

curl https://models.manbuwl.com/v1/audio/speech \
  -H "Authorization: Bearer sk-xxxxxxxxxxxx" \
  -H "Content-Type: application/json" \
  -d '{"model":"hs-seed-tts-2.0","input":"你好,这里是擎苍。","voice":"alloy","speed":1.0,"response_format":"mp3"}' \
  --output qingcang.mp3

MiniMax Speech 2.8 Turbo 示例

curl https://models.manbuwl.com/v1/audio/speech \
  -H "Authorization: Bearer sk-xxxxxxxxxxxx" \
  -H "Content-Type: application/json" \
  -d '{"model":"minimax-speech-2.8-turbo","input":"你好,这是 MiniMax 语音。","voice":"male-qn-jingying","response_format":"mp3"}' \
  --output minimax.mp3

OpenRouter OpenAI Audio 示例

curl https://models.manbuwl.com/v1/audio/speech \
  -H "Authorization: Bearer sk-xxxxxxxxxxxx" \
  -H "Content-Type: application/json" \
  -d '{"model":"or-openai-gpt-audio-mini-tts","input":"你好世界","voice":"onyx","response_format":"wav"}' \
  --output openai-audio.wav

Python(OpenAI SDK)

from openai import OpenAI
client = OpenAI(base_url="https://models.manbuwl.com/v1", api_key="sk-xxxxxxxxxxxx")
resp = client.audio.speech.create(model="altkpl-qwen-audio-3.0-tts-plus", voice="alloy", input="你好世界", response_format="mp3")
resp.stream_to_file("speech.mp3")

可选音色(voice)

male-qn-jingying(MiniMax 默认)zh_male_qingcang_uranus_bigtts(火山默认)longanlingxin(Qwen 默认)longanlufengonyx(OpenRouter 默认)alloyechofablenovashimmer

MiniMax 会把 OpenAI 标准音色映射到其系统音色(例如 onyx/ashmale-qn-jingyingalloyfemale-yujie);新 Qwen-Audio 会映射到阿里系统音色(如 alloy→longanlingxinecho→longanlufeng);火山会映射到擎苍。OpenRouter 的 OpenAI Audio 直接使用其 onyxash 等标准音色。

OpenRouter 会按账号与出口地区决定可用性;若它拒绝 OpenAI Audio,网关会如实返回上游 403,不会换成其它声音。

返回:HTTP 200 + 对应音频 Content-Type,body 即音频字节流(curl 用 --output 存文件,SDK 用 stream_to_file)。出错时才返回 JSON:{"error":{"message":"[router] ..."}}

五、图像生成与编辑 OpenAI Compatible

端点:POST /v1/images/generations  ·  请求体:JSON  ·  返回:JSON(图片为 URL,非 base64)。用法与 OpenAI images.generations 一致。

请求参数

字段必填说明
modelaltkpl-qwen-image-3.0-pro(也兼容已有图像模型别名)
prompt图片描述文本
size1024x1024(也接受 1024*1024),默认 1024x1024
n生成张数,默认 1
response_formaturl(默认)或 b64_json

cURL 示例

curl https://models.manbuwl.com/v1/images/generations \
  -H "Authorization: Bearer sk-xxxxxxxxxxxx" \
  -H "Content-Type: application/json" \
  -d '{"model":"altkpl-qwen-image-3.0-pro","prompt":"一只在月球上散步的猫","size":"1024x1024","n":1}'

返回结构

{
  "created": 1780475270,
  "data": [ { "url": "https://dashscope-xxx.oss-../xxxx.png" } ]
}

⚠️ 图片是临时 URL(阿里云 OSS,有效期有限),拿到后请尽快下载保存到自己的存储。

图片编辑(Image Edit)

端点:POST /v1/images/edits  ·  请求体:multipart/form-data  ·  返回:与文生图相同的 OpenAI Images JSON。使用 altkpl-qwen-image-3.0-pro,上传 1–3 张参考图并用提示词描述编辑结果。

curl https://models.manbuwl.com/v1/images/edits \
  -H "Authorization: Bearer sk-xxxxxxxxxxxx" \
  -F "model=altkpl-qwen-image-3.0-pro" \
  -F "prompt=把画面改成清晨的柔和光线,保持主体和构图不变" \
  -F "image=@source.png" \
  -F "size=1024x1024"

支持 JPG/JPEG、PNG、BMP、TIFF、WEBP、GIF;每张不超过 10MB。多图时重复传 image=@first.png。Qwen 图片编辑是“参考图 + 指令”模式,OpenAI/DALL·E 风格的 mask 参数没有等价语义,传入会明确返回 400。

六、视频理解 OpenAI Chat Compatible

端点:POST /v1/chat/completions  ·  模型:or-gemini-3.8-flash-video。无需另学私有上传协议:在标准 messages[].content 数组中同时传文字 textvideo_url,返回正常的 Chat Completions JSON / SSE。

内容块说明
text告诉模型要做什么,例如总结、找关键动作、按时间线回答问题。
video_url公开的 http(s) 视频地址,或 data:video/mp4;base64,... 形式的内联数据。支持 MP4、MPEG、MOV(video/mov / video/quicktime)、WebM。
curl https://models.manbuwl.com/v1/chat/completions \
  -H "Authorization: Bearer sk-xxxxxxxxxxxx" \
  -H "Content-Type: application/json" \
  -d '{"model":"or-gemini-3.8-flash-video","messages":[{"role":"user","content":[{"type":"text","text":"按时间顺序总结视频发生了什么"},{"type":"video_url","video_url":{"url":"https://example.com/demo.mp4"}}]}]}'

本机文件不能直接传 Windows 路径;请由客户端读成 base64 后使用上述 data URL。视频内容不会被降级成文字:若模型路由不支持视频,或 URL/MIME 格式不合法,网关会返回明确的 400。

七、语音识别 ASR OpenAI Compatible

端点:POST /v1/audio/transcriptions  ·  请求体:multipart/form-data不是 JSON,是表单上传文件) ·  返回:JSON。用法与 OpenAI audio.transcriptions 一致。

表单字段

字段必填说明
file音频文件(wav / mp3 等),以文件形式上传
modelaltkpl-qwen-audio-3.0-asr-flash(或下方旧模型)
response_formatjson(默认) 或 text

cURL 示例

curl https://models.manbuwl.com/v1/audio/transcriptions \
  -H "Authorization: Bearer sk-xxxxxxxxxxxx" \
  -F "file=@audio.wav" \
  -F "model=altkpl-qwen-audio-3.0-asr-flash"

可用模型

模型说明
fun-asr通用录音文件转写
paraformer-8k-v28kHz 电话录音转写
paraformer-realtime-v2实时语音识别
altkpl-qwen-audio-3.0-asr-flashQwen-Audio 非实时语音识别

返回:默认 {"text":"识别出的文字"};传 response_format=text 则直接返回纯文本。

八、实时语音对话 OpenAI Compatible WebSocket

端点:wss://models.manbuwl.com/v1/realtime?model=altkpl-qwen-audio-3.0-realtime-plus  ·  连接后使用 session.updateinput_audio_buffer.appendresponse.audio.delta 等事件;输入为 16kHz/16-bit/单声道 PCM,输出为 24kHz/16-bit/单声道 PCM。

客户端只需把 OpenAI Realtime WebSocket 连接地址替换为上面的网关地址,并继续使用标准 Bearer API Key;网关会透传 Qwen-Audio Realtime 事件。

九、文字识别 OCR

端点:POST /v1/ocr  ·  返回:JSON。识别图片中的文字(PaddleOCR),有 Key 即可调用,方便程序/AI 直接使用。三种传图方式三选一

请求参数

字段位置必填说明
image_base64JSON三选一图片 base64(可带 data:image/png;base64, 前缀)
urlJSON图片的 http(s) 地址
file表单multipart/form-data 上传图片文件
modelJSON/表单识别档位 tiny/small/medium,默认 small

cURL 示例

① base64(JSON):

curl https://models.manbuwl.com/v1/ocr \
  -H "Authorization: Bearer sk-xxxxxxxxxxxx" \
  -H "Content-Type: application/json" \
  -d "{\"image_base64\":\"$(base64 -w0 image.png)\",\"model\":\"small\"}"

② 直接上传文件(表单):

curl https://models.manbuwl.com/v1/ocr \
  -H "Authorization: Bearer sk-xxxxxxxxxxxx" \
  -F "file=@image.png" \
  -F "model=small"

③ 图片 URL(JSON):

curl https://models.manbuwl.com/v1/ocr \
  -H "Authorization: Bearer sk-xxxxxxxxxxxx" \
  -H "Content-Type: application/json" \
  -d '{"url":"https://example.com/a.png","model":"small"}'

返回结构

{
  "model": "small",
  "elapsed_ms": 127,
  "raw_text": "第一行文字\n第二行文字",
  "lines": [
    { "text": "第一行文字", "confidence": 0.9876, "box": [[0,0],[100,0],[100,20],[0,20]] }
  ]
}

raw_text 是整张图拼好的纯文本(含换行);lines 是逐行结果(文字 + 置信度 + 四角坐标框)。查可用档位:GET /v1/ocr/models

九、查看可用模型

curl https://models.manbuwl.com/v1/models \
  -H "Authorization: Bearer sk-xxxxxxxxxxxx"

返回你的 Key 有权访问的模型列表(仅需有效 Key,不消耗额度)。