Skip to main content
Glama

aihub-mcp

MCP server for the AihubMax media generation API — https://docs.aihubmax.com.

把 AihubMax(api.aihubmax.com)的媒体生成能力(图像 / 视频 / 音频 / 文档 + 异步任务体系)封装成 Agent 友好的 MCP server。目标:Agent 拿到一个 sk- key 后,能在对话里顺畅地发现模型、生成媒体、拿回结果。

工具(13 个)

工具

作用

list_models

列出模型。主列表来自 GET /v1/models,里面的 id 可直接提交;另附 catalog_only 段(文档可见但当前 Key 未开通)。media_type="llm" 改列 llm-router 注册表

describe_model

查看某模型的端点、参数(类型/枚举/默认/中文说明)、示例、定价

generate_image / generate_audio / generate_document

提交生成任务,默认等待 45s:短任务直接返回结果 URL,超时返回 task_id;图像成功时内联回传图片

generate_video

提交视频任务,默认不等待、立即返回 task_id(视频是分钟级,阻塞等待会撞穿客户端工具超时),再用 wait_for_task 取结果

get_task

查询/轮询异步任务到终态

wait_for_task

阻塞等待长任务 + MCP 进度通知;超时返回 still-running 可续等

download_asset

把任务产物或 URL 流式下载到本地磁盘(视频等大文件落盘)

get_credits

查询当前 Key 的总额度 / 已用 / 剩余

upload_file

本地文件 / 远程 URL / base64 → 可引用的 URL(i2v 等场景刚需)。本地文件上限 20 MB,更大的请走 url 模式

analyze_media

多模态 LLM 分析图/视频/音频 → 文本(宿主模型看不了视频/听不了音频时补位)

ask_model

问另一个 LLM(二次意见 / 试用),非主对话通道

模型 id 用哪个

线上可调用 id 与文档 spec 里的 model 名是两套命名:文档写 veo-3.1,网关实际提供的是 veo-3.1[4k]google/veo-3.1[fast] 这类变体 id,裸 family 名不一定能直接提交

因此 list_modelsmodels 段直接给线上真实 id,照抄即可提交;catalog_only 段列的是 文档中存在但当前 Key 未开通的模型,需要先开通。两套命名的完整对应关系见 docs/model-mapping.md(由 scripts/build-mapping.ts 生成)。

Related MCP server: ImaginePro MCP Server

快速使用(stdio)

在 MCP 客户端(Claude Code / Claude Desktop / Cursor 等)配置:

{
  "mcpServers": {
    "aihub": {
      "command": "npx",
      "args": ["-y", "github:cookaihq/aihub-mcp"],
      "env": { "AIHUB_API_KEY": "sk-你的key" }
    }
  }
}

当前走 GitHub 分发(npm 发布后再改为 "aihub-mcp")。仓库 github:cookaihq/aihub-mcp;首次拉取时 npx 会自动执行 prepare 编译。 本地开发也可把 command/args 指向 node /绝对路径/dist/index.js,或 AIHUB_API_KEY=sk-... npm run dev

base URL 可用 AIHUB_BASE_URL 覆盖。Key 推荐用环境变量 AIHUB_API_KEY;也支持 --api-key sk-...,但命令行参数会出现在 ps aux 里,同机其他用户可见,仅建议本机调试时使用。

开发

npm install
npm run typecheck
npm test                       # 离线回归测试(不需要 Key,不产生费用)
npm run build                  # 输出 dist/

# 目录管道(需要 aihubmax 文档站源码)
MINTLIFY_DIR=/path/to/mintlify npm run build-catalog
AIHUB_API_KEY=sk-... npm run build-mapping    # 重建 catalog ↔ 线上 id 映射表

AIHUB_API_KEY=sk-... npm run verify           # 端到端打真实 API 验收(会产生少量生成费用)

进度

  • M0 目录管道:catalog/catalog.zh.json(155 端点 / 128 模型 / 每模型完整参数 Schema)

  • M1 核心 server:11 工具 + stdio + 真实定价(/api/pricing)+ 产物三层交付,实测通过

  • M2 能力补齐analyze_media / ask_model 已实现(13 工具全部实测通过)

  • M2 发布:文档站集成页、npm 发布、MCP registry(待授权/确认)

  • M3 托管模式(Streamable HTTP)

Available Tools

