APIKO

io.github.tong0619453646-dev由 GitHub 帳號 tong0619453646-dev 發布v0.1.1更新於 Nov 6, 2026

Look up APIKO image and video models, quote prices, generate media and track spend.

概覽

AI 產生的概覽

APIKO 讓助理查詢影像與影片模型、取得報價、用你自己的 APIKO 餘額生成或編輯媒體,並追蹤任務與花費。

可以做什麼
  • 查詢可用模型及其請求欄位,含類別、生成模式與價格級距
  • 驗證預計的輸入並給出標價估算,不送出任何任務
  • 生成或編輯影像、送出影片任務,費用計入 APIKO 餘額
  • 依 task_id 追蹤影像與影片任務的狀態、進度與結果連結
  • 上傳本機或遠端參考圖,取得可用於參考欄位的公開連結
  • 查看該 API 金鑰的花費及其自身消費上限
適用情境
適合希望助理透過單一 APIKO 金鑰呼叫多家廠商模型生成影像或影片,並在每次付費呼叫前先報價、經你確認的情境。也適合比較模型與價格、查看任務結果與金鑰用量。
執行需求
透過 npx 以 stdio 在本機執行(需 Node.js 18.17 或更新版本),也可從原始碼執行。需要 APIKO API 金鑰,透過環境變數 APIKO_API_KEY 提供,可於 APIKO 控制台取得。需能連線 APIKO 介面與價格目錄,選用支援代理變數。設定 APIKO_MCP_READ_ONLY=1 會隱藏付費與上傳工具。
安裝前請注意
generate_image 與 generate_video 會實際扣款,參考影片還會增加計費秒數;送出時可能先從餘額保留部分金額。上傳的參考圖對任何持有連結的人公開,72 小時後刪除;結果連結保留 24 小時。請勿把 API 金鑰貼到聊天或共用設定中。文字模型無法透過此伺服器呼叫。

安裝

在 SourceWeft 中

  1. 開啟 儀表板中的 APIKO,將其新增到工作區。
  2. 為需要使用其工具的對話啟用該服務。

Desktop only,透過 STDIO。 STDIO 服務會啟動本機處理程序,因此需要 SourceWeft 桌面主機。

其他 MCP 客戶端

參照 儲存庫 中的啟動說明。

README

APIKO MCP server

Use APIKO image and video models from Claude Code, Codex, Cursor, Claude Desktop and other MCP clients. The server runs locally over stdio with your own APIKO API key: the agent can look up models and request fields, quote a list price, generate images and videos, follow tasks, check what the key has spent, and upload reference images.

Generation is billed to your APIKO balance at API prices. The server tells the agent to quote first and wait for your approval before every paid call.

Overview, supported models and prices: APIKO MCP server.

Works with

Any client that can start a local stdio MCP server can run npx -y apiko-mcp.

ClientHow to add itTested by us
Claude Code (CLI and desktop app)claude mcp add (below)yes
Codex (CLI, IDE extension, desktop app)codex mcp add or ~/.codex/config.toml (below)yes
Cursor~/.cursor/mcp.json (below)config follows Cursor's docs
Claude Desktopclaude_desktop_config.json (below)config follows the MCP docs
Other stdio clients (Windsurf, Cline, VS Code agent mode, ...)command npx, args -y apiko-mcp, env APIKO_API_KEYno

The rows marked "follows the docs" use each client's documented mcpServers format with the same command that is tested in Claude Code and Codex. If one of them does not work for you, please open an issue.

Requirements

Install

The server is published on npm as apiko-mcp and runs with npx -y apiko-mcp. To run it from source instead:

bash
git clone <this repo> apiko-mcpcd apiko-mcpnpm installnpm run build        # writes dist/index.js

and replace npx -y apiko-mcp below with node /absolute/path/to/apiko-mcp/dist/index.js.

Claude Code (CLI and desktop app)

bash
claude mcp add apiko --scope user -e APIKO_API_KEY=sk-... -- npx -y apiko-mcp

--scope user stores the server in ~/.claude.json, which the Claude Code desktop app (Code tab) also loads. Run /mcp in Claude Code to check that apiko is connected.

Codex (CLI, IDE extension, desktop app)

bash
codex mcp add apiko --env APIKO_API_KEY=sk-... -- npx -y apiko-mcp

