GithubHelp home page GithubHelp logo

free-api-hub's Introduction

free-api-hub

free-api系列项目 集合共享资源

如果您对 free-api系列项目 感兴趣,欢迎PR分享的内容到本仓库。

使用说明和URL链接分享PR在本 README.md

文档类PR在 /docs 目录中,并在 /docs/README.md 说明

脚本类PR在 /scripts 目录中,并在 /scripts/README.md 说明

非常感谢您的关注和支持!

demo

核心资源

all-free-api.yml

docker-compose一键启动所有free-api的脚本,运行以下命令启动。

docker-compose -f all-free-api.yml up -d

Render容器保活

使用Render部署free-api时,容器在一段时间不活动后会自动回收,导致下次调用响应有近1分钟的延迟,你可以用以下方案保活容器。

方案1:通过任意监控服务调用保活

  1. 在你支持监控服务的框架或程序上面配置在Render的free-api地址,如 https://kimi-free-api-nut5.onrender.com 就是 https://kimi-free-api-nut5.onrender.com/ping,需要使用GET请求方法。

  2. 配置探测频率,建议5分钟一轮。

方案2:通过脚本curl调用保活

命令仅适用于Linux系统。

  1. 改写 scripts/render_keeplive.sh 文件,将循环遍历的ping地址换成你部署在Render的free-api地址,如 https://kimi-free-api-nut5.onrender.com 就是 https://kimi-free-api-nut5.onrender.com/ping

  2. 运行 crontab -e 命令,在打开的编辑器中添加如下内容(/path/to/render_keeplive.sh 替换为你的脚本路径):

*/5 * * * * /path/to/render_keeplive.sh
  1. 保存并退出编辑器,可以通过 tail -f /var/log/cron 查看脚本被调用的日志。

free-api-hub's People

Contributors

kokojacket avatar vinlic avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.