14 tools
analyze_media媒体理解(图/视频/音频 → 文本)A

用多模态 LLM 分析媒体内容并输出文本(宿主模型自身无法看视频/听音频,此为能力补充)。三选一提供 image_urls / video_urls / audio_url(协议自动判别)。异步提交:默认等待 60s,短任务直接返回 text;长任务(视频/思考模型)超时返回 task_id,用 get_task / wait_for_task 取回。模型来自 llm-router 注册表(与生成类不同),用支持对应能力的模型(如 gemini-3.1-pro-preview 支持 vision/video/audio);model 无效时错误会列出可用模型。

ParametersJSON Schema
NameRequiredDescriptionDefault
modelYesllm-router 模型 id,如 gemini-3.1-pro-preview、claude-sonnet-4-6
promptYes对媒体的分析指令,如“描述这段视频”“转写这段音频”
audio_urlNo单个音频 URL
image_urlsNo图片 URL 数组(1–10 张)
max_tokensNo
video_urlsNo视频 URL 数组(1–10 个)
temperatureNo
wait_secondsNo最长等待秒数,默认 60,设 0 立即返回 task_id
system_promptNo系统指令

TDQS

A4.3/5.0
Behavior4/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations, the description carries the full burden. It discloses asynchronous submission, default 60s wait, direct return vs task_id for long tasks, media type auto-detection, and model routing. However, it does not mention rate limits or detailed error conditions beyond invalid model.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is a single paragraph that front-loads the core purpose and then provides key details. It is concise and logically ordered, though could benefit from slight structuring for readability.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the complexity (9 params, no output schema), the description covers purpose, input types, async behavior, model source, and error handling. It compensates for missing output schema by describing return types. Minor gaps like rate limits and full error scenarios are absent.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is 78%, so baseline is 3. The description adds value by explaining the async logic (wait_seconds, task_id return) and the model registry distinction, which goes beyond what the schema provides. It does not repeat parameter constraints but contextualizes their use.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the tool's purpose: analyzing media (image/video/audio) using multimodal LLMs to output text, and explicitly distinguishes it from the host model's limitations. It differentiates from sibling tools like ask_model (text-only) and generate_* tools.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description explains when to use the tool (for media analysis), describes the asynchronous behavior and timeout handling, and notes that models come from a separate registry from generation tools. While it doesn't explicitly mention when not to use, it provides clear contextual guidance.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

ask_model问另一个模型(二次意见)A

调用一个 LLM 做对话,定位为“向另一个模型征询二次意见 / 试用”,不是主对话通道、不支持流式。异步提交 + 轮询:默认等待 60s,短问答直接返回 text;超时返回 task_id 用 get_task / wait_for_task 取回。model 用 llm-router 注册表模型(如 gemini-3.5-flash、claude-sonnet-4-6、gpt-5.5;可用集见 /v1/configs/llm_generations_models,与生成类不同)。传 prompt(单轮)或 messages(多轮,OpenAI 格式)。

ParametersJSON Schema
NameRequiredDescriptionDefault
modelYesllm-router 模型 id
promptNo单轮用户输入(与 messages 二选一)
systemNo系统指令(prompt 模式下前置)
messagesNo多轮消息(OpenAI 格式,与 prompt 二选一)
max_tokensNo
temperatureNo
wait_secondsNo最长等待秒数,默认 60,设 0 立即返回 task_id

TDQS

A4.2/5.0
Behavior4/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

Without annotations, the description covers key behaviors: non-streaming, async with 60s default wait, immediate return for short queries, and timeout handling via task_id. It does not mention rate limits or side effects, but is sufficient.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is a single paragraph that front-loads the purpose and efficiently covers all essential aspects without redundant or unnecessary information.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

The description covers the main behavior and parameter interactions, but lacks detail on the return value structure (e.g., format of direct text response) and error cases. Given no output schema, this is a notable gap.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

The description adds meaning beyond the schema by explaining the mutual exclusivity of prompt and messages, the role of system with prompt mode, and the behavior of wait_seconds (default 60, 0 returns task_id). Schema coverage is 71%, so description compensates well.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the tool's purpose as calling an LLM for dialogue, positioned as seeking a second opinion or trial, and distinguishes it from the main chat channel and sibling tools like media/audio generation.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description explicitly states this tool is for second opinions or trial, not the main chat channel, and mentions async polling with fallback to sibling tools get_task/wait_for_task. It provides clear context although not exhaustive.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

