API Free.ai

Ko te kī API kotahi. Ko ia utauta AI. Ko te utu tohu māmā.

He pēhea te mahi

1
Ki te whiwhi i tētahi kī API

Whakawhiwhinga tohu, kātahi ka waihanga i tōna kī sk-free-

2
Ka whakapāho te pūwāhi mutunga

Chat, whakaahua, TTS, STT, pūoro, whakamāoritanga - katoa API kotahi

3
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": "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);

Whakatautau

Ko te utu o ngā tohu katoa. He taurite kotahi mō ngā utauta katoa. He ōrite te utu mēnā e whakamahia ana e koe te API, te pūnaewele rānei.

Kāhua whakanoho-i-tono Ko te tino māmā
KāhuaKāhuaKo te utu tohuWhakawhiwhinga
Qwen 2.5 7BChat/Write/CodeKo ngā tohu tūturu i whakamahia (whakahauhau+whakahautu)Apache 2.0
FLUX.2 itiKo te whakatūnga o te whakaahua5,000 tohu/whātataApache 2.0
KokoroWhakahaua te kupu ki te kōrero1 tohu i ia 4 tohuApache 2.0
faster-whisperWhakawhiti ki te kupu4 ngā tohu/tuna o te oroMIT
AudioLDM 2Ko te whakatūnga pūoro2,000 tohu/whakahaereApache 2.0
MadLAD-400Whakamāoritanga (450+ rārangi)Ka whakamahia ngā tohu tūturuApache 2.0
Real-ESRGANWhakahauhautanga whakaahua500 tohu/whātataBSD
BRIA RMBGWhakarewa o te papamuri500 tohu/whātataApache 2.0
CogVideoXKo te whakatūnga o te vitio30,000 tohu/whitiāhuaApache 2.0
Stem Separator (Mel-Band RoFormer + SCNet)Whakawehe reo500 ngā tohu/whakahaereMIT + Apache-2.0
Kāhua o waho Kāhua 579

Ka uru ki te GPT-6, Claude, Gemini, Llama, DeepSeek me te toenga o ngā tauira 579. E ai ki te utu tohu i runga i te utu kaiwhiwhi i tatauranga ki a tātau tohu.

KāhuaKaiwhiwhi~Toke ki ia karereWhakatuhi
GPT-4 te itiOpenAI~20He ngāwari, he tere
Gemini 2.0 Te PūhihiGoogle~15Āhua tere
Mistral NemoMistral~10Waihoki nui
DeepSeek V3DeepSeek~30He tino kaha te take
Llama 3.3 70BMeta~25Ka whakatuwheratia nga taumahatanga
Claude Sonnet 4Anthropic~400Whakahautanga Premium
GPT-4oOpenAI~325Whakahautanga Premium
Qwen 2.5 72BAlibaba~40Nui, kaha

Ko te rārangi katoa o ngā tauira 579 i /mātautau/. Ka whakamahia e ngā mea katoa te /v1/chat/ pēhi te pēhi - ka huri noa te model parameter.

Taupū tohu

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: ko te utu o te GPT-4o $0.0025 ia tohu whakahau 1K. Mō ngā tohu 1,000: $0.0025 × 100,000 × 1.30 = 325 ngā tohu mai i tō tātou taurite.

Ko ngā wāhi mutunga katoa

Chat / LLM
POST /v1/chat/Chat me tētahi tauira (whakamārō, ā-roto rānei). Ka tautokona te rerenga.
Pikitia
POST /v1/image/generate/Te kupu ki te whakaahua (FLUX, SDXL)
POST /v1/image/edit/Inpaint, outpaint, whakawhitinga kāhua
POST /v1/image/enhance/Whakatauira 2x/4x (Real-ESRGAN)
POST /v1/image/remove-bg/Whakamutunga te papamuri (BRIA RMBG)
Whakataki i te pūwhitiwhiti
POST /v1/video/generate/Whakatuhi/whakaahua ki te vitio (CogVideoX)
Whakahaua te kupu ki te kōrero
POST /v1/tts/Whakatū i te kōrero (Kokoro, Piper, MeloTTS, Chatterbox)
POST /v1/tts/stream/TTS te whakateretanga (ngā pūoro reo-wā-tūturu)
Whakawhiti ki te kupu
POST /v1/stt/transcribe/Whakawaenga oro/whitiāhua (faster-whisper, 99 reo)
Pūoro me te oro
POST /v1/music/generate/Ka whakaputa pūoro mai i te whakaahuatanga kupu
POST /v1/music/separate/Whakawehe ngā pūoro/tūpāpaku (Mel-Band RoFormer + SCNet)
Whakahaua ngā utauta tuhituhi
POST /v1/write/Whakanao i ngā ihirangi (whakahaere, maimo, kōrero, ērā atu mea).
POST /v1/code/generate/Ka whakaputaina te waehere i roto i tētahi reo
POST /v1/summarize/Whakapūtātuhi kuputuhi
POST /v1/humanize/Ka mahi te kupu AI i te pūoro tangata
POST /v1/detect/Ki te kite i ngā ihirangi i hangaia e AI
Ka whakamāoritia te whakamāoritanga
POST /v1/translate/Whakamāori i te kupu (MadLAD-400, 450+ reo)
POST /v1/ocr/Whakapūkete i te kupu mai i ngā whakaahua
Whakapānga
GET /v1/modelsList all available models (self-hosted + external)
GET /v1/status/{job_id}/Ka whakamātautau te āhua o te mahi ā-whakahaere
GET /healthKa whakamātautau te hauora o te API

