Free.ai API
Ko te kī API kotahi. Ko ia utauta AI. Ko te utu tohu māmā.
He pēhea te mahi
Ki te whiwhi taupū API
Whakawhiwhia ngā tohu, kātahi ka waihanga i tōna kī sk-free-
Ka karangatia tētahi pito mutunga
Whakapāpāho, whakaahua, TTS, STT, pūoro, whakamāoritanga — katoa i tētahi API
Whakawhiwhinga ki ngā tohu
He taurite kotahi. Ko ia utauta e utu ana i ngā tohu. Māmā.
Ka tīmata tere
# 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": "flux-schnell"}'
# 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": "flux-schnell", # 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: "flux-schnell" })
});
// 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);
Whakawhiwhinga tohu
Ko nga utu katoa he tohu. He taurite kotahi mō ngā utauta katoa. He ōrite te utu mēnā e whakamahi ana rānei koe i te API, i te pūnaewele rānei.
| Kāhua | Kāhua | Ko te utu tohu | Ka taea te whakawātea |
|---|---|---|---|
| Qwen 2.5 7B | Whakawhitiwhiti/Wāhi/Koode | Ko ngā tohu tūturu i whakamahia (input+output) | Apache 2.0 |
| Āhua tere | Ko te whakatūnga o te whakaahua | 1,000 tohu/whitiāhua | Apache 2.0 |
| Kokoro | Huinga ki te kōrero | 1 tohu i ia 4 tohu | Apache 2.0 |
| tere ake-whisper | Whakawhiti ki te kupu | 4 ngā tohu/tuna o te oro | MIT |
| LDM 2 Pūoro | Ko te whakatūnga pūoro | 2,000 ngā tohu/whakahaere | Apache 2.0 |
| MadLAD-400 | Ka whakamāoritia (450+ wā) | Kua whakamahia ngā tohu tūturu | Apache 2.0 |
| RĀWAHI RĀWAHI | Whakatauiratanga whakaahua | 500 ngā tohu/whitiāhua | BSD |
| BRIA RMBG | Whakamutunga o te papamuri | 500 ngā tohu/whitiāhua | Apache 2.0 |
| CogVideoX | Ko te whakatūnga o te vitio | 5,000 ngā tohu/whitiāhua | Apache 2.0 |
| Democ | Whakawehe reo | 500 ngā tohu/whakahaere | MIT |
Ka uru ki GPT-4, Claude, Gemini, Llama, DeepSeek, me ngā tauira anō 340+. Ko te utu tohu e whakawhirinaki ana ki te utu kaiāwhina i tatauranga ki a tātau tohu.
| Kāhua | Kaihoahoa | ~Tokena ia karere | Whakawa |
|---|---|---|---|
| GPT-4o Mini | Ka tūpāpaku te AI | ~20 | Māmā, tere |
| Gemini 2.0 Te whakaata | ~15 | Ā-hā rawa | |
| Mistral Nemo | Mistral | ~10 | Waihoki nui |
| DeepSeek V3 | DeepSeek | ~30 | He tino kaha te take |
| Llama 3.3 70B | Meta | ~25 | Ka whakatuwheratia nga taumahatanga |
| Claude Sonnet 4 | Anthropic | ~400 | Whakahautanga |
| GPT-4o | Ka tūpāpaku te AI | ~325 | Whakahautanga |
| Qwen 2.5 72B | Alibaba | ~40 | Nui, kaha |
Ko te rārangi katoa o ngā tauira 346+ i te /apps/. Ka whakamahia e ia te /v1/chat/ te wāhi mutunga - ka huri noa te model taurearea.
Kāhua whakanoho-i-tono: E utu ana koe i ngā tohu tika i whakamahia. Kāore he tohu.
Kāhua o waho: our_tokens = provider_usd_cost × 100,000 × 1.30
Hei tauira: GPT-4o ko te utu $0.0025 ia tohu whakahau 1K. Mō ngā tohu 1,000: $0.0025 × 100,000 × 1.30 = 325 ngā tohu mai i tōna taurite.
Ko nga pito mutunga katoa
POST /v1/chat/ | E kōrerorerotia ana ki tētahi tauira (whakamārō-kore, o waho rānei). E tautokona ana te rerenga. |
POST /v1/image/generate/ | Huinga ki te whakaahua (FLUX, SDXL) |
POST /v1/image/edit/ | Inpaint, outpaint, whakawhitinga kāhua |
POST /v1/image/enhance/ | Whakatauira 2x/4x (Real-ESRG) |
POST /v1/image/remove-bg/ | Whakamutunga te papamuri (BRIA RMBG) |
POST /v1/video/generate/ | Wetereo/Piki ki te ataata (CogVideoX) |
POST /v1/tts/ | Whakana te kōrero (Kokoro, Piper, MeloTTS, Chatterbox) |
POST /v1/tts/stream/ | TTS (ngā hautanga oro-kore) |
POST /v1/stt/transcribe/ | Whakarerekē i te oro/whitiāhua (whakatere-whakatere, 99 reo) |
POST /v1/music/generate/ | Ka whakaputa pūoro mai i te whakaahuatanga kupu |
POST /v1/music/separate/ | Whakawehe ngā pūoro/tūturu (Demucs) |
POST /v1/write/ | Whakanao i ngā ihirangi (whakahaere, imeli, kōrero, ērā atu mea). |
POST /v1/code/generate/ | Ka whakaputaina te waehere i roto i tētahi reo |
POST /v1/summarize/ | Whakarārangi kupu |
POST /v1/humanize/ | Ka hanga te kupu AI i te oro tangata |
POST /v1/detect/ | Ki te kite i ngā ihirangi i hangaia e AI |
POST /v1/translate/ | Ka whakamāoritia te kupu (MadLAD-400, 450+ reo) |
POST /v1/ocr/ | Whakapūkete i te kupu mai i ngā whakaahua |
GET /v1/models | List all available models (self-hosted + external) |
GET /v1/status/{job_id}/ | Ka whakamātau te tūnga o te mahi ā-whakahaere |
GET /health | Ka whakamātautau te hauora o te API |
Whakamau
Kei roto i tōna pātū API i roto i te Authorization kaitūtū:
Authorization: Bearer sk-free-YOUR_API_KEY
Kei roto i ia urupare he kōaro free_ai_usage e whakaatu ana i ngā tohu kua whakamahia:
{
"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"
}
}
Rate Limits & Plans
He ōrite te utu tohu i runga i te pūnaewele me te API. Kāore he utu API motuhake.
| Ka taea te whakaata | Whakaritenga/Wā | API Requests/Min | Whakahauhau |
|---|---|---|---|
| Waihoki | 5K/rau (pū) | 10 | $0 |
| Taketake | 250K | 30 | $5/whā |
| Ka taea | 1.25M | 60 | $19/whā |
| Kauhanga | 6.25M | 120 | $49/whā |
| Kaupapa | Ka taea te whakahua | Ka taea te whakahua | Kāhea |
He pakipū tohu e wātea ana: 200K/$5, 1M/$15, 5M/$40. Kāore e whakamutua ngā tohu.
Python SDK & CLI
Python SDK
Ka taea ngā utauta AI katoa mai i tō tātau waehere Python.
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"
GitHub
PyPI
Te Kaiāwhina waehere CLI
Whakawhiwhinga, pūtake-whenua whirinoa ki te Claude Kōrero, Kāwere, me te GitHub Copilot.
pip install free-dot-ai-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"
5K ngā tohu wātea/rohe. I tautokona e BYOK. 346+ ngā tauira. He whakahōu hanganga me Web IDE.
GitHub PyPI Web IDEBYOK (Kai te mau i tō tou kī)
Ka whakamahia e koe ōna kī API ake mai i tētahi kaiwhakawhiwhi. Kāore te tohu, kore ngā utu. Free.ai anake te mana o te tono.
| Kaihoahoa | He pūāhua kī | Kāhua | Whakatuhi |
|---|---|---|---|
| Ka tūpāpaku te AI | sk-proj-xxx | GPT-4o, GPT-4o Mini, o1, o3, ērā atu mea. | $0 |
| Anthropic | sk-ant-xxx | Claude Sonnet 4, Opus 4, Haiku, ērā atu mea. | $0 |
AIzaSyxxx | Gemini 2.5 Pro, Flash, ērā atu mea. | $0 | |
| Ko ētahi atu kaiwhakawhanake | sk-or-xxx etc. | 346+ ngā tauira mai i ngā kaiwhakawhanake katoa | $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
Ko tātou kī, ko tātou whakamahinga, ko tātou tāke. Kāore he tākuitanga. Kāore he whakaiti tohu mai i tōtou taumahatanga Free.ai.
FAQ API
"tauira": "openai/gpt-4o", "tauira" rānei: "anthropic/claude-sonnet-4". Ko te rārangi katoa i /apps/, GET rānei /v1/tauira."stream": true i roto i tōna tono kōrero. Ka tukuna ngā urupare mā ngā Hītori Pāpāho-Tuhi (SSE).free_ai_usage.tokens_charged i ia urupare API.