SpicyAPI MCP

io.github.spicyapi-ai由 GitHub 账号 spicyapi-ai 发布v0.6.2更新于 Nov 4, 2026

图像、视频和音频生成API,提供美元报价,并在付费请求前进行确认。

AI 翻译由 AI 模型根据下方的原文描述翻译,可能有误。

原文描述

Image, video and audio generation APIs with USD quotes and confirmation before paid requests.

概览

SpicyAPI 的本地 MCP 服务;无需登录;STDIO;22 个工具。

暂无 AI 概览:以下信息来自注册中心条目和服务本身。

安装

在 SourceWeft 中

  1. 打开 控制台中的 SpicyAPI MCP,将其添加到工作区。
  2. 为需要使用其工具的对话启用该服务。

Desktop only,通过 STDIO。 STDIO 服务会启动本地进程,因此需要 SourceWeft 桌面宿主。

其他 MCP 客户端

参照 仓库 中的启动说明。

README

@spicyapi/mcp

The official local MCP server for SpicyAPI. It lets the AI assistant you already use — Claude Desktop, Claude Code, Codex, Cursor, VS Code, Windsurf, Gemini CLI or any MCP client — browse the live model catalog, compare prices, create generation tasks and collect results, with every billable step confirmed by you.

SpicyAPI is an unrestricted AI API: one key for 200+ image, video, audio and chat models (Seedance, Kling, Wan, MiniMax, Seedream, GPT Image, Suno and more), with no content filter added by the platform. What a request can produce depends on the model you pick, and the catalog marks which models are uncensored.

This package installs spicyapi-mcp (stdio) and spicyapi-mcp-http (loopback-only Streamable HTTP). It does not contain the CLI or the Agent Skill.

Full, beginner-friendly guide: docs.spicyapi.ai/docs/mcp.

What it does, in plain words

MCP (Model Context Protocol) is an open standard for giving AI assistants extra abilities. Once this server is added to your assistant, you can ask in ordinary language — "make a five-second video from this photo" — and the assistant:

  1. finds a suitable model in the live catalog and reads what it accepts;
  2. uploads your local file if there is one;
  3. gets an exact USD quote and stops to ask you before anything is charged;
  4. starts the task, waits for it and gives you the result link.

The server runs on your own computer. Your assistant app starts it when needed; there is nothing to host.

