Feature · translation

AI translation API for apps and documents

Translate product strings, support macros and long documents through the same OpenAI-compatible endpoint you already use. Send structured segments, keep a glossary, and validate the output before it reaches a customer.

Short answer. Call plugsky-translate through POST https://api.plugsky.com/v1/chat/completions. It supports a 32,768-token context and up to 16,384 output tokens. For product strings, send a JSON array of {id, text} segments and ask for the same array back; for documents, send the text or page images and request a structured result. Paid plans start at $8/month.

Why use an API instead of a translation website

A translation website is built for one-off human use. An API is built for repetition and control. It lets you:

  • Translate new strings as part of a release pipeline, without copy-pasting into a web form.
  • Keep a glossary of product names, legal terms and tone rules in the request.
  • Preserve segment IDs so the translated string lands in the right UI key.
  • Run automated checks for missing IDs, length limits and placeholder preservation.
  • Store approved translations as translation memory and reuse them when the source has not changed.

Model and limits

PropertyValue
Model IDplugsky-translate
Context window32,768 tokens
Max output16,384 tokens
InputText
EndpointOpenAI-compatible chat completions
PlansPaid plans from Hobby $8/month

Translate UI strings with segment IDs

The safest pattern is to translate an array, not a paragraph. Each item carries an ID, the source text and optional context. Ask the model to return the same IDs and validate that none are missing.

import json
from openai import OpenAI

client = OpenAI(
    api_key="YOUR_PLUGSKY_KEY",
    base_url="https://api.plugsky.com/v1",
)

segments = [
    {"id": "nav.pricing", "text": "Pricing"},
    {"id": "cta.start", "text": "Start free"},
    {"id": "billing.cancel", "text": "Cancel anytime"},
]

response = client.chat.completions.create(
    model="plugsky-translate",
    response_format={"type": "json_object"},
    messages=[
        {"role": "system", "content": "Translate each text to Arabic. Keep the id unchanged. Return {\"segments\":[{\"id\":...,\"text\":...}]}."},
        {"role": "user", "content": json.dumps({"segments": segments})},
    ],
)

translated = json.loads(response.choices[0].message.content)["segments"]
assert {x["id"] for x in translated} == {x["id"] for x in segments}

Keep terminology consistent

Add a glossary block to the system prompt. Keep it short and specific: product names, legal terms, and words that must not be translated. For example:

Glossary:
- "Plugsky" stays "Plugsky".
- "workspace" → "مساحة عمل".
- "API key" → "مفتاح API".
- Never translate code, URLs, or placeholder tokens such as {name}.

Placeholder preservation is the most common failure. After translation, check that every {variable}, HTML tag, URL and number is still present and in the right order.

Translate documents and long content

For a document, split by heading or paragraph rather than by a fixed character count. Send the section ID, the heading path and the text. Ask for a JSON object with the same section IDs. For scanned PDFs, use document parsing first, then translate the extracted text.

Long documents can exceed the output limit even when the input fits. Translate section by section and store each result, rather than asking for the whole document in one response.

Quality checks before publication

  • Coverage: every source ID appears exactly once in the output.
  • Placeholders: variables, tags, URLs and numbers survive unchanged.
  • Length: UI strings fit the layout; German and Arabic often expand.
  • Direction: RTL text uses dir="rtl", and mixed numbers/punctuation render correctly.
  • Human review: sample high-risk strings (legal, medical, billing) for native review.
  • Back-translation: translate a sample back to the source language and compare meaning, not wording.

Pricing and deployment

Translation runs on paid plans. Hobby is $8/month with 1,000 requests and 2M tokens/day; Starter is $20/month with 2,000 requests and 5M tokens/day. Builder ($60) and Scale ($120) have no monthly token cap, with fair-use concurrency and RPM. All plans use the same OpenAI-compatible endpoint, and annual billing saves 20%. See pricing for the current caps.

FAQ

What is a translation API?

An HTTP endpoint that accepts source text and returns translated text. It can be embedded in onboarding, support tools, content pipelines and document workflows, with glossary and formatting controls.

Which model does Plugsky use for translation?

plugsky-translate, with a 32,768-token context and up to 16,384 output tokens, on the same chat-completions endpoint as every other model.

How do I keep translations consistent across releases?

Send segment IDs and a glossary, request a JSON array keyed by ID, validate every ID, and store approved translations as translation memory.

Does it handle right-to-left languages?

It can return Arabic, Hebrew and other RTL text. Direction is a UI concern: set dir="rtl", test mixed numbers and punctuation, and keep source and target strings separate.

Is translation included in the free plan?

The free plan includes Micro and Lite. plugsky-translate is available on paid plans from $8/month.

Reviewed 20 November 2026. Model limits are checked against the Plugsky model catalogue. Translation quality varies by language pair and domain; run your own evaluation before publishing customer-facing content.