MCP
HiAPI runs a hosted remote MCP (Model Context Protocol) server. One connection gives any MCP-compatible client — Claude Code, Cursor, and others — a set of image and video generation tools backed by the Unified Async API. There is nothing to install or run locally.
https://mcp.hiapi.ai/mcpThe server is stateless about credentials: it never stores your API key, it only forwards the Authorization header of each request to api.hiapi.ai.
Connect
Section titled “Connect”Authentication uses your HiAPI API key as a Bearer token. Create one at Dashboard → API Keys.
claude mcp add --transport http hiapi https://mcp.hiapi.ai/mcp \ --header "Authorization: Bearer YOUR_API_KEY"For clients configured via a JSON file (Cursor, Claude Desktop, and most others):
{ "mcpServers": { "hiapi": { "type": "http", "url": "https://mcp.hiapi.ai/mcp", "headers": { "Authorization": "Bearer YOUR_API_KEY" } } }}After connecting, ask your client to list tools or just say “generate an image of …” — the client discovers and calls the right tool on its own.
| Tool | What it does | Default model |
|---|---|---|
generate_image | Text-to-image, plus reference-image generation on models that support it | qwen-image-2.0 |
edit_image | Edit or transform an existing image (image-to-image) | Nano-Banana-2 |
generate_video | Text-to-video and image-to-video | seedance-2-0 |
list_models | List all supported image and video models with capability summaries | — |
get_model_capabilities | Per-model parameters: aspect ratios, resolutions, output formats, reference-image limits, durations | — |
get_pricing | Live pricing metadata from /api/pricing | — |
All generation tools create tasks through POST /v1/tasks and poll GET /v1/tasks/:id for up to 3 minutes. For longer generations, pass wait_for_completion: false to get the taskId immediately and check it later via the task detail endpoint.
Supported models match the public catalog — see the model pages for exact parameters. Model-specific fields (for example Seedance reference videos, Wan ratio, FLUX safety_tolerance) are exposed directly as tool arguments and documented in get_model_capabilities.
Troubleshooting
Section titled “Troubleshooting”| Symptom | Fix |
|---|---|
401 / 403 from tools | Check the Authorization: Bearer … header in your client config |
| Balance or quota errors | Add funds at Dashboard → Billing |
| Tool call times out | The task may still be running — re-run with wait_for_completion: false and poll GET /v1/tasks/:id |
| Client cannot connect | Verify the URL is exactly https://mcp.hiapi.ai/mcp and the transport is HTTP (streamable) |
Prefer a per-model workflow inside an agent runtime? Install the Skills instead. Building your own product or backend? Call the Unified Async API directly.