Free.ai API
One API key. Every AI tool. Simple token billing.
Maitiro Ekushanda
Kuwana API Key
Kutenga tokens, wobva wagadzira yako sk-free- key
Chiva chero Endpoint
Chat, mapikicha, TTS, STT, music, translation - zvese imwe API
Pay in Tokens
One توازن. Every tool costs tokens. Simple.
Kutanga Kwenguva pfupi
# Chat with AI
curl -X POST https://api.free.ai/v1/chat/ \
-H "Authorization: Bearer sk-free-YOUR_KEY" \
-H "Content-Type: application/json" \
-d '{
"messages": [{"role": "user", "content": "Hello!"}],
"model": "qwen7b"
}'
# Generate an image — self-hosted (free within daily allowance)
curl -X POST https://api.free.ai/v1/image/generate/ \
-H "Authorization: Bearer sk-free-YOUR_KEY" \
-H "Content-Type: application/json" \
-d '{"prompt": "A sunset over mountains", "model": "sdxl"}'
# Generate with a premium model (paid tokens only — FLUX Kontext, Seedream,
# Ideogram, Nano Banana, Gemini 3 Pro, etc.). Full list at /v1/providers.
curl -X POST https://api.free.ai/v1/image/generate/ \
-H "Authorization: Bearer sk-free-YOUR_KEY" \
-H "Content-Type: application/json" \
-d '{"prompt": "A sunset over mountains", "model": "premium/flux-pro/kontext"}'
# Generate a video (premium)
curl -X POST https://api.free.ai/v1/video/generate/ \
-H "Authorization: Bearer sk-free-YOUR_KEY" \
-H "Content-Type: application/json" \
-d '{"prompt": "A cat running in slow motion", "duration": 5, "model": "premium/kling-video/v2.6/pro/text-to-video"}'
# Text to speech
curl -X POST https://api.free.ai/v1/tts/ \
-H "Authorization: Bearer sk-free-YOUR_KEY" \
-H "Content-Type: application/json" \
-d '{"text": "Hello world", "voice": "default", "model": "kokoro"}'
# Translate text
curl -X POST https://api.free.ai/v1/translate/ \
-H "Authorization: Bearer sk-free-YOUR_KEY" \
-H "Content-Type: application/json" \
-d '{"text": "Hello world", "target": "es"}'
import requests
API_KEY = "sk-free-YOUR_KEY"
BASE = "https://api.free.ai"
HEADERS = {"Authorization": f"Bearer {API_KEY}", "Content-Type": "application/json"}
# Chat
r = requests.post(f"{BASE}/v1/chat/", headers=HEADERS, json={
"messages": [{"role": "user", "content": "Hello!"}],
"model": "qwen7b" # or "openai/gpt-4o", "anthropic/claude-sonnet-4", etc.
})
print(r.json()["choices"][0]["message"]["content"])
# Generate image — self-hosted (free within daily allowance)
r = requests.post(f"{BASE}/v1/image/generate/", headers=HEADERS, json={
"prompt": "A sunset over mountains",
"model": "sdxl", # or "premium/flux-pro/kontext" for paid tier
"aspect_ratio": "16:9"
})
print(r.json()["image_url"])
# Generate video (premium — see /v1/providers for the full list)
r = requests.post(f"{BASE}/v1/video/generate/", headers=HEADERS, json={
"prompt": "A cat running in slow motion",
"duration": 5,
"model": "premium/kling-video/v2.6/pro/text-to-video"
})
print(r.json()["video_url"])
# Text to speech
r = requests.post(f"{BASE}/v1/tts/", headers=HEADERS, json={
"text": "Hello world",
"model": "kokoro",
"voice": "af_heart"
})
print(r.json()["audio_url"])
# Transcribe audio
r = requests.post(f"{BASE}/v1/stt/transcribe/", headers=HEADERS, json={
"url": "https://example.com/audio.mp3",
"model": "whisper"
})
print(r.json()["text"])
const API_KEY = "sk-free-YOUR_KEY";
const BASE = "https://api.free.ai";
// Chat
const chat = await fetch(`${BASE}/v1/chat/`, {
method: "POST",
headers: { "Authorization": `Bearer ${API_KEY}`, "Content-Type": "application/json" },
body: JSON.stringify({
messages: [{ role: "user", content: "Hello!" }],
model: "qwen7b"
})
});
const data = await chat.json();
console.log(data.choices[0].message.content);
// Generate image — self-hosted (free within daily allowance)
const img = await fetch(`${BASE}/v1/image/generate/`, {
method: "POST",
headers: { "Authorization": `Bearer ${API_KEY}`, "Content-Type": "application/json" },
body: JSON.stringify({ prompt: "A sunset over mountains", model: "sdxl" })
});
// Premium image model (paid tokens) — full list at /v1/providers
const imgPro = await fetch(`${BASE}/v1/image/generate/`, {
method: "POST",
headers: { "Authorization": `Bearer ${API_KEY}`, "Content-Type": "application/json" },
body: JSON.stringify({ prompt: "A sunset over mountains", model: "premium/flux-pro/kontext" })
});
console.log((await img.json()).image_url);
Token Kubhadhara
Zviri nyore kushandisa, uye zvinokurumidza.Izvi zvinokutendera kuti utore mari yako yese kubva kune chero webhusaiti kana API.
| Model | _Rudzi: | Kubhadhara kweToken | License |
|---|---|---|---|
| Qwen 2.5 7B | Chat/Write/Code | Nhasi tokens kushandiswa (input + output) | Apache 2.0 |
| FLUX.2 Klein | Kuumbwa kweImage | 5,000 tokens / vhidhiyo | Apache 2.0 |
| Kokoro | Tevere | 1 token per 4 chars | Apache 2.0 |
| faster-whisper | Kutaura-Ku-Tekisi | 4 tokens / sekondi yeaudio | MIT |
| AudioLDM 2 | Kuumbwa kweMusic | 2,000 tokens / track | Apache 2.0 |
| MadLAD-400 | Kushandurwa (450+ langs) | Actual tokens used | Apache 2.0 |
| Real-ESRGAN | Kuwedzera kwechifananidzo | 500 tokens / vhidhiyo | BSD |
| BRIA RMBG | Kubvisa Kwekunze | 500 tokens / vhidhiyo | Apache 2.0 |
| CogVideoX | Kugadzira Video | 30,000 tokens/video | Apache 2.0 |
| Stem Separator (Mel-Band RoFormer + SCNet) | KCharselect unicode block name | 500 tokens / track | MIT + Apache-2.0 |
Kusvika GPT-6, Claude, Gemini, Llama, DeepSeek uye zvimwe zve 579 mamodheru. Token mutengo inoenderana ne provider mutengo wakashandurwa kuita yedu tokens.
| Model | Mugadziri | ~ Tokens per message | Nhoroondo |
|---|---|---|---|
| GPT-4o Mini | OpenAI | ~20 | Cheap, nyore |
| Gemini 2.0 Flash | ~15 | Yakanaka kwazvo | |
| Mistral | Mistral | ~10 | Great value |
| DeepSeek V3 | DeepSeek | ~30 | Strong reasoning |
| Llama 3.3 70B | Meta | ~25 | Open weights |
| Claude Sonnet 4 | Anthropic | ~400 | Premium mhando |
| GPT-4o | OpenAI | ~325 | Premium mhando |
| Qwen 2.5 72B | Alibaba | ~40 | Large, capable |
Full list of 579 models at /models/. All use the same /v1/chat/ endpoint - just change the model parameter.
Self-inochengetwa mamodheru: Unogona kubhadharisa zvakajeka tokens kushandiswa. No markup.
Zvekunze mamodheru: our_tokens = provider_usd_cost × 100,000 × 1.30
Mufananidzo: GPT-4o zvinoda $ 0.0025 pa 1K prompt matombo. For 1,000 matombo: $ 0.0025 × 100,000 × 1.30 = 325 tokens kubva pabasa rako.
_Zvimwe
POST /v1/chat/ | Chat ne chero model (self-hosted kana kunze). Streaming inotsigirwa. |
POST /v1/image/generate/ | Tevere, sarudza bhokisi rezvinyorwa (FLUX, SDXL) |
POST /v1/image/edit/ | Inpaint, outpaint, style transfer |
POST /v1/image/enhance/ | Kuwedzera 2x/4x (Real-ESRGAN) |
POST /v1/image/remove-bg/ | Remove background (BRIA RMBG) |
POST /v1/video/generate/ | Text/image to video (CogVideoX) |
POST /v1/tts/ | Kugadzira mashoko (Kokoro, Piper, MeloTTS, Chatterbox) |
POST /v1/tts/stream/ | Streaming TTS (real-time audio chunks) |
POST /v1/stt/transcribe/ | Kushandura audio/video (faster-whisper, 99 languages) |
POST /v1/music/generate/ | Kugadzira mimhanzi kubva pamashoko ezvinyorwa |
POST /v1/music/separate/ | Kusiyana kwevokal/stems (Mel-Band RoFormer + SCNet) |
POST /v1/write/ | Kugadzira zvemukati (esesi, email, nyaya, nezvimwewo) |
POST /v1/code/generate/ | Kugadzira kodhi mu chero rurimi |
POST /v1/summarize/ | Kuisa mufananidzo |
POST /v1/humanize/ | Kuita kuti AI tebhu iite semunhu |
POST /v1/detect/ | Kuwana AI-yakagadzirwa zvemukati |
POST /v1/translate/ | Kushandura mazita (MadLAD-400, 450+ languages) |
POST /v1/ocr/ | Kubvisa tenzi kubva kuimages |
GET /v1/models | List all available models (self-hosted + external) |
GET /v1/status/{job_id}/ | Cheka async job status |
GET /health | API hutano cheki |
Ku_zivana
Kusanganisira yako API key mu Authorization header:
Authorization: Bearer sk-free-YOUR_API_KEY
Yese mhinduro inosanganisira free_ai_usage block ichiratidza ma tokens anoshandiswa:
{
"choices": [...],
"free_ai_usage": {
"tokens_used": 142, // actual tokens processed
"tokens_charged": 142, // tokens deducted from your balance
"source": "self_hosted", // or "external"
"model": "qwen7b"
}
}
Kubhadhara Zvirambidzo & Plans
Same token pricing pawebsite uye API. No zvakasiyana API pricing.
| Plan | Tokens/mwedzi | API Kukumbira / Min | Mutengo |
|---|---|---|---|
| _Dambudziko: | 30K / zuva (pool) | 10 | $0 |
| Chikuru | 250K | 30 | $5/mwedzi |
| Pro | 1.25M | 60 | $19/mwedzi |
| Business | 6.25M | 120 | $49/mwedzi |
| Enterprise | _Zvinoenderana | _Zvinoenderana | Contact |
Token mapakeji anowanikwa: 200K/$5, 1M/$15, 5M/$40. Tokens haasi ku expire.
Python SDK & CLI
Python SDK
Kuwana chero AI chirongwa kubva Python yako kodhi.
pip install free-dot-ai
from freeai import FreeAI
ai = FreeAI(api_key="sk-free-xxx")
# Chat
response = ai.chat("What is Python?")
print(response.text)
# Image generation
image = ai.image("A sunset over mountains")
image.save("sunset.png")
# Text to speech
audio = ai.tts("Hello world", voice="af_heart")
audio.save("hello.mp3")
# Translation
result = ai.translate("Hello", to="es")
print(result.text) # "Hola"
PyPI
PyPI
CLI Kunyora Mubatsiri
Free, open-source sarudzo Claude Code, Cursor, uye GitHub Copilot.
pip install freeai-code
# Start a coding session
cd your-project/
free-code
# Ask about your codebase
free-code ask "How does auth work?"
# Execute a task
free-code run "Add unit tests for User model"
30K free tokens/day. BYOK supported. 579 models. Session sync with Web IDE.
PyPI PyPI Web IDEBYOK (Bring Your Own Key)
Usashandisa yako yepamutemo API mabhureki kubva kune chero mutengesi. Zero markup, zero mari. Free.ai chete proxies chikumbiro.
| Mugadziri | Chikamu cheKeyboard | Mamodheru | Kunyora |
|---|---|---|---|
| OpenAI | sk-proj-xxx | GPT-4o, GPT-4o Mini, o1, o3, etc. | $0 |
| Anthropic | sk-ant-xxx | Claude Sonnet 4, Opus 4, Haiku, etc. | $0 |
AIzaSyxxx | Gemini 2.5 Pro, Flash, nezvimwe. | $0 | |
| Vamwe Vagadziri | sk-or-xxx etc. | 579 mamodheru kubva kune vese vatengesi | $0 |
# Python SDK with BYOK
from freeai import FreeAI
ai = FreeAI(provider="openai", api_key="sk-proj-xxx")
response = ai.chat("Hello", model="gpt-4o")
# CLI with BYOK
# free-code config set provider openai
# free-code config set api_key sk-proj-xxx
Chikamu chako, kushandisa kwako, bhiri rako. Hapana kurodha pasi. Hapana kubvisa kwechiratidzo kubva kune yako Free.ai chengetedzo.
API FAQ
"model": "openai/gpt-4o" or "model": "anthropic/claude-sonnet-4". Full list at /models/ or GET /v1/models."stream": true in your chat request. Responses are delivered via Server-Sent Events (SSE).free_ai_usage.tokens_charged mumunda weAPI response.pip install free-dot-ai. It wraps every endpoint with typed responses. For coding assistance, install pip install freeai-code. The API also follows OpenAI's format, so you can use the openai Python/Node SDK with our base URL. API docs