Key facts
| Vietnamese text | Latin script with tone diacritics on most syllables; six tones are meaningful |
| Normalisation | NFC versus NFD changes code points and token counts — normalise early |
| Tokenisation | Diacritic-heavy text fragments into more subwords — measure with the token calculator |
| Regional accents | Northern, central and southern speech differ in tone and vocabulary |
| API compatibility | OpenAI-compatible POST https://api.plugsky.com/v1/chat/completions — chat, streaming, JSON mode and function calling |
| Models | 30+ models behind one endpoint, from free tiers to frontier reasoning |
| Free tier | Free plan with plugsky-micro and plugsky-lite, no card required |
| Product status | Chat, streaming, JSON mode, function calling, embeddings, RAG and agents live; audio, images, moderation, files, batch, fine-tuning, assistants and responses coming soon |
TL;DR
- Vietnamese runs on the standard endpoint with one base_url change.
- Normalise to NFC before counting tokens or embedding.
- Add accent-insensitive keys so search works on phones without diacritic keyboards.
- Separate northern, central and southern evaluation slices.
- plugsky-embed-multilingual covers Vietnamese and English retrieval.
How it works, step by step
- Create a free Plugsky key and set base_url to https://api.plugsky.com/v1.
- Normalise all input to NFC before sending text, counting tokens or embedding.
- Send real Vietnamese prompts to /v1/chat/completions and compare two or three models.
- Measure tokens with the token calculator and note the diacritic load in your content.
- For search, add accent-insensitive keys and test queries typed without diacritics.
- For RAG, embed with plugsky-embed-multilingual and review outputs with native speakers.
Try it yourself
How Plugsky handles Vietnamese text
Vietnamese needs no special endpoint: UTF-8 text with tone diacritics goes in and comes back. The engineering issue is encoding form. The same accented letter can be represented as one precomposed code point (NFC) or as a base letter plus a combining mark (NFD); both look identical on screen but tokenise and match differently. Normalising to NFC at the edge removes a whole class of bugs.
Regional speech also matters for consumer products. Northern, central and southern Vietnamese differ in tone realisation and vocabulary, so if your reviewers or users cluster in one region, state which variety the product should write.
Tokenisation and cost in Vietnamese
Vietnamese syllables are short, but each carries diacritics that can split into separate subwords depending on the tokeniser and the encoding form. Accent-heavy prose therefore costs more tokens than the character count suggests, and mixed NFD input can quietly increase counts without changing the text.
- Normalise to NFC before measuring or embedding.
- Keep diacritics for display and embedding; fold only for search keys.
- Test mobile input where users drop tones.
- Re-measure after model or pipeline changes.
Vietnamese retrieval and RAG
One multilingual collection built with plugsky-embed-multilingual serves Vietnamese documents with Vietnamese or English queries. On phones, users often type without tone marks, so search needs an accent-insensitive path alongside exact matching.
- Add accent-insensitive keys for keyword search.
- Normalise NFC consistently across documents and queries.
- Include English queries common in technical audiences.
- Keep one embedding model per collection.
Code example: a Vietnamese request
Point your OpenAI client at https://api.plugsky.com/v1; normalise the text before sending if your source data may be NFD.
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": "system", "content": "Trả lời bằng tiếng Việt, giọng lịch sự và ngắn gọn"}, {"role": "user", "content": "Tóm tắt hợp đồng này trong ba điểm"}])
Start on the free plan with plugsky-micro and plugsky-lite, then compare paid models on a Vietnamese gold set. See the docs for the API reference.
Honest comparison
| Capability | Plugsky | Vietnamese apps today | Building in-house |
|---|---|---|---|
| API compatibility | OpenAI-compatible — change base_url and model name | Varies by provider and SDK | Full rewrite |
| Vietnamese text handling | UTF-8 with NFC guidance and accent-insensitive search | Depends on provider tokeniser and preprocessing | You build normalisation and evals |
| Token budget | Fixed tokeniser per model; measure diacritic-heavy text and chunk to fit | Varies by provider and model | You host and tune each tokeniser |
| Multilingual retrieval | plugsky-embed-multilingual for Vietnamese and English RAG | Often needs a separate embedding vendor | You serve and maintain embeddings |
| Sovereignty | Cloud, VPC, on-prem and air-gapped with residency options | Usually US/EU public endpoints | You own the full stack |
Frequently asked questions
Can Plugsky handle Vietnamese text?
Yes. The API accepts UTF-8 Vietnamese input with tone diacritics on the OpenAI-compatible chat endpoint. Compare two or three models on your own prompts.
What is the NFC versus NFD issue?
Accented letters can be encoded as one code point or as a base letter plus a combining mark. Normalising to NFC before tokenising, embedding or matching prevents silent duplication and mismatches.
Should search require correct diacritics?
No. Many users type without tone marks, so add an accent-insensitive search path while keeping diacritics for display and embeddings.
Do regional accents need separate handling?
Vocabulary and some tone conventions differ between north, centre and south. Keep review slices per region if your audience is regionally concentrated.
Is there a multilingual embedding model?
Yes — plugsky-embed-multilingual is part of the 30+ model catalogue and supports Vietnamese and English retrieval from one collection.
Can I deploy in my own environment?
Yes. Plugsky supports cloud, VPC, on-prem and air-gapped deployment with residency options for regulated teams.
Is there a free plan?
Yes — plugsky-micro and plugsky-lite are free with no card, and a 14-day full-access trial covers the paid catalogue.