Requirements

  • Node.js 22.13 or later (node --version). npx ships with Node.js.
  • A SpicyAPI API key (below), and funds on the account for paid tasks. Browsing, quoting and reading results are free.
  • An MCP client. Creating, retrying and purging tasks additionally require a client that supports MCP form elicitation (the protocol's way of asking the user a question). In a client without it those three tools return an error, usually containing did not declare the required capability. Nothing is created, reserved, charged or destroyed: creation has fetched only its free quote by then, and retry and purge have sent no request. The read-only tools still work.

Get a key first

  1. Create an account at spicyapi.ai/register — if sign-ups are paused, that page shows how to join the waitlist.
  2. On the API keys page choose Create key. Name it after the assistant that will use it. Under Advanced you can set a daily cap, monthly budget, lifetime cap, allowed models, IP allowlist and expiry; new keys always get the platform's default daily cap unless you enter 0 for no cap.
  3. Copy the key. It starts with sk-spicy- and is shown once.
  4. For the terminal-based setups below, export it in the terminal you will run the setup command from:
bash
export SPICY_API_KEY="sk-spicy-..."   # paste your own key

In Windows PowerShell: $env:SPICY_API_KEY = "sk-spicy-...".

Add it to your client

Every client below runs the same stdio server: npx --yes --package=@spicyapi/mcp spicyapi-mcp.

You never run this server yourself — your MCP client starts it. Launched by hand it just waits silently on stdin, which looks like a hang. And it needs --package=@spicyapi/mcp in front of the binary name, because this package ships two of them; plain npx @spicyapi/mcp fails with could not determine executable to run.

Claude Desktop

  1. Open Settings → Developer → Edit Config. The file is ~/Library/Application Support/Claude/claude_desktop_config.json on macOS and %APPDATA%\Claude\claude_desktop_config.json on Windows.
  2. Paste the block below (or add the spicyapi entry to an existing mcpServers) and replace YOUR_SPICY_API_KEY.
  3. Quit Claude Desktop completely and reopen it — it reads this file only at launch.
json
{  "mcpServers": {    "spicyapi": {      "command": "npx",      "args": ["--yes", "--package=@spicyapi/mcp", "spicyapi-mcp"],      "env": { "SPICY_API_KEY": "YOUR_SPICY_API_KEY" }    }  }}

Claude Code

bash
claude mcp add spicyapi \  -e SPICY_API_KEY=$SPICY_API_KEY \  -- npx --yes --package=@spicyapi/mcp spicyapi-mcp

The default scope is the current project; add --scope user for every project. Do not use --scope project, which writes the key into a .mcp.json inside the repository. Check with claude mcp list or /mcp. On native Windows, if the server fails to start, use -- cmd /c npx --yes --package=@spicyapi/mcp spicyapi-mcp.

Codex

bash
codex mcp add spicyapi \  --env SPICY_API_KEY=$SPICY_API_KEY \  -- npx --yes --package=@spicyapi/mcp spicyapi-mcp

That writes ~/.codex/config.toml, which the Codex CLI, the IDE extension and the ChatGPT desktop app all read — configure it once and all three pick it up. Check with codex mcp list or /mcp.

Both terminal commands copy SPICY_API_KEY out of your current shell into that client's local config, so run them in a terminal where the key is already exported. If it was not, remove the server (claude mcp remove spicyapi / codex mcp remove spicyapi) and add it again.

Cursor, Windsurf and Gemini CLI

Cursor (~/.cursor/mcp.json), Windsurf (~/.codeium/windsurf/mcp_config.json) and Gemini CLI (~/.gemini/settings.json) share the same shape as Claude Desktop:

json
{  "mcpServers": {    "spicyapi": {      "command": "npx",      "args": ["--yes", "--package=@spicyapi/mcp", "spicyapi-mcp"],      "env": { "SPICY_API_KEY": "YOUR_SPICY_API_KEY" }    }  }}

On Windows these live under %USERPROFILE%. If a file already has other settings, merge mcpServers into it — the whole file must stay valid JSON, with no comments or trailing commas. Restart the client if the tools do not appear (Gemini CLI: /mcp lists them).

Those are user-level files outside your repository. Never copy that block, with a real key in it, into a project file that gets committed — such as a project-level .cursor/mcp.json.

VS Code

.vscode/mcp.json is committed with your repository, so let VS Code prompt for the key and keep it in its own secret storage:

json
{  "inputs": [    {      "id": "spicyapi-key",      "type": "promptString",      "description": "SpicyAPI key",      "password": true    }  ],  "servers": {    "spicyapi": {      "type": "stdio",      "command": "npx",      "args": ["--yes", "--package=@spicyapi/mcp", "spicyapi-mcp"],      "env": { "SPICY_API_KEY": "${input:spicyapi-key}" }    }  }}

Start it from the code lens above the entry or MCP: List Servers, paste the key when asked, then use the tools from Chat in Agent mode.

Any other MCP client

Use the same command, args and env. Each client owns its config location and format, and both change between versions — their own documentation is authoritative.

Check that it works

Ask your assistant, in order:

  1. "Check the SpicyAPI service status." — spicyapi_service_status needs no key, so this proves the server starts.
  2. "What is my SpicyAPI balance?" — spicyapi_balance_get proves the key reaches the server.
  3. "Which SpicyAPI tools do you have?" — expect 22 tools prefixed spicyapi_.

None of these costs anything.

Then ask for something real

Use SpicyAPI to list the image models I can call, pick an inexpensive one, generate a cinematic night portrait, and give me the result link when it finishes.

The agent reads the catalog, fetches the model's schema, obtains an exact quote and stops for your confirmation before anything is charged.

More prompts to try:

  • "How much SpicyAPI balance do I have, and what did I spend this week?" — balance and usage, free.
  • "Find SpicyAPI models that turn an image into a video and compare what a 5-second clip costs on each." — catalog plus quotes, free.
  • "Turn /Users/me/Desktop/portrait.jpg into a 5-second video with a slow push-in." — upload, then a confirmed task.
  • "Show my SpicyAPI tasks from the last three days that failed, and why." — task history, free; a retry afterwards asks for confirmation.
  • "Save the result of my last task to my SpicyAPI asset library as 'Hero portrait', then use it as the starting image for a 5-second video." — a saved asset, then a confirmed task.

Model IDs always come from the live catalog. Any placeholder such as MODEL_ID_FROM_CATALOG in SpicyAPI documentation means an exact ID selected from that catalog, not a literal value.

Tools

ToolPurposeRead-onlyBillableConfirmation
spicyapi_service_statusPublic health and readiness; no key neededYesNoNo
spicyapi_docs_searchSearch the bundled first-party documentation index; no keyYesNoNo
spicyapi_models_listEnabled models and account-specific pricesYesNoNo
spicyapi_model_getOne model and its current input schemaYesNoNo
spicyapi_balance_getAvailable, held and total balanceYesNoNo
spicyapi_usage_getSettled USD usage for the current keyYesNoNo
spicyapi_tasks_listOne page of task metadata for the current keyYesNoNo
spicyapi_task_getRead one task, including ready result linksYesNoNo
spicyapi_task_waitWait up to 300 seconds for a task to reach a terminal stateYesNoNo
spicyapi_task_quotePrice an exact request without creating anythingYesNoNo
spicyapi_upload_fileRead, upload and commit a local file; return its spicy:// URINoNoNo
spicyapi_download_url_createShort-lived signed URL for a task outputNoNoNo
spicyapi_task_createCreate an asynchronous generation taskNoYesAlways
spicyapi_task_retryCreate a new task from a failed or expired oneNoYesAlways
spicyapi_task_purgeDestroy one terminal task's stored content (destructiveHint)NoNoAlways
spicyapi_assets_listOne page of saved assets, each with its spicy://a/ referenceYesNoNo
spicyapi_assets_usage_getAsset storage plan, what is stored, today's count, next planYesNoNo
spicyapi_asset_saveSave a task output, local file, URL or upload to the libraryNoNoNo
spicyapi_asset_renameRename a saved asset; its reference stays the sameNoNoNo
spicyapi_asset_deleteDelete a saved asset for good (destructiveHint)NoNoAlways
spicyapi_characters_listOne page of characters, each with its images in orderYesNoNo
spicyapi_character_getOne character with its images, as spicy://a/ referencesYesNoNo

The server also registers two resources — spicyapi://docs/index and spicyapi://contract/openapi — and one prompt. spicyapi_generation_workflow is a prompt, not a tool — it is registered with registerPrompt, takes goal and an optional model, and does not appear in SPICYAPI_MCP_TOOLS. Hosts surface it wherever they list MCP prompts.

Parameters

ToolParameters (required in bold)
spicyapi_service_statusnone
spicyapi_docs_searchquery (default ""), limit (1–25, default 10)
spicyapi_models_listmodality (image / video / audio / text), provider, task, search, includeSchema, includeExamples (both default false)
spicyapi_model_getmodel
spicyapi_balance_getnone
spicyapi_usage_getfrom, to (YYYY-MM-DD, UTC)
spicyapi_tasks_listfrom, to, state, model, limit (1–100, default 20), cursor
spicyapi_task_gettaskId
spicyapi_task_waittaskId, timeoutSeconds (1–300, default 60), intervalSeconds (1–60, default adaptive)
spicyapi_upload_filepath (absolute; ~/, and ~\ on Windows, is expanded), contentType (only when the extension is missing or wrong)
spicyapi_download_url_createtaskId, key
spicyapi_task_quotemodel, input, callBackUrl
spicyapi_task_createmodel, input, callBackUrl, idempotencyKey, retentionSeconds
spicyapi_task_retrytaskId, idempotencyKey
spicyapi_task_purgetaskId
spicyapi_assets_listkind (image / video / audio), source (array of task_output / upload / url), query, favorite, collectionId, entityId, sort (recent / oldest / name / size), cursor, limit (1–100, default 20)
spicyapi_assets_usage_getnone
spicyapi_asset_saveexactly one of taskId (with index or key), path (with contentType), url, fileId; name, idempotencyKey
spicyapi_asset_renameassetId (ast_… or spicy://a/…), name (1–80 characters)
spicyapi_asset_deleteassetId
spicyapi_characters_listassetId (only characters that contain it), cursor, limit (1–100, default 20)
spicyapi_character_getcharacterId

Model input schemas are returned as plain JSON Schema: display-only and rate-card annotations are stripped before they reach the agent.

spicyapi_task_create accepts an optional retentionSeconds that shortens how long that one task's generated media, result payload, prompt and other input text are kept; it can never extend them, 0 removes them once the task reaches a terminal state, and billing records are always kept.

Its optional callBackUrl must be a public https:// address. Plain http:// is refused, and so are localhost, private network addresses, explicit ports other than 443 and 80, and URLs carrying credentials; each returns 400 with Invalid callback URL. http:// has no development exception because the delivery body carries the prompt and signed links to the result.

spicyapi_task_purge is annotated destructiveHint: true and removes a terminal task's generated media, result payload, prompt and other input text. It destroys content, not the record of what it cost — the ledger entry, charged amount, model, state, timestamps and request ID all survive — so it is never a refund. Only terminal tasks are accepted. An accepted task cannot be canceled and there is no cancellation API, so for a queued or running task, wait until it finishes (spicyapi_task_wait), then purge it. It takes no idempotency key, because the task ID is the idempotency key: a repeat after a dropped response returns the original purgedAt and changes nothing. Its result carries only the task ID, content state and removal metadata: no links, tickets or output keys, because leaving a way to fetch the content in the same message that reports its destruction would defeat the point.

How spending is protected

Billable tools use protocol elicitation and signed request state. Task creation fetches and binds the exact quote, then asks you to confirm its USD estimate and maximum charge. An agent cannot bypass that confirmation.

  • The question goes to the user, not the model. The client renders it; the agent has no way to answer it.
  • The answer is bound to the exact arguments. If the model, input or any other argument changes between the question and the answer, the call fails with confirmed request state does not match the current tool arguments and nothing is created.
  • Declining creates, charges and destroys nothing. A declined or cancelled confirmation returns operation declined; … with what did and did not happen. For task creation that is no task was created and no funds were reserved or charged (only the free price quote had been requested) — the quote shown in the question was already fetched. Retry and purge send no request before confirmation, so theirs ends in no SpicyAPI request was made. Leave any "auto-accept elicitation" setting off for this server.
  • No elicitation, no spending. A client without form elicitation cannot answer the question, so creation fails right after the free quote and nothing is created or charged.
  • Quotes last five minutes. Confirming after that fails with 40901; ask again for a fresh quote.
  • Retry confirmations carry no price. A retry is a new task at the model's current price; use spicyapi_task_quote first if you want the number.
  • Recovery reuses the idempotency key. The confirmation shows it, and a failure after confirmation returns it with a recovery hint. Calling spicyapi_task_create again with that idempotencyKey and the unchanged request returns the original task instead of a second charge.
  • Failed and expired tasks are never charged; the hold is released automatically. A successful task settles on actual usage, capped at the accepted hold. Accepted tasks cannot be cancelled.

Call creation directly once the model input is ready. The separate spicyapi_task_quote tool is for independent price comparisons, not a prerequisite. Health and balance checks are optional diagnostics, not a per-task checklist.

Results

spicyapi_task_get, spicyapi_task_wait and verified v2 webhooks all include ready output.assets[].url links. Use them directly — never send the API key to storage. A complete verified callback needs no extra task lookup and no download ticket. Query again for pending assets or expired links; spicyapi_download_url_create remains available for legacy integrations and explicit link renewal, and its signed URL lasts 20 minutes.

Some models answer in output.text rather than with a file — audio transcription is the plain case, an ordinary asynchronous task whose result is words. An empty output.assets on such a model is the expected shape, not a failure, so report the text instead of looking for a missing link. A transcription may also carry output.transcript with word timings, timed segments and the detected language, and layer decomposition returns one image per layer, stacked by output.assets[].layer.zIndex. Embedding models return vectors in output.embeddings; when they add up to more than 2,048 numbers, spicyapi_task_get and spicyapi_task_wait replace each vector with its length and first eight values and say so in output.embeddings.summary — read the full vectors with the SDK, the CLI or POST /v1/embeddings. Image-to-3D and text-to-3D return one mesh asset (a .glb file), vector models return image/svg+xml images, and video translation can add a subtitle asset (.srt).

spicyapi_task_wait polls adaptively by default, starting at about two seconds and backing off to at most ten. Set intervalSeconds only for a fixed interval. Waiting is bounded to 60 seconds by default and 300 at most per call; a local timeout does not cancel the accepted task.

Generated artefacts are kept for about 14 days at most, prompts for 30 days, uploads for one day — see Retention and destruction. Copy anything you want to keep.

Usage reports

spicyapi_usage_get takes optional from and to dates in YYYY-MM-DD. It queries only the API key configured for this MCP process — there is no user, key or workspace override.

  • UTC range [from,to), up to 92 days. By default to is tomorrow UTC and from is seven days earlier.
  • Task counts are grouped by creation day and model.
  • totalSpend and each spend are exact decimal USD strings covering settled charges only; pending holds are excluded and late settlement can change earlier days.
  • This is a usage report, not account balance or remaining key budget, and is never required before generating. Observe Retry-After when reporting is rate limited.

spicyapi_tasks_list finds tasks after a restart or a missed callback. It returns one page of metadata with no inputs, no result URLs and no automatic detail requests. Filters: from, to, state, model, limit, cursor. Keep the UTC dates fixed while paging and pass nextCursor unchanged. Default window seven days ending tomorrow UTC, 92 days maximum; page size 20, capped at 100. cost is final only when settled is true. Do not use history for status polling or as a prerequisite to generation.

This endpoint has its own account-wide bucket: a burst of 30 requests, refilling 30 per minute, shared by every key on the account. Unlike the general API limit it fails closed, so it still rejects when the limiter is degraded. Use it for reconciliation, not polling.

Local files

spicyapi_upload_file takes the absolute path the user gave, reads the file, uploads the bytes from this machine and commits the upload in one call, then returns the committed spicy:// URI to put in a model input field. There is no separate commit tool: nothing on the MCP side ever holds a half-finished upload. Split-step uploads (ticket, PUT, commit) belong to SDK code, which finishes them with commitUploadedFile. Images (JPEG, PNG, WebP, GIF) up to 10 MiB; MP4 / WebM video and MP3 / WAV audio up to 90 MiB; reference documents up to 90 MiB — PDF, Word, Excel, PowerPoint, Keynote, Pages, Numbers, plain text and Markdown — for fields such as reference_file_url; LoRA weights (.safetensors, up to 2 GiB) for loras[].path. Content type is inferred from the extension. Public HTTPS media URLs need no upload. Relative paths are refused; a leading ~/ (and ~\ on Windows) is expanded to the home directory. If the extension is not recognised, nothing is uploaded and the error lists every extension the tool infers: gif, jpeg, jpg, png, webp, mp4, webm, mp3, wav, pdf, doc, docx, xls, xlsx, ppt, pptx, key, pages, numbers, txt, md, markdown, safetensors.

The server reads only under the user's home directory. Symlinks are resolved before the check, so a link pointing out of an allowed root is refused. The guard exists for prompt injection — a path that arrives inside an email, a web page or a task description is data, not an instruction — not to restrict the person running the server, who can already read their own files.

Set SPICY_MCP_UPLOAD_ROOTS in the server's env to narrow or widen that; it replaces the default. Entries are separated like PATH: : on macOS and Linux, ; on Windows. ~ is not expanded in this variable, so write full paths.

json
{  "env": {    "SPICY_API_KEY": "YOUR_SPICY_API_KEY",    "SPICY_MCP_UPLOAD_ROOTS": "/Users/you/Pictures:/Users/you/Movies"  }}

On Windows the same entry reads "SPICY_MCP_UPLOAD_ROOTS": "C:\\Users\\you\\Pictures;D:\\Renders" (backslashes doubled inside JSON). A root that does not exist matches nothing; the refusal message lists the roots in effect.

Asset library

An upload's spicy:// URI lasts one day. Files the user wants to reuse — a character portrait, a style reference, a voice sample — can be saved to the asset library with spicyapi_asset_save; each saved file gets a uri of the form spicy://a/<id> that works in any media field of model inputs sent with keys of the same workspace, until it is deleted. The agent puts that uri straight into the task input, with no upload or download step.

The configured SPICY_API_KEY decides the library: a personal key reaches the user's personal library, a team key that team's shared library. With a team key, the creator's current role decides what may change (owner and admin anything; developer saves and renames, favorites or deletes only what they saved; billing and readonly only read and use); spicyapi_assets_usage_get returns this as scope.

  • spicyapi_asset_save takes exactly one source: taskId (with index or key; the first output by default), path (an absolute local path, read under the same SPICY_MCP_UPLOAD_ROOTS guard as spicyapi_upload_file), url, or fileId. The required Idempotency-Key is added for you.
  • spicyapi_assets_list filters by kind, source, a name query, favorite, a folder (collectionId) and one character's images (entityId), and orders by sort (recent by default, oldest, name, size), 20 per page by default; follow nextCursor with the same sort (a cursor from another sort gets 400). Folders and favorites are managed on the Assets page of the web app. Each item's previewUrl is a private preview signed for at most 20 minutes — fine to show, never to store.
  • spicyapi_characters_list and spicyapi_character_get read characters: named, ordered sets of images created on the web. To use one, the agent puts its images' uri values, in order, into the model's reference image field. Older spicy://p/<id> persona references still resolve to the same images, in the personal library only. An unknown character is a 404.
  • spicyapi_asset_delete asks for confirmation every time, because the reference stops working at once and there is no undo.
  • Storage unlocks with the owner's lifetime top-ups, shared by their personal and team libraries. A refused call returns the server's reason (for example asset_library_full, asset_daily_limit or asset_permission_denied) in the error JSON; spicyapi_assets_usage_get explains the plan and what the next one takes, and leaves out the top-up amounts when scope.canTopUp is false.

See the asset library guide: favorites and folders and characters.

Environment variables

VariableUsed byMeaning
SPICY_API_KEYboth entrypointsYour API key. Required for everything except status and docs search
SPICY_MCP_UPLOAD_ROOTSboth entrypointsDirectories spicyapi_upload_file and spicyapi_asset_save may read, separated by : (; on Windows). Default: home directory
SPICY_MCP_HTTP_TOKENspicyapi-mcp-httpRequired bearer token, at least 32 bytes, different from SPICY_API_KEY
SPICY_MCP_HOSTspicyapi-mcp-http127.0.0.1 (default), localhost or ::1; anything else is refused
SPICY_MCP_PORTspicyapi-mcp-httpPort, default 8765
HTTPS_PROXYboth entrypointsSend API calls through this proxy; see Behind a proxy

Behind a proxy

If your network reaches the internet through an HTTP proxy, put HTTPS_PROXY (and NO_PROXY, if you need it) in the server's env block. The server uses it on its own on Node.js 22.21+ or 24+. Node.js's built-in fetch ignores proxy variables unless it was started with NODE_USE_ENV_PROXY=1, so when the server finds an http:// or https:// proxy it restarts itself once with that switch on. Set NODE_USE_ENV_PROXY=0 to always connect directly.

Put it in the env block rather than relying on your shell. Desktop apps do not see the variables you export in a terminal, and Codex passes only a short fixed list of them to MCP servers:

bash
codex mcp add spicyapi \  --env SPICY_API_KEY=$SPICY_API_KEY \  --env HTTPS_PROXY=http://127.0.0.1:7890 \  -- npx --yes --package=@spicyapi/mcp spicyapi-mcp

A proxy that curl in your terminal uses and this server does not is the usual reason curl reaches the API while the server reports network request failed. Errors then say so: they name the proxy variable that was set and not used. socks5:// proxies are not supported.

HTTP entrypoint

spicyapi-mcp-http serves Streamable HTTP on loopback only. Most users want the stdio entrypoint above instead; use this for a client that connects to an already-running server by URL.

bash
export SPICY_API_KEY="sk-spicy-..."export SPICY_MCP_HTTP_TOKEN="$(node -e "console.log(require('node:crypto').randomBytes(32).toString('hex'))")"npx --yes --package=@spicyapi/mcp spicyapi-mcp-http# SpicyAPI MCP HTTP listening at http://127.0.0.1:8765/mcp
  • The MCP endpoint is /mcp and requires Authorization: Bearer <SPICY_MCP_HTTP_TOKEN>; without it the server answers 401.
  • GET /healthz returns {"ok":true} without authentication.
  • It refuses to start on a non-loopback address, with a token shorter than 32 bytes, or with a token equal to SPICY_API_KEY.
  • Host and Origin headers must be local, so web pages on other sites cannot drive it; request bodies are capped at 2 MiB.

Loopback means only programs on the same computer can connect — not other devices on the network.

Troubleshooting

SymptomFix
No SpicyAPI tools in the clientRestart the client fully; validate the JSON (no comments or trailing commas); check the file path; check node --version is 22.13 or later
npx: command not found / spawn npx ENOENTInstall Node.js from nodejs.org, or use the absolute path from which npx / where npx; on Windows try "command": "cmd" with /c npx … args
could not determine executable to runAdd --package=@spicyapi/mcp before spicyapi-mcp
SPICY_API_KEY is required for authenticated API operationsThe key is not reaching the server: fix the env block, or re-add the server from a shell where the key is exported
HTTPS_PROXY is set, but this request did not use itUpdate Node.js to 22.21+ or 24+, or add NODE_USE_ENV_PROXY=1 to the env block; see Behind a proxy
401Key mistyped, revoked or expired — create a new key
40201 / 40202 / 40301Top up; raise the key's cap or wait for the UTC reset; allow the model on the key
40310Verify your account email: open the link we sent, or send a new one from the console
40003The uploaded bytes do not match their ticket; call spicyapi_upload_file again and use the new spicy:// URI
40004No deployment can serve that exact combination of settings; change the parameter named in the message against the model's schema, do not just retry
503A dependency is briefly unavailable; wait for Retry-After, then repeat the call
50302A synchronous generation failed upstream and was already refunded; sending the same request again is safe
did not declare the required capabilityThe client lacks elicitation support; nothing was created or charged (creation fetched only its free quote). Update it, or use the CLI for paid tasks
confirmed request state does not match the current tool argumentsThe request changed after the question was asked; start the creation again
40901Quote expired or price changed; quote and confirm again
path must be absolute / no such file / may only read files under …Give the full path; check it exists; move the file under an allowed root
cannot tell the file type from its extension; …Rename the file with a listed extension, or pass contentType
operation declined; …The confirmation was declined or cancelled; the message says whether only the free quote had been requested
task … did not reach a terminal state within …The task is still running — wait again or look it up later; it was not cancelled

Errors from the API carry status, code and requestId; keep the request ID for support. See Errors for every code.

A failed task is different from a failed call: it comes back with state: "failed", an errorCode from a closed set, and an errorMessage. Relay errorMessage to the user — when the model service gave a specific reason it is passed through in English, untranslated, with service names, hosts, URLs, request and task IDs and account details removed — but branch only on errorCode, which does not change with the wording or the language.

What this server does not do

It submits and tracks native asynchronous tasks; it does not stream chat tokens, and it has no chat tool to add. The catalogue's text models are served by the compatible layers instead — POST /v1/chat/completions and POST /v1/responses (OpenAI), POST /v1/messages (Anthropic) and POST /v1beta/models/{model}:generateContent (Google Gemini), all under https://api.spicyapi.ai — so a client that already speaks one of those protocols only needs its base URL pointed at SpicyAPI. Embedding and text-to-speech models also answer at POST /v1/embeddings and POST /v1/audio/speech. Live voice and live transcription use the wss://api.spicyapi.ai/v1/realtime WebSocket, which a tool call cannot hold open; a task created here runs a single bounded turn instead — see the realtime guide. Use native jobs/stream when you need quote confirmation and the platform event envelope — see the chat streaming guide.

Text models that read images, video or audio take them as message parts, and the spicy://f/… URI from spicyapi_upload_file is what goes in an image_url, video_url or audio_url part (video and audio parts are carried by Chat Completions and jobs/stream) — see sending media to a text model.

It cannot cancel an accepted task — no public API can — and it never answers a billing confirmation on your behalf.

More

来源:README.md,提交 21fb18e

工具

22

spicyapi_service_status

Check SpicyAPI service status

Read public health and readiness endpoints for diagnostics or an explicit status request. Not a prerequisite for task creation. No API key is required. Report the `operational` field. On the public surface /readyz answers 404 by design — readiness exposes database and Redis state, so it is registered only on the admin process — and `operational` already accounts for that. Do not report a 404 there as an outage.

无需输入参数。

spicyapi_models_list

List callable SpicyAPI models

Discover enabled models and account-specific prices. Fetch only the selected model for its schema, or set includeSchema to reuse complete records without another model_get call. Returned input schemas are plain JSON Schema; display-only and rate-card annotations are removed. Some input values change the price; task_create obtains the exact request quote for confirmation. Use pricing entries for comparisons rather than calculating the accepted charge yourself. Models with task `realtime` or `realtime-transcription` take one bounded turn as a task from their input schema; live, continuous audio needs a server-side WebSocket to wss://api.spicyapi.ai/v1/realtime, which this server does not open. Embedding models (task `embedding`) and text-to-speech models are also served by OpenAI-compatible POST /v1/embeddings and POST /v1/audio/speech for applications that want vectors or audio bytes directly.

输入参数tasksearchmodalityproviderincludeSchemaincludeExamples

spicyapi_model_get

Get one SpicyAPI model

Return one exact model, its live input schema, pricing, policy and availability. Reuse a complete record already obtained from models_list with includeSchema. The input schema is plain JSON Schema; display-only and rate-card annotations are removed. Some input values change the price; task_create obtains the exact request quote for confirmation. Use pricing entries for comparisons rather than calculating the accepted charge yourself.

输入参数model必填

spicyapi_balance_get

Get SpicyAPI USD balance

Return available, held, and total balance as exact decimal USD strings when requested or diagnosing funds. Task creation already checks funds; this is not a prerequisite.

无需输入参数。

spicyapi_usage_get

Get current SpicyAPI key usage

Read task counts and settled actual USD spend for the current API key, grouped by creation day and model. Only from/to dates are accepted: UTC [from,to), at most 92 days; defaults to seven days ending tomorrow UTC. Money is returned as exact decimal strings; pending holds are excluded and late settlement can change prior-day spend. This is not account balance or remaining key budget, and is not a generation prerequisite. Use for requested usage reports; respect Retry-After on rate limits.

输入参数tofrom

spicyapi_tasks_list

List current SpicyAPI key tasks

Discover current-key task history with metadata only, without fetching each result. Dates are UTC [from,to), default seven days, at most 92 days. Keep from/to fixed across pages and pass nextCursor unchanged. Limit defaults to 20, maximum 100. Cost is an exact USD string and is final only when settled. Use task_get only for selected results; use usage_get for settled spending including hidden tasks. This is not a polling endpoint or a prerequisite to generation.

输入参数tofromlimitmodelstatecursor

spicyapi_task_get

Get a SpicyAPI task

Read a task created by the current API key, including ready output.assets[].url links. Use those URLs directly without your API key; query again if assets are pending or URLs have expired. A verified complete v2 webhook already contains the result. Unknown and inaccessible IDs are both 404. Some models answer in words instead of a file: speech-to-text and other text results arrive in output.text with no assets, and a transcription may add output.transcript with word timings, timed segments (output.transcript.segments, with speaker labels when available) and the detected language. Embedding models return vectors in output.embeddings (inputTokens and data[].index/embedding); large results are summarized here, see output.embeddings.summary. Layer decomposition returns one image asset per layer; stack them by ascending output.assets[].layer.zIndex. Other asset roles: image-to-3d and text-to-3d return one `mesh` asset (a binary glTF .glb, mime model/gltf-binary); vector endpoints return `image` assets with mime image/svg+xml; video translation can add a `subtitle` asset (.srt); video extension that joins the source clip returns the joined `video` first and the new part as `segment`.

输入参数taskId必填

spicyapi_task_wait

Wait briefly for a SpicyAPI task

Wait for a task for up to 300 seconds and read ready output.assets[].url directly without a download-ticket call. By default, polling backs off from about 2 to at most 10 seconds; an explicit intervalSeconds stays fixed. Prefer signed webhooks for production; a complete verified v2 callback needs no extra task_get. A local wait timeout does not cancel the task. Some models answer in words instead of a file: speech-to-text and other text results arrive in output.text with no assets, and a transcription may add output.transcript with word timings, timed segments (output.transcript.segments, with speaker labels when available) and the detected language. Embedding models return vectors in output.embeddings (inputTokens and data[].index/embedding); large results are summarized here, see output.embeddings.summary. Layer decomposition returns one image asset per layer; stack them by ascending output.assets[].layer.zIndex. Other asset roles: image-to-3d and text-to-3d return one `mesh` asset (a binary glTF .glb, mime model/gltf-binary); vector endpoints return `image` assets with mime image/svg+xml; video translation can add a `subtitle` asset (.srt); video extension that joins the source clip returns the joined `video` first and the new part as `segment`.

输入参数taskId必填timeoutSecondsintervalSeconds

spicyapi_upload_file

Upload a local file to SpicyAPI

Read a file from this computer, upload it, and return the spicy:// URI to put in a model input field. Use this whenever the user refers to a file on their machine. Images (JPEG, PNG, WebP, GIF) up to 10 MiB; MP4/WebM video and MP3/WAV audio up to 90 MiB; reference documents (PDF, Word, Excel, PowerPoint, Keynote, Pages, Numbers, TXT, Markdown) up to 90 MiB for fields such as reference_file_url. Public HTTPS media URLs need no upload at all — pass them straight to the model input when its schema accepts a URL.

输入参数path必填contentType

spicyapi_download_url_create

Create a SpicyAPI output download URL

Create a short-lived signed URL for an output owned by the current task and API key, for legacy integrations or explicit link renewal. Prefer existing ready output.assets[].url from task_get, task_wait, or a verified v2 webhook; no ticket call is needed for those links.

输入参数keytaskId必填

spicyapi_task_quote

Quote an exact SpicyAPI request

Compare an exact request price without creating a task or reserving funds. Returns a five-minute USD estimate and maximum charge. task_create already obtains its own quote and confirmation; do not call this tool as a routine prerequisite.

输入参数input必填model必填callBackUrl

spicyapi_task_create

Create a billable SpicyAPI task

Obtain the exact request quote, show its USD estimate and maximum charge for user confirmation, then reserve funds and create an asynchronous task. Do not call task_quote first unless independently comparing prices. The confirmation needs an MCP client that supports form elicitation; if the client does not, the call fails after the free quote and no task is created or charged. Models with task `realtime` or `realtime-transcription` take one bounded turn as a task from their input schema; live, continuous audio needs a server-side WebSocket to wss://api.spicyapi.ai/v1/realtime, which this server does not open. Embedding models (task `embedding`) and text-to-speech models are also served by OpenAI-compatible POST /v1/embeddings and POST /v1/audio/speech for applications that want vectors or audio bytes directly.

输入参数input必填model必填callBackUrlidempotencyKeyretentionSeconds

spicyapi_task_retry

Retry a billable SpicyAPI task

Create a new task from a failed or expired source. Requires a user confirmation round.

输入参数taskId必填idempotencyKey

spicyapi_task_purge

Destroy a SpicyAPI task's stored content

Permanently destroy one terminal task's stored content: generated media, result payload, prompt, and input text. This destroys content, not the record of what it cost — the ledger entry, charged amount, model, state, timestamps and request ID all stay queryable afterwards, so this never hides or reverses a charge and never refunds anything. It cannot be undone and there is no per-output granularity: the unit is one whole task. Download any result the user still wants before calling this. Only tasks in a terminal state are accepted. An accepted task cannot be canceled and there is no cancellation API, so for a queued or running task wait until it finishes (task_wait), then purge it. Repeating the call on an already destroyed task succeeds and changes nothing. Requires a user confirmation round.

输入参数taskId必填

spicyapi_assets_list

List saved SpicyAPI assets

List files in the asset library this key reaches — the personal library for a personal key, the team's shared library for a team key — newest first unless sort says otherwise, one page at a time; pass nextCursor back as cursor with the same filters and sort to continue (a cursor from another sort is rejected with 400). Narrow it with favorite, collectionId (a folder; folders are created on the web, and an id outside this library is a 404), entityId (the images of one character) and query. Each item's uri (spicy://a/<id>) goes straight into any media field of a model input — no upload or download step. previewUrl is a private preview signed for at most 20 minutes; use it to show the file, never store it. A change the key's team role does not allow gets 403 with reason asset_permission_denied; a key that cannot reach the library gets 403 with asset_workspace_forbidden.

输入参数kindsortlimitquerycursorsourceentityIdfavoritecollectionId

spicyapi_asset_save

Save a file to the SpicyAPI asset library

Keep a file in the asset library this key reaches (personal, or the team's shared library for a team key) until it is deleted, and return its spicy://a/<id> uri for later model inputs made with keys of the same workspace. Give exactly one source: taskId (an output of one of the user's own successful tasks, or of the team's with a team key; index or key picks which, the first output by default), path (an absolute path to a file on this computer, uploaded first), url (a public http or https file), or fileId (a committed spicy://f/ upload). Saving the same task output, upload or URL again returns the existing asset. Storage unlocks with lifetime top-ups; a refusal carries a reason (asset_library_locked, asset_library_full, asset_file_too_large, asset_daily_limit, asset_storage_full) — call spicyapi_assets_usage_get to explain the plan rather than retrying.

输入参数keyurlnamepathindexfileIdtaskIdcontentTypeidempotencyKey

spicyapi_asset_rename

Rename a saved SpicyAPI asset

Change an asset's name. Its spicy://a/<id> uri stays the same, so model inputs that already use it keep working.

输入参数name必填assetId必填

spicyapi_asset_delete

Delete a saved SpicyAPI asset

Permanently delete one asset from the library this key reaches. Its spicy://a/<id> uri stops working in new requests at once and the stored file is removed; there is no undo. In a team library, developers can delete only what they saved. Deleting does not give back today's allowance of new assets. Only delete an asset the user named. Requires a user confirmation round.

输入参数assetId必填

spicyapi_assets_usage_get

Get SpicyAPI asset library plan and usage

Return which library the key reaches (scope), the storage plan, what is stored against its limits, how many assets were saved today against the daily limit, and the next plan with how much more to top up. Usage covers the owner's whole allowance, shared by their personal and team libraries; the top-up amounts are absent when scope.canTopUp is false. Plans unlock with lifetime top-ups and never go down; byte values use binary units (500 MB = 524288000 bytes). Use it to explain a refused save.

无需输入参数。

spicyapi_characters_list

List SpicyAPI characters

List the characters in the asset library this key reaches: named sets of images, each image an asset with its own uri. Newest first, one page at a time; pass nextCursor back as cursor to continue. Pass assetId to find the characters that contain one asset. To use a character, put the uri (spicy://a/<id>) of its images, in the order given, into the reference image field of the model's input (spicyapi_model_get shows which field), and refer to them in the prompt the way that model's page describes. Characters are created and edited on the web; these tools only read them. Older spicy://p/<id> persona references still resolve to the same images, in the personal library only.

输入参数limitcursorassetId

spicyapi_character_get

Get a SpicyAPI character

Read one character with its images in order, each with its uri and a fresh private previewUrl (signed for at most 20 minutes; never store it). An unknown character and one outside this key's library both return 404. To use a character, put the uri (spicy://a/<id>) of its images, in the order given, into the reference image field of the model's input (spicyapi_model_get shows which field), and refer to them in the prompt the way that model's page describes. Characters are created and edited on the web; these tools only read them. Older spicy://p/<id> persona references still resolve to the same images, in the personal library only.

输入参数characterId必填

版本历史

2
  1. v0.6.2最新Nov 3, 2026
  2. v0.6.1Oct 29, 2026

评分

已满足适用检查项的 90%

该评分衡量此收录条目的完整程度,依据注册中心条目、端点与公开来源计算得出。它不是对服务器本身的评价,也不表示服务器安全或当前可用:可连通性是带日期的检查结果,评分也不包含安装量或用户评价。

  • 近 30 天内可连通25 分
  • 已声明认证方式10 分

    请在注册中心条目中声明凭据请求头,或保持端点能够响应探测,以便判定其认证方式。

  • 已列出工具必需15 分
  • 描述必需15 分
  • 图标10 分
  • 文档15 分
  • 许可证10 分