Whakatuhi

Kei roto i tō tou kī 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.

WhakapapaToken/MonthAPI Requests/MinWhakahauhau
Waihoki30K/roa (pū)10$0
Taketake250K30$5/whā
Ka taea1.25M60$19/whā
Waihoki6.25M120$49/whā
KaupapaWhakahauaWhakahauaTātai

Ko ngā pakipū tohu e wātea ana: 200K/$5, 1M/$15, 5M/$40. Kāore e whakamutua ngā tohu.

Python SDK me te CLI

Python SDK

Ka āhei ki ia utauta AI mai i tō tātou 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"
PyPI PyPI
Te Kaiāwhina waehere CLI

Mā te wātea, te pūtake tūwhera o te pūnaha Claude, te Kaituhi, me te 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 ngā tohu wātea/rohe. Ko BYOK i tautokona. ngā tauira 579. Te whakapāpāho ā-rohe me te Web IDE.

PyPI PyPI IDE Wīwī

BYOK (Hoatu i tō tou kī)

Ka whakamahia e koe ōna kī API ake mai i tētahi kaiwhakawhiwhi. Kāore te tohu, kore te utu. Ko te Free.ai anake te mana o te tono.

KaiwhiwhiKāhua kīKāhuaWhakatuhi
OpenAIsk-proj-xxxGPT-4o, GPT-4o Mini, o1, o3, ērā atu mea.$0
Anthropicsk-ant-xxxClaude Sonnet 4, Opus 4, Haiku, ērā atu mea.$0
GoogleAIzaSyxxxGemini 2.5 Pro, Flash, ērā atu mea.$0
Ko ētahi atu kaiwhakawhanakesk-or-xxx etc.Kāhua 579 mai i ngā kaiwhiwhi 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ōna kī, ko tōna whakamahinga, ko tōna tāke. Kāore he tāke. Kāore he whakaiti tohu mai i tōna taumahatanga Free.ai.

FAQ API

He! Ka whiwhi te pūkete wātea i ngā tohu 30K / rā Ko ngā mahere utu e whakarato ana i ngā tohu nui ake me ngā tepe ā-tau tiketike ake.

Kāore! He ōrite nga tohu, he ōrite te utu. Ka tiritiritia tōna taumahatanga tohu i waenganui i te pūnaewele me te API. Ka whakamahia rānei, ka utu ōrite.

Ko te pūngao kotahi, ka huri noa te tauira. Hei tauira: "tauira": "openai/gpt-4o", rānei"tauira": "anthropic/claude-sonnet-4". Ko te rārangi katoa i /tauira/, GET rānei /v1/tauira.

He! Ko te /v1/chat/ te wāhi mutunga e whai ana i te āhua o te whakaotitanga o te kōrero OpenAI. Ka taea e koe te whakamahi i tētahi SDK OpenAI-hōu - ka huri noa te URL taketake ki https://api.free.ai me te whakamahi i tō tou kī API Free.ai.

He! Whakatū "stream": true i roto i tō tātau tono kōrero. Ka tukuna ngā urupare mā ngā Hītori-Hoatu (SSE).

Ka whiwhi a koe i tētahi urupare 402 me tētahi karere hapa. Whakawhiwhia ētahi atu tohu i te /price/, e tūmanako ana rānei kia whakaoratia tō tātou pūrere i ia rā. Ka wātea tonu ngā tauira whakanoho-i-aro i roto i ngā tepe o ia rā.

He! Ko ngā tauira katoa e noho ana i a rātou anō he whakaaetanga MIT/Apache 2.0. Ko ngā ihirangi i hangaia ko tātou mō te whakamahinga hokohoko.

I whakatūria: e haere ana i runga i tātau GPU. Te tino māmā, te tere, te tino tūmataiti. Ā-wāhi: i whakatūria ki te kaikōrero tauira. Ki te GPT-4, Claude, Gemini, me ētahi atu. He nui ake ngā tohu nā te utu API kaikōrero.

Ka haere ki tōna pou i /account/, ki te arotake rānei i te āpure free_ai_usage.tokens_charged i ia urupare API.

He! Ka whakatū i tātau Python SDK: pip whakatū i te wātea-wāhanga-ai. Ka whakatū i ia wāhi mutunga me ngā urupare i tātaitia. Mō te āwhina waehere, whakatū i te pip whakatū i te wātea-wāhanga-kōrero. Ka whai hoki te API i OpenAI\

E whai ana tātau ki te 99.9% o te wā. Kei roto i ngā mahere o te kamupene ko ngā whakaritenga SLA. Ka tirohia / hauora mo te tūnga wā tūturu.

Email hello@free.ai, ki te toro atu rānei ki /contact/. Ka whiwhi tautoko arotahi ngā mahere Pro+. Kei roto i ngā urupare hapa he mea hapa_id mō te whakarerekētanga.

E hiahia ana Free.ai? Whakapāpāho ki ōna hoa!

Whakawa tēnei pātaka