Free.ai Docs
Quickstart mu 60 masekondi.
OpenAI-kuenderana chat API. One Bearer token, 400 + zvinhu. Kufamba iyi curl, wobva waverenga.
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!"}]}'
Chii chaunoda kuumba?
Kutanga kwacho kwacho
Chat
POST /v1/chat/
{
"model": "qwen2.5-7b",
"messages": [
{"role": "user", "content": "Hello!"}
]
}
Kuumbwa kwechifananidzo
POST /v1/image/generate/
{
"model": "flux",
"prompt": "a quiet cabin at dusk",
"width": 1024,
"height": 1024
}
Kuchinja i_mifananidzo
POST /v1/image/edit/
multipart:
image: <file>
prompt: "remove the chair"
operation: "edit"
Tevere:
POST /v1/tts/
{
"model": "kokoro",
"voice": "af_heart",
"text": "Hello there!"
}
Kutaura-ku-tekisi
POST /v1/stt/
multipart:
audio: <file>
model: "whisper-large-v3"
language: "auto"
_Tsanangura
POST /v1/translate/
{
"text": "Hello",
"target_lang": "es"
}
SDKs
Python
pip install freeai-code
Nodenpm i freeai-code
Go (coming)
Ruby (inouya)
Kana kushandisa OpenAI SDK — point base_url pa api.free.ai/v1
Recipes
FAQ
Sign up at /signup/, kuvimbisa yako email, uye avhure /account/?tab=api. Tinya Kugadzira uye a Bearer key (sk-free-...) anoonekwa. Save it — for security we chete kuratidzwa chikuru chenguva imwe.
JSON. The /v1/chat/ response mirrors the OpenAI shape: choices[].message.content for the text, plus a usage object that reports token cost. Audio + image endpoints return a JSON envelope with output_url, share_url, and credits_used.
Yes — pass stream:true on chat requests. Responses arrive as Server-Sent Events with the same data: {...} envelope as the OpenAI streaming protocol. The final message is data:[DONE].
Yeah. Pass a tools array per the OpenAI tool-calling schema. Native-tool-call models return structured tool_calls; non-native models fall back to a JSON-mode prompt that emits the same shape.
Yeah. Vision-kukwanisa chat mamodheru kubvuma image_url zvinhu zvikamu (URLs kana base64). For STT, POST audio as multipart/form-data to /v1/stt/. For PDF, use /v1/pdf/extract/ to OCR and chat about the result.
A chikumbiro chisingaperi chinoenderana nechirongwa chako (1,000 free, 10,000 Basic, 100,000 Pro, 1M Business) pamwe nemari yako yakatengeswa. Hapana kumanikidza kwesekondi. Chikumbiro chezuva nezuva chinopihwa chete kune web requests, kwete API calls.
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.
Tinonyora pasi ese webhook ne HMAC-SHA256 pamusoro pemuviri wakachena. Kunyora kunoitwa mu X-Free-Signature header (hex-encoded). Tora chero payload iyo yekunyora kwayo haifananidzi ne 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.
The / v1 / chat / endpoint inogamuchira OpenAI ChatCompletion chikumbiro schema uye anodzokera imwe pfungwa. Most zviripo OpenAI mutengi code mabasa nekuchinja maviri mativi — base_url + api_key.
Yeah - yega yega self-hosted model i open-source (Apache 2.0 / MIT). Our gpu_api repo i public; clone it, supply your GPU, and run the same inference stack.For a managed private cloud install, contact us.
Self-hosted mamodheru kutenderera zvakasununguka pa 30,000-token zuva nezuva pool, uye wobva wabhadhara chikuru token kuongorora. Premium mamodheru pay-as-you-go: 1.50 × retail markup, kudonha 1.30 × pa $ 500 / 30d uye 1.15 × pa $ 2,000 / 30d. Live mutengo ndewe pamwechete model page uye pamwechete API response; token top-ups kutanga pa $ 1.