# MHOO API 开发者文档 ## Docs - [API 快速开始](https://mhoo-api.apifox.cn/9233533m0.md): - [令牌与鉴权](https://mhoo-api.apifox.cn/9233534m0.md): - [gpt-image-2 绘图与计费](https://mhoo-api.apifox.cn/9233535m0.md): - [SDK 与客户端配置](https://mhoo-api.apifox.cn/9233536m0.md): - [错误码与排查](https://mhoo-api.apifox.cn/9233537m0.md): ## API Docs - 01 · 开始使用 [获取令牌可用模型](https://mhoo-api.apifox.cn/492477325e0.md): 返回当前 API Key 所属分组可使用的模型。不同令牌看到的模型可能不同,不要把定价页中出现的名称直接当作可调用模型。 - 01 · 开始使用 [Gemini 格式获取](https://mhoo-api.apifox.cn/492477326e0.md): 以 Gemini API 格式返回可用模型列表 - 02 · OpenAI Chat [创建聊天补全](https://mhoo-api.apifox.cn/492477327e0.md): 兼容 OpenAI Chat Completions。`stream=true` 时返回 `text/event-stream`,客户端应逐行处理 `data:` 事件并在 `[DONE]` 后结束。模型名称必须来自 `GET /v1/models`。 - 03 · OpenAI Responses [创建 Responses 响应](https://mhoo-api.apifox.cn/492477328e0.md): 兼容 OpenAI Responses API。适用于支持该协议的模型;模型名称必须来自当前令牌的模型列表。 - 03 · OpenAI Responses [压缩对话 (OpenAI Responses API)](https://mhoo-api.apifox.cn/492477329e0.md): OpenAI Responses API,用于对长对话进行 compaction。 - 04 · 图像生成 [生成图片(gpt-image-2)](https://mhoo-api.apifox.cn/492477330e0.md): 通过 OpenAI 兼容格式生成图片。当前公开定价:1K ¥0.03/张、2K ¥0.06/张、4K ¥0.08/张。 - 04 · 图像生成 [编辑图片](https://mhoo-api.apifox.cn/492477331e0.md): 使用 `multipart/form-data` 上传原图并描述修改目标。是否支持蒙版、透明背景和具体尺寸取决于所选模型。 - 05 · 视频生成 [创建视频 ](https://mhoo-api.apifox.cn/492477332e0.md): OpenAI 兼容的视频生成接口。 - 05 · 视频生成 [获取视频任务状态 ](https://mhoo-api.apifox.cn/492477333e0.md): OpenAI 兼容的视频任务状态查询接口。 - 05 · 视频生成 [获取视频内容](https://mhoo-api.apifox.cn/492477334e0.md): 获取已完成视频任务的视频文件内容。 - 05 · 视频生成 [Kling 文生视频](https://mhoo-api.apifox.cn/492477335e0.md): 使用 Kling 模型从文本描述生成视频。 - 05 · 视频生成 [获取 Kling 文生视频任务状态](https://mhoo-api.apifox.cn/492477336e0.md): 查询 Kling 文生视频任务的状态和结果。 - 05 · 视频生成 [Kling 图生视频](https://mhoo-api.apifox.cn/492477337e0.md): 使用 Kling 模型从图片生成视频。 - 05 · 视频生成 [获取 Kling 图生视频任务状态](https://mhoo-api.apifox.cn/492477338e0.md): 查询 Kling 图生视频任务的状态和结果。 - 05 · 视频生成 [即梦视频生成](https://mhoo-api.apifox.cn/492477339e0.md): 即梦官方 API 格式的视频生成接口。 - 05 · 视频生成 [创建视频生成任务](https://mhoo-api.apifox.cn/492477340e0.md): 提交视频生成任务,支持文生视频和图生视频。 - 05 · 视频生成 [获取视频生成任务状态](https://mhoo-api.apifox.cn/492477341e0.md): 查询视频生成任务的状态和结果。 - 06 · Claude Messages [Claude 聊天](https://mhoo-api.apifox.cn/492477342e0.md): Anthropic Claude Messages API 格式的请求。 - 07 · Gemini 原生 [Gemini 图片(Nano Banana)](https://mhoo-api.apifox.cn/492477343e0.md): Gemini 图片生成 - 07 · Gemini 原生 [Gemini 嵌入(Embeddings)](https://mhoo-api.apifox.cn/492477344e0.md): 使用指定引擎/模型创建嵌入 - 08 · 向量与重排 [创建文本嵌入](https://mhoo-api.apifox.cn/492477345e0.md): 将文本转换为向量嵌入 - 08 · 向量与重排 [文档重排序](https://mhoo-api.apifox.cn/492477346e0.md): 根据查询对文档列表进行相关性重排序 - 09 · 音频 [音频转录](https://mhoo-api.apifox.cn/492477347e0.md): 将音频转换为文本 - 09 · 音频 [音频翻译](https://mhoo-api.apifox.cn/492477348e0.md): 将音频翻译为英文文本 - 09 · 音频 [文本转语音](https://mhoo-api.apifox.cn/492477349e0.md): 将文本转换为音频 - 10 · 其他兼容接口 [创建文本补全](https://mhoo-api.apifox.cn/492477350e0.md): 基于给定提示创建文本补全 - 10 · 其他兼容接口 [内容审核](https://mhoo-api.apifox.cn/492477351e0.md): 检查文本内容是否违反使用政策 - 10 · 其他兼容接口 [实时 WebSocket 连接](https://mhoo-api.apifox.cn/492477352e0.md): 建立 WebSocket 连接用于实时对话。 ## Schemas - [ModelsResponse](https://mhoo-api.apifox.cn/298189564d0.md): - [Model](https://mhoo-api.apifox.cn/298189565d0.md): - [ErrorResponse](https://mhoo-api.apifox.cn/298189566d0.md): - [GeminiModelsResponse](https://mhoo-api.apifox.cn/298189567d0.md): - [ChatCompletionRequest](https://mhoo-api.apifox.cn/298189568d0.md): - [Message](https://mhoo-api.apifox.cn/298189569d0.md): - [MessageContent](https://mhoo-api.apifox.cn/298189570d0.md): - [ToolCall](https://mhoo-api.apifox.cn/298189571d0.md): - [Tool](https://mhoo-api.apifox.cn/298189572d0.md): - [ResponseFormat](https://mhoo-api.apifox.cn/298189573d0.md): - [ChatCompletionResponse](https://mhoo-api.apifox.cn/298189574d0.md): - [Usage](https://mhoo-api.apifox.cn/298189575d0.md): - [ResponsesRequest](https://mhoo-api.apifox.cn/298189576d0.md): - [ResponsesResponse](https://mhoo-api.apifox.cn/298189577d0.md): - [ResponsesCompactionRequest](https://mhoo-api.apifox.cn/298189578d0.md): - [ResponsesCompactionResponse](https://mhoo-api.apifox.cn/298189579d0.md): - [ImageGenerationRequest](https://mhoo-api.apifox.cn/298189580d0.md): - [ImageResponse](https://mhoo-api.apifox.cn/298189581d0.md): - [OpenAIVideoError](https://mhoo-api.apifox.cn/298189582d0.md): - [VideoRequest](https://mhoo-api.apifox.cn/298189583d0.md): - [VideoResponse](https://mhoo-api.apifox.cn/298189584d0.md): - [VideoTaskResponse](https://mhoo-api.apifox.cn/298189585d0.md): - [VideoTaskMetadata](https://mhoo-api.apifox.cn/298189586d0.md): - [VideoTaskError](https://mhoo-api.apifox.cn/298189587d0.md): - [ClaudeRequest](https://mhoo-api.apifox.cn/298189588d0.md): - [ClaudeMessage](https://mhoo-api.apifox.cn/298189589d0.md): - [ClaudeResponse](https://mhoo-api.apifox.cn/298189590d0.md): - [GeminiResponse](https://mhoo-api.apifox.cn/298189591d0.md): - [EmbeddingRequest](https://mhoo-api.apifox.cn/298189592d0.md): - [EmbeddingResponse](https://mhoo-api.apifox.cn/298189593d0.md): - [CompletionRequest](https://mhoo-api.apifox.cn/298189594d0.md): - [CompletionResponse](https://mhoo-api.apifox.cn/298189595d0.md): - [AudioTranscriptionResponse](https://mhoo-api.apifox.cn/298189596d0.md): - [SpeechRequest](https://mhoo-api.apifox.cn/298189597d0.md): - [RerankRequest](https://mhoo-api.apifox.cn/298189598d0.md): - [RerankResponse](https://mhoo-api.apifox.cn/298189599d0.md): - [ModerationRequest](https://mhoo-api.apifox.cn/298189600d0.md): - [ModerationResponse](https://mhoo-api.apifox.cn/298189601d0.md):