Free.ai API
Àwọn àwọn
Bií o ṣe n ṣiṣẹ́
Gba àwọn àmì-ìwé API
Rá àwọn tókènì, ki o si ṣẹ́dá bọ́tìnì sk-free- rẹ̀
Wá Àwọn Ààyè Àìparí
Chat, àwòrán, TTS, STT, ìranṣẹ́, ìṣàfarawé - gbogbo API kan
Fi pamọ́ Nínú Àwọn Àmì-ìwé
Ìdáràn kan. Àwọn àtòjọ-ẹ̀yàn gbogbo ní àwọn
Ìṣàmúlò-ètò
# 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);
Àwọn Ìjánu-ìṣàmúlò-ètò
Gbogbo ohun na owo-ìtàn. Ìbàlẹ̀ kan fun gbogbo àwọn àtòjọ-ẹ̀yàn. Ìbàlẹ̀ kan tí o bá ló API tàbí ojú-ìwé.
| Àwọn ìṣàmúlò-ètò | Àwọn Ìṣàmúlò-ètò | Àwọn Ìgúnrégé | Àwọn Àmì-ìwé |
|---|---|---|---|
| Qwen 2.5 7B | Chat/Write/Code | Àwọn tókè tí a lò (input+output) | _Ìṣàmúlò-ètò |
| Tí àwọn àwọn ààyè-iṣẹ́ | Àwọn Àwòrán | 5,000 tokens/image | _Ìṣàmúlò-ètò |
| _Ìṣàmúlò-ètò | Àkọ́lé sí Àkọ́lé | Àwọn àmì-ìwé àwọn àmì-ìwé | _Ìṣàmúlò-ètò |
| _Ìṣàmúlò-ètò | Àwọn Àkọ́lé | 4 token/second tí àwòrán | MIT |
| _Ìṣàmúlò-ètò | Ìṣàfilọ́lẹ̀ Àwọn Àkọ́kọ́ | 2,000 tokens/track | _Ìṣàmúlò-ètò |
| _Ìṣàmúlò-ètò | Àwọn ìṣàfarawé (450+ àwọn ìṣàfarawé) | Àwọn tókè tí a lò | _Ìṣàmúlò-ètò |
| _Ìṣàmúlò-ètò | Ìṣàmúlò-ètò àwòrán | 500 tokeni/àwòrán | BSD |
| BRIA RMBG | Ìjánú ìsàlẹ̀-ilà | 500 tokeni/àwòrán | _Ìṣàmúlò-ètò |
| _Ìṣàmúlò-ètò | Àwọn àkọlé àwòrán | 30,000 tokens/video | _Ìṣàmúlò-ètò |
| Stem Separator (Mel-Band RoFormer + SCNet) | Àwọn ìṣàfarawé àwọn ìṣàfarawé àwọn àmì-ìwé | 500 tokeni/àkọ́kọ́ | MIT + Apache-2.0 |
Access GPT-6, Claude, Gemini, Llama, DeepSeek and the rest of the 579 models. Token cost is based on provider pricing converted to our tokens.
| Àwọn ìṣàmúlò-ètò | Àwọn Ìṣàmúlò-ètò | Àwọn Àmì-ìwé | Àwọn Àmì-ìwé |
|---|---|---|---|
| GPT-4ókè | OpenAI | ~20 | Ókù, àìpẹ̀ |
| Gemini 2.0 Fẹ̀lì | ~15 | Àwọn ìṣàmúlò-ètò | |
| Nemo | _Ìṣàmúlò-ètò | ~10 | Àwọn ìṣàmúlò-ètò |
| DeepSeek V3 | _Ìṣàmúlò-ètò | ~30 | Àwọn ìṣàmúlò-ètò |
| Llama 3.3 70B | Meta | ~25 | Ṣí àwọn àwọn ìṣàmúlò-ètò |
| Claude Sonnet 4 | Anthropic | ~400 | Àwọn ìṣàmúlò-ètò |
| Òkè | OpenAI | ~325 | Àwọn ìṣàmúlò-ètò |
| Qwen 2.5 72B | Alibaba | ~40 | Ńlá, àwọn ìṣàmúlò-ètò |
Àtòjọ àwọn àwọn ìṣàmúlò-ètò 579 nínú /ìṣàmúlò-ètò/. Gbogbo wọ́n ló àwọn ààyè ìparísẹ̀ /v1/ìpàtìlẹ̀/ - yipadà àwọn ààyè àwọn ààyè model.
Àwọn ìṣàmúlò-ètò àìṣàmúlò-ètò: Ò fi àwọn tókè tí a lò pamọ́. Kò ní àwọn àmì-ìwé.
Àwọn ìṣàmúlò-ètò inú: our_tokens = provider_usd_cost × 100,000 × 1.30
Àwọn ààtòjọ-ẹ̀yàn: GPT-4o gbàwò $0.0025 fun 1K àwọn tókènì ìṣàfihàn. Fun 1,000 tókènì: $0.0025 × 100,000 × 1.30 = Àwọn àtòjọ-ẹ̀yàn lati inú ìbàlẹ̀ rẹ̀.
Àwọn ààyè-iṣẹ́ ìtàn
POST /v1/chat/ | Chat pẹlú àwọn móòdù fún gbogbó àwọn (àtí àwọn ààyè-iṣẹ́). À̀̀ṣàfilọ́lẹ̀ ìṣàfilọ́lẹ̀. |
POST /v1/image/generate/ | Àkọ́lé sí àwòrán (FLUX, SDXL) |
POST /v1/image/edit/ | Àwọn àwọn àwòrán, àwọn àwòrán inú, àwọn àwòrán ìṣàmúlò-ètò |
POST /v1/image/enhance/ | Fi àwọn ìṣàmúlò-ètò pamọ́ sí àwọn ààtò àwọn ààtò |
POST /v1/image/remove-bg/ | Pa àwọn ìsàlẹ̀-ilà kù (BRIA RMBG) |
POST /v1/video/generate/ | Àkọ́lé/ábùó sí àwòrán (CogVideoX) |
POST /v1/tts/ | Ṣẹ̀dà àkọlé (Kokoro, Piper, MeloTTS, Chatterbox) |
POST /v1/tts/stream/ | Ìjáde TTS (àwọn àkóónú àìgbọ̀n tí a bá fi pẹ̀lú àwọn ààyè-iṣẹ́) |
POST /v1/stt/transcribe/ | Ṣàfihàn àwòrán/àwòrán (faster-whisper, àwọn ìtàn 99) |
POST /v1/music/generate/ | Fi àwọn ìṣàmúlò-ètò pamọ́ sí àwọn àkọlé |
POST /v1/music/separate/ | Fi àwọn àwòrán/àtí àwọn àgbègbè pamọ́ (Mel-Band RoFormer + SCNet) |
POST /v1/write/ | Ṣẹ̀dà àwọn ìrísí-lẹ́tà (ìwé-ìwé, àmì-ìwé, àkọlé, abbl.) |
POST /v1/code/generate/ | Fi àwọn àmì-ìwé pamọ́ sínú ìrísí-lẹ́tà |
POST /v1/summarize/ | Àwọn àkọlé |
POST /v1/humanize/ | Fi àkọlé AI pamọ́ sí ìrànwọ́ eniyan |
POST /v1/detect/ | Wá àwọn ààyè-iṣẹ́ tí a ṣẹ̀dà láti inú AI |
POST /v1/translate/ | Ṣàfikún àkọlé (MadLAD-400, 450+ àwọn ìtàn) |
POST /v1/ocr/ | Ṣàfikún àkọlé láti inú àwòrán |
GET /v1/models | List all available models (self-hosted + external) |
GET /v1/status/{job_id}/ | Wá àwọn ààtò àtòjọ-ẹ̀yàn |
GET /health | Àwọn ìṣàmúlò-ètò API |
Àwọn Àmì-ìwé
Fi bọ́tìnì API rẹ̀ pamọ́ sínú àkọlé Authorization:
Authorization: Bearer sk-free-YOUR_API_KEY
Àwọn ìṣàfihàn gbogbo ní àwọn àkóónú free_ai_usage tí wọ́n ṣàfihàn àwọn tókènì tí a lò:
{
"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"
}
}
Àwọn Ìgbà Ìṣẹ́
Àwọn àwọn
| Àwọn ààyè-iṣẹ́ | Àwọn àyọkà/Òkè | Àwọn Ìgbégbé API/Min | Àwọn Ìgúnrégé |
|---|---|---|---|
| Àìfẹ́ | 30K/ọ̀jọ́ (àwọn ààyè) | 10 | $0 |
| Àwọn àgbékalẹ̀ | 250K | 30 | $5/oṣù |
| Àwọn Àwọn Àkọ́lé | 1.25M | 60 | $19/oṣù |
| Àwọn Àkọ́gbègbè | 6.25M | 120 | $49/oṣù |
| Àwọn Ìṣàmúlò-ètò | Àwọn ìkúndùǹ | Àwọn ìkúndùǹ | Àwọn Àkọ́lé |
Àwọn pákì Token tí a ní: 200K/$5, 1M/$15, 5M/$40. Tokens kò lè kù.
Python SDK & CLI
Python SDK
Gbaàwọlé gbogbo àtòjọ-ẹ̀yàn AI láti inú ìṣàmúlò-ètò Python rẹ̀.
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
Àwọn Àkọ́lé
Àwọn ìṣàmúlò-ètò ọ̀fẹ́, àìdálò-ètò tí a ṣí fún Claude Àkóódù, Àìṣàmúlò-ètò, àti 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 IDE Wẹ́ẹ̀bùBYOK (Ṣẹ̀dà Bọ́tìnì Rẹ̀)
Lo àwọn bọ́tìnì API rẹ̀ láti inú àwọn oníjádè. Kò ní àwọn ààyè, kò ní àwọn àwọn owó. Free.ai kò lè fi àgbèwọlé àwọn ìṣàmúlò-ètò.
| Àwọn Ìṣàmúlò-ètò | Àwọn ìgúnrégé bọ́tìnì | Àwọn ìṣàmúlò-ètò | Àwọn àmì-ìwé |
|---|---|---|---|
| OpenAI | sk-proj-xxx | GPT-4o, GPT-4o Kekeré, o1, o3, wdg. | $0 |
| Anthropic | sk-ant-xxx | Claude Sonnet 4, Opus 4, Haiku, abbl. | $0 |
AIzaSyxxx | Gemini 2.5 Pro, Flash, abbl. | $0 | |
| Àwọn Àṣẹ Àwọn Àwọn Àṣẹ | sk-or-xxx etc. | Àwọn ìṣàmúlò-ètò 579 láti inú gbogbo àwọn ìṣẹ̀dà | $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
Your key, your usage, your bill. No logging. No token deductions from your Free.ai balance.
Àwọn Àgbègbè
"móòdù": "openai/gpt-4o" tàbí "móòdù": "anthropic/claude-sonnet-4". Àtòjọ ìṣàmúlò-ètò nínú /móòdù/ tàbí GET /v1/mòòdù. "stream": true papọ nínú àgbèwọlé àkọ́kọ́ rẹ. Àwọn ìṣàfihàn tí a fi pamọ́ láti inú àwọn àgbèwọlé àwọn àgbèwọlé-sáà (SSE).free_ai_usage.tokens_charged nínú àwọn ìṣàfihàn API níkan.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