[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"project-1130":3},{"id":4,"name":5,"fullName":6,"owner":7,"repo":5,"description":8,"homepage":9,"htmlUrl":9,"language":10,"languages":9,"totalLinesOfCode":9,"stars":11,"forks":12,"watchers":13,"openIssues":14,"contributorsCount":14,"subscribersCount":14,"size":14,"stars1d":14,"stars7d":14,"stars30d":15,"stars90d":14,"forks30d":14,"starsTrendScore":14,"compositeScore":16,"rankGlobal":9,"rankLanguage":9,"license":9,"archived":17,"fork":17,"defaultBranch":18,"hasWiki":19,"hasPages":19,"topics":20,"createdAt":9,"pushedAt":9,"updatedAt":40,"readmeContent":41,"aiSummary":42,"trendingCount":14,"starSnapshotCount":14,"syncStatus":13,"lastSyncTime":43,"discoverSource":44},1130,"free-ai","vibheksoni\u002Ffree-ai","vibheksoni","Free OpenAI-compatible AI API with 50+ active models, image generation, tool calling, Anthropic-style messages, and Discord key signup. No credit card.",null,"TypeScript",514,94,2,0,99,9.93,false,"master",true,[21,22,23,24,25,26,27,28,29,5,30,31,32,33,34,35,36,37,38,39],"ai","ai-api","ai-gateway","api","chatgpt","claude","deepseek","discord-bot","free","free-api","gemini","gpt","image-generation","llm","machine-learning","openai-api","openai-compatible","streaming","tool-calling","2026-06-12 02:00:23","\u003Cdiv align=\"center\">\n\n# FreeTheAi\n\n\u003Cimg src=\"assets\u002FTrevorSecretsToAi.webp\" alt=\"TrevorSecretsToAi\" width=\"400\" style=\"border-radius: 8px;\" \u002F>\n\u003Cbr>\n\u003Csub>\u003Ci>gpt-image-2 api for free\u003C\u002Fi>\u003C\u002Fsub>\n\u003Cbr>\u003Cbr>\n\n**Free OpenAI-compatible API — 16,000+ models, zero billing**\n\nChat · Streaming · Tool Calling · Image Generation · Image Editing\n\n\u003Cbr>\n\n[![Models](https:\u002F\u002Fimg.shields.io\u002Fbadge\u002Fmodels-16%2C248-white?style=flat-square)](https:\u002F\u002Ffreetheai.xyz\u002Fmodels)\n[![API](https:\u002F\u002Fimg.shields.io\u002Fbadge\u002FOpenAI-compatible-white?style=flat-square)](https:\u002F\u002Fapi.freetheai.xyz)\n[![Cost](https:\u002F\u002Fimg.shields.io\u002Fbadge\u002Fcost-%240-white?style=flat-square)](https:\u002F\u002Ffreetheai.xyz)\n[![Prompts](https:\u002F\u002Fimg.shields.io\u002Fbadge\u002Fprompts-not%20stored-white?style=flat-square)](https:\u002F\u002Ffreetheai.xyz)\n[![Discord](https:\u002F\u002Fimg.shields.io\u002Fbadge\u002FDiscord-join-5865F2?style=flat-square&logo=discord&logoColor=white)](https:\u002F\u002Fdiscord.gg\u002Fsecrets)\n\n\u003Cbr>\n\n[Website](https:\u002F\u002Ffreetheai.xyz) · [Docs](https:\u002F\u002Ffreetheai.xyz\u002Fdocs) · [Model Catalog](https:\u002F\u002Ffreetheai.xyz\u002Fmodels) · [API Health](https:\u002F\u002Fapi.freetheai.xyz\u002Fv1\u002Fhealth) · [Discord](https:\u002F\u002Fdiscord.gg\u002Fsecrets)\n\n\u003C\u002Fdiv>\n\n---\n\n## Overview\n\nFree API gateway with 16,000+ models behind a single key. OpenAI-compatible — if your SDK works with OpenAI, it works here. Full request docs live at [freetheai.xyz\u002Fdocs](https:\u002F\u002Ffreetheai.xyz\u002Fdocs).\n\n- `POST \u002Fv1\u002Fchat\u002Fcompletions` — chat with streaming\n- `POST \u002Fv1\u002Fmessages` — Anthropic-style messages route\n- `POST \u002Fv1\u002Fimages\u002Fgenerations` — image generation\n- `POST \u002Fv1\u002Fimages\u002Fedits` — image editing with prompt + base64 input\n- Tool calling, structured outputs, multi-turn conversations\n- No billing, no daily cap, no prompt storage\n\n---\n\n## Quick Start\n\n```\nBase URL    https:\u002F\u002Fapi.freetheai.xyz\u002Fv1\nAuth        Bearer YOUR_API_KEY\n```\n\n\u003Ctable>\n\u003Ctr>\n\u003Ctd width=\"50%\">\n\n**1 — Join Discord**\n\nOpen [discord.gg\u002Fsecrets](https:\u002F\u002Fdiscord.gg\u002Fsecrets)\n\n\u003C\u002Ftd>\n\u003Ctd width=\"50%\">\n\n**2 — Get a key**\n\nRun `\u002Fsignup` in any channel\n\n\u003C\u002Ftd>\n\u003C\u002Ftr>\n\u003Ctr>\n\u003Ctd>\n\n**3 — Set your environment**\n\n```bash\nexport FREETHEAI_API_KEY=\"sk-...\"\n```\n\n\u003C\u002Ftd>\n\u003Ctd>\n\n**4 — Build**\n\nPoint any OpenAI SDK at the base URL\n\n\u003C\u002Ftd>\n\u003C\u002Ftr>\n\u003C\u002Ftable>\n\n> [!TIP]\n> Lost your key? Run `\u002Fresetkey` — same account, same stats, fresh key.\n\n---\n\n## Routes\n\n| Route | Method | What it does |\n| :--- | :---: | :--- |\n| `\u002Fv1\u002Fchat\u002Fcompletions` | `POST` | Chat completions with streaming |\n| `\u002Fv1\u002Fmessages` | `POST` | Anthropic-style messages |\n| `\u002Fv1\u002Fimages\u002Fgenerations` | `POST` | Image generation |\n| `\u002Fv1\u002Fimages\u002Fedits` | `POST` | Image editing |\n| `\u002Fv1\u002Fmodels` | `GET` | Authenticated model catalog |\n| `\u002Fv1\u002Fmodels\u002Ffull` | `GET` | Expanded model catalog with tier metadata |\n| `\u002Fv1\u002Fmodels\u002Fleaderboard` | `GET` | Site-key top model leaderboard |\n| `\u002Fv1\u002Fhealth` | `GET` | Health check |\n\n---\n\n## Code Examples\n\n\u003Cdetails>\n\u003Csummary>\u003Cb>Chat — curl\u003C\u002Fb>\u003C\u002Fsummary>\n\u003Cbr>\n\n```bash\ncurl https:\u002F\u002Fapi.freetheai.xyz\u002Fv1\u002Fchat\u002Fcompletions \\\n  -H \"Authorization: Bearer $FREETHEAI_API_KEY\" \\\n  -H \"Content-Type: application\u002Fjson\" \\\n  -d '{\n    \"model\": \"glm\u002Fglm-5.1\",\n    \"messages\": [\n      { \"role\": \"user\", \"content\": \"Write a Python hello world.\" }\n    ],\n    \"stream\": true\n  }'\n```\n\n\u003C\u002Fdetails>\n\n\u003Cdetails>\n\u003Csummary>\u003Cb>Chat — JavaScript\u003C\u002Fb>\u003C\u002Fsummary>\n\u003Cbr>\n\n```js\nimport OpenAI from \"openai\";\n\nconst client = new OpenAI({\n  apiKey: process.env.FREETHEAI_API_KEY,\n  baseURL: \"https:\u002F\u002Fapi.freetheai.xyz\u002Fv1\",\n});\n\nconst res = await client.chat.completions.create({\n  model: \"glm\u002Fglm-5.1\",\n  messages: [{ role: \"user\", content: \"Say hello.\" }],\n});\n\nconsole.log(res.choices[0].message.content);\n```\n\n\u003C\u002Fdetails>\n\n\u003Cdetails>\n\u003Csummary>\u003Cb>Chat — Python\u003C\u002Fb>\u003C\u002Fsummary>\n\u003Cbr>\n\n```python\nfrom openai import OpenAI\n\nclient = OpenAI(\n    api_key=\"YOUR_API_KEY\",\n    base_url=\"https:\u002F\u002Fapi.freetheai.xyz\u002Fv1\",\n)\n\nres = client.chat.completions.create(\n    model=\"glm\u002Fglm-5.1\",\n    messages=[{\"role\": \"user\", \"content\": \"Say hello.\"}],\n)\n\nprint(res.choices[0].message.content)\n```\n\n\u003C\u002Fdetails>\n\n\u003Cdetails>\n\u003Csummary>\u003Cb>Messages API — curl\u003C\u002Fb>\u003C\u002Fsummary>\n\u003Cbr>\n\n```bash\ncurl https:\u002F\u002Fapi.freetheai.xyz\u002Fv1\u002Fmessages \\\n  -H \"Authorization: Bearer $FREETHEAI_API_KEY\" \\\n  -H \"Content-Type: application\u002Fjson\" \\\n  -d '{\n    \"model\": \"rev\u002Fclaude-sonnet-4.5\",\n    \"max_tokens\": 256,\n    \"messages\": [\n      { \"role\": \"user\", \"content\": \"Write a migration plan.\" }\n    ]\n  }'\n```\n\n\u003C\u002Fdetails>\n\n\u003Cdetails>\n\u003Csummary>\u003Cb>Tool calling — Python\u003C\u002Fb>\u003C\u002Fsummary>\n\u003Cbr>\n\n```python\nfrom openai import OpenAI\n\nclient = OpenAI(\n    api_key=\"YOUR_API_KEY\",\n    base_url=\"https:\u002F\u002Fapi.freetheai.xyz\u002Fv1\",\n)\n\nres = client.chat.completions.create(\n    model=\"wsf\u002Fswe-1.6\",\n    tool_choice=\"required\",\n    messages=[{\"role\": \"user\", \"content\": \"Get weather for Boston.\"}],\n    tools=[{\n        \"type\": \"function\",\n        \"function\": {\n            \"name\": \"get_weather\",\n            \"description\": \"Get the weather for a city.\",\n            \"parameters\": {\n                \"type\": \"object\",\n                \"properties\": {\"city\": {\"type\": \"string\"}},\n                \"required\": [\"city\"],\n                \"additionalProperties\": False,\n            },\n        },\n    }],\n)\n\nprint(res.choices[0].message.tool_calls)\n```\n\n\u003C\u002Fdetails>\n\n\u003Cdetails>\n\u003Csummary>\u003Cb>Image generation — curl\u003C\u002Fb>\u003C\u002Fsummary>\n\u003Cbr>\n\n```bash\ncurl https:\u002F\u002Fapi.freetheai.xyz\u002Fv1\u002Fimages\u002Fgenerations \\\n  -H \"Authorization: Bearer $FREETHEAI_API_KEY\" \\\n  -H \"Content-Type: application\u002Fjson\" \\\n  -d '{\n    \"model\": \"vhr\u002Fgpt_image_2\",\n    \"prompt\": \"A neon sports car under rainy city lights\"\n  }'\n```\n\nGeneration models include `img\u002Fgpt-image-2`, `vhr\u002Fflux_dev`, `vhr\u002Fgpt_image_2`, `vhr\u002Fnano_banana_2`, and `vhr\u002Fbytedance_seedream_v4`.\n\nRobust clients should support both response shapes:\n\n- `data[0].b64_json` for base64 image data\n- `data[0].url` for a generated image URL\n\n\u003C\u002Fdetails>\n\n\u003Cdetails>\n\u003Csummary>\u003Cb>Image editing — Python\u003C\u002Fb>\u003C\u002Fsummary>\n\u003Cbr>\n\n```python\nimport base64, requests, os\n\ndef edit_image(prompt, image_path):\n    with open(image_path, \"rb\") as f:\n        data_url = \"data:image\u002Fpng;base64,\" + \\\n            base64.b64encode(f.read()).decode()\n\n    return requests.post(\n        \"https:\u002F\u002Fapi.freetheai.xyz\u002Fv1\u002Fimages\u002Fedits\",\n        headers={\n            \"Authorization\": f\"Bearer {os.environ['FREETHEAI_API_KEY']}\",\n            \"Content-Type\": \"application\u002Fjson\",\n        },\n        json={\n            \"model\": \"img\u002Fgpt-image-2\",\n            \"prompt\": prompt,\n            \"image\": data_url,\n        },\n    ).json()\n```\n\nSee [`examples\u002Fimage_client.py`](examples\u002Fimage_client.py) for a beginner-friendly CLI tool that saves the key locally and handles both `b64_json` and `url` image responses.\n\n\u003C\u002Fdetails>\n\n---\n\n## Models\n\nBrowse the full searchable catalog at [freetheai.xyz\u002Fmodels](https:\u002F\u002Ffreetheai.xyz\u002Fmodels). Request examples and endpoint details are on [freetheai.xyz\u002Fdocs](https:\u002F\u002Ffreetheai.xyz\u002Fdocs).\n\n| Prefix | Models | |\n| :--- | ---: | :--- |\n| `fth\u002F*` | 16,137 | Open-weight catalog |\n| `or\u002F*` | 33 | Free-tier models |\n| `cat\u002F*` | 15 | Chat models |\n| `yng\u002F*` | 15 | Chat models |\n| `kai\u002F*` | 12 | Aggregated models |\n| `bbg\u002F*` | 9 | Premium allowlist |\n| `bbl\u002F*` | 7 | Chat models |\n| `glm\u002F*` | 6 | Chat models |\n| `opc\u002F*` | 5 | Free models |\n| `rev\u002F*` | 4 | Chat models |\n| `wsf\u002F*` | 4 | Chat models |\n| `vhr\u002F*` | 4 | Image generation |\n| `img\u002F*` | 1 | Image generation |\n\n> [!NOTE]\n> Use exact alias IDs from `GET \u002Fv1\u002Fmodels`. Model availability updates automatically as upstream catalogs change.\n\n---\n\n## Rate Limits\n\n| Tier | RPM | Concurrency |\n| :---: | :---: | :---: |\n| 1 | 10 | 1 |\n| 2 | 15 | 1 |\n| 3 | 20 | 2 |\n| 4 | 28 | 2 |\n| 5 | 35 | 3 |\n\nTiers unlock through Discord invite progress. No daily limit.\n\n---\n\n## Privacy\n\nPrompt and completion text are **not stored**.\n\n\u003Ctable>\n\u003Ctr>\n\u003Ctd width=\"50%\">\n\n**Tracked**\n- Model alias used\n- Token counts\n- Request timestamp\n- Status code\n\n\u003C\u002Ftd>\n\u003Ctd width=\"50%\">\n\n**Not tracked**\n- Prompt content\n- Completion content\n- Conversation history\n\n\u003C\u002Ftd>\n\u003C\u002Ftr>\n\u003C\u002Ftable>\n\n---\n\n## Discord Commands\n\n\u003Ctable>\n\u003Ctr>\n\u003Ctd width=\"50%\">\n\n| Command | Description |\n| :--- | :--- |\n| `\u002Fsignup` | Get your API key |\n| `\u002Fresetkey` | Rotate to a fresh key |\n| `\u002Fmodels` | Browse models |\n| `\u002Fstats` | Your usage stats |\n| `\u002Fgenerate` | Generate an image |\n\n\u003C\u002Ftd>\n\u003Ctd width=\"50%\">\n\n| Command | Description |\n| :--- | :--- |\n| `\u002Ftiers` | View rate limit tiers |\n| `\u002Ftiermodels` | Models per access tier |\n| `\u002Fleaderboard` | Top users |\n| `\u002Fmodelleaderboard` | Top models |\n| `\u002Fmodelstats` | Stats for a model |\n\n\u003C\u002Ftd>\n\u003C\u002Ftr>\n\u003C\u002Ftable>\n\n---\n\n\u003Cdiv align=\"center\">\n\n## Community\n\n\u003Ca href=\"https:\u002F\u002Fdiscord.gg\u002Fsecrets\">\n  \u003Cimg src=\"https:\u002F\u002Fimg.shields.io\u002Fbadge\u002FDiscord-Join%20Server-5865F2?style=flat-square&logo=discord&logoColor=white\" alt=\"Join Discord\" \u002F>\n\u003C\u002Fa>\n\n\u003Cbr>\u003Cbr>\n\n\u003Ciframe src=\"https:\u002F\u002Fdiscord.com\u002Fwidget?id=1461555807731585158&theme=dark\" width=\"350\" height=\"500\" allowtransparency=\"true\" frameborder=\"0\" sandbox=\"allow-popups allow-popups-to-escape-sandbox allow-same-origin allow-scripts\">\u003C\u002Fiframe>\n\n\u003Cbr>\n\n[Website](https:\u002F\u002Ffreetheai.xyz) · [Docs](https:\u002F\u002Ffreetheai.xyz\u002Fdocs) · [Model Catalog](https:\u002F\u002Ffreetheai.xyz\u002Fmodels) · [API](https:\u002F\u002Fapi.freetheai.xyz) · [Discord](https:\u002F\u002Fdiscord.gg\u002Fsecrets) · [Backup Invite](https:\u002F\u002Fdiscord.gg\u002FrG3SYpeqYF)\n\n\u003Cbr>\n\n\u003Csub>No paid tiers. No billing page. Community-run.\u003C\u002Fsub>\n\n\u003C\u002Fdiv>\n","FreeTheAi 是一个提供超过16,000种模型的免费OpenAI兼容API，支持聊天、流式传输、工具调用、图像生成和编辑等功能。该项目采用Astro构建，用户无需支付任何费用即可通过Discord获取API密钥并开始使用。其核心功能包括与OpenAI API完全兼容，支持多种请求类型如文本聊天、图像处理等，并且不存储用户的提示内容以保护隐私。适用于希望在不产生额外成本的情况下测试或部署AI应用的开发者和个人，特别适合那些需要快速集成AI能力但预算有限的项目。","2026-05-29 02:43:07","CREATED_QUERY"]