Developer API

Konpoze ak Free.ai - yon Bearer token, 477 AI zouti.

Chat, imaj, videyo, mizik, vwa, OCR, tradwi - tout sou yon sèl OpenAI-kompatib pwent an. generous gratis pisin, tradwi markup, pri patnè a sou eskalye.

30,000 gratis tokens/jou. Cards pa janm mande pou kòmanse.

Single pwen bout pou modalite

Yon URL kontwole chak modèl konvèsasyon. Yon URL pou chak modèl imaj. Chwazi modèl la ak yon string sèl. Pa gen shuffle SDK pou chak founisè.

Honest, markup-friendly billing

Self-hosted modèl facturation a pri brut. Premium modèl ajoute yon markup transparan ki tonbe kòm ou skale. chak repons rapòte pri a egzat token.

99 lang nan yon sèl pake

Chat, tradui, TTS, STT - chak modalite majè kouvri 99 lang san konfigirasyon ekstra. pase yon kòd lang ak li travay.

60-dezyèm Quickstart

Same API, five languages. Drop your sk- free-... key in and run.

curl https://api.free.ai/v1/chat/ \
  -H "Authorization: Bearer sk-free-YOUR-KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "qwen2.5-7b",
    "messages": [{"role":"user","content":"Hello!"}]
  }'
import requests

r = requests.post(
    "https://api.free.ai/v1/chat/",
    headers={"Authorization": "Bearer sk-free-YOUR-KEY"},
    json={
        "model": "qwen2.5-7b",
        "messages": [{"role": "user", "content": "Hello!"}],
    },
)
print(r.json()["choices"][0]["message"]["content"])
const r = await fetch("https://api.free.ai/v1/chat/", {
  method: "POST",
  headers: {
    "Authorization": "Bearer sk-free-YOUR-KEY",
    "Content-Type": "application/json",
  },
  body: JSON.stringify({
    model: "qwen2.5-7b",
    messages: [{role: "user", content: "Hello!"}],
  }),
});
const data = await r.json();
console.log(data.choices[0].message.content);
package main

import (
  "bytes"; "fmt"; "io"; "net/http"
)

func main() {
  body := []byte(`{"model":"qwen2.5-7b","messages":[{"role":"user","content":"Hello!"}]}`)
  req, _ := http.NewRequest("POST", "https://api.free.ai/v1/chat/", bytes.NewBuffer(body))
  req.Header.Set("Authorization", "Bearer sk-free-YOUR-KEY")
  req.Header.Set("Content-Type", "application/json")
  resp, _ := http.DefaultClient.Do(req)
  defer resp.Body.Close()
  out, _ := io.ReadAll(resp.Body)
  fmt.Println(string(out))
}
require "net/http"
require "json"

uri = URI("https://api.free.ai/v1/chat/")
req = Net::HTTP::Post.new(uri, {
  "Authorization" => "Bearer sk-free-YOUR-KEY",
  "Content-Type"  => "application/json",
})
req.body = {
  model: "qwen2.5-7b",
  messages: [{role: "user", content: "Hello!"}],
}.to_json

res = Net::HTTP.start(uri.host, uri.port, use_ssl: true) { |h| h.request(req) }
puts JSON.parse(res.body)["choices"][0]["message"]["content"]

Pri - diskresyon kick nan otomatikman

Self-hosted modèl kouri gratis sou 30,000-token jounen an, Lè sa a, facturation nan pri a brut. Premium modèl yo pay-as-you-go; markup tonbe ak 30 jou depanse.

Pool gratis
30,000 / day
Web sèlman - kouvri modèl ki fè tèt yo-hosted
Pay-as-you-go
1.50×
< $500 / 30 jou
Bulk
1.30×
≥ $500 / 30 jou
Patnè
1.15×
≥ $2,000 / mwa

Depatman pri konplè →

API demand tiers

Plan ou a leve otomatikman limit demann chak mwa chak kle - pa gen yon nouvo kle ki nesesè. Bidjè token pou chak demann pa chanje.

Plan Pri Rezon Ratè / minit
Gratis $0 1,000 60
Baz $5/mo 10,000 120
Pro $19/mo 100,000 300
Biznis $49/mo 1,000,000 600

Chwazi yon plan →

Si ou vle konnen plis sou plan biznis ak pri pou gwosè, gade Platform API.

Ki sa ou ka fè

Enkòpore ou @handle kòm yon ajan chat

