{"id":26121657,"url":"https://github.com/hominsu/freegpt35","last_synced_at":"2025-03-10T14:24:29.671Z","repository":{"id":233487726,"uuid":"786430400","full_name":"hominsu/freegpt35","owner":"hominsu","description":"Unlimited free GPT-3.5 turbo API service.","archived":false,"fork":false,"pushed_at":"2024-05-07T03:05:43.000Z","size":1372,"stargazers_count":28,"open_issues_count":0,"forks_count":10,"subscribers_count":2,"default_branch":"main","last_synced_at":"2024-05-07T04:23:24.098Z","etag":null,"topics":["ai","api","chat","chatgpt","free","gpt","gpt-3","openai","openai-api","openai-chatgpt","reverse-proxy"],"latest_commit_sha":null,"homepage":"","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"agpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/hominsu.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-14T12:50:02.000Z","updated_at":"2024-05-07T04:23:25.182Z","dependencies_parsed_at":"2024-05-03T10:52:18.023Z","dependency_job_id":null,"html_url":"https://github.com/hominsu/freegpt35","commit_stats":null,"previous_names":["hominsu/freegpt35"],"tags_count":7,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hominsu%2Ffreegpt35","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hominsu%2Ffreegpt35/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hominsu%2Ffreegpt35/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hominsu%2Ffreegpt35/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/hominsu","download_url":"https://codeload.github.com/hominsu/freegpt35/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":242865707,"owners_count":20197943,"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","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":["ai","api","chat","chatgpt","free","gpt","gpt-3","openai","openai-api","openai-chatgpt","reverse-proxy"],"created_at":"2025-03-10T14:24:29.074Z","updated_at":"2025-03-10T14:24:29.662Z","avatar_url":"https://github.com/hominsu.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003cdiv id=\"top\"\u003e\u003c/div\u003e\n\n\u003c!-- PROJECT SHIELDS --\u003e\n\u003cp align=\"center\"\u003e\n\u003ca href=\"https://github.com/hominsu/freegpt35/graphs/contributors\"\u003e\u003cimg src=\"https://img.shields.io/github/contributors/hominsu/freegpt35.svg?style=for-the-badge\" alt=\"Contributors\"\u003e\u003c/a\u003e\n\u003ca href=\"https://github.com/hominsu/freegpt35/network/members\"\u003e\u003cimg src=\"https://img.shields.io/github/forks/hominsu/freegpt35.svg?style=for-the-badge\" alt=\"Forks\"\u003e\u003c/a\u003e\n\u003ca href=\"https://github.com/hominsu/freegpt35/stargazers\"\u003e\u003cimg src=\"https://img.shields.io/github/stars/hominsu/freegpt35.svg?style=for-the-badge\" alt=\"Stargazers\"\u003e\u003c/a\u003e\n\u003ca href=\"https://github.com/hominsu/freegpt35/issues\"\u003e\u003cimg src=\"https://img.shields.io/github/issues/hominsu/freegpt35.svg?style=for-the-badge\" alt=\"Issues\"\u003e\u003c/a\u003e\n\u003ca href=\"https://github.com/hominsu/freegpt35/blob/master/LICENSE\"\u003e\u003cimg src=\"https://img.shields.io/github/license/hominsu/freegpt35.svg?style=for-the-badge\" alt=\"License\"\u003e\u003c/a\u003e\n\u003c/p\u003e\n\n\u003cdiv align=\"center\"\u003e\n\n\u003ch3 align=\"center\"\u003efreegpt35\u003c/h3\u003e\n  \u003cp align=\"center\"\u003e\n    Unlimited free GPT-3.5 turbo API service.\n    \u003cbr/\u003e\n    \u003ca href=\"https://homing.so/about\"\u003e\u003cstrong\u003eAbout author »\u003c/strong\u003e\u003c/a\u003e\n    \u003cbr/\u003e\n    \u003cbr/\u003e\n    \u003ca href=\"#Features\"\u003eFeatures\u003c/a\u003e\n    ·\n    \u003ca href=\"#Examples\"\u003eExamples\u003c/a\u003e\n    ·\n    \u003ca href=\"#Reference\"\u003eReference\u003c/a\u003e\n    ·\n    \u003ca href=\"#License\"\u003eLicense\u003c/a\u003e\n  \u003c/p\u003e\n\u003c/div\u003e\n\n## Features\n\n- **Streaming API**. freegpt35 allows the response sent back incrementally in chunks.\n- **Easy Deploy**. Containerized, starts in seconds using docker compose.\n- **Login free**. Do not need to worry about the details of authorization, use at a glance.\n\n## Examples\n\n### Usage at a glance\n\n```bash\nmkdir freegpt35 \u0026\u0026 cd freegpt35\ncurl -O https://raw.githubusercontent.com/hominsu/freegpt35/main/deploy/docker-compose.yml\n```\n\nThen add the environment if you need, for more details check the following [**Customize**](https://github.com/hominsu/freegpt35?tab=readme-ov-file#customize) part.\n\n```\ndocker compose up -d\n```\n\nOnce deployed, use the following command to confirm that everything is working well.\n\n```bash\ncurl -X POST \"http://localhost:3000/v1/chat/completions\" \\\n     -H \"Authorization: Bearer anything_or_your_key\" \\\n     -H \"Content-Type: application/json\" \\\n     -d '{\n           \"model\": \"gpt-3.5-turbo\",\n           \"messages\": [{\"role\": \"user\", \"content\": \"Hello\"}],\n         }'\n```\n\n```json\n{\"id\":\"chatcmpl-*********\",\"created\":9999999999,\"model\":\"gpt-3.5-turbo\",\"object\":\"chat.completion\",\"choices\":[{\"finish_reason\":\"stop\",\"index\":0,\"message\":{\"content\":\"Hi there! How can I assist you today?\",\"role\":\"assistant\"}}],\"usage\":{\"prompt_tokens\":1,\"completion_tokens\":10,\"total_tokens\":11}}\n```\n\n### Nginx Template\n\nHere is an Nginx conf template that you can refer to. For more info about NGINX Docker setup you can check this post: [优雅地在 Docker 中使用 NGINX](https://homing.so/blog/nginx/how-to-use-nginx-elegantly-with-docker)\n\n```nginx\nupstream freegpt35 {\n    server 127.0.0.1:3000\n}\n\nserver {\n    listen 80;\n    listen [::]:80;\n    server_name your.domain.name;\n\n    return 301 https://$server_name$request_uri;\n}\n\nserver {\n    listen 443 ssl;\n    listen [::]:443 ssl;\n    server_name your.domain.name;\n\n    ssl_certificate /etc/nginx/ssl/your.domain.name/full.pem;\n    ssl_certificate_key /etc/nginx/ssl/your.domain.name/key.pem;\n\n    ssl_session_timeout 5m;\n\n    add_header Strict-Transport-Security \"max-age=31536000; includeSubDomains\" always;\n\n    ssl_protocols TLSv1.2 TLSv1.3;\n    ssl_ciphers TLS13_AES_128_GCM_SHA256:TLS13_AES_256_GCM_SHA384:TLS13_CHACHA20_POLY1305_SHA256:ECDHE-ECDSA-AES128-GCM-SHA256:ECDHE-ECDSA-AES256-GCM-SHA384:ECDHE-ECDSA-CHACHA20-POLY1305;\n    ssl_prefer_server_ciphers on;\n\n    location /v1/chat/completions {\n       proxy_set_header Host $host;\n       proxy_set_header X-Real-IP $remote_addr;\n       proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;\n       proxy_set_header X-Forwarded-Proto \"https\";\n       proxy_pass http://freegpt35;\n\n       proxy_buffering  off;\n       proxy_cache      off;\n\n       send_timeout               600;\n       proxy_connect_timeout      600;\n       proxy_send_timeout         600;\n       proxy_read_timeout         600;\n       chunked_transfer_encoding  on;\n    }\n    error_page   500 502 503 504  /50x.html;\n}\n```\n\n### Vercel\n\nIf you subscribe to Vercel, you can try this deploy method, otherwise do not waste your time, since with `Hobby` plan your serverless API routes can only be processed for 5 seconds, and the route responds with a `FUNCTION_INVOCATION_TIMEOUT` error.\n\n[![Deploy with Vercel](https://vercel.com/button)](https://vercel.com/new/clone?repository-url=https%3A%2F%2Fgithub.com%2Fhominsu%2Ffreegpt35\u0026env=NEXT_API_KEY\u0026envDescription=API%20key%20used%20for%20authentication%20to%20access%20the%20API.\u0026envLink=https%3A%2F%2Fgithub.com%2Fhominsu%2Ffreegpt35%3Ftab%3Dreadme-ov-file%23customize)\n\nOnce deployed, you can test with curl again\n\n```bash\ncurl -X POST \"https://freegpt35.vercel.app/v1/chat/completions\" \\\n     -H \"Authorization: Bearer anything_or_your_key\" \\\n     -H \"Content-Type: application/json\" \\\n     -d '{\n           \"model\": \"gpt-3.5-turbo\",\n           \"messages\": [{\"role\": \"user\", \"content\": \"Hello\"}]\n         }'\n```\n\n```json\n{\"id\":\"chatcmpl-**********\",\"created\":9999999999,\"model\":\"gpt-3.5-turbo\",\"object\":\"chat.completion\",\"choices\":[{\"finish_reason\":\"stop\",\"index\":0,\"message\":{\"content\":\"Hey there! How's it going?\",\"role\":\"assistant\"}}],\"usage\":{\"prompt_tokens\":1,\"completion_tokens\":8,\"total_tokens\":9}}\n```\n\n### Customize\n\nYou can also define your Environment Variables to for some specific cases.\n\n| Environment Variable | Description                                                                                                                                                                                    |\n|:---------------------|:-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| `NEXT_BASE_URL`      | Base URL for the ChatGPT, modified it if you using a mirror site                                                                                                                               |\n| `NEXT_API_URL`       | **DO NOT MODIFIED IT**, unless you really know what you're doing                                                                                                                               |\n| `NEXT_API_KEY`       | API key used for authentication to access the API.                                                                                                                                             |\n| `NEXT_MAX_RETRIES`   | Maximum number of retries for API requests in case of failure.                                                                                                                                 |\n| `NEXT_USER_AGENT`    | User agent string used in the headers of requests sent from the server.                                                                                                                        |\n| `NEXT_PROXY`         | Enable http(s) proxy e.g. `http://127.0.0.1:7890`. If multiple proxies are needed, separate each proxy with `,` e.g. `https://user:password@proxy-1:10000,https://user:password@proxy-2:10001` |\n\n## Reference\n\n- https://github.com/PawanOsman/ChatGPT\n\n## License\n\nDistributed under the AGPL 3.0 license. See `LICENSE` for more information.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhominsu%2Ffreegpt35","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fhominsu%2Ffreegpt35","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhominsu%2Ffreegpt35/lists"}