Free.ai API

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

He pēhea te mahi

1
Ki te whiwhi taupū API

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

2
Ka karangatia tētahi pito mutunga

Whakapāpāho, whakaahua, TTS, STT, pūoro, whakamāoritanga — katoa i tētahi API

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": "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 whakanoho-i-tono Te iti rawa
KāhuaKāhuaKo te utu tohuKa taea te whakawātea
Qwen 2.5 7BWhakawhitiwhiti/Wāhi/KoodeKo ngā tohu tūturu i whakamahia (input+output)Apache 2.0
Āhua tereKo te whakatūnga o te whakaahua1,000 tohu/whitiāhuaApache 2.0
KokoroHuinga ki te kōrero1 tohu i ia 4 tohuApache 2.0
tere ake-whisperWhakawhiti ki te kupu4 ngā tohu/tuna o te oroMIT
LDM 2 PūoroKo te whakatūnga pūoro2,000 ngā tohu/whakahaereApache 2.0
MadLAD-400Ka whakamāoritia (450+ wā)Kua whakamahia ngā tohu tūturuApache 2.0
RĀWAHI RĀWAHIWhakatauiratanga whakaahua500 ngā tohu/whitiāhuaBSD
BRIA RMBGWhakamutunga o te papamuri500 ngā tohu/whitiāhuaApache 2.0
CogVideoXKo te whakatūnga o te vitio5,000 ngā tohu/whitiāhuaApache 2.0
DemocWhakawehe reo500 ngā tohu/whakahaereMIT
Kāhua o waho 346+ tauira

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āhuaKaihoahoa~Tokena ia karereWhakawa
GPT-4o MiniKa tūpāpaku te AI~20Māmā, tere
Gemini 2.0 Te whakaataGoogle~15Ā-hā rawa
Mistral NemoMistral~10Waihoki nui
DeepSeek V3DeepSeek~30He tino kaha te take
Llama 3.3 70BMeta~25Ka whakatuwheratia nga taumahatanga
Claude Sonnet 4Anthropic~400Whakahautanga
GPT-4oKa tūpāpaku te AI~325Whakahautanga
Qwen 2.5 72BAlibaba~40Nui, 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.

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: 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

Pāpāho / LLM
POST /v1/chat/E kōrerorerotia ana ki tētahi tauira (whakamārō-kore, o waho rānei). E tautokona ana te rerenga.
Pikitia
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)
Whakataki i te kaituhituhi
POST /v1/video/generate/Wetereo/Piki ki te ataata (CogVideoX)
Huinga ki te kōrero
POST /v1/tts/Whakana te kōrero (Kokoro, Piper, MeloTTS, Chatterbox)
POST /v1/tts/stream/TTS (ngā hautanga oro-kore)
Whakawhiti ki te kupu
POST /v1/stt/transcribe/Whakarerekē i te oro/whitiāhua (whakatere-whakatere, 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ūturu (Demucs)
Ka taea te whakahua i te reo
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
Ka whakamāoritia te OCR
POST /v1/translate/Ka whakamāoritia te kupu (MadLAD-400, 450+ reo)
POST /v1/ocr/Whakapūkete i te kupu mai i ngā whakaahua
Waihoki
GET /v1/modelsList all available models (self-hosted + external)
GET /v1/status/{job_id}/Ka whakamātau te tūnga o te mahi ā-whakahaere
GET /healthKa 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 whakaataWhakaritenga/WāAPI Requests/MinWhakahauhau
Waihoki5K/rau (pū)10$0
Taketake250K30$5/whā
Ka taea1.25M60$19/whā
Kauhanga6.25M120$49/whā
KaupapaKa taea te whakahuaKa taea te whakahuaKā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 IDE

BYOK (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.

KaihoahoaHe pūāhua kīKāhuaWhakatuhi
Ka tūpāpaku te AIsk-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.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

He! Ka whiwhi ngā kāwanatanga wātea i ngā tohu 5K / rā me te tāpiritanga whakaingoatanga 10K. Ka whakarato ētahi atu tohu me ngā tepe ā-tau tiketike ake.

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

Ko te wāhi mutunga ōrite, ka huri noa te tauira. Hei tauira: "tauira": "openai/gpt-4o", "tauira" rānei: "anthropic/claude-sonnet-4". Ko te rārangi katoa i /apps/, 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ōrerorero OpenAI. Ka taea e koe te whakamahi i tētahi SDK OpenAI-hōia — ka huri noa te URL taketake ki https://api.free.ai me te whakamahi i tōtou kī API Free.ai.

He! Ka whakaritea "stream": true i roto i tōna tono kōrero. Ka tukuna ngā urupare mā ngā Hītori Pāpāho-Tuhi (SSE).

Ka whiwhi whakautu 402 ki tētahi karere hapa. Whakawhiwhia ētahi atu tohu i te /price/, e tūmanako ana rānei kia whakaoratia e koe tōna pūtea wātea i ia rā. Ka wātea tonu ngā tauira whakanoho-i-te-rohe 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 whakanohoia: e haere ana i runga i tātau GPU. Te ngāwari rawa, te tere rawa, te tino tūmataiti. Āhua: i whakawhirinaki ki te kaiāwhina tauira. Ki te āhei ki GPT-4, Claude, Gemini, me ētahi atu. He nui ake ngā tohu nā te utu API kaiāwhina.

Ka toro atu ki tōna pou kāri i /account/, ka tirohia rānei te āpure free_ai_usage.tokens_charged i ia urupare API.

He! Ka whakatū i tātau Python SDK: pip whakatū i te wāteatanga-pū-ai. Ka whakatū i ia wāhi mutunga me ngā urupare i tātai. Mō te āwhina waehere, whakatū pip whakatū i te wāteatanga-pū-ai-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 mō 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 ki te Free.ai? Whakapāpāho ki ōna hoa!

Whakawhiwhia tēnei pātū