Languages

How do you build Arabic AI apps with Plugsky?

Plugsky serves Arabic through the same OpenAI-compatible API as English: set base_url to https://api.plugsky.com/v1, send UTF-8 text to /v1/chat/completions, and keep your SDK. Arabic is right-to-left and morphologically rich, so measure tokens instead of characters, pin MSA or a dialect in the prompt, and use plugsky-embed-multilingual for cross-language retrieval.

Key facts

Arabic scriptRight-to-left UTF-8 text handled as-is; mixed-direction spans need explicit markers
TokenisationClitics and diacritics can split into extra subwords — measure with the Plugsky token calculator
Embeddingsplugsky-embed-multilingual for Arabic and cross-language RAG
API compatibilityOpenAI-compatible POST https://api.plugsky.com/v1/chat/completions — chat, streaming, JSON mode and function calling
Models30+ models behind one endpoint, from free tiers to frontier reasoning
Free tierFree plan with plugsky-micro and plugsky-lite, no card required
DeploymentPlugsky cloud, your VPC, on-prem and air-gapped options
Product statusChat, streaming, JSON mode, function calling, embeddings, RAG and agents live; audio, images, batch and fine-tuning coming soon

TL;DR

  • Change one base_url and send Arabic text unchanged — no separate endpoint.
  • Count tokens on real Arabic prompts; clitics and tashkeel inflate counts.
  • Pin the Arabic variety (MSA or dialect) in the system prompt.
  • Use plugsky-embed-multilingual for Arabic and cross-language retrieval.
  • Start free with plugsky-micro and plugsky-lite, then scale as quality demands.

How it works, step by step

  1. Create a Plugsky API key on the free plan (no card) and set base_url to https://api.plugsky.com/v1.
  2. Send a small set of real Arabic prompts to /v1/chat/completions and compare output across two or three models.
  3. Count tokens for those prompts with the Plugsky token calculator and set chunk sizes that fit your model context.
  4. Normalise text before indexing or prompting: unify alef variants, remove tatweel and bidi controls, and keep a display copy untouched.
  5. For RAG, embed with plugsky-embed-multilingual and test cross-language queries alongside Arabic-only queries.
  6. Score candidate models on a Arabic gold set with native-speaker review, then cut production traffic over.
1Create a PlugskyAPI key on the freeplan (no card) and2Send a small set ofreal Arabic promptsto3Count tokens forthose prompts withthe Plugsky token4Normalise textbefore indexing orprompting: unify5For RAG, embed withplugsky-embed-multilingualand test6Score candidatemodels on a Arabicgold set with

Original data

Right-to-left Arabic scriptOpenAI-compatiAPI compatibility30+ models behModelsSource: Plugsky facts table · updated 2026-09-25

Try it yourself

Open the RAG sandbox →

How Plugsky handles Arabic text

Arabic is written right-to-left in a cursive Arabic script, with optional diacritics (tashkeel) that readers normally infer from context.

Decide early between Modern Standard Arabic and a dialect such as Gulf, Egyptian or Levantine, then state the expected variety in the system prompt, because the same request produces different tone and vocabulary in each.

Evaluate with a small gold set written by Arabic speakers: check grammar, register and direction handling in mixed Arabic and Latin answers, because automated metrics miss those errors.

Tokenisation and cost in Arabic

Token counts for Arabic rarely match word counts. Clitics such as و, ال and ب, plus suffixes, frequently split into several subword tokens, and fully vocalised text inflates counts further.

  • Count tokens on your real corpus before sizing context windows.
  • Drop tashkeel unless it changes meaning; it adds tokens and readers infer it.
  • Unify alef variants and digits for retrieval, but keep the display copy untouched.
  • Budget extra for mixed Arabic and Latin text: code, URLs and product names break the script run.

Arabic retrieval and RAG

Cross-language retrieval is the main RAG decision: index Arabic documents with plugsky-embed-multilingual and query in Arabic or English against the same collection.

  • Use plugsky-embed-multilingual for Arabic and mixed-language corpora.
  • Strip bidi control characters and tatweel before indexing; both pollute vectors.
  • Store the original text for display and a normalised copy for retrieval.
  • Test English-query/Arabic-passage retrieval as a first-class eval.

Code example: a Arabic request

Point your existing OpenAI client at https://api.plugsky.com/v1 and pass Arabic text in the content field — no language flag and no separate endpoint. Streaming, JSON mode and function calling keep the same request shapes.

client = OpenAI(base_url="https://api.plugsky.com/v1", api_key=os.environ["PLUGSKY_API_KEY"])

client.chat.completions.create(model="plugsky-pro", messages=[{"role": "user", "content": "اكتب ملخّصاً من ثلاث نقاط لهذا العقد بالعربية الفصحى."}])

Start on the free plan with plugsky-micro and plugsky-lite, then compare paid models on a Arabic gold set before cutover. See the docs for request details.

For production, log the model name and your normalisation settings with each request, and re-run the Arabic gold set whenever either changes — language quality regressions usually come from prompt or preprocessing drift, not from the model alone.

Honest comparison

CapabilityPlugskyArabic workflow todayBuilding in-house
API compatibilityOpenAI-compatible — change base_url and model nameVaries by provider and SDKFull rewrite
Arabic text handlingUTF-8 RTL passes through; you control normalisation and bidi hygieneDepends on provider tokeniser and prompt hygieneYou build normalisation, segmentation and evals
Token budgetFixed tokeniser per model; measure with the Plugsky token calculator and chunk to fitVaries by provider and modelYou host and tune each tokeniser
Multilingual retrievalplugsky-embed-multilingual available for cross-language RAGOften needs a separate embedding vendorYou serve and maintain embeddings
SovereigntyCloud, VPC, on-prem and air-gapped with residency optionsUsually US/EU public endpointsYou own the full stack

Frequently asked questions

Can Plugsky handle Arabic text?

Yes. The API accepts UTF-8 Arabic input on the OpenAI-compatible chat endpoint; output quality depends on the model, so compare two or three on your own prompts before choosing.

How do I estimate token usage for Arabic?

Token counts for Arabic rarely match word counts. Use the token calculator at /tools/llm-token-calculator before sizing context windows or chunk lengths.

Should I use MSA or a dialect?

Pick one per feature and state it in the system prompt. MSA is the safer default for formal content; Gulf or Egyptian dialect fits conversational products.

Does the API handle right-to-left rendering?

The API transports Arabic as UTF-8 text; rendering is your UI's responsibility. Wrap code, URLs and numbers in bidi isolation characters and test in your own front end.

Is there a multilingual embedding model?

Yes — plugsky-embed-multilingual is part of the 30+ model catalogue and is built for cross-language retrieval. Keep one embedding model per vector collection.

Can I keep data in my region?

Plugsky supports cloud, VPC, on-prem and air-gapped deployment with data-residency options; confirm your requirements with the docs and the enterprise team.

How do I migrate an existing app?

Change base_url to https://api.plugsky.com/v1 and map the model name. Streaming, JSON mode, function calling and embeddings keep the same request shapes.

Is there a free plan?

Yes — the free plan includes two free models, plugsky-micro and plugsky-lite, with no card. A 14-day full-access trial unlocks the paid catalogue.