Free.ai API
Eochair API amháin. Gach uirlis AI. Billeáil comhartha simplí.
Conas a oibríonn sé
Faigh Eochair API
Ceannaigh comharthaí, ansin giniúint do eochair sk-free-
Glaoigh ar Aon Deireadhphointe
Comhrá, íomhánna, TTS, STT, ceol, aistriúchán — gach API amháin
Íoc i gComharthaí
Iarmhéid amháin. Costais gach uirlis comharthaí. Simplí.
Tosaigh Mear
# 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);
Praghsáil Comharthaí
Cosnaíonn gach rud comharthaí.Iarmhéid amháin do gach uirlis.An praghsáil chéanna cibé an n-úsáideann tú an API nó an láithreán gréasáin.
| Samhail | Cineál | Costas an Chomhartha | Ceadúnas |
|---|---|---|---|
| Qwen 2. 5 7B | Comhrá/Scríobh/Cód | Comharthaí iarbhír a úsáidtear (ionchur+aschur) | Apache 2. 0 |
| FLUX. 1 Fast | Giniúint Íomhá | 1,000 comhartha/íomhá | Apache 2. 0 |
| Kokoro | Téacs- go- CaintComment | 1 chomhartha in aghaidh 4 charachtar | Apache 2. 0 |
| faster- whisper | Urlabhra go Téacs | 4 chomhartha/soicind fuaime | MIT |
| LDM Fuaime 2 | Giniúint Cheoil | 2,000 comhartha/rian | Apache 2. 0 |
| MadLAD- 400 | Aistriúchán (450+ langs) | Comharthaí iarbhír a úsáidtear | Apache 2. 0 |
| Real- ESRGAN | Uasscálú Íomhá | 500 comhartha/íomhá | BSD |
| BRIA RMBG | Baint Cúlra | 500 comhartha/íomhá | Apache 2. 0 |
| CogVideoX | Giniúint Físe | 5,000 comharthaí / físeán | Apache 2. 0 |
| Demucs | @ item: inlistbox | 500 comhartha/rian | MIT |
Rochtain GPT-4, Claude, Gemini, Llama, DeepSeek, agus 340 + samhlacha níos mó.Tá costas comhartha bunaithe ar phraghsáil soláthraí a thiontú go dtí ár gcomharthaí.
| Samhail | Soláthraí | ~Comharthaí in aghaidh na teachtaireachta | Nótaí |
|---|---|---|---|
| GPT- 4o Mini | OpenAI | ~20 | Cheap, go tapa |
| Gemini 2. 0 Flash | ~15 | An- thapa | |
| Mistral Nemo | Mistral | ~10 | Luach iontach |
| DeepSeek V3 | DeepSeek | ~30 | Réasúnaíocht láidir |
| Flame 3. 3 70B | Meta | ~25 | Meáchain oscailte |
| @ item: inlistbox | Antraipiúil | ~400 | Cáilíocht préimhe |
| GPT-4o | OpenAI | ~325 | Cáilíocht préimhe |
| Qwen 2. 5 72B | Alibaba | ~40 | Móra, cumasach |
Liosta iomlán de 346+ samhlacha ag /apps/. Úsáideann gach ceann acu an pointe deiridh céanna /v1/chat/ — ach an paraiméadar model a athrú.
Samhlacha féin-óstaithe: Íocann tú na comharthaí cruinn a úsáidtear. Uimh marcáil.
Samhlacha Seachtracha: our_tokens = provider_usd_cost × 100,000 × 1.30
Sampla: GPT-4o costais $ 0.0025 in aghaidh 1K comharthaí leid. I gcás 1,000 comharthaí: $ 0.0025 × 100,000 × 1.30 = 325 comhartha ó d'iarmhéid.
Gach Deireadhphointe
POST /v1/chat/ | Comhrá a dhéanamh le haon samhail (féin-óstáil nó seachtrach). Streaming tacaíocht. |
POST /v1/image/generate/ | Téacs go híomhá (FLUX, SDXL) |
POST /v1/image/edit/ | Inpéinteáil, aspéinteáil, aistriú stíle |
POST /v1/image/enhance/ | Uasscálú 2x/ 4x (Real- ESRGAN) |
POST /v1/image/remove-bg/ | Bain cúlra (BRIA RMBG) |
POST /v1/video/generate/ | Téacs/íomhá go físeán (CogVideoX) |
POST /v1/tts/ | Gineann sé caint (Kokoro, Piper, MeloTTS, Chatterbox) |
POST /v1/tts/stream/ | TTS sruthú (bróga fuaime fíor- ama) |
POST /v1/stt/transcribe/ | Tras-scríobh fuaime/físe (faster-whisper, 99 teanga) |
POST /v1/music/generate/ | Gin ceol ó thuairisc téacs |
POST /v1/music/separate/ | Guthanna/gathanna ar leith (Demucs) |
POST /v1/write/ | Ábhar a ghiniúint (aiste, ríomhphost, scéal, etc.) |
POST /v1/code/generate/ | Cód a ghiniúint in aon teanga |
POST /v1/summarize/ | Déan achoimre ar théacs |
POST /v1/humanize/ | Déan AI téacs fuaime daonna |
POST /v1/detect/ | Aimsigh ábhar AI-ghinte |
POST /v1/translate/ | Téacs a aistriú (MadLAD-400, 450+ teangacha) |
POST /v1/ocr/ | Sliocht téacs ó íomhánna |
GET /v1/models | List all available models (self-hosted + external) |
GET /v1/status/{job_id}/ | Seiceáil stádas an jabanna neamhshioncrónaigh |
GET /health | Seiceáil shláinte API |
Fíordheimhniú
Cuir d'eochair API sa cheanntásc Authorization:
Authorization: Bearer sk-free-YOUR_API_KEY
Tá bloc free_ai_usage ag gach freagra a thaispeánann na comharthaí a úsáidtear:
{
"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"
}
}
Teorainneacha Ráta agus Pleananna
Praghsáil comhartha céanna ar an láithreán gréasáin agus API. Níl aon phraghsáil API ar leithligh.
| Plean | Comharthaí/Mí | Iarratais API/Min | Praghas |
|---|---|---|---|
| Saor | 5K/day (pool) | 10 | $0 |
| Bun | 250K | 30 | $5/ mí |
| Pro | 1.25M | 60 | $19/mhí |
| Gnó | 6.25M | 120 | $49/mhí |
| Fiontraíocht | Saincheaptha | Saincheaptha | Teagmháil |
Pacáistí comhartha atá ar fáil: 200K / $ 5, 1M / $ 15, 5M / $ 40.
Python SDK & CLI
Python SDKName
Rochtain ar gach uirlis AI ó do chód 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
Cúntóir Códaithe CLIComment
Saor in aisce, foinse oscailte malartach Claude Cód, Cúrsóir, agus 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 comharthaí saor in aisce / lá. BYOK tacaíocht. 346+ samhlacha. Sioncrónú seisiún le Web IDE.
GitHub PyPI Web IDEBYOK (Tabhair d' Eochair Féin)
Bain úsáid as do chuid eochracha API féin ó aon soláthraí. Ag tabhairt freagra ar zero fees. Free.ai ach proxies an t-iarratas.
| Soláthraí | Formáid na hEochrach | Samhlacha | Marcáil |
|---|---|---|---|
| OpenAI | sk-proj-xxx | GPT-4o, GPT-4o Mini, o1, o3, etc. | $0 |
| Antraipiúil | sk-ant-xxx | Claude Sonnet 4, Opus 4, Haiku, etc. | $0 |
AIzaSyxxx | Gemini 2.5 Pro, Flash, etc. | $0 | |
| Soláthraithe Eile | sk-or-xxx etc. | 346+ samhlacha ó gach soláthraí | $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
Do eochair, d'úsáid, do bhille. Gan logáil. Gan asbhaintí comhartha ó d'iarmhéid Free.ai.
Ceisteanna Coitianta API
"model": "openai/gpt-4o" nó "model": "anthropic/claude-sonnet-4". Liosta iomlán ag /apps/ nó GET /v1/models."stream": true i d'iarratas comhrá. Seoltar freagraí trí Theagmhais Seolta ón bhFreastalaí (SSE).free_ai_usage.tokens_charged i ngach freagra API.pip install free-dot-ai. Déanann sé gach pointe deiridh a fhilleadh le freagraí clóscríofa. Chun cúnamh códaithe a fháil, suiteáil pip install free-dot-ai-code. Leanann an API OpenAI freisin\