Languages

How do you build Vietnamese AI apps with Plugsky?

Vietnamese runs on the standard OpenAI-compatible API: change base_url to https://api.plugsky.com/v1 and send UTF-8 text to /v1/chat/completions. NFC-normalise tone diacritics before counting tokens or embedding, add accent-insensitive search keys for mobile users, and use plugsky-embed-multilingual for Vietnamese and English retrieval.

Key facts

Vietnamese textLatin script with tone diacritics on most syllables
NormalisationNFC versus NFD changes code points and token counts — normalise early
Locale variantsNorthern, central and southern accents differ in tone and vocabulary
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

  • Vietnamese uses the standard chat endpoint — one base_url change.
  • NFC-normalise tone diacritics before counting or embedding.
  • NFD text inflates token counts; fix normalisation first.
  • Add accent-insensitive search keys for mobile typing.
  • plugsky-embed-multilingual covers Vietnamese and English retrieval.

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 Vietnamese 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: NFC-normalise tone diacritics and standardise regional vocabulary.
  5. For RAG, embed with plugsky-embed-multilingual and test cross-language queries alongside Vietnamese-only queries.
  6. Score candidate models on a Vietnamese 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 Vietnameseprompts to3Count tokens forthose prompts withthe Plugsky token4Normalise textbefore indexing orprompting:5For RAG, embed withplugsky-embed-multilingualand test6Score candidatemodels on aVietnamese gold set

Try it yourself

Open the token calculator →

How Plugsky handles Vietnamese text

Vietnamese uses the Latin alphabet with tone diacritics on most syllables, and reads left to right.

Northern (Hanoi), central and southern accents differ in tone and vocabulary, and pronouns change with the relationship between speakers.

Evaluate on northern and southern samples; check tone diacritics, word-choice consistency and whether the register matches the product.

Tokenisation and cost in Vietnamese

Vietnamese writes syllables separated by spaces, so token counts can look word-like, but tone diacritics may be composed or decomposed, changing code points and tokens; decomposed NFD text inflates counts significantly.

  • NFC-normalise diacritics before embedding or counting tokens.
  • Decide how to treat syllable versus word units in chunking.
  • Test northern and southern tone and vocabulary variants.
  • Remove tone marks only for accent-insensitive search keys.

Vietnamese retrieval and RAG

Normalise diacritics consistently before embedding, and keep a toneless search variant for users who type without accents on mobile keyboards.

  • Use plugsky-embed-multilingual for Vietnamese and English corpora.
  • NFC-normalise all diacritics first.
  • Add accent-insensitive keys as a query fallback.
  • Evaluate regional accent and vocabulary variants.

Code example: a Vietnamese request

Point your existing OpenAI client at https://api.plugsky.com/v1 and pass Vietnamese 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": "Tóm tắt hợp đồng này thành ba điểm bằng tiếng Việt."}])

Start on the free plan with plugsky-micro and plugsky-lite, then compare paid models on a Vietnamese 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 Vietnamese gold set whenever either changes — language quality regressions usually come from prompt or preprocessing drift, not from the model alone.

Honest comparison

CapabilityPlugskyVietnamese workflow todayBuilding in-house
API compatibilityOpenAI-compatible — change base_url and model nameVaries by provider and SDKFull rewrite
Vietnamese text handlingNFC tone diacritics with accent-insensitive search keysDepends 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 Vietnamese text?

Yes. The API accepts UTF-8 Vietnamese 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 Vietnamese?

Vietnamese writes syllables separated by spaces, so token counts can look word-like, but tone diacritics may be composed or decomposed, changing code points and tokens; decomposed NFD text inflates counts significantly. Use the token calculator at /tools/llm-token-calculator before sizing context windows or chunk lengths.

How do I normalise Vietnamese text?

Use NFC normalisation for tone diacritics before counting tokens or embedding. Decomposed NFD text inflates code points and token counts.

Which regional accent should I target?

Choose northern or southern vocabulary per market; both are widely understood, but local vocabulary improves quality. Keep one per product.

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.