Free.ai Dokiman

Quickstart nan 60 segonn.

API chat ki konpatib ak OpenAI. Yon kòd, plis pase 400 zouti. Ranplase sa a, epi li sou.

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!"}]}'

Ki sa ou vle bati?

Kòmanse vit

Chat

POST /v1/chat/
{
  "model": "qwen2.5-7b",
  "messages": [
    {"role": "user", "content": "Hello!"}
  ]
}

Kreyasyon imaj

POST /v1/image/generate/
{
  "model": "flux",
  "prompt": "a quiet cabin at dusk",
  "width": 1024,
  "height": 1024
}

Edite imaj

POST /v1/image/edit/
multipart:
  image: <file>
  prompt: "remove the chair"
  operation: "edit"

Text to speech

POST /v1/tts/
{
  "model": "kokoro",
  "voice": "af_heart",
  "text": "Hello there!"
}

Konvèti pale an tèks

POST /v1/stt/
multipart:
  audio: <file>
  model: "whisper-large-v3"
  language: "auto"

Tradiksyon

POST /v1/translate/
{
  "text": "Hello",
  "target_lang": "es"
}

SDKs

Recipes

FAQ

Enskri nan /signup/, konfime adrès imel ou, epi louvri /account/?tab=api. Klike sou Jenerasyon epi yon kle Bearer (sk-gratis-...) ap parèt. Sauvegarde li — pou sekirite nou sèlman montre kle a konplè yon fwa.

JSON. Reponn /v1/chat/ la reflete fòm OpenAI: choices[].message.content pou tèks la, plis yon objè utilisation ki rapòte pri token. Endpoints son + imaj retounen yon envelope JSON ak output_url, share_url, ak credits_used.

Yes — pase stream:true sou demann chat. Reponn rive kòm Server-Sent Events ak menm done: {...} envelope ke OpenAI streaming protocol. Mesaj final la se done:[DONE].

Wi. Passe yon array zouti selon schema a rele zouti OpenAI. Modèl rele zouti natif natal yo retounen tool_calls estriktire; modèl ki pa natif natal yo retounen nan yon pwompt mòd JSON ki voye menm fòm lan.

Wi. Modèl chat ki gen kapasite vizib aksepte pati kontni image_url (URLs oswa base64). Pou STT, POST odyo kòm multipart/form-data nan /v1/stt/. Pou PDF, itilize /v1/pdf/extract/ pou OCR ak chat sou rezilta a.

Yon limit apèl chak mwa ki gen rapò ak plan ou (1,000 gratis, 10,000 Basic, 100,000 Pro, 1M Business) ak balans token ou achte. Pa gen okenn limit pou chak segonn. Pool gratis chak jou a sèlman aplike pou demann entènèt, pa pou apèl API.

freeai-code on npm + PyPI for our Coder IDE wrapper. For the raw API, the OpenAI SDKs (Python + Node) and most LLM frameworks (LangChain, LlamaIndex, Vercel AI SDK) work — set base_url to https://api.free.ai/v1 and your Bearer key.

Nou siyen chak webhook ak HMAC-SHA256 sou kò a. Signature se nan X-Free-Signature header (hex-encoded). Refuse any payload whose signature does not match HMAC(your_webhook_secret, raw_body).

{error:{message, type, code}}. 402 = out of credits (response includes upgrade URL + shortfall in tokens). 429 = daily pool exhausted (web only). 400 = validation error. 5xx = our problem; retry with exponential backoff.

Endpoint /v1/chat/ la aksepte OpenAI ChatCompletion schema demann lan epi li retounen menm fòm repons lan. Pifò kòd kliyan OpenAI ki egziste deja travay pa chanje de liy — base_url + api_key.

Wi — chak modèl ki òganize tèt li se open-source (Apache 2.0 / MIT). Repo gpu_api nou an se piblik; klone li, bay GPU ou, epi kouri menm stack infèrans lan.

Self-hosted modèl kouri gratis sou 30,000-token jounen an, lè sa a, facturer kont la token. Premium modèl yo peye-tankou-ou-ale: 1.50 × markup magazen, tonbe a 1.30 × nan $500/30d ak 1.15 × nan $2,000/30d. Koute a se sou chak paj modèl la ak sou chak API repons; token top-ups kòmanse nan $1.

Love Free.ai? Di zanmi ou yo!

Ranje paj sa a