
apimodels
io.github.stimQQ由 GitHub 帳號 stimQQ 發布v0.7.0更新於 Oct 31, 2026
Image, video, chat and speech models with one account — local (npx) or hosted with OAuth sign-in.
概覽
apimodels 讓助理用一組付費 API 金鑰生成圖片、影片與語音,與 LLM 對話並查詢餘額,可本機執行或使用託管服務。
- 可以做什麼
- 生成與編輯圖片,支援透明背景與圖層拆分,並可回傳供模型檢視的預覽圖
- 依文字或參考圖生成影片,並輪詢長時間任務直到完成
- 與 LLM 模型對話,並以 MiniMax 聲音進行文字轉語音
- 依需求審查生成的圖片並提出修改後的提示詞
- 列出可用模型 ID,查詢帳戶美元餘額
- 將本機檔案上傳為公開連結(僅託管伺服器)
- 適用情境
- 適合希望助理直接產出圖片、短影片、配音等素材,或透過單一付費帳戶呼叫 LLM 對話的情境,可在 Claude Desktop、Cursor、Codex、Claude Code 等 MCP 用戶端使用,不必分別串接各家服務商。
- 執行需求
- 使用託管端點 api.apimodels.app 並以 OAuth 登入,或以 npx 執行本機 npm 套件(需 Node.js 18 以上)。需要 apimodels.app 付費帳戶,並透過 APIMODELS_API_KEY 提供 API 金鑰,或使用登入指令儲存的金鑰。選用設定:APIMODELS_BASE_URL、APIMODELS_WAIT_SECONDS、APIMODELS_CREDENTIALS_FILE。需要網路存取。
安裝
在 SourceWeft 中
- 開啟 儀表板中的 apimodels,將其新增到工作區。
- 連接 所需的 憑證。它們會被私密儲存,絕不會在公開頁面上展示。
- 為需要使用其工具的對話啟用該服務。
Web executable,透過 Streamable HTTP。 遠端服務在工作區中設定後即可從網頁執行環境執行。
交給代理程式安裝
把這段提示詞貼上到 Claude Code、Codex、Cursor 等代理程式,或 SourceWeft 對話中。代理程式會讀取該伺服器的安裝指南,先向你展示發布者、端點和登入方式,經你同意後再把它新增到你的客戶端。金鑰不會寫進任何命令。
閱讀 https://sourceweft.com/mcp/io.github.stimQQ%2Fapimodels-mcp/install.md,並按其中說明把這個 MCP 伺服器接入我的客戶端。修改任何設定之前,先告訴我它的發布者、端點和登入方式,等我確認。不要把 API 金鑰寫進命令或我會提交的檔案;問我金鑰應從哪裡取得。其他 MCP 客戶端
把它新增到你客戶端的 mcpServers 設定中。 客戶端會在首次連接時完成 OAuth 登入。
{
"mcpServers": {
"apimodels": {
"type": "http",
"url": "https://api.apimodels.app/mcp"
}
}
}README
apimodels-mcp
MCP server for apimodels.app — call image, video, LLM chat and text-to-speech models with one API key, from Claude Desktop, Cursor, or any MCP client.
One key unlocks GPT-6.1, Claude, Gemini, GLM, DeepSeek, Qwen, Seedance, Veo, Kling, gpt-image-2, Gemini Image, MiniMax speech and more — billed in USD, you only pay for successful generations.
Fastest setup: the Codex / Claude Code plugin
Coding agents are good at planning — scripts, shot lists, prompts, editing with ffmpeg. The apimodels plugin gives them the part they cannot do: rendering the video, images and voice-over. It bundles this MCP server plus a skill that teaches the agent when to use it, how to pick a model, how to wait for long renders and when to ask before spending.
- Sign in once (needs Node.js 18+):
Your browser opens apimodels.app; click Authorize. A key named
CLI · <date>is created for this machine and stored in~/.apimodels/credentials.json, where every client finds it — including desktop apps that do not see your shell's environment variables. Nothing to copy or paste, and the agent can run this step for you. On a machine without a browser use--no-browser(prints the link) or--paste(paste a key from https://apimodels.app/console/api-keys). - Install the plugin.
- Claude Code (2.1.275 or later):
Older versions:
/plugin marketplace add stimQQ/apimodels-mcp, then/plugin install apimodels@apimodels. - Codex:
Only have the Codex desktop app and no
codexcommand? Usenpx -y @openai/codexin place ofcodex— it runs the official CLI on the fly and shares the app's config. Then restart Codex. Codex asks you to approve each call that spends credits (generate_video,generate_image,text_to_speech,chat,review_image); checking progress, the model list and the balance never asks.
- Claude Code (2.1.275 or later):
Older versions:
- Ask in plain words, e.g. "make a 5-second 16:9 video of a kitten slowly raising its head in morning light" or "plan a 20-second product video for this repo and render it shot by shot".
No Node.js yet? Install the plugin anyway and ask for a video: the skill has the agent check for Node.js and, with your OK, install the official LTS for you (winget on Windows, Apple's installer on macOS).
Hosted server: no Node.js, sign in with OAuth
The same tools run at https://api.apimodels.app/mcp (Streamable HTTP). Nothing to install and no key to copy: add the URL to your client and it asks you to sign in to apimodels.app and click Authorize. The access token it gets is a dedicated API key named MCP · <app> · <date>; delete that key in the console to disconnect.
- Codex — add to
~/.codex/config.toml, then runcodex mcp login apimodels: - Claude Code —
claude mcp add --transport http apimodels https://api.apimodels.app/mcp, then/mcp→ apimodels → Authenticate. - ChatGPT, Claude.ai, Cursor and other clients that take a remote MCP URL — add it as a custom connector with this URL and sign in when asked.
Differences from the local server: the hosted one cannot read files on your machine — the agent calls get_upload_url, uploads the file with curl -T and passes the returned URL instead (local paths are refused with that hint) — and each call waits at most 50 seconds before handing back a task id for get_task. Signed in with a plain API key instead? Send it as Authorization: Bearer sk_….
Tools
Long generations do not get lost
Every generation is asynchronous on apimodels, and video is slow: a median of about 2.5 minutes, 9 in 10 within 8 minutes (production, week to 2026-09-22). Images take about 50 seconds. Meanwhile Codex aborts an MCP tool call after 60 seconds by default, and the MCP SDK's own client timeout is 60 seconds too. A tool that blocks until the video is ready therefore gets killed mid-wait — the task keeps running, the account is billed when it finishes, and the assistant never sees the URL. Versions up to 0.2.x did exactly that.
Since 0.3.0 the generation tools wait at most wait_seconds (default 50) and then return the task id with a "still running" note; the assistant calls get_task, which waits up to another wait_seconds and returns the URL(s) — with the image preview for image tasks — or "still running" again. Nothing is resubmitted and nothing is billed twice. The assistant does this on its own; you just ask for the video.
- Codex: keep the default. Or raise
tool_timeout_secfor this server inconfig.tomland pass a largerwait_seconds. - Claude Code / Claude Desktop / Cursor: no 60-second limit, so
wait_seconds: 600ongenerate_videogets the URL in one call.APIMODELS_WAIT_SECONDS=600in the server's env makes that the default.
The model can check its own work
Ask for an image and let the assistant iterate until it is right — "make a 16:9 banner that says SAVE 10%, check the spelling, fix it if needed":
generate_imagereturns the URL and a preview of the image itself (max 1024px JPEG). Clients that pass tool-result images to the model — Claude Desktop, Claude Code, Cursor — let it see what it made. Passreturn_image: falseto skip the preview.review_imageworks everywhere, including clients that show tool-result images to you but not to the model (Cherry Studio is one). It sends the image and your brief to a vision model and returns what matches, what is wrong (garbled text, composition, aspect ratio, artifacts) and a revised prompt. One review costs well under $0.01 on the defaultgpt-5.6-luna.
The assistant picks aspect_ratio and resolution itself from what you ask for, so "make it 16:9" in plain words is enough.
Local images just work
image_url on generate_image and generate_video takes any of these:
- a public
https://…URL — passed through untouched - a local file path —
/Users/me/photo.png,./ref.jpg,~/Pictures/x.webp - a URL on your own machine —
http://127.0.0.1:8000/photo.png,http://localhost:3000/… - a
data:image/png;base64,…URI
The last three are uploaded for you first, and the resulting public URL is what gets
generated from. This has to happen here rather than server-side: the file exists only on
your machine, and 127.0.0.1 means our server when our server resolves it — which is why
passing one to the REST API directly fails with private/reserved IP addresses not allowed.
This MCP server runs next to your files, so it can do what our servers cannot.
Uploads land in your account's R2 space and are auto-deleted after 30 days.
Setup
- Run
npx -y apimodels-mcp loginand click Authorize in the browser — or create a key at https://apimodels.app/console/api-keys (it looks likesk_…) and put it in the server's environment asAPIMODELS_API_KEY, as the examples below do. - Add the server to your MCP client.
npx -y apimodels-mcp statusshows which key is in use and your balance.
Claude Desktop
Edit claude_desktop_config.json (Settings → Developer → Edit Config):
Restart Claude Desktop. You can now ask it to "generate an image of …" or "make a 5-second video of …".
Cursor
Settings → MCP → Add new MCP server, or add to ~/.cursor/mcp.json:
Codex CLI
Add to ~/.codex/config.toml:
Two things to know in Codex:
- Approvals. Codex asks you to approve any tool call that is not marked read-only. Since 0.4.3,
list_modelsandget_taskare marked read-only, so waiting on a video no longer prompts on every check; the tools that bill your account (generate_video,generate_image,text_to_speech,chat,review_image) still ask once per call. To skip those prompts as well, adddefault_tools_approval_mode = "approve"under[mcp_servers.apimodels]. - Name the tool. Codex loads MCP tools on demand rather than listing them all up front, so say which one you want — e.g. "use apimodels generate_video to make a 5-second 16:9 clip of …". A bare "make me a video" may not make it look.
Cherry Studio
In Settings → MCP Servers, add a new server of type stdio:
- Command:
npx - Arguments:
-y apimodels-mcp - Environment variables:
APIMODELS_API_KEY=sk_your_key_here
Enable the server, then select it for your conversation from the MCP control under the chat box. Use a chat model that supports tool calls (Claude, GPT, Gemini …) as the conversation model — it calls the image model for you. Cherry Studio needs Node.js installed for npx; on Windows install it from https://nodejs.org.
Any other MCP client works the same way — run npx -y apimodels-mcp over stdio with APIMODELS_API_KEY in the environment.
Models, docs and pricing
Everything the tools call is documented on apimodels.app:
- API documentation · pricing · full model catalog
- Image: GPT Image 2.5 API (model page), GPT Image 2 API, Nano Banana 2.1 API (model page), all image models
- Video: Seedance 2.5 API, Google Veo API, MiniMax H3 API, FlashVSR video upscaling
- Chat and speech: LLM API (GPT, Claude, Gemini, DeepSeek, GLM, Qwen), Claude Sonnet 5.5, audio and text-to-speech
- Other ways in: Claude Code setup, chat clients, Agent Skills, free calculators and tools
- Prompt libraries with example outputs: GPT Image 2.5 prompts, GPT Image 2 prompts, Seedance 2.5 prompts, MiniMax H3 prompts
Configuration
Local development
License
MIT
來源:README.md,提交 aeaa15d
工具
0版本歷史
5- v0.7.0最新Oct 10, 2026
- v0.4.2Oct 7, 2026
- v0.4.1Oct 4, 2026
- v0.3.0Sep 22, 2026
- v0.2.3Sep 19, 2026
評分
已滿足適用檢查項的 85%
該評分衡量此收錄條目的完整程度,依據註冊中心條目、端點與公開來源計算得出。它不是對伺服器本身的評價,也不表示伺服器安全或目前可用:可連通性是帶日期的檢查結果,評分也不包含安裝量或使用者評價。
- 近 30 天內可連通必需25 分
- 已宣告認證方式必需10 分
- 已列出工具15 分
請讓伺服器在無憑證時回應 tools/list,或發布可在沙箱中無憑證啟動的軟體包。
- 描述必需15 分
- 圖示10 分
- 文件15 分
- 授權條款10 分