Languages

How do you build Japanese AI apps with Plugsky?

Plugsky handles Japanese on the standard OpenAI-compatible endpoint: set base_url to https://api.plugsky.com/v1 and send UTF-8 text to /v1/chat/completions. With three scripts and no spaces, Japanese needs token-aware sizing, width normalisation and a glossary for product terms. Keep one keigo level per surface and use plugsky-embed-multilingual for Japanese and English retrieval.

Key facts

Japanese scriptKanji, hiragana and katakana with no word spaces; width variants matter
TokenisationCharacter-based encoding and katakana loans can raise token counts — measure with the Plugsky token calculator
RegisterKeigo, plain and casual forms are distinct — fix one per surface
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

  • Japanese works on the shared chat endpoint — no special mode.
  • No spaces means token counts fill context fast; measure real prompts.
  • Normalise full-width and half-width forms before indexing.
  • Pin one keigo level per product surface.
  • plugsky-embed-multilingual covers Japanese 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 Japanese 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: normalise full-width and half-width forms and keep one script convention.
  5. For RAG, embed with plugsky-embed-multilingual and test cross-language queries alongside Japanese-only queries.
  6. Score candidate models on a Japanese 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 Japaneseprompts to3Count tokens forthose prompts withthe Plugsky token4Normalise textbefore indexing orprompting:5For RAG, embed withplugsky-embed-multilingualand test6Score candidatemodels on aJapanese gold set

Try it yourself

Open the token calculator →

How Plugsky handles Japanese text

Japanese mixes kanji, hiragana and katakana with no spaces, and politeness level (keigo) changes verb endings throughout a sentence.

Business keigo, plain form and casual speech are distinct registers, and full-width and half-width digits and Latin letters coexist in the same text.

Evaluate with a Japanese reviewer on keigo and plain samples; check kanji choice, counters, and whether the politeness level stays constant through the answer.

Tokenisation and cost in Japanese

Japanese tokenisers work on characters and common words with no space cues, so context budgets fill faster than character counts suggest. Katakana loanwords and mixed full-width text add extra tokens.

  • Normalise full-width Latin letters and digits to half-width where appropriate.
  • Test keigo and plain registers as separate prompt sets.
  • Chunk on Japanese punctuation such as 。 and 、 rather than newlines.
  • Expect katakana loanword names to split; keep a glossary for product terms.

Japanese retrieval and RAG

Japanese retrieval benefits from consistent script normalisation: index with full-width forms normalised, keep the original for display, and test both Japanese and English queries.

  • Use plugsky-embed-multilingual for Japanese and English retrieval.
  • Normalise width variants before embedding.
  • Segment with a Japanese tokeniser for keyword search.
  • Evaluate keigo and casual queries separately.

Code example: a Japanese request

Point your existing OpenAI client at https://api.plugsky.com/v1 and pass Japanese 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": "この契約書を日本語で3点に要約してください。"}])

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

Honest comparison

CapabilityPlugskyJapanese workflow todayBuilding in-house
API compatibilityOpenAI-compatible — change base_url and model nameVaries by provider and SDKFull rewrite
Japanese text handlingWidth-normalised text with one keigo levelDepends 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 Japanese text?

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

Japanese tokenisers work on characters and common words with no space cues, so context budgets fill faster than character counts suggest. Use the token calculator at /tools/llm-token-calculator before sizing context windows or chunk lengths.

Which keigo level should I use?

Match the use case: business documents need polite keigo, internal tools can use plain form. Mixing levels within one conversation reads as a quality failure.

How do I handle full-width characters?

Normalise full-width Latin letters and digits to half-width for search and retrieval; keep the original form for display when the user expects it.

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.