Skip to content
English

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.

  1. Get your API key

    Go to HiAPI Dashboard → API Keys and create or copy an API key.

  2. 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:

    FieldValue
    Name / Server namehiapi
    Type / TransportRemote, HTTP, or Streamable HTTP
    URLhttps://mcp.hiapi.ai/mcp
    Header nameAuthorization
    Header valueBearer YOUR_HIAPI_API_KEY
  3. Enter the remote URL

    https://mcp.hiapi.ai/mcp
  4. Add the authorization header

    Authorization: Bearer YOUR_HIAPI_API_KEY
  5. Save and restart the AI tool

    Most AI tools load MCP settings at startup. Fully quit the tool, then open it again.

  6. Verify the connection

    Ask:

    Use HiAPI to list available image models, then generate a product poster with gpt-image-2.

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:

FieldValue
Name / Server namehiapi
Type / TransportRemote, HTTP, or Streamable HTTP
URLhttps://mcp.hiapi.ai/mcp
Header nameAuthorization
Header valueBearer YOUR_HIAPI_API_KEY

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_models and generate_image.

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.

GoalExample request
Generate an imageUse 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 videoUse 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 modelsList the currently available HiAPI image and video models
Check model parametersCheck which aspect ratios and resolutions Nano-Banana-Pro supports
Check pricingCheck 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 as gpt-image-2 or Nano-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.

  1. Get your API key

    Go to HiAPI Dashboard → API Keys and create or copy an API key.

  2. Open remote connector / MCP settings

    In Claude Desktop, look for Connectors, MCP, Integrations, or Tools settings. The exact entry point may differ by version.

  3. Add HiAPI Remote MCP

    • URL: https://mcp.hiapi.ai/mcp
    • Header: Authorization
    • Value: Bearer YOUR_HIAPI_API_KEY
  4. Restart Claude Desktop

    Fully quit Claude Desktop, then reopen it.

  5. 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.

Use the Remote MCP configuration entry in Claude Code and point it at the HiAPI endpoint.

  1. 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"
    }
    }
    }
    }
  2. Restart Claude Code

    Fully exit the current Claude Code session, then start it again.

  3. Verify

    Use HiAPI MCP to list models, then generate a cyberpunk city image with flux-1.1-pro.

Use the Remote MCP configuration entry in Codex CLI or Codex Desktop and point it at the HiAPI endpoint.

  1. 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"
    }
    }
    }
    }
  2. Restart Codex

    • Codex CLI: exit the current codex session, then start it again.
    • Codex Desktop: fully quit and reopen the desktop app.
  3. Try it

    Use HiAPI MCP to list image models and generate a developer workstation illustration with Nano-Banana-Pro.

  1. Open Cursor Settings.

  2. Find MCP, Tools, or Integrations.

  3. Add a new MCP Server.

  4. Configure the remote MCP server:

    FieldValue
    Namehiapi
    Type / TransportRemote, HTTP, or Streamable HTTP
    URLhttps://mcp.hiapi.ai/mcp
    HeaderAuthorization: Bearer YOUR_HIAPI_API_KEY
  5. Save and confirm the connection is active.

  6. Open Cursor Chat (Cmd/Ctrl + L) and say:

    Use HiAPI MCP to list image models, then generate a futuristic city image.

Use a Remote MCP configuration in VS Code / GitHub Copilot and point it at the HiAPI endpoint.

  1. Open your project in VS Code.

  2. Open MCP settings or .vscode/mcp.json.

  3. Use a config like:

    {
    "servers": {
    "hiapi": {
    "type": "http",
    "url": "https://mcp.hiapi.ai/mcp",
    "headers": {
    "Authorization": "Bearer YOUR_HIAPI_API_KEY"
    }
    }
    }
    }
  4. Open the Command Palette (Cmd/Ctrl + Shift + P) and run the relevant MCP List Servers / Start Server command.

  5. Switch Copilot Chat to Agent Mode.

  6. Ask:

    List HiAPI image models and generate a developer-tool style illustration.

Add HiAPI as a Remote MCP server in Cherry Studio.

  1. Open Cherry Studio settings.

  2. Find MCP Server.

  3. Click Add server.

  4. Use:

    FieldValue
    Namehiapi
    TypeRemote, HTTP, or Streamable HTTP
    URLhttps://mcp.hiapi.ai/mcp
    HeadersAuthorization: Bearer YOUR_HIAPI_API_KEY
  5. Save, then enable the hiapi MCP server in the chat box.

  6. Ask:

    Generate a minimal tech avatar background with HiAPI.

If your AI tool supports remote MCP, connect HiAPI with a remote URL and one authorization header.

  1. Confirm remote MCP support

    In the target tool, look for MCP, Tools, Extensions, Servers, or Integrations and confirm it supports Remote, HTTP, or Streamable HTTP.

  2. Add a new MCP server

    Use:

    FieldValue
    Name / Server namehiapi
    Type / TransportRemote, HTTP, or Streamable HTTP
    URLhttps://mcp.hiapi.ai/mcp
    HeaderAuthorization: Bearer YOUR_HIAPI_API_KEY
  3. Use JSON when required

    {
    "mcpServers": {
    "hiapi": {
    "url": "https://mcp.hiapi.ai/mcp",
    "headers": {
    "Authorization": "Bearer YOUR_HIAPI_API_KEY"
    }
    }
    }
    }
  4. Save and restart the AI tool

    Most MCP clients load server config at startup. Fully quit the app, then open it again.

  5. Verify the connection

    Ask:

    List the current HiAPI MCP models and recommend one for a Chinese poster.

    A working setup should call list_models or get_model_capabilities and return image/video model options.

SymptomFix
401 or unauthorizedCheck that the header is Authorization: Bearer YOUR_HIAPI_API_KEY
No tools appearSave the config and fully restart the MCP client
Model parameters are unclearAsk the AI to call get_model_capabilities first
You want live pricingAsk the AI to call get_pricing
Uploaded local image failsDo not pass a local file path; ask the AI to pass image_data_uri or image_base64