Languages

How do you build Chinese AI apps with Plugsky?

Plugsky's OpenAI-compatible API accepts Chinese text unchanged at https://api.plugsky.com/v1 — no spaces required and no special endpoint. Chinese tokenises by character or word, so budget tokens carefully, pick Simplified or Traditional per collection, and normalise full-width punctuation before indexing. Use plugsky-embed-multilingual for Chinese and English retrieval.

Key facts

Chinese scriptHan characters with no word spaces; Simplified and Traditional are distinct sets
TokenisationCharacter-level encoding can raise tokens per line, and full-width punctuation adds more — measure with the token calculator
SegmentationWord segmentation is required for keyword indexing and chunking
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

  • Chinese text works through the standard /v1/chat/completions endpoint.
  • Token counts track characters, not English words — measure before sizing context.
  • Keep one character set (Simplified or Traditional) per collection.
  • Segment words for keyword search; Chinese has no spaces.
  • plugsky-embed-multilingual covers mixed Chinese 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 Chinese 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: convert full-width punctuation and digits to half-width, and fix one character set.
  5. For RAG, embed with plugsky-embed-multilingual and test cross-language queries alongside Chinese-only queries.
  6. Score candidate models on a Chinese 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 Chineseprompts to3Count tokens forthose prompts withthe Plugsky token4Normalise textbefore indexing orprompting: convert5For RAG, embed withplugsky-embed-multilingualand test6Score candidatemodels on a Chinesegold set with

Try it yourself

Open the token calculator →

How Plugsky handles Chinese text

Chinese uses Han characters with no spaces between words, and Simplified and Traditional character sets are not interchangeable.

Simplified (mainland China, Singapore) and Traditional (Taiwan, Hong Kong) differ in glyphs and vocabulary, and Mandarin and Cantonese diverge in everyday wording.

Evaluate both character sets on a small gold set: check particle usage and measure words, and confirm the model does not mix Simplified and Traditional within one answer.

Tokenisation and cost in Chinese

Tokenisers encode Chinese by characters or common multi-character words, so a short Chinese sentence can consume more tokens than its character count suggests relative to English. Full-width punctuation and numerals add tokens too.

  • Normalise full-width and half-width punctuation and digits before indexing.
  • Decide Simplified or Traditional per collection; never mix character sets in one index.
  • Test Cantonese-written text separately if users write colloquially.
  • Chunk on sentence punctuation such as 。!? rather than fixed character counts.

Chinese retrieval and RAG

For Chinese RAG, keep each collection in one character set and one script convention, then test queries in both Simplified and Traditional against it.

  • Use plugsky-embed-multilingual for Chinese and English mixed retrieval.
  • Segment with a word segmenter before keyword indexing; spaces do not exist.
  • Normalise punctuation width before embedding.
  • Evaluate zh-Hans and zh-Hant coverage explicitly.

Code example: a Chinese request

Point your existing OpenAI client at https://api.plugsky.com/v1 and pass Chinese 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 Chinese 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 Chinese gold set whenever either changes — language quality regressions usually come from prompt or preprocessing drift, not from the model alone.

Honest comparison

CapabilityPlugskyChinese workflow todayBuilding in-house
API compatibilityOpenAI-compatible — change base_url and model nameVaries by provider and SDKFull rewrite
Chinese text handlingOne character set per collection, full-width punctuation normalisedDepends 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 Chinese text?

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

Tokenisers encode Chinese by characters or common multi-character words, so a short Chinese sentence can consume more tokens than its character count suggests relative to English. Use the token calculator at /tools/llm-token-calculator before sizing context windows or chunk lengths.

Simplified or Traditional — does it matter?

Yes. Characters map differently and vocabulary differs. Keep one character set per collection and evaluate queries in the set your users type.

How should I chunk Chinese text?

Chunk on sentence punctuation such as 。!? rather than fixed character counts, and leave headroom in the context window for Chinese token density.

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.