Quickstart i 60 soicind.
OpenAI- comhoiriúnach comhrá API. One Bearer comhartha, 477 uirlisí. Rith an curl, ansin léigh ar.
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!"}]}'
Cad ba mhaith leat a thógáil?
Mearthosaigh
Chat
POST /v1/chat/
{
"model": "qwen2.5-7b",
"messages": [
{"role": "user", "content": "Hello!"}
]
}
Giniúint Íomhá
POST /v1/image/generate/
{
"model": "flux",
"prompt": "a quiet cabin at dusk",
"width": 1024,
"height": 1024
}
Cuir Íomhá in Eagar
POST /v1/image/edit/
multipart:
image: <file>
prompt: "remove the chair"
operation: "edit"
Téacs- go- Caint
POST /v1/tts/
{
"model": "kokoro",
"voice": "af_heart",
"text": "Hello there!"
}
Ó chaint go téacs
POST /v1/stt/
multipart:
audio: <file>
model: "whisper-large-v3"
language: "auto"
Aistrigh
POST /v1/translate/
{
"text": "Hello",
"target_lang": "es"
}
SDKanna
pip install freeai-code
Nodenpm i freeai-code
Go (ag teacht)
Ruby (ag teacht)
Nó bain úsáid as an OpenAI SDK - pointe base_url ag api.free.ai / v1