curl -X POST https://api.chersus.com/v1/run \
-H "Authorization: Bearer chrs_live_YOUR_KEY" \
-H "Content-Type: application/json" \
-d '{
"input": {
"type": "text",
"value": "Guten Morgen, ich habe eine Frage zu meiner Rechnung."
},
"pipeline": [
{ "id": "detect", "service": "routing.language.detect" }
]
}'const res = await fetch("https://api.chersus.com/v1/run", {
method: "POST",
headers: {
Authorization: `Bearer ${process.env.CHERSUS_KEY}`,
"Content-Type": "application/json",
},
body: JSON.stringify({
input: { type: "text", value: "Guten Morgen, ich habe eine Frage zu meiner Rechnung." },
pipeline: [{ id: "detect", service: "routing.language.detect" }],
}),
});
const data = await res.json();import os
import requests
res = requests.post(
"https://api.chersus.com/v1/run",
headers={"Authorization": f"Bearer {os.environ['CHERSUS_KEY']}"},
json={
"input": {"type": "text", "value": "Guten Morgen, ich habe eine Frage zu meiner Rechnung."},
"pipeline": [{"id": "detect", "service": "routing.language.detect"}],
},
)
data = res.json()200 · 4ms · 53 chars
{
"trace_id": "chs_01J9X4Q7K2M8N3P5R6T7V8W9X5",
"status": "completed",
"output": {
"type": "text",
"value": "Guten Morgen, ich habe eine Frage zu meiner Rechnung."
},
"results": {
"detect": {
"kind": "extract",
"status": "ok",
"data": { "language": "de", "confidence": 0.99 }
}
},
"usage": {
"billed": [
{ "unit": "characters", "quantity": 53, "steps": ["detect"] }
]
},
"audit": { "region": "eu-nl-1", "retention": "none", "total_ms": 4 }
}The cheapest decision you can automate. Use routing.language.detect as the first hop
of any multi-locale pipeline: detect the ISO language code, then route the payload to
the right model, template, or human queue. Trust the text, not headers or user
settings.
At under 5ms it is fast enough to run on every payload, including inside chains where
a language switch should change how later steps behave. When workflows ship, a branch
on data.language will route the payload without a second round trip.
- KIND
- extract
- MODEL
- papluca/xlm-roberta-base-language-detection
- LICENSE
- Apache 2.0
- LANGUAGES
- 20 languagesArabic, Bulgarian, German, Greek, English, Spanish, French, Hindi, Italian, Japanese, Dutch, Polish, Portuguese, Russian, Swahili, Thai, Turkish, Urdu, Vietnamese, Chinese
- REGION
- 26 EU cities