create_embeddings文本嵌入B

生成文本向量嵌入(OpenAI 兼容)。model 用嵌入模型 id(如 text-embedding-3-small、jina-embeddings-v3)。input 为字符串或字符串数组。

ParametersJSON Schema
NameRequiredDescriptionDefault
inputYes待嵌入文本,单条或数组
modelYes嵌入模型 id

TDQS

B3.3/5.0
Behavior2/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

No annotations are provided, so the description carries full burden. It only states basic functionality and OpenAI compatibility, without disclosing behavioral traits like rate limits, idempotency, input size constraints, or return format. For a tool generating embeddings, return format (e.g., array of floats) is crucial but omitted.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is very short (two sentences) and front-loaded with the core purpose. It uses bullet-like clarity but lacks structured sections. Every sentence adds value, but could be more efficient by combining model info and input type into one line.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness2/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

With no output schema, the description should explain what the tool returns (e.g., embedding vectors). It does not. Given the tool's complexity (two parameters, straightforward return), the description is incomplete as it omits both output format and behavioral details like error handling or maximum input length.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is 100% with basic descriptions, but the description adds concrete model ID examples (text-embedding-3-small, jina-embeddings-v3) and clarifies input as string or array. This provides practical value beyond the schema alone.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The tool name 'create_embeddings' and description '生成文本向量嵌入' clearly state the action (generate) and resource (text vector embeddings). The description explicitly mentions OpenAI compatibility, which distinguishes it from other generation tools like generate_audio or generate_image. It's specific and non-tautological.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

No guidance is provided on when to use this tool over siblings (e.g., ask_model for semantic search, or generate_document for text output). The description does not mention prerequisites, exclusions, or preferred contexts. The agent is left to infer usage from the tool's name alone.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

describe_model查看模型参数说明A

返回指定模型的提交端点、必填/可选参数(含类型、枚举、默认值、中文说明)与一个示例请求。生成前用它确认参数,避免 422。

ParametersJSON Schema
NameRequiredDescriptionDefault
modelYes模型 id,如 veo-3.1-text-to-video、gpt-image-2

TDQS

A4.3/5.0
Behavior4/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

No annotations are provided, so the description carries full burden. It describes the return values (endpoint, parameters, example) and suggests safe usage (avoiding 422). It does not mention destructive actions, which is appropriate for a read-only query tool.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is two sentences, front-loaded with core functionality and usage benefit. Every word is informative; no redundant or vague phrasing.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness5/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a simple query tool with one parameter and no output schema, the description fully explains what is returned (endpoint, parameters with types/enums/defaults/descriptions, example request) and the use case (pre-generation parameter confirmation). No gaps.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 100% for the single parameter 'model', with an example ID provided. The tool description adds context about the parameter's purpose (model ID) but does not significantly expand beyond the schema. Baseline 3 is appropriate.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the tool returns the submission endpoint, required/optional parameters with details (types, enums, defaults, Chinese descriptions), and an example request. It distinguishes from siblings like list_models by focusing on parameter details for a specific model, not just listing models.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description explicitly advises to use it before generation to confirm parameters and avoid 422 errors. It implies the context of use (before generating) but does not explicitly state when not to use or mention alternatives.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

download_asset下载任务产物到本地A

把任务产物或任意 URL 下载到本地磁盘(视频等大文件的显式落盘手段)。传 task_id 时下载其成功结果里的全部 url;或直接传 url。产物 URL 24 小时失效,请及时下载。

ParametersJSON Schema
NameRequiredDescriptionDefault
urlNo直接下载的 URL(与 task_id 二选一)
task_idNo要下载其结果的 task_id(下载全部结果 url)
save_dirNo保存目录(默认当前工作目录);文件名从 URL 推断
save_pathNo单文件完整保存路径(仅 url 模式或单结果时生效,优先于 save_dir)

TDQS

A4.3/5.0
Behavior4/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

