Use Cases + Implementation

How do you build multilingual AI with an OpenAI-compatible API?

An OpenAI-compatible API makes multilingual support a configuration problem rather than a rewrite: keep your SDK, point it at api.plugsky.com, and choose models and embeddings per language. plugsky-embed-multilingual puts every language in one vector space, and 30+ chat models behind the same endpoint let you route by language based on measured quality.

Key facts

API compatibilityDrop-in OpenAI-style chat and embeddings endpoints (live)
Multilingual embeddingsplugsky-embed-multilingual via /v1/embeddings (live)
Models30+ models behind one endpoint, route per language
Structured outputJSON mode for locale-aware response objects
MigrationBase URL and model names change; re-embed into one shared collection
PricingFlat monthly plans with unlimited fair-use usage on self-serve
ResidencyRegion-locked planes, VPC, on-prem and air-gapped options
Free tierplugsky-micro and plugsky-lite on the free plan, no card required

TL;DR

  • Keep one client and one endpoint; language becomes a routing decision, not a code path.
  • Re-embed the corpus with plugsky-embed-multilingual into a single collection.
  • Detect language in code and pass it to prompts and filters as metadata.
  • Validate quality per language before routing traffic to a new model.
  • Return structured output that records the response language and sources.

How it works, step by step

  1. Move base URL, key and model names into configuration so language routing can change without deploys.
  2. Re-embed multilingual content with plugsky-embed-multilingual into one collection, replacing per-language indexes.
  3. Add deterministic language detection and pass the locale into prompts and retrieval filters.
  4. Define JSON-mode response shapes that include the answer, the response language and source references.
  5. Run a per-language evaluation across candidate models and record which performs best for each language and task.
  6. Encode the winners in a routing table and roll out language by language behind a flag.
  7. Monitor per-language error rates, latency and refusal behaviour, and adjust routing as data accumulates.
1Move base URL, keyand model namesinto configuration2Re-embedmultilingualcontent with3Add deterministiclanguage detectionand pass the locale4Define JSON-moderesponse shapesthat include the5Run a per-languageevaluation acrosscandidate models6Encode the winnersin a routing tableand roll out

Try it yourself

Open the OpenAI-compatible API tester →

Compatibility across languages

Multilingual apps often grow messy: one integration per provider, one index per language, translation layers between them. An OpenAI-compatible endpoint collapses the model side. Chat completions, streaming, JSON mode and embeddings all use the same client, so the only thing that varies by language is which model name you choose.

Plugsky exposes 30+ models behind that endpoint, and plugsky-embed-multilingual for embeddings. Specialist endpoints such as files and batch are coming soon, so bulk multilingual ingestion stays in your pipeline for now — which is where translation and normalisation steps belong anyway.

Embeddings and retrieval in one space

The biggest migration win is consolidating indexes. With multilingual embeddings, documents in Arabic, English and French can live in one collection and answer each other's questions. That removes synchronisation work and improves recall for users whose language has less content.

  • Normalise input: strip diacritics and standardise script variants before embedding.
  • Tag metadata: store language, region and version per chunk for preference and fallback rules.
  • Re-embed once: switching embedding models requires a full backfill — plan for it before cutover.
  • Keep originals: citations should display the source language text, not a translation.

Rollout per language

Treat each language as its own release. Run the evaluation, pick the model, ship behind a flag, and watch error rates, latency and escalation behaviour before enabling the next language. Aggregate dashboards hide the failures that only appear in one locale, so keep per-language views.

Because the API is compatible and routing lives in configuration, rollback per language is a config change. Keep prompts and glossaries versioned per language, and record the response language in structured output so analytics can segment by locale. Where data must remain in-market, pin deployments to a region-locked plane or run VPC, on-prem or air-gapped with the same client code.

Honest comparison

AspectPlugskyPer-language integrationsTranslation middleware
Client codeOne compatible clientOne adapter per providerExtra pipeline stage
EmbeddingsOne multilingual vector spaceIndex per languageTranslated text indexed
Model routing30+ models, per-language choiceProvider-limitedFixed model
PricingFlat monthly with unlimited fair use on self-serveMixed per-token billsPer-token plus translation
ResidencyRegion choice, VPC, on-prem, air-gappedVariesVaries

Frequently asked questions

Do we need separate indexes per language?

No, and you should avoid them. plugsky-embed-multilingual places equivalent content from different languages in one vector space, so a single collection serves every language with better coverage.

How do we pick a model per language?

Evaluate. Run the same task set per language across candidate models, record quality and latency, and encode the results in a routing table. Model strengths differ by language.

Will our existing prompts work?

Mostly, but test them. Ask for the answer in the user's language explicitly, keep formatting in code, and provide approved terminology per language where consistency matters.

How do we migrate embeddings safely?

Backfill a new collection with plugsky-embed-multilingual, verify recall on per-language question sets, then switch reads. Vectors from different models cannot be mixed in one index.

What about right-to-left languages?

Keep text generation responsible for language, not layout. Return structured content and let the interface handle direction, numerals and typography per locale.

How do we control cost across languages?

Use small models for high-volume, lower-complexity languages and reserve stronger models where quality demands. Flat self-serve plans make forecasting easier than per-token billing.

Can we keep data in one market?

Yes. Plugsky supports region-locked cloud planes plus VPC, on-prem and air-gapped deployment, so content can stay where policy requires.