or add this to ~/.codex/config.toml, which the Codex CLI, the IDE extension and the ChatGPT desktop app share:

toml
[mcp_servers.apiko]command = "npx"args = ["-y", "apiko-mcp"]env = { APIKO_API_KEY = "sk-..." }

Cursor

Add this to ~/.cursor/mcp.json (all projects) or .cursor/mcp.json in a project root:

json
{  "mcpServers": {    "apiko": {      "type": "stdio",      "command": "npx",      "args": ["-y", "apiko-mcp"],      "env": { "APIKO_API_KEY": "sk-..." }    }  }}

Claude Desktop

Settings → Developer → Edit Config opens claude_desktop_config.json (~/Library/Application Support/Claude/ on macOS, %APPDATA%\Claude\ on Windows). Add the server and restart the app:

json
{  "mcpServers": {    "apiko": {      "command": "npx",      "args": ["-y", "apiko-mcp"],      "env": { "APIKO_API_KEY": "sk-..." }    }  }}

If a desktop app reports that node or npx cannot be found, use the full path from which node.

Try it without spending anything

Add APIKO_MCP_READ_ONLY=1 to the server's env (-e APIKO_MCP_READ_ONLY=1 or --env APIKO_MCP_READ_ONLY=1). The generate and upload tools are then hidden; model lookup, quotes, task checks and the key's usage still work.

Environment variables

VariableDefaultMeaning
APIKO_API_KEYrequiredYour APIKO key. Never paste it into a chat.
APIKO_MCP_READ_ONLYoff1 hides generate_image, generate_video and upload_image.
APIKO_BASE_URLhttps://api.apiko.appAPI base URL.
APIKO_SITE_URLhttps://apiko.appWhere the public price catalog is read from.
HTTPS_PROXY, HTTP_PROXY, NO_PROXYunsetUsed only when set. Node's built-in fetch ignores them, so the server switches to a proxy-aware client when they are present.

Tools

ToolCostWhat it does
search_modelsfreeLists the models your key can use, with category, list price and modes. Filter by query and category.
get_modelfreeOne model's input_schema (fields, enums, defaults), endpoints, modes and price tiers.
estimate_costfreeValidates an input against the schema and quotes the list price without submitting.
generate_imagepaidGenerates, or edits when input.images has reference URLs. Runs async when the model supports it and waits up to wait_seconds (default 30).
generate_videopaidSubmits a video task (POST /v1/videos) and returns its task_id.
get_taskfreeStatus, progress, result URLs and failure reason of a task; can wait up to 45 s.
check_balancefreeWhat this key has spent and its own spending limit, if any.
upload_imagefreeUploads a local JPEG/PNG/WebP (or copies a public image URL) and returns a public img.apiko.app URL for reference fields.

Typical flow: search_models → get_model → upload_image (if you have local references) → estimate_cost → you approve → generate_image / generate_video → get_task.

Cost estimates