No annotations are provided, so the description carries the full burden. It discloses that the tool downloads and saves files locally, that URLs expire, and the parameter behaviors. It does not mention permissions or side effects beyond saving, but for a download tool this is sufficient.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is concise, consisting of two sentences that front-load the main purpose. Every sentence adds essential information without redundancy.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given no output schema, the description does not explain return values (e.g., saved file path or success status). While the tool's behavior is mostly clear, the lack of return value information is a gap for an otherwise complete description.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is 100% with parameter descriptions. The description adds context beyond the schema: it explains the relationship between task_id and url (mutually exclusive), the purpose of saving large files, and the URL expiry. This adds meaningful value.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the tool's purpose: downloading task assets or arbitrary URLs to local disk. It specifies the two modes (by task_id or direct URL) and highlights that it's for explicit persistence of large files like videos.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description explains when to use each parameter (task_id vs url) and notes the 24-hour URL expiry. While it doesn't explicitly mention when not to use the tool, the sibling tools are distinct and do not offer download functionality, so the guidance is adequate.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

generate_audio生成音频A

提交音频任务:TTS/音乐/语音识别/语音克隆(Suno 自动走专用端点)。 先用 describe_model 确认该 model 的参数。默认等待 60s:短任务直接返回结果 URL;长任务超时返回 task_id,用 get_task 继续查询。

ParametersJSON Schema
NameRequiredDescriptionDefault
modelYes模型 id
paramsYes请求参数对象(不含 model),如 {prompt, aspect_ratio, ...},见 describe_model
inline_imageNo图像成功时是否内联回传图片(默认 true,仅 generate_image 生效;大图自动降级为纯 URL)
wait_secondsNo最长等待秒数,默认 60,设 0 立即返回 task_id

TDQS

A4/5.0
Behavior3/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations, the description carries full burden. It explains synchronous/asynchronous behavior and the need to consult describe_model. However, it does not disclose auth requirements, rate limits, or what the returned URL/task_id contain. The inline_image parameter description is irrelevant for audio and may confuse.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness3/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is compact but includes an irrelevant detail about inline_image only applying to generate_image, which is noise for this tool. The structure is mostly front-loaded but could be streamlined.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Covers the main workflow (submit, wait, fallback) and dependency on describe_model. Lacks details on return format (URL or task_id contents) and potential limitations like credit costs. Without output schema, more detail would improve completeness.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is 100%, but the description adds value: it explains the params object structure (e.g., {prompt, aspect_ratio}) and refers to describe_model for details, clarifies wait_seconds=0 behavior, and explains inline_image only applicable to generate_image. This goes beyond the schema.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states it submits audio tasks (TTS, music, voice recognition, voice cloning) and mentions a dedicated endpoint for Suno. It distinguishes from sibling tools that handle other media types.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Explicit guidance includes using describe_model first, default 60s wait, short tasks returning URL directly, long tasks returning task_id with get_task, and setting wait_seconds=0 for immediate task_id. It does not explicitly state when not to use, but context implies audio-only tasks.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

generate_document文档转换A

提交文档处理任务(如 Doc2X:PDF→md/tex/docx)。 先用 describe_model 确认该 model 的参数。默认等待 60s:短任务直接返回结果 URL;长任务超时返回 task_id,用 get_task 继续查询。

ParametersJSON Schema
NameRequiredDescriptionDefault
modelYes模型 id
paramsYes请求参数对象(不含 model),如 {prompt, aspect_ratio, ...},见 describe_model
inline_imageNo图像成功时是否内联回传图片(默认 true,仅 generate_image 生效;大图自动降级为纯 URL)
wait_secondsNo最长等待秒数,默认 60,设 0 立即返回 task_id

TDQS

A4.2/5.0
Behavior3/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

No annotations provided, so description must disclose behavior. It covers async execution and timeout behavior, but includes the 'inline_image' parameter with a note that it only applies to generate_image, which is confusing for this document tool. Does not mention failure handling or credential needs.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Two concise sentences that front-load the purpose and immediately provide actionable guidance. No wasted words.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given no output schema, the description explains return values (URL or task_id) and workflow. However, it does not address errors or credits, and the inline_image parameter seems out of place. Still, the core async behavior is well-covered.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is 100% with descriptions for all 4 parameters. The description adds context about using describe_model for params and explains wait_seconds, but the inline_image parameter's note is misleading. Overall, marginal value added beyond schema.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the tool submits document processing tasks (PDF to md/tex/docx) with a specific verb '提交' and resource '文档处理任务'. It distinguishes from sibling tools like generate_audio, generate_image, etc., by focusing on document conversion.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines5/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Explicit guidance: use describe_model first to confirm parameters, default wait 60s, short tasks return URL, long tasks return task_id for get_task. It also explains wait_seconds behavior and mentions get_task as a follow-up.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

