Base URL: http://boffire-kabyle-multi-translate.hf.space
Translate English text using MarianMT, LibreTranslate variants, or both. Also accepts GET for quick testing.
Request body (JSON):
| Field | Type | Required | Description |
|---|---|---|---|
text | string | yes | English text to translate |
engines | array | no | Subset of ["marian", "libre"]. Defaults to both. |
variants | array | no | Subset of LibreTranslate variant codes (see /api/variants). Defaults to all. |
Example (curl):
curl -X POST "http://boffire-kabyle-multi-translate.hf.space/api/translate" \
-H "Content-Type: application/json" \
-d '{"text": "Good morning", "engines": ["marian", "libre"]}'
Example (GET, quick testing):
curl "http://boffire-kabyle-multi-translate.hf.space/api/translate?text=Good+morning&engines=marian,libre"
Example (JavaScript fetch, from a browser):
const res = await fetch("http://boffire-kabyle-multi-translate.hf.space/api/translate", {
method: "POST",
headers: { "Content-Type": "application/json" },
body: JSON.stringify({ text: "Good morning", engines: ["marian", "libre"] })
});
const data = await res.json();
console.log(data);
Example response:
{
"source_text": "Good morning",
"marian": ["Azul igerrzen", "Ssbeh yelhan", "Aseb yelhan"],
"libre": {
"Taqbaylit (Standard)": {"code": "kab", "success": true, "text": "Tifawin"},
"Taqbaylit (51000)": {"code": "kab_comp2", "success": true, "text": "Azul"}
}
}
Returns the full list of supported LibreTranslate Kabyle variant names and codes.
curl "http://boffire-kabyle-multi-translate.hf.space/api/variants"
Basic health check. Returns whether the MarianMT model has been loaded into memory yet.
curl "http://boffire-kabyle-multi-translate.hf.space/health"
All /api/* routes send permissive CORS headers, so you can call this API directly from browser-based JavaScript (fetch, axios, etc.) on any origin — no proxy needed.