Sawalni API
APIsDocumentationOpen portal ↗
Omneity Labs API collection ↗Integration quickstart →API keys and playgrounds →
API Reference

Tarjamli Translation API

Use POST /v1/language/translate for Tarjamli. Do not use the chat endpoint.

Tarjamli is available to all authenticated API users without a model entitlement. Account quotas and billing still apply. Sawalni and Sawalni Mini continue to require their existing model access grant.

Choose tarjamli-mini-v4 for multilingual translation. Choose tarjamli-nano-v3 for fast Darija-to-English, French or Modern Standard Arabic translation. tarjamli-v3 is the Nano compatibility alias.

json
{"model":"tarjamli-mini-v4","text":"The Atlas workspace is ready.","source":"eng_Latn","target":"fra_Latn","instructions":"Use formal French. Keep Atlas unchanged. Glossary: workspace → espace de travail."}

For a standard translation, omit instructions. For Mini v4, use it for tone, audience, terminology, formatting, example translations, glossary entries or dictionary notes. Put only the passage to translate in text.

Nano accepts source ary_Arab or ary_Latn and target eng_Latn, fra_Latn or arb_Arab. Do not send instructions to Nano.

Read data.translated. Check data.complete; false means the output is incomplete. data.detected_lang echoes the supplied source. It does not report automatic detection. Requests require explicit source and target codes. For long passages, split at paragraph or sentence boundaries and translate each part in order. Mini has a 2,048-token output cap; Nano has a 512-token output cap. Check data.complete for every part. Context capacity does not imply an equally large output allowance. See the generated contract for all supported codes and byte limits.

No chat messages, tools, history, streaming or generation settings are accepted. Use a chat model for general conversation.

bash
curl https://api.sawalni.com/v1/language/translate \ -H "Authorization: Bearer YOUR_API_KEY" \ -H "Content-Type: application/json" \ -d '{"model":"tarjamli-nano-v3","text":"سلام كيف داير؟","source":"ary_Arab","target":"eng_Latn"}'

Use the translation playground to try Mini v4 with searchable language selectors and optional Instructions.