MCP
HiAPI provides a hosted remote MCP (Model Context Protocol) server. After connecting, any MCP-compatible client — including Claude Code and Cursor — can call image, video, audio, and text generation tools. Media tools use the Unified Async API, while text tools use OpenAI-compatible text endpoints. No local deployment is required.
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, the client discovers the available tools and invokes the corresponding capability, such as an image-generation or product-description request.
| 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 |
generate_audio | Dialogue speech, music, and other live audio models | elevenlabs/text-to-dialogue |
generate_text | Generate text with any live text model; the catalog selects Chat or Responses | deepseek-v4-flash |
get_task_status | Check an asynchronous image, video, or audio task by ID | — |
list_models | List all live image, video, audio, and text 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 | — |
Image, video, and audio 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 with get_task_status or the task detail endpoint. Text models use the live catalog’s /v1/chat/completions or /v1/responses route. generate_text returns a complete JSON response and reports a clear error when stream: true is requested.
Supported models match the live public catalog — see the model pages for exact parameters. New task models appear through generic params passthrough; model-specific fields (for example Seedance reference videos, Wan ratio, FLUX safety_tolerance, or audio lyrics) are documented in get_model_capabilities. Models from a modality without a matching MCP tool are shown separately until support is added.
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) |
For model-specific workflows in an agent runtime, install Skills. For product or backend integration, call the Unified Async API directly.