generate_image生成图像A

提交图像生成/编辑任务。 先用 describe_model 确认该 model 的参数。默认等待 60s:短任务直接返回结果 URL;长任务超时返回 task_id,用 get_task 继续查询。

ParametersJSON Schema
NameRequiredDescriptionDefault
modelYes模型 id
paramsYes请求参数对象(不含 model),如 {prompt, aspect_ratio, ...},见 describe_model
inline_imageNo图像成功时是否内联回传图片(默认 true,仅 generate_image 生效;大图自动降级为纯 URL)
wait_secondsNo最长等待秒数,默认 60,设 0 立即返回 task_id

TDQS

A4.2/5.0
Behavior4/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations, the description bears full burden. It discloses core behavior: submitting a task, waiting up to 60s, short tasks return URL, long tasks return task_id. It also explains the inline_image parameter behavior and the effect of wait_seconds. Minor omission: no mention of error handling or cost implications, but sufficient.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is concise: three sentences, front-loaded with purpose, then prerequisite, then behavior. No redundancy or unnecessary information. Every sentence earns its place.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given no output schema and 4 parameters with nested objects, the description explains async behavior, prerequisites, and follow-up (get_task). It covers the return values (URL or task_id) adequately. Could mention URL expiry, but not essential. Complete enough for common use.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 100%, so baseline is 3. The description reinforces the guidance to use describe_model for params format, but does not add significant new meaning beyond the schema. The schema already describes each parameter adequately.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states '提交图像生成/编辑任务' (submit image generation/editing task), specifying the verb (submit/generate/edit) and resource (image). It distinguishes from sibling tools like generate_audio and generate_video by focusing on images.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description advises to first use describe_model to confirm model parameters, and explains the default wait behavior with short vs long tasks, explicitly directing to use get_task for long tasks. It lacks explicit when-not-to-use but provides strong contextual guidance.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

generate_video生成视频A

提交视频生成任务(通常耗时较长)。 先用 describe_model 确认该 model 的参数。默认等待 60s:短任务直接返回结果 URL;长任务超时返回 task_id,用 get_task 继续查询。

ParametersJSON Schema
NameRequiredDescriptionDefault
modelYes模型 id
paramsYes请求参数对象(不含 model),如 {prompt, aspect_ratio, ...},见 describe_model
inline_imageNo图像成功时是否内联回传图片(默认 true,仅 generate_image 生效;大图自动降级为纯 URL)
wait_secondsNo最长等待秒数,默认 60,设 0 立即返回 task_id

TDQS

A3.8/5.0
Behavior4/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

No annotations are provided, so the description carries full burden. It discloses that the task is time-consuming, the default wait is 60s, short tasks return a URL, and long tasks return a task_id. This is good behavioral context, though it could further detail error handling or failure modes.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is two sentences, front-loaded with the main action, then efficient detail. Every sentence earns its place with no wasted words.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the complexity of a long-running generation task and no output schema, the description covers the essential workflow: prerequisite (describe_model), default wait, and fallback to get_task. It could mention error handling or output format more explicitly, but overall it is complete enough for an agent.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 100%, so parameters are fully documented there. The description adds workflow context (use describe_model for params, wait/retry behavior) but does not provide additional semantic details beyond the schema. Baseline 3 is appropriate.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states '提交视频生成任务' (submit a video generation task), a specific verb+resource. While it does not explicitly differentiate from sibling tools like generate_audio or generate_image, the tool name and title already do that. The description adds the long-running nature, enhancing clarity.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines3/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description advises using describe_model first to confirm parameters and mentions fallback to get_task on timeout. This provides sequential context but lacks explicit when-to-use versus alternatives or when not to use. Guidance is implied rather than explicit.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

get_credits查询额度与用量A

查询当前 API Key 的总额度、已用量与剩余额度。数据来自 New API 的计费端点。数值单位为站点展示单位(可能是美元/人民币/tokens,由站点配置决定),字段名沿用 OpenAI 惯例的 _usd 但不代表一定是美元。unlimited=true 表示该 Key 为无限额度。

