Supports high-speed streaming output, supports Secret Tower AI super network search (full network or academic, and three modes of concise, in-depth, and research), zero-configuration deployment, and multi-channel token support.
Fully compatible with ChatGPT interface.
There are also the following eight free-api welcome to pay attention to:
Moonshot AI (Kimi.ai) interface to API kimi-free-api
StepChat interface to API step-free-api
Zhipu AI (Zhipu Qingyan) interface to API glm-free-api
Alibaba Tongyi (Qwen) interface to API qwen-free-api
Iflytek Spark interface to API spark-free-api
MiniMax (Conch AI) interface to API hailuo-free-api
DeepSeek interface to API deepseek-free-api
Listening Intelligence (Emohaa) interface to API emohaa-free-api
The reverse API is unstable. It is recommended to use the official Metaso AI https://metaso.cn/ to avoid the risk of being banned.
This organization and individuals do not accept any financial donations or transactions. This project is purely for research, exchange and learning!
It is for personal use only, and it is prohibited to provide external services or commercial use to avoid putting pressure on the official service, otherwise it is at your own risk!
It is for personal use only, and it is prohibited to provide external services or commercial use to avoid putting pressure on the official service, otherwise it is at your own risk!
It is for personal use only, and it is prohibited to provide external services or commercial use to avoid putting pressure on the official service, otherwise it is at your own risk!
This link is only a temporary test function. If you encounter an exception, please try again later. It is recommended to deploy it yourself.
https://udify.app/chat/46rRHl5xoVa4m1lo
Get uid
and sid
from Secret Tower AI search and use -
:
Enter the Secret Tower AI search, log in to your account ( it is recommended to log in to your account, otherwise you may encounter strange restrictions ), then open the developer tools with F12 and find uid
and sid
values from Application > Cookies.
Splice uid and sid: uid-sid
, such as 65e91a6b2bac5b600dd8526a-5e7acc465b114236a8d9de26c9f41846
.
This will serve as the Bearer Token value for Authorization: Authorization: Bearer uid-sid
Note: It is currently suspected that Secret Tower has a limit on the total number of searches for IP addresses. It is recommended to join IP rotation.
You can provide the uid-sid of multiple accounts ,
use them together to provide:
Authorization: Bearer uid-sid1,uid-sid2,uid-sid3
One of these will be selected each time the service is requested.
Please prepare a server with a public IP and open port 8000.
Pull the image and start the service
docker run -it -d --init --name metaso-free-api -p 8000:8000 -e TZ=Asia/Shanghai vinlic/metaso-free-api:latest
View real-time service logs
docker logs -f metaso-free-api
Restart service
docker restart metaso-free-api
Stop service
docker stop metaso-free-api
version : ' 3 '
services :
metaso-free-api :
container_name : metaso-free-api
image : vinlic/metaso-free-api:latest
restart : always
ports :
- " 8000:8000 "
environment :
- TZ=Asia/Shanghai
labels :
- vinlic.scope.metaso=metaso
watchtower :
image : containrrr/watchtower
restart : unless-stopped
command :
--cleanup
--scope metaso
--interval 600
--include-restarting
# 可以配置通知地址,具体支持列表请查看:https://containrrr.dev/shoutrrr/v0.8/services/overview/
# --notification-url="bark://{填入bark的token}@api.day.app/{填入bark的token}/metaso-image-just-updated?title=Notification"
volumes :
- /var/run/docker.sock:/var/run/docker.sock
Note: Some deployment areas may not be able to connect to metaso. If the container log shows a request timeout or cannot be connected, please switch to other areas for deployment! Note: The container instance of the free account will automatically stop running after a period of inactivity, which will cause a delay of 50 seconds or more on the next request. It is recommended to check Render container keep alive
Fork this project to your github account.
Visit Render and log in to your github account.
Build your Web Service (New+ -> Build and deploy from a Git repository -> Connect your forked project -> Select the deployment area -> Select the instance type as Free -> Create Web Service).
After the construction is completed, copy the assigned domain name and splice the URL for access.
Note: The request response timeout for Vercel free accounts is 10 seconds, but the interface response usually takes longer, and you may encounter a 504 timeout error returned by Vercel!
Please make sure you have installed the Node.js environment first.
npm i -g vercel --registry http://registry.npmmirror.com
vercel login
git clone https://github.com/LLM-Red-Team/metaso-free-api
cd metaso-free-api
vercel --prod
Please prepare a server with a public IP and open port 8000.
Please install the Node.js environment and configure the environment variables first, and confirm that the node command is available.
Install dependencies
npm i
Install PM2 for process guarding
npm i -g pm2
Compile and build. When you see the dist directory, the build is complete.
npm run build
Start service
pm2 start dist/index.js --name " metaso-free-api "
View real-time service logs
pm2 logs metaso-free-api
Restart service
pm2 reload metaso-free-api
Stop service
pm2 stop metaso-free-api
It is faster and easier to use the following secondary development client to access the free-api series projects, and supports document/image upload!
LobeChat developed by Clivia https://github.com/Yanyutin753/lobe-chat
ChatGPT Web https://github.com/SuYxh/chatgpt-web-sea developed by Guangguang@
Currently, it supports the /v1/chat/completions
interface that is compatible with openai. You can use the client access interface that is compatible with openai or other clients, or use online services such as dify to access it.
Conversation completion interface, compatible with openai's chat-completions-api.
POST /v1/chat/completions
header needs to set the Authorization header:
Authorization: Bearer [token]
Request data:
{
// 全网model名称支持 -> 简洁:concise / 深入:detail / 研究:research
// 学术model名称支持 -> 学术-简洁:concise-scholar / 学术-深入:detail-scholar / 学术-研究:research-scholar
// model乱填的话,可以通过tempature参数来控制(但不支持学术):简洁:< 0.4 / 深入:>= 0.4 && < 0.7 / 研究:>= 0.7
// model乱填的话,还可以通过消息内容包含指令来控制:↓↓↓
// 简洁 -> 简洁搜索小米su7 / 深入 -> 深入搜索小米su7 / 研究 -> 研究搜索小米su7
// 学术-简洁 -> 学术简洁搜索:小米su7 / 学术-深入 -> 学术深入搜索小米su7 / 学术研究 -> 学术研究搜索小米su7
// 优先级:model > 消息内容指令 > tempature
"model" : " concise " ,
"messages" : [
{
"role" : " user " ,
"content" : "秘塔AI "
}
],
// 如果使用SSE流请设置为true,默认false
"stream" : false
}
Response data:
{
"id" : " 8466827997659213824 " ,
"model" : " concise " ,
"object" : " chat.completion " ,
"choices" : [
{
"index" : 0 ,
"message" : {
"role" : " assistant " ,
"content" : "秘塔AI搜索是上海秘塔网络科技有限公司在2024年初推出的一款新产品,被誉为中国版Perplexity。它利用自研的大模型MetaLLM,能够直接对用户的提问进行理解和回答,提供结构化、准确、直接的搜索结果,并明确列出来源参考,无需科学上网,解决了语言理解上的误差[[1]]。秘塔AI搜索通过其强大的语义理解能力和全网搜索功能,为用户提供了一个高效、无广告、信息丰富的搜索体验[[2]]。此外,秘塔AI搜索的特点包括没有广告,直达结果;结构化信息展示;以及信息来源追溯,为每条搜索结果提供了来源链接,用户可以轻松溯源验证信息的出处和可靠性[[4]]。秘塔科技成立于2018年4月,是一家新锐科技公司,致力于运用AI技术赋能专业场景,进行技术研发与产品落地[[3]]。 n "
},
"finish_reason" : " stop "
}
],
"usage" : {
"prompt_tokens" : 1 ,
"completion_tokens" : 1 ,
"total_tokens" : 2
},
"created" : 1712859314
}
Check whether the token is alive. If alive is not true, otherwise it is false. Please do not call this interface frequently (less than 10 minutes).
POST /token/check
Request data:
{
"token" : " 65e91a6b2bac5b600dd8526a-5e7acc465b114236a8d9de26c9f41846 "
}
Response data:
{
"live" : true
}
If you are using Nginx reverse proxy metaso-free-api, please add the following configuration items to optimize the output effect of the stream and optimize the experience.
# 关闭代理缓冲。当设置为off时,Nginx会立即将客户端请求发送到后端服务器,并立即将从后端服务器接收到的响应发送回客户端。
proxy_buffering off ;
# 启用分块传输编码。分块传输编码允许服务器为动态生成的内容分块发送数据,而不需要预先知道内容的大小。
chunked_transfer_encoding on ;
# 开启TCP_NOPUSH,这告诉Nginx在数据包发送到客户端之前,尽可能地发送数据。这通常在sendfile使用时配合使用,可以提高网络效率。
tcp_nopush on ;
# 开启TCP_NODELAY,这告诉Nginx不延迟发送数据,立即发送小数据包。在某些情况下,这可以减少网络的延迟。
tcp_nodelay on ;
# 设置保持连接的超时时间,这里设置为120秒。如果在这段时间内,客户端和服务器之间没有进一步的通信,连接将被关闭。
keepalive_timeout 120 ;
Since the inference side is not in metaso-free-api, the token cannot be counted and will be returned as a fixed number.