API Free.ai

Un allwedd API. Pob offeryn AI. Bil tocyn syml.

Sut mae'n Gweithio

1
Nôl Allwedd API

Prynu tocynnau, ac yna creu eich allwedd sk-free-

2
Galw unrhyw Ddiwedd

Sgwrsio, delweddau, TTS, STT, cerddoriaeth, cyfieithiadau - pob un API

3
Talu mewn Tocynnau

Un balans. Mae pob offeryn yn costio tocynnau. Syml.

Cychwyn Cyflym

# 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);

Prisio Tocynnau

Mae popeth yn costio tocynnau. Un balans ar gyfer pob offeryn. Yr un pris os ydych yn defnyddio'r API neu'r wefan.

Modelau Hunan- Westeiedig Cheapest
ModelMathCost TocynTrwydded
Qwen 2.5 7BSgwrsio/Ysgrifennu/CôdTocynnau gwirioneddol a ddefnyddir (mewnbwn+allbwn)Apache 2. 0
FLUX. 1 CyflymCreu Delwedd1,000 tocyn/ddelweddApache 2. 0
KokoroTestun i LeferyddComment1 tocyn am bob 4 nodApache 2. 0
faster-whisperLleferydd i DestunName4 tocyn/eiliad o sainMIT
SainCreu Cerddoriaeth2,000 tocyn/tracApache 2. 0
MadLAD- 400Cyfieithiad (450+ o dudalennau)Tocynnau gwirioneddol a ddefnyddiwydApache 2. 0
Real-ESRGANUwchraddio Delwedd500 tocyn/ddelweddBSD
BRIA RMBGGwaredu Cefndir500 tocyn/ddelweddApache 2. 0
CogVideoXCreu Fideo5,000 tocyn/fideoApache 2. 0
DemucsAtal Seiliau500 tocyn/tracMIT
Modelau Allanol 346+ modelau

Cyrchu GPT-4, Claude, Gemini, Llama, DeepSeek, a 340+ mwy o fathau. Mae cost tocynnau yn seiliedig ar bris y darparwr wedi ei drosi i'n tocynnau.

ModelDarparwr~Tocynnau y negesNodiadau
GPT-4o MiniOpenAI~20Cheap, fast
Fflach Gemini 2. 0Google~15Cyflym iawn
Mistral NemoMistral~10Gwerth mawr
ChwilioDdwfn V3Chwilio Ddwfn~30Rhesymu gryf
Flame 3.3 70BMeta~25Agor pwysau
Claude Sonnet 4Anthropic~400Ansawdd Uchel
GPT-4oOpenAI~325Ansawdd Uchel
Qwen 2.5 72BAlibaba~40Maint:

Rhestr lawn o 346+ modelau ar /apps/. Defnyddia pob un yr un diweddfa /v1/chat/ — newidiwch y paramedr model yn unig.

Fformiwla

Modelau hunan- westeiedig: Mae'n rhaid i chi dalu'r tocynnau cywir a ddefnyddiwyd. Dim marcio.

Modelau allanol: our_tokens = provider_usd_cost × 100,000 × 1.30

Enghraifft: Mae GPT-4o yn costio $0.0025 am bob 1K o tocynnau galwad. Am 1,000 o tocynnau: $0.0025 × 100,000 × 1.30 = 325 tocyn o'ch balans.

Pob Diwedd

Sgwrsio / LLM
POST /v1/chat/Sgwrsio gydag unrhyw fodel (ei hunan-westeiedig neu allanol). Cynhelir llif.
Delwedd
POST /v1/image/generate/Testun i ddelwedd (FLUX, SDXL)
POST /v1/image/edit/Mewn- farcio, allan- farcio, trosglwyddo arddull
POST /v1/image/enhance/Uwchraddio 2x/4x (Real-ESRG)
POST /v1/image/remove-bg/Gwaredu Cefndir (BRIA RMBG)
Fideo
POST /v1/video/generate/Testun/delwedd i fideo (CogVideoX)
Testun i LeferyddComment
POST /v1/tts/Creu siarad (Kokoro, Piper, MeloTTS, Chatterbox)
POST /v1/tts/stream/TTS Llif (cymysgeddau sain amser real)
Lleferydd i DestunName
POST /v1/stt/transcribe/Trawsnewid sain/fideo (cyflymach-chwiban, 99 iaith)
Cerddoriaeth a SainName
POST /v1/music/generate/Creu cerddoriaeth o ddisgrifiad testun
POST /v1/music/separate/Seneddwyr/Cyfarfodydd Arwain (Demucs)
Erfyn Testun
POST /v1/write/Creu cynnwys (esboniadau, e-bost, stori, ac ati)
POST /v1/code/generate/Creu cod mewn unrhyw iaith
POST /v1/summarize/Crynodeb testun
POST /v1/humanize/Gwneud i destun AI swnio fel dyn
POST /v1/detect/Canfod cynnwys a gynhyrchir gan AI
Cyfieithiad
POST /v1/translate/Cyfieithu testun (MadLAD-400, 450+ iaith)
POST /v1/ocr/Echdynnu testun o ddelweddau
Offeryn
GET /v1/modelsList all available models (self-hosted + external)
GET /v1/status/{job_id}/Gwirio cyflwr y swydd an- gydamserol
GET /healthGwirio iechyd API