ParametersJSON Schema
NameRequiredDescriptionDefault

No parameters

TDQS

A4.1/5.0
Behavior3/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

No annotations are present, so the description carries full burden. It discloses data source, unit meaning, and unlimited flag, but lacks explicit statements about read-only nature, authentication requirements, or side effects.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Four sentences are concise and front-loaded: main purpose first, then data source, unit clarification, and special case. Every sentence adds necessary context without redundancy.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness5/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given zero parameters and no output schema, the description fully covers what the tool returns, data origin, unit meaning, and the unlimited flag. No additional information is needed for correct invocation.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

No parameters exist in the schema, so description has no burden to explain parameters (baseline 4). The description adds value by explaining output semantics (total, used, remaining) and unit convention.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the tool queries an API key's total, used, and remaining credits, with specific data source (New API billing endpoint) and unit convention explanation. Distinguishes itself from unrelated sibling tools.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines3/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description implies usage for checking credits but does not provide explicit when-to-use or exclusionary context. No alternatives are needed as no sibling credit tools exist.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

get_task查询任务状态与结果A

查询异步任务。wait_seconds>0 时在服务端轮询(每 5s)直到完成或超时。完成后 results 内为结果(图/视频/音频为 {url},24 小时内有效,请尽快转存)。

ParametersJSON Schema
NameRequiredDescriptionDefault
task_idYes提交生成时返回的 task_id
inline_imageNo图像结果是否内联回传(默认 true)
wait_secondsNo最长等待秒数,默认 0(立即返回当前状态)
sync_upstreamNo是否在返回前主动向上游刷新一次状态

TDQS

A3.6/5.0
Behavior4/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

The description discloses polling behavior (every 5s) when wait_seconds>0, and notes that results contain temporary URLs valid for 24 hours. This adds useful behavioral context beyond a simple 'query' statement.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Two concise sentences with essential information front-loaded. No unnecessary words, every sentence adds value.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given full schema coverage and no output schema, the description adequately explains return format (URLs for media) and validity period. Missing error handling details but sufficient for a status check tool.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is 100%, so baseline is 3. The description adds overall behavioral context but does not provide additional parameter-specific semantics beyond what the schema already describes.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states '查询异步任务' (query async task), indicating the tool retrieves status and results. It is specific but does not differentiate from sibling 'wait_for_task', which may serve a similar purpose.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description explains behavior when wait_seconds>0 but provides no explicit guidance on when to use this tool versus alternatives like 'wait_for_task' or when not to use it.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

list_models列出可用生成模型A

列出 AihubMax 的媒体生成模型(图像/视频/音频/文档)。可按 media_type 或关键词过滤。available=true 表示当前 API Key 分组可直接调用;available=false 表示文档中存在但当前 Key 未开通。price 为定价摘要,group_ratios 给出各分组倍率(最终价=基准×倍率)。

ParametersJSON Schema
NameRequiredDescriptionDefault
keywordNo按模型名/标题关键词过滤,如 veo、kling、tts
media_typeNo按媒体类型过滤
available_onlyNo仅返回当前 Key 可调用的模型

TDQS

A4.1/5.0
Behavior4/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations provided, the description bears the full burden of behavioral disclosure. It explains the output fields 'available', 'price', and 'group_ratios' and their interpretations (e.g., 'available=true' means directly callable). This provides sufficient transparency for a read-only listing tool, though it omits details on pagination or error handling.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is a single, front-loaded paragraph that states the core function first. It is concise with no redundant sentences, but the explanations of 'available', 'price', and 'group_ratios' could be slightly more integrated. Overall, it is well-structured for quick comprehension.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the absence of an output schema, the description covers the key response fields (available, price, group_ratios) and filtering capabilities. It does not mention pagination or response format details, but for a listing tool with 3 optional parameters and simple logic, it provides adequate context for an agent to use it correctly.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Since schema coverage is 100%, the baseline is 3. The description adds minimal extra meaning beyond the schema: it repeats the filtering concept and explains 'available' (which is not a parameter). The keyword param's description in the schema is already clear, and the description does not provide new formatting or constraints.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states '列出可用生成模型' (list available generation models) and specifies the supported media types (图像/视频/音频/文档). It distinguishes itself from sibling generation tools like generate_image by focusing on discovery rather than creation, and explicitly mentions filtering by media_type or keyword, leaving no ambiguity about the tool's purpose.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description implies usage context by explaining the 'available' field's meaning (directly callable vs. not provisioned), which helps agents decide which model to use for generation tasks. However, it lacks explicit guidance on when to use this tool versus alternatives like analyze_media or get_task, and does not specify prerequisites or exclusions.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

