It supports high-speed streaming output, multiple rounds of dialogue, online search, long document interpretation, image analysis, zero-configuration deployment, multi-channel token support, and automatic cleaning of session traces.
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
Alibaba Tongyi (Qwen) interface to API qwen-free-api
Zhipu AI (Zhipu Qingyan) interface to API glm-free-api
Metaso AI (Metaso) interface to API metaso-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 go to Step Star Official https://platform.stepfun.com/ to pay to use the API 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 and cannot be used for a long time. Please deploy it yourself for long-term use.
https://udify.app/chat/RGqDVPHspgQgGSgf
Get deviceId and Oasis-Token from yuewen.cn
Enter StepChat and start a conversation, then F12 to open the developer tools.
deviceId
from Application > LocalStorage (remove the double quotes), such as: 267bcc81a01c2032a11a3fc6ec3e372c380eb9d1
Oasis-Token
from Application > Cookies, such as: eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9...
@
to splice deviceId
and Oasis-Token
into Token, which will be used as the Bearer Token value of Authorization: Authorization: Bearer 267bcc81a01c2032a11a3fc6ec3e372c380eb9d1@eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9...
You can provide refresh_tokens for multiple accounts ,
use them together to provide:
Authorization: Bearer TOKEN1,TOKEN2,TOKEN3
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 step-free-api -p 8000:8000 -e TZ=Asia/Shanghai vinlic/step-free-api:latest
View real-time service logs
docker logs -f step-free-api
Restart service
docker restart step-free-api
Stop service
docker stop step-free-api
version : ' 3 '
services :
step-free-api :
container_name : step-free-api
image : vinlic/step-free-api:latest
restart : always
ports :
- " 8000:8000 "
environment :
- TZ=Asia/Shanghai
Note: Some deployment areas may not be able to connect to step. If the request times out or cannot be connected in the container log, 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/step-free-api
cd step-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 " step-free-api "
View real-time service logs
pm2 logs step-free-api
Restart service
pm2 reload step-free-api
Stop service
pm2 stop step-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 [refresh_token]
Request data:
{
// 模型名称随意填写
"model" : " step " ,
"messages" : [
{
"role" : " user " ,
"content" : "你是谁? "
}
],
// 如果使用SSE流请设置为true,默认false
"stream" : false
}
Response data:
{
"id" : " 85466015488159744 " ,
"model" : " step " ,
"object" : " chat.completion " ,
"choices" : [
{
"index" : 0 ,
"message" : {
"role" : " assistant " ,
"content" : "我是跃问(StepChat),一个由阶跃星辰(StepFun)开发的多模态大模型。我可以回答您的问题,提供信息和帮助,同时支持多种模态的交互,如文字、图像等。如果您有任何问题或需要帮助,请随时向我提问。 "
},
"finish_reason" : " stop "
}
],
"usage" : {
"prompt_tokens" : 1 ,
"completion_tokens" : 1 ,
"total_tokens" : 2
},
"created" : 1711829974
}
Provide an accessible file URL or BASE64_URL to parse.
POST /v1/chat/completions
header needs to set the Authorization header:
Authorization: Bearer [refresh_token]
Request data:
{
// 模型名称随意填写
"model" : " step " ,
"messages" : [
{
"role" : " user " ,
"content" : [
{
"type" : " file " ,
"file_url" : {
"url" : " https://mj101-1317487292.cos.ap-shanghai.myqcloud.com/ai/test.pdf "
}
},
{
"type" : " text " ,
"text" : "文档里说了什么? "
}
]
}
]
}
Response data:
{
"id" : " 85774360661086208 " ,
"model" : " step " ,
"object" : " chat.completion " ,
"choices" : [
{
"index" : 0 ,
"message" : {
"role" : " assistant " ,
"content" : "这是一个关于爱情魔法的文档。它包含了四个部分: nn 1. **PMG 4.1390 – 1495**:这是一个使用面包和咒语来吸引心仪女性的仪式。仪式中需要将面包分成七个小块,并在特定地点进行咒语的念诵和投掷。 n 2. **PMG 4.1342 – 57**:这是一个召唤恶魔来使一个名叫Tereous的女性受到折磨,直到她与一个名叫Didymos的人相爱并结合的咒语。 n 3. **PGM 4.1265 – 74**:这是关于如何赢得一个美丽的女人的咒语。它涉及到连续三天保持纯洁,向女神阿佛洛狄特(Aphrodite)供奉乳香,并在心中默念她的神秘名字。 n 4. **PGM 4.1496 – 1**:这是一个使用没药来吸引一个特定女性的咒语。这个咒语需要在煤上焚烧没药的同时念诵,目的是让这个女性心中只想着施咒者,并最终与施咒者相爱。 "
},
"finish_reason" : " stop "
}
],
"usage" : {
"prompt_tokens" : 1 ,
"completion_tokens" : 1 ,
"total_tokens" : 2
},
"created" : 1711903489
}
Provide an accessible image URL or BASE64_URL to parse.
This format is compatible with the gpt-4-vision-preview API format, and you can also use this format to transmit documents for parsing.
POST /v1/chat/completions
header needs to set the Authorization header:
Authorization: Bearer [refresh_token]
Request data:
{
// 模型名称随意填写
"model" : " step " ,
"messages" : [
{
"role" : " user " ,
"content" : [
{
"type" : " image_url " ,
"image_url" : {
"url" : " https://k.sinaimg.cn/n/sinakd20111/106/w1024h682/20240327/babd-2ce15fdcfbd6ddbdc5ab588c29b3d3d9.jpg/w700d1q75cms.jpg "
}
},
{
"type" : " text " ,
"text" : "图像描述了什么? "
}
]
}
]
}
Response data:
{
"id" : " 85773574417829888 " ,
"model" : " step " ,
"object" : " chat.completion " ,
"choices" : [
{
"index" : 0 ,
"message" : {
"role" : " assistant " ,
"content" : "这张图片展示了一个活动现场,似乎是某种新产品或技术的发布会。图片中央有一个大屏幕,上面写着“创新技术及产品首发”,屏幕上还展示了一些公司的标志或名称,如“RWKV”、“财跃星辰”、“阶跃星辰”、“商汤”和“零方科技”。在屏幕下方的舞台上,有几位穿着正装的人士正在进行互动,可能是在进行产品发布或演示。整个场景给人一种正式且科技感十足的印象。 "
},
"finish_reason" : " stop "
}
],
"usage" : {
"prompt_tokens" : 1 ,
"completion_tokens" : 1 ,
"total_tokens" : 2
},
"created" : 1711903302
}
Check whether refresh_token is alive. If live is not true, otherwise it is false. Please do not call this interface frequently (less than 10 minutes).
POST /token/check
Request data:
{
"token" : " 267bcc81a01c2032a11a3fc6ec3e372c380eb9d1@eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9... "
}
Response data:
{
"live" : true
}
If you are using Nginx reverse proxy step-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 the step-free-api, the token cannot be counted and will be returned as a fixed number!!!!!