Dilysiant

Cynnwys eich allwedd API yn y pennawd Authorization:

Authorization: Bearer sk-free-YOUR_API_KEY

Mae pob ymateb yn cynnwys bloc free_ai_usage yn dangos y tocynnau a ddefnyddir:

{
  "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"
  }
}

Terfynau a Phlanau Cyfradd

Y un pris tocyn ar y wefan ac API. Dim pris API ar wahân.

& Gwaredu IaithTocynnau/MisCais API/MunudPris
Rhydd30K/day (pool)10$0
Sylfaenol250K30$5/mis
Proffesiynol1.25M60$19/mis
Busnes6.25M120$49/mis
EnterpriseAddasiedigAddasiedigCyswllt

Pecynnau tocynnau ar gael: 200K/$5, 1M/$15, 5M/$40. Ni ddaw tocynnau i ben byth.

PythonName

PythonName

Cyrchu pob offer AI o'ch cô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
Cynorthwyydd Amgodiad CLI

Dewis am ddim, ffynhonnell agored i Claude Code, Cursor, a 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"

30K free tokens/day. BYOK supported. 346+ models. Session sync with Web IDE.

GitHub PyPI Web IDE

BYOK (Dewch â'ch Allwedd Eich Hun)

Defnyddio eich allweddi API eich hun o unrhyw ddarparwr. Dim marcio, dim ffioedd. Free.ai dim ond dirprwyo' r cais.

DarparwrFformat AllweddModelauMarcio
OpenAIsk-proj-xxxGPT-4o, GPT-4o Mini, o1, o3, ac ati$0
Anthropicsk-ant-xxxClaude Sonnet 4, Opus 4, Haiku, ac ati$0
GoogleAIzaSyxxxGemini 2.5 Pro, Flash, ac ati$0
Darparwyr Eraillsk-or-xxx etc.346+ modelau o bob darparwr$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

Eich allwedd, eich defnydd, eich bil. Dim cofnodi. Dim tynnu tocynnau o'ch balans Free.ai.

API FAQ

Yes! Free accounts get 30K tokens/day plus a 10K signup bonus. Paid plans offer more tokens and higher rate limits.

Na! Y un tocynnau, yr un pris. Mae balans eich tocyn yn cael ei rannu rhwng y wefan a'r API. Defnyddiwch un ai un, a thalwch yr un pris.

Y un diwedd-bwynt, newidwch y paramedr model yn unig. Er enghraifft: "model": "openai/gpt-4o" neu "model": "anthropic/claude-sonnet-4". Rhestr lawn yn /apps/ neu GET /v1/models.

Ie! Mae'r diwedd-bwynt /v1/chat/ yn dilyn fformat cwblhau sgwrsio OpenAI. Gallwch ddefnyddio unrhyw SDK sy'n gydnaws â OpenAI — newidwch y LAU sylfaenol i https://api.free.ai a defnyddiwch eich allwedd API Free.ai.

Ie! Gosodwch "stream": true yn eich cais sgwrsio. Darperir ymatebion drwy Ddigwyddiadau a Anfonwyd gan y Gweinydd (SSE).

Fe gewch ymateb 402 gyda neges gwall. Prynwch fwy o tocynnau yn /pricing/ neu aros i'ch cronfa rhad ac am ddim ddyddiol ailosod. Mae modelau hunan-westeiedig bob amser ar gael o fewn y terfynau dydd.

Ydy! Mae pob model hunan-gefnogi dan drwydded MIT/Apache 2.0. Eich cynnwys chi yw'r cynnwys a gynhyrchir ar gyfer defnydd masnachol.

Hunan-westeiedig: rheda ar ein GPU. Y rhataf, cyflymaf, mwyaf preifat. Allanol: dirprwyir i'r darparwr model. Cyrchfan i GPT-4, Claude, Gemini, a mwy. Mae'n costio mwy o tocynnau oherwydd ffioedd API'r darparwr.

Ewch i'ch tudalen cyfrif yn /account/ neu gwiriwch y maes free_ai_usage.tokens_charged yn bob ymateb API.

Ydy! Gosodwch ein Python SDK: pip install free-dot-ai. Mae'n ymwthio pob diwedd-bwynt gydag ymatebion wedi'u teipio. Am gymorth codio, gosodwch pip install free-dot-ai-code. Mae'r API hefyd yn dilyn OpenAI\

Rydym yn anelu at 99.9% o amser i fyny. Mae cynlluniau busnes yn cynnwys gwarantau SLA. Gwiriwch /health am statws amser real.

E-bostiwch hello@free.ai neu ewch i /contact/. Mae cynlluniau Pro+ yn cael cefnogaeth flaenoriaeth. Mae ymatebion gwall yn cynnwys error_id ar gyfer datnamu.

Hoffwch Free.ai? Meddwl am eich ffrindiau!

Graddio'r dudalen hon