upload_file上传文件获取可用 URLA

把本地文件或远程 URL 转存为 AihubMax 可直接引用的 URL(用于 image-to-video 等需要 image_urls/audio_url 的场景)。三选一:path(本地文件)、url(远程转存)、base64。返回的 url 可填入生成参数。

ParametersJSON Schema
NameRequiredDescriptionDefault
urlNo远程文件 URL(转存到 AihubMax)
pathNo本地文件绝对路径
base64NoBase64 或 data URL 文件内容
file_nameNo文件名(含扩展名),影响 MIME 推断

TDQS

A4/5.0
Behavior2/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

No annotations provided. Description does not disclose behavioral traits such as file size limits, authentication requirements, rate limits, or what happens with invalid files. It only states the input options and output, leaving significant gaps.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Extremely concise: two sentences that immediately convey purpose, usage context, and input options. Every sentence is meaningful and front-loaded.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a simple file upload tool with no required parameters, the description covers key aspects: purpose, input methods, and target usage. Lacks return structure details but still sufficient given low complexity.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is 100%. Description adds value by explaining the mutual exclusivity of path, url, base64 and that file_name influences MIME inference, which goes beyond schema descriptions.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

Description clearly states the tool's verb (upload/转存), resource (local file or remote URL), and output (AihubMax URL). It distinguishes from sibling tools like download_asset by specifying the direction and use in image/video generation.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Description specifies when to use: for scenarios needing image_urls/audio_url in AihubMax. It lists three input methods (path, url, base64) but does not explicitly state when not to use or mention alternatives. Still clear context.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

wait_for_task阻塞等待任务完成A

阻塞等待某个异步任务直到完成/失败或达到单次等待上限。等待期间向支持的客户端发送 MCP 进度通知。达到 timeout_seconds 仍未完成则返回 still-running(含最新状态),可再次调用续等。适合长任务(视频等)。

ParametersJSON Schema
NameRequiredDescriptionDefault
task_idYes要等待的 task_id
inline_imageNo图像结果是否内联回传(默认 true)
sync_upstreamNo每次轮询是否主动刷新上游状态
timeout_secondsNo单次等待上限秒数,默认 300

TDQS

A4/5.0
Behavior4/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

Discloses blocking behavior, MCP progress notifications, timeout returns still-running with latest status, ability to re-call. No annotations provided, so description carries burden well.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Concise, front-loaded with purpose, then mechanism, then use case. No extraneous content.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Describes timeout return behavior, but does not explicitly mention success/failure return details. No output schema, so some gaps remain.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema covers 100% of parameters with descriptions. Description adds overall behavioral context (timeout meaning) but per-parameter detail is already in schema.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

Description states it blocks waiting for async task completion/failure/timeout. Clear verb+resource, but no explicit differentiation from sibling tool 'get_task'.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Mentions suitability for long tasks (video), and explains timeout behavior and re-callability. Does not explicitly state when not to use.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

TDQS

A4.1/5.0
Disambiguation5/5

Every tool has a clearly distinct purpose. Generation tools are separated by media type (audio, document, image, video), analysis is separate, task management tools differentiate polling (get_task) from blocking (wait_for_task), and other utilities (embeddings, credits, file upload, model listing) are unique.

Naming Consistency5/5

All tools follow a consistent verb_noun snake_case pattern: analyze_media, ask_model, create_embeddings, etc. No mixed conventions or abbreviations.

Tool Count5/5

14 tools is an appropriate count for a multimodal AI hub. It covers key functionalities without being bloated or sparse.

Completeness5/5

The tool set is comprehensive: media analysis, model querying, embeddings, generation (audio, document, image, video), file upload/download, task management, credits, and model discovery. No obvious gaps for the intended domain.

Maintenance

ActivityMaintained
ResponsivenessSyncing

Resources

Unclaimed servers have limited discoverability.

Looking for Admin?

If you are the server author, to access and configure the admin panel.

Related MCP Connectors

Related MCP Servers

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/cookaihq/aihub-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server