API Reference
Build integrations with the Polyglot Cloud API. RESTful endpoints, Translation Memory, and community consensus — all in one platform.
Quick Start
Get up and running in minutes. All you need is an API key.
https://api.polyglot-translate.cloud/v1Include your API key in the Authorization header:
Authorization: Bearer YOUR_API_KEYContent-Type: application/jsonExample request
curl -X POST https://api.polyglot-translate.cloud/v1/translate \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"text": "Hello, world!",
"sourceLang": "en",
"targetLang": "sr"
}'Endpoints
All endpoints return JSON. Authenticated endpoints require a Bearer token.
/v1/translateTranslate text
Translate a string from one language to another. Uses Translation Memory first, then falls back to provider routing (OPUS-MT, Gemini, Argos).
{
"text": "Hello, world!",
"sourceLang": "en",
"targetLang": "sr",
"context": "homepage hero"
}{
"translations": [
{
"text": "Zdravo, svete!",
"provider": "community_tm",
"confidence": 95,
"cached": true
},
{
"text": "Pozdrav, svete!",
"provider": "opus_mt",
"confidence": 70,
"cached": false
}
],
"_metadata": {
"sourceLang": "en",
"targetLang": "sr",
"tmHit": true
}
}/v1/translate/publicNo auth requiredPublic translate (multi-option)
Public endpoint that returns multiple translation options with community votes. No authentication required. Rate-limited per IP.
{
"text": "Welcome to our website",
"sourceLang": "en",
"targetLang": "sr"
}{
"translations": [
{
"text": "Dobrodošli na naš sajt",
"provider": "community_tm",
"confidence": 95,
"votes": {
"up": 47,
"down": 0
}
},
{
"text": "Dobrodošli na našu web stranicu",
"provider": "gemini",
"confidence": 72,
"votes": {
"up": 12,
"down": 0
}
}
],
"_metadata": {
"sourceLang": "en",
"targetLang": "sr",
"tmHit": true
}
}/v1/tm/searchSearch Translation Memory
Search the Translation Memory for existing translations. Supports pagination and partial (substring) matching.
Query parameters
?q=Hello&sourceLang=en&targetLang=sr&page=1&pageSize=20{
"entries": [
{
"id": "tm_abc123",
"sourceText": "Hello",
"targetText": "Zdravo",
"sourceLang": "en",
"targetLang": "sr",
"confidence": 98,
"qualityTier": "gold"
}
],
"total": 1,
"page": 1,
"pageSize": 20
}/v1/usageGet credit usage
Returns your current credit usage and plan limits. The Polyglot Translate WordPress plugin deduplicates duplicate strings locally before they reach our API, so your effective character spend stays low.
{
"used": 1234,
"limit": 50000,
"remaining": 48766,
"plan": "pro"
}/v1/sitesList connected sites
Returns all sites connected to your account (WordPress, Shopify, or custom integrations), including their status and language configuration.
[
{
"id": "site_abc123",
"domain": "example.com",
"status": "active",
"languages": [
"en",
"sr",
"de"
],
"createdAt": "2026-01-15T10:00:00Z"
}
]/v1/translate/public/batchNo auth requiredPublic batch translate
Translate multiple strings in one request without authentication. Up to 20 texts per batch. TM is checked for each string — only cache misses hit the provider. Rate-limited per IP.
{
"texts": [
"Add to cart",
"Checkout",
"My Account"
],
"sourceLang": "en",
"targetLang": "de"
}{
"results": [
{
"sourceText": "Add to cart",
"text": "In den Warenkorb",
"provider": "community_tm",
"confidence": 97,
"tmHit": true
},
{
"sourceText": "Checkout",
"text": "Zur Kasse",
"provider": "gemini",
"confidence": 72,
"tmHit": false
},
{
"sourceText": "My Account",
"text": "Mein Konto",
"provider": "community_tm",
"confidence": 94,
"tmHit": true
}
],
"sourceLang": "en",
"targetLang": "de"
}/v1/translate/batchBatch translate (authenticated)
Translate multiple strings in a single request. Up to 100 texts per batch. TM is checked for each string individually — only cache misses hit the provider. Credits deducted only for API calls, not TM hits.
{
"texts": [
"Add to cart",
"Checkout",
"My Account"
],
"source": "en",
"target": "de"
}{
"translations": [
{
"text": "In den Warenkorb",
"provider": "community_tm",
"confidence": 97,
"tmHit": true
},
{
"text": "Zur Kasse",
"provider": "gemini",
"confidence": 72,
"tmHit": false
},
{
"text": "Mein Konto",
"provider": "community_tm",
"confidence": 94,
"tmHit": true
}
],
"tmHits": 2,
"apiCalls": 1
}/v1/feedbackSubmit translation feedback
Vote on a translation (upvote/downvote) or suggest an improvement. Feedback drives the self-learning system — good translations get promoted, bad ones get demoted.
{
"entryId": "tm_abc123",
"action": "upvote"
}{
"success": true,
"newScore": 0.97
}/v1/translate/public/voteNo auth requiredVote on translation
Upvote or downvote a translation variant. Votes influence quality tier promotion (candidate → verified → gold). No authentication required.
{
"variantId": "var_abc123",
"vote": "up"
}{
"success": true,
"votes": 48
}/v1/geoNo auth requiredDetect visitor country
Returns the visitor's country based on Cloudflare CF-IPCountry header. Used for language auto-detection. No authentication required.
{
"country": "DE"
}/v1/tm/contributeContribute translation to TM
Submit a human translation to the Translation Memory. Contributions start as "candidate" and are promoted through trust tiers (candidate, verified, gold) based on community consensus.
{
"sourceText": "Thank you",
"targetText": "Hvala",
"sourceLang": "en",
"targetLang": "sr"
}{
"id": "contrib_xyz789",
"status": "candidate"
}Rate Limits
Rate limits depend on your plan. TM lookups are always free and do not count against your translation quota. Limits are returned in response headers.
| Plan | Requests | Burst | Characters |
|---|---|---|---|
| Free | 100/min | 10/sec | 10,000 (lifetime trial) |
| Starter | 300/min | 30/sec | 50,000/mo |
| Pro | 1,000/min | 100/sec | 200,000/mo |
| Business | 3,000/min | 300/sec | 1,000,000/mo |
| Enterprise | Custom | Custom | Unlimited |
X-RateLimit-Remaining, X-RateLimit-ResetError Codes
All errors return a consistent JSON structure with a status code and message.
{
"error": {
"code": "RATE_LIMIT_EXCEEDED",
"message": "Too many requests. Please retry after 30 seconds.",
"retryAfter": 30
}
}| Status | Code | Description |
|---|---|---|
| 400 | INVALID_REQUEST | Missing or invalid parameters |
| 401 | UNAUTHORIZED | Invalid or missing API key |
| 403 | FORBIDDEN | Insufficient permissions |
| 404 | NOT_FOUND | Resource not found |
| 429 | RATE_LIMIT_EXCEEDED | Too many requests |
| 500 | INTERNAL_ERROR | Server error — contact support |
SDKs
Official client libraries are under development. In the meantime, use the REST API directly with any HTTP client.
JavaScript / TypeScript
Coming soonPython
Coming soonPHP
Coming soonWordPress Plugin
The easiest way to use Polyglot Cloud. Install the WordPress plugin and translate your site with one click — no API integration needed.
How it connects
The WordPress plugin acts as a client for this API. When you activate the plugin and enter your API key, it handles all translation calls automatically. The plugin includes built-in Translation Memory caching — translations are stored locally in your WordPress database for instant retrieval.
Available addons
- Pro — Unlimited languages, Magic Translate, bulk operations, XLIFF/CSV export
- WooCommerce — Products, cart, checkout, 9 email types, HPOS support
- SEO — Yoast/RankMath/SEOPress orchestration, hreflang, JSON-LD translation
- Elementor — Data-level widget translation, Theme Builder, forms, popups
- Contact Form 7 — Form labels, email templates, CF7 tag safety (free)
Ready to get started?
Create a free account to get your API key and start translating with 10,000 free characters to try the API.