estimate_cost (and the generate tools' cost field) returns one of:

  • estimated: a number, when the price follows directly from the input: per-image tiers chosen by resolution (or by an explicit WxH size for gpt-image-2), flat per-image prices, and per-second video prices by resolution × duration, including reference videos once you pass reference_video_seconds.
  • needs_input: something the price depends on is missing, usually the total length of reference videos. You also get the range and the amount held from your balance at submission (hold_usd), which is refunded down to the real charge when the task settles.
  • token_billed: billed by tokens (GPT Image 2.5 Flare / Sunburst, text models). An indicative_usd figure may be shown, but it is not a quote.
  • unknown: no published price or no reliable rule; never treat it as free.

All figures are list prices in USD from the public catalog at apiko.app. The gateway's charge at settlement is final. Failed tasks are refunded automatically.

max_cost_usd on the generate tools refuses the call when the estimate, or its guaranteed upper bound, is above the cap, or when no reliable figure exists.

Billing notes

  • Each generate_* call creates a paid task. Calling it again to check progress would pay twice; use get_task.
  • client_request_id stops a repeated call from being submitted twice while the same server process is running. If a submission times out, the server does not retry it: check https://apiko.app/dashboard/usage first.
  • Result links are signed and kept for 24 hours. Uploaded references are public to anyone with the link and are deleted after 72 hours.
  • check_balance reads the key, not the account. Keys created on apiko.app have no limit of their own and draw on the account balance, which only the dashboard shows (https://apiko.app/dashboard/billing).
  • Text models appear in search_models, but you call them through the OpenAI-compatible API at https://api.apiko.app/v1, not through this server.

Timeouts

Codex gives each MCP tool call 60 seconds by default, so no tool here waits longer than 45 seconds; long tasks are followed with get_task. The rare sync-only image model can take longer: raise tool_timeout_sec under [mcp_servers.apiko] if you use one.

Development

bash
npm installnpm test            # builds, then runs the tests against a local mock API

src/tools.ts holds the tool logic and src/server.ts builds an McpServer from it, independent of the transport; src/index.ts is the stdio entry point. The tests never call the production API.

來源:mcp/README.md,提交 5cbb580

工具

8

search_models

Search APIKO models

List the APIKO models this API key can use, with category (image / video / chat), list prices and generation modes. Free. Use it before get_model; never guess model ids. Text models are listed for reference: call them with the OpenAI-compatible API, not through this server.

輸入參數limitquerycategory

get_model

Get APIKO model details

Read one model's request fields (input_schema: types, enums, defaults, required fields), endpoints, async/sync modes and price tiers. Free. Send only fields from input_schema to estimate_cost and the generate tools.

輸入參數model必填

estimate_cost

Estimate generation cost

Validate a planned input against the model schema and quote its list price without submitting anything. Free. status "estimated" gives a number; "needs_input" names what is missing (e.g. reference_video_seconds); "token_billed" and "unknown" mean no reliable number exists, so never present them as a price. Show the user the model, input and estimate and wait for explicit approval before calling generate_image or generate_video.

輸入參數inputmodel必填reference_video_seconds

generate_image

Generate or edit an image (billable)

BILLABLE: creates a paid image task charged to the user's APIKO balance. Only call after estimate_cost on the same input and the user's explicit approval of the model and cost. With reference images in input.images it edits (POST /v1/images/edits), otherwise it generates. The input is validated against the model schema first. Runs async when the model supports it and waits up to wait_seconds; if not done, poll with get_task. Never call again to check progress.

輸入參數inputmodel必填promptmax_cost_usdwait_secondsclient_request_id

generate_video

Generate a video (billable)

BILLABLE: creates a paid video task (POST /v1/videos) charged per second to the user's APIKO balance. Only call after estimate_cost on the same input and the user's explicit approval of the model, duration, resolution and cost. Reference videos add billed seconds. Returns a task_id at once; poll with get_task (videos take minutes). Never call again to check progress.

輸入參數inputmodel必填promptmax_cost_usdwait_secondsclient_request_idreference_video_seconds

get_task

Get task status and results

Read an image or video task: status (queued, in_progress, completed, failed), progress, result_urls and fail_reason. Free. wait_seconds (0-45, default 30) keeps polling until the task finishes or the time runs out. Failed tasks are refunded automatically. Result links last 24 hours.

輸入參數task_id必填wait_seconds

check_balance

Check key limit and usage

Show what this API key has spent and its own spending limit, if it has one. Free. Keys without a limit draw on the account balance, which API keys cannot read; the user sees it at https://apiko.app/dashboard/billing.

無需輸入參數。

upload_image

Upload a reference image

Upload a JPEG, PNG or WebP (up to 10 MB) and get a public https://img.apiko.app URL for reference fields such as images, first_image_url or reference_image_urls. Free (per key: 60 per minute, 1,000 per day). Give exactly one of path (a local file the user named) or url. The uploaded copy is public to anyone with the link and deleted after 72 hours, so only upload files the user asked to use.

輸入參數urlpath

版本歷史

1
  1. v0.1.1最新Oct 29, 2026

評分

已滿足適用檢查項的 80%

該評分衡量此收錄條目的完整程度,依據註冊中心條目、端點與公開來源計算得出。它不是對伺服器本身的評價,也不表示伺服器安全或目前可用:可連通性是帶日期的檢查結果,評分也不包含安裝量或使用者評價。

  • 近 30 天內可連通25 分
  • 已宣告認證方式10 分

    請在註冊中心條目中宣告憑證請求標頭,或保持端點能夠回應探測,以便判定其認證方式。

  • 已列出工具必需15 分
  • 描述必需15 分
  • 圖示10 分
  • 文件15 分
  • 授權條款10 分

    請在儲存庫或註冊中心條目中宣告授權條款。