Antrene yon AI persona sou konesans ou, kite yon tag script yon-liy sou nenpòt paj. Vizite chat AI ou; kont ou pran pri a.

Konfiguration de @yourhandle

Webhooks

Konfigurer un signé callback pour des tâches longues en cours (video génération, batch transcription, share-link creation, low-credit alerts). HMAC-SHA256 signature in X-Free-Signature.

Konfiguration de webhooks →

FAQ

Enskri gratis nan /signup/ ak konfime adrès imel ou - sa a deblotché 30,000-token chak jou gratis. Ouvèti /account/?tab=api ak klike sou Jenerasyon. Chèn yo se Bearer tokens nan fòm sk-gratis-... ak kòmanse travay imedyatman. Pa gen aplikasyon, pa gen lis tann.

30,000-token chak jou gratis pool kouvri modèl self-hosted sou tou de sit entènèt ak API. Pi lwen pase li, modèl self-hosted facturation kont la tokens brut; modèl ekstèn ajoute yon 50% markup nan dediksyon. Yon fwa ou depanse $ 500 nan yon fenèt 30-jou markup a tonbe a 30%; nan $ 2,000 + ou vin yon patnè ak markup a tonbe a 15%. Premium modèl ekstèn toujou facturation achte tokens; token top-ups kòmanse nan $ 1.

Rezon ki fè yo pou demann API yo reglemante pa balans ou achte ak yon limit chak mwa pou chak kle ki konekte ak plan ou: 1,000 apèl gratis, 10,000 sou Basic, 100,000 sou Pro, 1M sou Business.Pa gen okenn gaz pou chak segonn sou tèt - si kle ou gen token ak ou se anba limit chak mwa a, demann lan kouri.

Pass stream:true on /v1/chat/ to receive Server-Sent Events. Format fil la reflete konvansyon streaming OpenAI a pou ke SDKs kliyan ki egziste deja yo travay san modifikasyon.

Wi - pwent bout chat la aksepte yon array zouti selon schema a rele zouti OpenAI. Modèl ki sipòte itilize zouti natif (Qwen 2.5 fanmi + pifò modèl premium) pral retounen tool_calls; modèl san sipò natif pral tounen nan yon pwompt JSON-mode.

Standard JSON: {error:{message, type, code}}. HTTP 402 means out of credits (response includes shortfall + an upgrade URL). HTTP 429 means daily pool exhausted on a non-API call. HTTP 400 covers validation errors with a human-readable message.

We publish freeai-code on npm + PyPI for the Coder IDE wrapper. For the raw API, the OpenAI SDKs work - point base_url at https://api.free.ai/v1 and pass your sk-free-... key. Same for Vercel AI SDK, LangChain, llamaindex, etc.

Konfigurer votre point de fin URL sous /account/?tab=developer. Nous signons chaque payload avec HMAC-SHA256 - la signature est dans le X-Free-Signature header. Webhook events fire for: long-running job completion, share-link generation, low-credit alerts, and team invite acceptance.

Nou multiplie pri a upstream nan tokens pa multiplier ou tier (1.50 × magazen, 1.30 × gwosè, 1.15 × patnè). Self-hosted modèl pa gen okenn markup - ou peye kont tokens brut.Liy dediksyon sou chak repons montre pri a egzak tokens konsa pa gen okenn guesswork.

Modèles gratis fonctionnent sur notre flotte GPU auto-hébergée (Qwen 2.5, FLUX, Whisper, Kokoro, etc.) et sont couverts par votre pool quotidien. Modèles payés route à des fournisseurs externes de premier plan - ceux-ci nécessitent des crédits achetés et ne peuvent pas être payés pour de la piscine quotidienne. Tous deux partagent le même /v1/chat/ endpoint; passer model:premium/ pour opter dans un modèle payé.

Wi - chak modèl ki òganize tèt li sou Free.ai se sous louvri anba lisans permissive (Apache 2.0, MIT). ID modèl nou itilize yo matche ak ID HuggingFace alantou, epi depo gpu_api nou an se piblik. Si ou vle orchestration nou an sou aparèy ou an, pale ak nou sou yon enstalasyon nuit prive.

BYOK pèmèt ou bay pwòp clé API ou pou yon founisè ekstèn, pou apèl yo ka peye kont kont ou alantou — ou ka pa tcheke tout markup nou an sou modèl sa yo. Atann sa, nivo gwoup + patnè a ranfòse markup la pou kliyan ki gen gwo kantite.

Love Free.ai? Di zanmi ou yo!

Rapò paj sa a