Plug into MCP
This page shows how to configure HiAPI MCP. Add a HiAPI service in your AI tool’s MCP / Connectors settings, enter the remote URL and your own HiAPI API key, then generate images, edit images, create videos, or inspect models directly from chat.
Quick Setup
Section titled “Quick Setup”-
Get your API key
Go to HiAPI Dashboard → API Keys and create or copy an API key.
-
Add a new MCP service in your AI tool
Open the MCP, Connectors, Tools, Integrations, or Servers settings in your AI tool. Add a new service and name it
hiapi.Fill in these fields:
Field Value Name / Server name hiapiType / Transport Remote,HTTP, orStreamable HTTPURL https://mcp.hiapi.ai/mcpHeader name AuthorizationHeader value Bearer YOUR_HIAPI_API_KEY -
Enter the remote URL
https://mcp.hiapi.ai/mcp -
Add the authorization header
Authorization: Bearer YOUR_HIAPI_API_KEY -
Save and restart the AI tool
Most AI tools load MCP settings at startup. Fully quit the tool, then open it again.
-
Verify the connection
Ask:
Use HiAPI to list available image models, then generate a product poster with
gpt-image-2.
JSON Config Template
Section titled “JSON Config Template”If your AI tool accepts JSON configuration, use this template:
{ "mcpServers": { "hiapi": { "url": "https://mcp.hiapi.ai/mcp", "headers": { "Authorization": "Bearer YOUR_HIAPI_API_KEY" } } }}If the client provides a UI, use the same fields:
| Field | Value |
|---|---|
| Name / Server name | hiapi |
| Type / Transport | Remote, HTTP, or Streamable HTTP |
| URL | https://mcp.hiapi.ai/mcp |
| Header name | Authorization |
| Header value | Bearer YOUR_HIAPI_API_KEY |
Let an AI Agent Configure It
Section titled “Let an AI Agent Configure It”If you want an AI tool to write the config for you, give it this page or llms.txt and say:
Use the HiAPI MCP docs to add the remote MCP URL and Authorization header to the current tool’s MCP config. After restart, verify the connection with
list_modelsandgenerate_image.
How to Ask the AI
Section titled “How to Ask the AI”After connection, you do not manually fill tool fields. Describe what you want in chat, and the AI tool will choose the HiAPI MCP tool and fill the right parameters for the selected model.
| Goal | Example request |
|---|---|
| Generate an image | Use gpt-image-2 to generate a 16:9 product poster with a clean layout and Chinese headline |
| Generate with reference images (selected models only) | Use Nano-Banana-2 with my uploaded image to generate a Japanese magazine cover |
| Edit an image (requires an image-editing model) | Use Nano-Banana-Pro to edit https://example.com/source.png and replace the background with snowy mountains |
| Generate a video | Use seedance-1-5-pro to create a 5-second 1920*1080 coffee ad video |
| Animate an uploaded local image (requires image-to-video) | Use wan2.7-i2v to animate my uploaded image into a 5-second landscape video |
| Browse models | List the currently available HiAPI image and video models |
| Check model parameters | Check which aspect ratios and resolutions Nano-Banana-Pro supports |
| Check pricing | Check pricing and multipliers for gpt-image-2 |
If you name a model, the AI tool should use your choice. If you do not name one, ask it to inspect the model list and capabilities before recommending a model.
Advanced: field name reference (optional)
The AI tool fills these fields automatically. You only need this section when debugging an MCP call or asking an AI agent to inspect its configuration. For normal use, describe your request using the examples above.
prompt: generation, editing, or video creation instructions.model: set when the user names a model, such asgpt-image-2orNano-Banana-Pro.image_url,image_data_uri,image_base64/image_mime_type,images: use only for reference images, image editing, or image-to-video.aspect_ratio,image_size,size: control image ratio, resolution, or video format. Available values depend on model capabilities.seconds: video duration, only for video models.wait_for_completion: whether video generation should wait for the completed result.
If the selected model does not support a requested parameter, the AI should check model capabilities first, then use a supported ratio, size, quality tier, or workflow.
Install for Claude Desktop
Section titled “Install for Claude Desktop”-
Get your API key
Go to HiAPI Dashboard → API Keys and create or copy an API key.
-
Open remote connector / MCP settings
In Claude Desktop, look for Connectors, MCP, Integrations, or Tools settings. The exact entry point may differ by version.
-
Add HiAPI Remote MCP
- URL:
https://mcp.hiapi.ai/mcp - Header:
Authorization - Value:
Bearer YOUR_HIAPI_API_KEY
- URL:
-
Restart Claude Desktop
Fully quit Claude Desktop, then reopen it.
-
Try it
Type in Claude:
Use HiAPI MCP to list available image models, then generate a cinematic mountain lake photo at sunset with
gpt-image-2.
Install for Claude Code (CLI)
Section titled “Install for Claude Code (CLI)”Use the Remote MCP configuration entry in Claude Code and point it at the HiAPI endpoint.
-
Add the remote URL
In the Claude Code MCP configuration entry, use:
{"mcpServers": {"hiapi": {"url": "https://mcp.hiapi.ai/mcp","headers": {"Authorization": "Bearer YOUR_HIAPI_API_KEY"}}}} -
Restart Claude Code
Fully exit the current Claude Code session, then start it again.
-
Verify
Use HiAPI MCP to list models, then generate a cyberpunk city image with
flux-1.1-pro.
Install for Codex (CLI / Desktop)
Section titled “Install for Codex (CLI / Desktop)”Use the Remote MCP configuration entry in Codex CLI or Codex Desktop and point it at the HiAPI endpoint.
-
Add remote MCP config
In the Codex MCP configuration file or UI, use:
{"mcpServers": {"hiapi": {"url": "https://mcp.hiapi.ai/mcp","headers": {"Authorization": "Bearer YOUR_HIAPI_API_KEY"}}}} -
Restart Codex
- Codex CLI: exit the current
codexsession, then start it again. - Codex Desktop: fully quit and reopen the desktop app.
- Codex CLI: exit the current
-
Try it
Use HiAPI MCP to list image models and generate a developer workstation illustration with
Nano-Banana-Pro.
Install for Cursor
Section titled “Install for Cursor”-
Open Cursor Settings.
-
Find MCP, Tools, or Integrations.
-
Add a new MCP Server.
-
Configure the remote MCP server:
Field Value Name hiapiType / Transport Remote,HTTP, orStreamable HTTPURL https://mcp.hiapi.ai/mcpHeader Authorization: Bearer YOUR_HIAPI_API_KEY -
Save and confirm the connection is active.
-
Open Cursor Chat (Cmd/Ctrl + L) and say:
Use HiAPI MCP to list image models, then generate a futuristic city image.
Install for VS Code / GitHub Copilot
Section titled “Install for VS Code / GitHub Copilot”Use a Remote MCP configuration in VS Code / GitHub Copilot and point it at the HiAPI endpoint.
-
Open your project in VS Code.
-
Open MCP settings or
.vscode/mcp.json. -
Use a config like:
{"servers": {"hiapi": {"type": "http","url": "https://mcp.hiapi.ai/mcp","headers": {"Authorization": "Bearer YOUR_HIAPI_API_KEY"}}}} -
Open the Command Palette (Cmd/Ctrl + Shift + P) and run the relevant MCP List Servers / Start Server command.
-
Switch Copilot Chat to Agent Mode.
-
Ask:
List HiAPI image models and generate a developer-tool style illustration.
Install for Cherry Studio
Section titled “Install for Cherry Studio”Add HiAPI as a Remote MCP server in Cherry Studio.
-
Open Cherry Studio settings.
-
Find MCP Server.
-
Click Add server.
-
Use:
Field Value Name hiapiType Remote,HTTP, orStreamable HTTPURL https://mcp.hiapi.ai/mcpHeaders Authorization: Bearer YOUR_HIAPI_API_KEY -
Save, then enable the
hiapiMCP server in the chat box. -
Ask:
Generate a minimal tech avatar background with HiAPI.
Install for other MCP hosts
Section titled “Install for other MCP hosts”If your AI tool supports remote MCP, connect HiAPI with a remote URL and one authorization header.
-
Confirm remote MCP support
In the target tool, look for MCP, Tools, Extensions, Servers, or Integrations and confirm it supports
Remote,HTTP, orStreamable HTTP. -
Add a new MCP server
Use:
Field Value Name / Server name hiapiType / Transport Remote,HTTP, orStreamable HTTPURL https://mcp.hiapi.ai/mcpHeader Authorization: Bearer YOUR_HIAPI_API_KEY -
Use JSON when required
{"mcpServers": {"hiapi": {"url": "https://mcp.hiapi.ai/mcp","headers": {"Authorization": "Bearer YOUR_HIAPI_API_KEY"}}}} -
Save and restart the AI tool
Most MCP clients load server config at startup. Fully quit the app, then open it again.
-
Verify the connection
Ask:
List the current HiAPI MCP models and recommend one for a Chinese poster.
A working setup should call
list_modelsorget_model_capabilitiesand return image/video model options.
Troubleshooting
Section titled “Troubleshooting”| Symptom | Fix |
|---|---|
| 401 or unauthorized | Check that the header is Authorization: Bearer YOUR_HIAPI_API_KEY |
| No tools appear | Save the config and fully restart the MCP client |
| Model parameters are unclear | Ask the AI to call get_model_capabilities first |
| You want live pricing | Ask the AI to call get_pricing |
| Uploaded local image fails | Do not pass a local file path; ask the AI to pass image_data_uri or image_base64 |