{"id":20523095,"url":"https://github.com/LLM-Red-Team/minimax-free-api","last_synced_at":"2025-09-18T22:33:34.816Z","repository":{"id":237968134,"uuid":"794033193","full_name":"LLM-Red-Team/minimax-free-api","owner":"LLM-Red-Team","description":"🚀 MiniMax大模型海螺AI逆向API【特长：超自然语音】，支持MiniMax Text-01、MiniMax-VL-01模型，支持高速流式输出、语音合成、联网搜索、长文档解读、图像解析、多轮对话，零配置部署，多路token支持，自动清理会话痕迹，仅供测试，如需商用请前往官方开放平台。","archived":false,"fork":false,"pushed_at":"2025-01-25T03:31:18.000Z","size":1888,"stargazers_count":314,"open_issues_count":5,"forks_count":89,"subscribers_count":5,"default_branch":"master","last_synced_at":"2025-05-23T18:13:45.179Z","etag":null,"topics":["chat-api","chatbot","chatgpt-api","hailuoai","hailuoai-api","llm","minimax","minimax-text-01","minimax-vl-01"],"latest_commit_sha":null,"homepage":"https://platform.minimaxi.com","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/LLM-Red-Team.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2024-04-30T10:28:04.000Z","updated_at":"2025-05-23T13:02:40.000Z","dependencies_parsed_at":"2024-08-09T07:32:13.059Z","dependency_job_id":"4b08c0c4-5db4-48d2-aad1-5bb97a4e118c","html_url":"https://github.com/LLM-Red-Team/minimax-free-api","commit_stats":null,"previous_names":["llm-red-team/hailuo-free-api","llm-red-team/minimax-free-api"],"tags_count":18,"template":false,"template_full_name":null,"purl":"pkg:github/LLM-Red-Team/minimax-free-api","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/LLM-Red-Team%2Fminimax-free-api","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/LLM-Red-Team%2Fminimax-free-api/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/LLM-Red-Team%2Fminimax-free-api/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/LLM-Red-Team%2Fminimax-free-api/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/LLM-Red-Team","download_url":"https://codeload.github.com/LLM-Red-Team/minimax-free-api/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/LLM-Red-Team%2Fminimax-free-api/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":275844446,"owners_count":25538991,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-09-18T02:00:09.552Z","response_time":77,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["chat-api","chatbot","chatgpt-api","hailuoai","hailuoai-api","llm","minimax","minimax-text-01","minimax-vl-01"],"created_at":"2024-11-15T22:37:55.775Z","updated_at":"2025-09-18T22:33:34.795Z","avatar_url":"https://github.com/LLM-Red-Team.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# MiniMax Hailuo AI Free 服务\n\n[![](https://img.shields.io/github/license/llm-red-team/minimax-free-api.svg)](LICENSE)\n![](https://img.shields.io/github/stars/llm-red-team/minimax-free-api.svg)\n![](https://img.shields.io/github/forks/llm-red-team/minimax-free-api.svg)\n![](https://img.shields.io/docker/pulls/vinlic/minimax-free-api.svg)\n\n支持最新MiniMax-Text-01、MiniMax-VL-01模型，支持高速流式输出、支持多轮对话、支持语音合成、语音识别、支持联网搜索、支持长文档解读、支持图像解析，零配置部署，多路token支持，自动清理会话痕迹。\n\n**注意，Docker镜像 vinlic/hailuo-free-api 已更名为 vinlic/minimax-free-api，旧镜像将不再继续维护！**\n\n与ChatGPT接口完全兼容。\n\n还有以下十个free-api欢迎关注：\n\nMoonshot AI（Kimi.ai）接口转API [kimi-free-api](https://github.com/LLM-Red-Team/kimi-free-api)\n\nZhipuAI (智谱清言) 接口转API [glm-free-api](https://github.com/LLM-Red-Team/glm-free-api)\n\n阶跃星辰 (跃问StepChat) 接口转API [step-free-api](https://github.com/LLM-Red-Team/step-free-api)\n\n阿里通义 (Qwen) 接口转API [qwen-free-api](https://github.com/LLM-Red-Team/qwen-free-api)\n\n秘塔AI (Metaso) 接口转API [metaso-free-api](https://github.com/LLM-Red-Team/metaso-free-api)\n\n字节跳动（豆包）接口转API [doubao-free-api](https://github.com/LLM-Red-Team/doubao-free-api)\n\n字节跳动（即梦AI）接口转API [jimeng-free-api](https://github.com/LLM-Red-Team/jimeng-free-api)\n\n讯飞星火（Spark）接口转API [spark-free-api](https://github.com/LLM-Red-Team/spark-free-api)\n\n深度求索（DeepSeek）接口转API [deepseek-free-api](https://github.com/LLM-Red-Team/deepseek-free-api)\n\n聆心智能 (Emohaa) 接口转API [emohaa-free-api](https://github.com/LLM-Red-Team/emohaa-free-api)\n\n## 目录\n\n- [MiniMax Hailuo AI Free 服务](#minimax-hailuo-ai-free-服务)\n  - [目录](#目录)\n  - [免责声明](#免责声明)\n  - [效果示例](#效果示例)\n    - [验明正身Demo](#验明正身demo)\n    - [语音合成Demo](#语音合成demo)\n    - [语音识别Demo](#语音识别demo)\n    - [多轮对话Demo](#多轮对话demo)\n    - [联网搜索Demo](#联网搜索demo)\n    - [长文档解读Demo](#长文档解读demo)\n    - [图像解析Demo](#图像解析demo)\n  - [接入准备](#接入准备)\n    - [多账号接入](#多账号接入)\n  - [Docker部署](#docker部署)\n    - [Docker-compose部署](#docker-compose部署)\n    - [Render部署](#render部署)\n    - [Vercel部署](#vercel部署)\n  - [原生部署](#原生部署)\n  - [推荐使用客户端](#推荐使用客户端)\n  - [接口列表](#接口列表)\n    - [对话补全](#对话补全)\n    - [创建语音](#创建语音)\n      - [官方发音人](#官方发音人)\n      - [克隆发音人](#克隆发音人)\n      - [自定义发音人映射](#自定义发音人映射)\n    - [创建转录](#创建转录)\n    - [文档解读](#文档解读)\n    - [图像解析](#图像解析)\n    - [\\_token存活检测](#_token存活检测)\n  - [注意事项](#注意事项)\n    - [Nginx反代优化](#nginx反代优化)\n    - [Token统计](#token统计)\n  - [Star History](#star-history)\n  \n## 免责声明\n\n**逆向API是不稳定的，建议前往MiniMax官方 https://www.minimaxi.com/platform 付费使用API，避免封禁的风险。**\n\n**本组织和个人不接受任何资金捐助和交易，此项目是纯粹研究交流学习性质！**\n\n**仅限自用，禁止对外提供服务或商用，避免对官方造成服务压力，否则风险自担！**\n\n**仅限自用，禁止对外提供服务或商用，避免对官方造成服务压力，否则风险自担！**\n\n**仅限自用，禁止对外提供服务或商用，避免对官方造成服务压力，否则风险自担！**\n\n## 效果示例\n\n### 验明正身Demo\n\n![验明正身](./doc/example-1.png)\n\n### 语音合成Demo\n\n语音合成就是创建语音\n\n![语音合成](./doc/example-2.png)\n\n### 语音识别Demo\n\n语音识别就是创建转录\n\n![语音识别](./doc/example-7.png)\n\n### 多轮对话Demo\n\n![多轮对话](./doc/example-3.png)\n\n### 联网搜索Demo\n\n![联网搜索](./doc/example-4.png)\n\n### 长文档解读Demo\n\n![长文档解读](./doc/example-5.png)\n\n### 图像解析Demo\n\n![图像解析](./doc/example-6.png)\n\n## 接入准备\n\n从 [海螺AI](https://hailuoai.com/) 获取token\n\n进入海螺AI随便发起一个对话，然后F12打开开发者工具，从Application \u003e LocalStorage中找到`_token`的值，这将作为Authorization的Bearer Token值：`Authorization: Bearer TOKEN`\n\n![获取_token](./doc/example-0.png)\n\n### 多账号接入\n\n目前似乎限制同个账号同时只能有*一路*输出，你可以通过提供多个账号的_token并使用`,`拼接提供：\n\n`Authorization: Bearer TOKEN1,TOKEN2,TOKEN3`\n\n每次请求服务会从中挑选一个。\n\n## Docker部署\n\n请准备一台具有公网IP的服务器并将8000端口开放。\n\n拉取镜像并启动服务\n\n```shell\ndocker run -it -d --init --name minimax-free-api -p 8000:8000 -e TZ=Asia/Shanghai vinlic/minimax-free-api:latest\n```\n\n查看服务实时日志\n\n```shell\ndocker logs -f minimax-free-api\n```\n\n重启服务\n\n```shell\ndocker restart minimax-free-api\n```\n\n停止服务\n\n```shell\ndocker stop minimax-free-api\n```\n\n### Docker-compose部署\n\n```yaml\nversion: '3'\n\nservices:\n  minimax-free-api:\n    container_name: minimax-free-api\n    image: vinlic/minimax-free-api:latest\n    restart: always\n    ports:\n      - \"8000:8000\"\n    environment:\n      - TZ=Asia/Shanghai\n```\n\n### Render部署\n\n**注意：部分部署区域可能无法连接hailuo，如容器日志出现请求超时或无法连接，请切换其他区域部署！**\n**注意：免费账户的容器实例将在一段时间不活动时自动停止运行，这会导致下次请求时遇到50秒或更长的延迟，建议查看[Render容器保活](https://github.com/LLM-Red-Team/free-api-hub/#Render%E5%AE%B9%E5%99%A8%E4%BF%9D%E6%B4%BB)**\n\n1. fork本项目到你的github账号下。\n\n2. 访问 [Render](https://dashboard.render.com/) 并登录你的github账号。\n\n3. 构建你的 Web Service（New+ -\u003e Build and deploy from a Git repository -\u003e Connect你fork的项目 -\u003e 选择部署区域 -\u003e 选择实例类型为Free -\u003e Create Web Service）。\n\n4. 等待构建完成后，复制分配的域名并拼接URL访问即可。\n\n### Vercel部署\n\n**注意：Vercel免费账户的请求响应超时时间为10秒，但接口响应通常较久，可能会遇到Vercel返回的504超时错误！**\n\n请先确保安装了Node.js环境。\n\n```shell\nnpm i -g vercel --registry http://registry.npmmirror.com\nvercel login\ngit clone https://github.com/LLM-Red-Team/minimax-free-api\ncd minimax-free-api\nvercel --prod\n```\n\n## 原生部署\n\n请准备一台具有公网IP的服务器并将8000端口开放。\n\n请先安装好Node.js环境并且配置好环境变量，确认node命令可用。\n\n安装依赖\n\n```shell\nnpm i\n```\n\n安装PM2进行进程守护\n\n```shell\nnpm i -g pm2\n```\n\n编译构建，看到dist目录就是构建完成\n\n```shell\nnpm run build\n```\n\n启动服务\n\n```shell\npm2 start dist/index.js --name \"minimax-free-api\"\n```\n\n查看服务实时日志\n\n```shell\npm2 logs minimax-free-api\n```\n\n重启服务\n\n```shell\npm2 reload minimax-free-api\n```\n\n停止服务\n\n```shell\npm2 stop minimax-free-api\n```\n\n## 推荐使用客户端\n\n使用以下二次开发客户端接入free-api系列项目更快更简单，支持文档/图像上传！\n\n由 [Clivia](https://github.com/Yanyutin753/lobe-chat) 二次开发的LobeChat [https://github.com/Yanyutin753/lobe-chat](https://github.com/Yanyutin753/lobe-chat)\n\n由 [时光@](https://github.com/SuYxh) 二次开发的ChatGPT Web [https://github.com/SuYxh/chatgpt-web-sea](https://github.com/SuYxh/chatgpt-web-sea)\n\n## 接口列表\n\n目前支持与openai兼容的 `/v1/chat/completions` 接口，可自行使用与openai或其他兼容的客户端接入接口，或者使用 [dify](https://dify.ai/) 等线上服务接入使用。\n\n### 对话补全\n\n对话补全接口，与openai的 [chat-completions-api](https://platform.openai.com/docs/guides/text-generation/chat-completions-api) 兼容。\n\n**POST /v1/chat/completions**\n\nheader 需要设置 Authorization 头部：\n\n```\nAuthorization: Bearer [_token]\n```\n\n请求数据：\n```json\n{\n    // model模型名称可以乱填\n    \"model\": \"hailuo\",\n    \"messages\": [\n        {\n            \"role\": \"user\",\n            \"content\": \"你是谁？\"\n        }\n    ],\n    // 如果使用SSE流请设置为true，默认false\n    \"stream\": false\n}\n```\n\n响应数据：\n```json\n{\n    \"id\": \"242830597915504644\",\n    \"model\": \"hailuo\",\n    \"object\": \"chat.completion\",\n    \"choices\": [\n        {\n            \"index\": 0,\n            \"message\": {\n                \"role\": \"assistant\",\n                \"content\": \"我是海螺AI，由上海稀宇科技有限公司（MiniMax）自主研发的AI助理。我可以帮助你回答各种问题，提供信息查询、生活建议、学习辅导等服务。如果你有任何问题，随时可以向我提问。\"\n            },\n            \"finish_reason\": \"stop\"\n        }\n    ],\n    \"usage\": {\n        \"prompt_tokens\": 1,\n        \"completion_tokens\": 1,\n        \"total_tokens\": 2\n    },\n    \"created\": 1714751470\n}\n```\n\n### 创建语音\n\n创建语音接口，与openai的 [audio-create-speech-api](https://platform.openai.com/docs/api-reference/audio/createSpeech) 兼容，只支持mp3格式输出。\n\n#### 官方发音人\n\n```\nmale-botong 思远 [兼容 tts-1 alloy]\nPodcast_girl 心悦 [兼容 tts-1 echo]\nboyan_new_hailuo 子轩 [兼容 tts-1 fable]\nfemale-shaonv 灵儿 [兼容 tts-1 onyx]\nYaeMiko_hailuo 语嫣 [兼容 tts-1 nova]\nxiaoyi_mix_hailuo 少泽 [兼容 tts-1 shimmer]\nxiaomo_sft 芷溪 [兼容 tts-1-hd alloy]\ncove_test2_hailuo 浩翔（英文）\nscarlett_hailuo 雅涵（英文）\nLeishen2_hailuo 模仿雷电将军 [兼容 tts-1-hd echo]\nZhongli_hailuo 模仿钟离 [兼容 tts-1-hd fable]\nPaimeng_hailuo 模仿派蒙 [兼容 tts-1-hd onyx]\nkeli_hailuo 模仿可莉 [兼容 tts-1-hd nova]\nHutao_hailuo 模仿胡桃 [兼容 tts-1-hd shimmer]\nXionger_hailuo 模仿熊二\nHaimian_hailuo 模仿海绵宝宝\nRobot_hunter_hailuo 模仿变形金刚\nLinzhiling_hailuo 小玲玲\nhuafei_hailuo 拽妃\nlingfeng_hailuo 东北er\nmale_dongbei_hailuo 老铁\nBeijing_hailuo 北京er\nJayChou_hailuo JayJay\nDaniel_hailuo 潇然\nBingjiao_zongcai_hailuo 沉韵\nfemale-yaoyao-hd 瑶瑶\nmurong_sft 晨曦\nshangshen_sft 沐珊\nkongchen_sft 祁辰\nshenteng2_hailuo 夏洛特\nGuodegang_hailuo 郭嘚嘚\nyueyue_hailuo 小月月\n```\n\n#### 克隆发音人\n\n从F12 Network中寻找robot_custom_config请求响应data.formInfo.userVoiceList自己的克隆音色ID，格式为`puv_******************`。\n\n#### 自定义发音人映射\n\n请在docker启动或系统中配置 `REPLACE_AUDIO_MODEL` 环境变量用于映射自定义发音人到openai的发音人模型，每个发音人使用`,`逗号隔开。\n\n映射的顺序为：alloy,echo,fable,onyx,nova,shimmer，目前可以定义6个映射。\n\n映射示例：\n\nPodcast_girl -\u003e alloy\n\nyueyue_hailuo -\u003e echo\n\nkeli_hailuo -\u003e fable\n\n以上映射关系的环境配置如下所示：\n\n```\nREPLACE_AUDIO_MODEL=\"Podcast_girl,yueyue_hailuo,keli_hailuo\";\n```\n\n**POST /v1/audio/speech**\n\nheader 需要设置 Authorization 头部：\n\n```\nAuthorization: Bearer [_token]\n```\n\n请求数据：\n```json\n{\n    // model模型名称可以乱填\n    \"model\": \"hailuo\",\n    // 语音内容，尽量不要包含指令（否则可能导致模型回答你的问题）\n    \"input\": \"你在做什么？\",\n    // 发音人ID，可以使用官方或者自己克隆的音色\n    \"voice\": \"Podcast_girl\"\n}\n```\n\n响应数据：\n\naudio/mpeg 二进制数据流（mp3文件）\n\n### 创建转录\n\n创建转录接口，与openai的 [audio-create-transcription-api](https://platform.openai.com/docs/api-reference/audio/createTranscription) 兼容。\n\n**POST /v1/audio/transcriptions**\n\nheader 需要设置 Authorization 头部：\n\n```\nAuthorization: Bearer [_token]\n```\n\n请求数据（multipart/form-data）：\n```\nfile  要转录的音频文件对象(不是文件名)，格式为:wav、mp3、mpeg、mpga、m4a、ogg、flac。\nmodel  模型名称，可以乱填\nresponse_format  仅支持json或text\n```\n\n响应数据：\n```json\n{\n    \"text\": \"嗯，多年前呢我是个穷小子，我有一个喜欢的女孩，他有一双会说话的眼睛，他偏爱雏菊般的淡黄色。我我每天都骑自行车送他上下学专挑那个坑坑洼洼的路走。然后编的时候，我就能感觉到他用双手在后边用力的拽我的衣服，我好开心哪。然后回家以后，我才发现我唯一的一件衬衣变成了燕尾服。我每天中午会把我妈妈给我带的荷包蛋，我给她吃，他只吃蛋白，他把蛋蛋黄留给我，我我真的我好感动啊。呃，到后来我我知道呃，吃蛋黄反腹唇口，呃，我们同窗三年，我给他写了一百多封信，跟你联系我我我我我我每一封信我都换一个笔记，我怕他认出来，我那我很不好意思。所以说长此以往的练习，我在书法大赛获得了一等奖。直到有一天，他准备坐火车去省城上学的时候，我也没有把我自己的话跟他说出来。哎，我去那天也是像今天一样下着雨，他也带着那条漂亮的黄丝巾，我递给他一篮子鸡蛋，他没接，他反问我说有多少个鸡蛋，我说有一百个，他说他一天吃一个，一百天就吃完了再想吃，还有吗？这个其实我知道他懂我那句话，可是我当时就像被雷击中了一样无果果主人我什么话我都说不出来。当我缓过神儿来的时候，他已经上车了，车已经开了，车已经开出一段距离了。那个时候我只要大声的喊，他一定能够听到我张嘴了，没声儿。从那一刻起，我就生了病，预言是癌症，没当下雨或者是重要场合，我者无法说话。其实这么多年我一直想找一个机会，我希望他能够重新出现在我眼前。今天这个机会来了，此时此刻他就坐在离我三米半远的地方。我要把我二十年前要跟你说的话，大声的告诉你，哇，李丽，你你只要愿意跟我在一起鸡蛋，我给你带一辈子，有的是。\"\n}\n```\n\n### 文档解读\n\n提供一个可访问的文件URL或者BASE64_URL进行解析。\n\n**POST /v1/chat/completions**\n\nheader 需要设置 Authorization 头部：\n\n```\nAuthorization: Bearer [_token]\n```\n\n请求数据：\n```json\n{\n    // model模型名称可以乱填\n    \"model\": \"hailuo\",\n    \"messages\": [\n        {\n            \"role\": \"user\",\n            \"content\": [\n                {\n                    \"type\": \"file\",\n                    \"file_url\": {\n                        \"url\": \"https://mj101-1317487292.cos.ap-shanghai.myqcloud.com/ai/test.pdf\"\n                    }\n                },\n                {\n                    \"type\": \"text\",\n                    \"text\": \"文档里说了什么？\"\n                }\n            ]\n        }\n    ],\n    // 如果使用SSE流请设置为true，默认false\n    \"stream\": false\n}\n```\n\n响应数据：\n```json\n{\n    \"id\": \"242835041910616068\",\n    \"model\": \"hailuo\",\n    \"object\": \"chat.completion\",\n    \"choices\": [\n        {\n            \"index\": 0,\n            \"message\": {\n                \"role\": \"assistant\",\n                \"content\": \"文档中包含了一系列的古代魔法仪式和咒语，这些内容似乎源自古希腊罗马时期的魔法文献，如《希腊魔法纸莎草纸》（PGM，全称为Papyri Graecae Magicae）。以下是每个文档内容的简要概述：\\n\\n1. 文档1中描述了一个仪式，其中包括将面包分成七小块，然后在那些被暴力杀害的地方留下这些面包块，并念诵一段咒语。这个仪式的目的是为了吸引一个特定女性的注意，让她对施法者产生强烈的感情和欲望。\\n\\n2. 文档2中包含了一个咒语，要求一个名为Didymos的施法者召唤一个名为Tereous的女性，通过念诵一系列的魔法名字和咒语，使她感到痛苦和渴望，直到她来到施法者身边。\\n\\n3. 文档3中提供了一个简单的仪式，施法者需要保持三天的纯洁，并献上乳香作为祭品，念诵一个特定的名字（NEPHERIRI），以此来吸引一个美丽的女性。\\n\\n4. 文档4中描述了一个使用没药的仪式，施法者在献上没药的同时念诵一段咒语，目的是让一个特定的女性对施法者产生强烈的爱慕之情，即使她正在做其他事情，也会被这种强烈的感情所占据。\\n\\n这些文档内容反映了古代人们对于魔法和咒语的信仰，以及他们试图通过这些仪式来影响他人情感和行为的愿望。需要注意的是，这些内容仅供学术研究和了解历史之用，现代社会中不应使用这些仪式或咒语来干预他人的自由意志。\"\n            },\n            \"finish_reason\": \"stop\"\n        }\n    ],\n    \"usage\": {\n        \"prompt_tokens\": 1,\n        \"completion_tokens\": 1,\n        \"total_tokens\": 2\n    },\n    \"created\": 1714752530\n}\n```\n\n### 图像解析\n\n提供一个可访问的图像URL或者BASE64_URL进行解析。\n\n此格式兼容 [gpt-4-vision-preview](https://platform.openai.com/docs/guides/vision) API格式，您也可以用这个格式传送文档进行解析。\n\n**POST /v1/chat/completions**\n\nheader 需要设置 Authorization 头部：\n\n```\nAuthorization: Bearer [_token]\n```\n\n请求数据：\n```json\n{\n    \"model\": \"hailuo\",\n    \"messages\": [\n        {\n            \"role\": \"user\",\n            \"content\": [\n                {\n                    \"type\": \"image_url\",\n                    \"image_url\": {\n                        \"url\": \"https://ecmb.bdimg.com/tam-ogel/-1384175475_-1668929744_259_194.jpg\"\n                    }\n                },\n                {\n                    \"type\": \"text\",\n                    \"text\": \"图里是什么？\"\n                }\n            ]\n        }\n    ],\n    // 如果使用SSE流请设置为true，默认false\n    \"stream\": false\n}\n```\n\n响应数据：\n```json\n{\n    \"id\": \"242835404705341445\",\n    \"model\": \"hailuo\",\n    \"object\": \"chat.completion\",\n    \"choices\": [\n        {\n            \"index\": 0,\n            \"message\": {\n                \"role\": \"assistant\",\n                \"content\": \"图里是“海螺AI”的标识。\"\n            },\n            \"finish_reason\": \"stop\"\n        }\n    ],\n    \"usage\": {\n        \"prompt_tokens\": 1,\n        \"completion_tokens\": 1,\n        \"total_tokens\": 2\n    },\n    \"created\": 1714752616\n}\n```\n\n### _token存活检测\n\n检测_token是否存活，如果存活live未true，否则为false，请不要频繁（小于10分钟）调用此接口。\n\n**POST /token/check**\n\n请求数据：\n```json\n{\n    \"token\": \"eyJhbGciOiJIUzUxMiIsInR5cCI6IkpXVCJ9...\"\n}\n```\n\n响应数据：\n```json\n{\n    \"live\": true\n}\n```\n\n## 注意事项\n\n### Nginx反代优化\n\n如果您正在使用Nginx反向代理minimax-free-api，请添加以下配置项优化流的输出效果，优化体验感。\n\n```nginx\n# 关闭代理缓冲。当设置为off时，Nginx会立即将客户端请求发送到后端服务器，并立即将从后端服务器接收到的响应发送回客户端。\nproxy_buffering off;\n# 启用分块传输编码。分块传输编码允许服务器为动态生成的内容分块发送数据，而不需要预先知道内容的大小。\nchunked_transfer_encoding on;\n# 开启TCP_NOPUSH，这告诉Nginx在数据包发送到客户端之前，尽可能地发送数据。这通常在sendfile使用时配合使用，可以提高网络效率。\ntcp_nopush on;\n# 开启TCP_NODELAY，这告诉Nginx不延迟发送数据，立即发送小数据包。在某些情况下，这可以减少网络的延迟。\ntcp_nodelay on;\n# 设置保持连接的超时时间，这里设置为120秒。如果在这段时间内，客户端和服务器之间没有进一步的通信，连接将被关闭。\nkeepalive_timeout 120;\n```\n\n### Token统计\n\n由于推理侧不在minimax-free-api，因此token不可统计，将以固定数字返回。\n\n## Star History\n\n[![Star History Chart](https://api.star-history.com/svg?repos=LLM-Red-Team/minimax-free-api\u0026type=Date)](https://star-history.com/#LLM-Red-Team/minimax-free-api\u0026Date)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FLLM-Red-Team%2Fminimax-free-api","html_url":"https://awesome.ecosyste.ms/projects/github.com%2FLLM-Red-Team%2Fminimax-free-api","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FLLM-Red-Team%2Fminimax-free-api/lists"}