Install
Works with Claude Code, Claude apps, Codex, Cursor, Gemini CLI, GitHub Copilot, VS Code, OpenCode, Goose, Windsurf. Read the repository before you give any tool access to your data.
npx agentmarket install skill/zyntroai-translator-api
Asks which of your tools to add it to (Claude Code, Codex, Cursor, VS Code, Windsurf, Gemini CLI, Claude Desktop) and shows the change first. See https://agentmart.dev/cli.
Get the weekly diff
The weekly diff: one email a week with new agent tools, notable updates and grade changes, plus security alerts for tools you follow. Double opt-in, one-click unsubscribe.
About
Use cases: backend
Reviews
Write a reviewNo reviews yet. Installed it? Reviews come from verified installers only. How reviews work
Permissions: not checked yet.
What's inside
- Skill name
translator-api- Description
- None
- License
- MIT
- Instructions
- 127 lines in SKILL.md · view on GitHub
Before installing
- Instructions call the network
Agent Skills spec issues
- missing YAML frontmatter
- name: missing
- description: missing
Files (1)
- SKILL.md
SKILL.md (first lines)
# Translator API — Overview & Implementation
A **Translator API** enables programmatic text translation between languages, typically via REST/HTTP endpoints, JSON request/response, and standard authentication. Below is a complete practical guide, including common providers, a minimal self-hosted FastAPI version, and usage examples.
---
## 📋 Popular Translator API Providers
| Provider | Free Tier | Key Features | Docs |
|---|---|---|---|
| **Google Cloud Translation API** | Yes (limited chars/month) | 130+ langs, auto-detect, glossary | cloud.google.com/translate |
| **DeepL API** | Yes (500k chars/month) | High-quality, context-aware, formal/informal | deepl.com/pro-api |
| **Microsoft Translator (Azure)** | Yes (2M chars/month) | 100+ langs, batch, dictionary | azure.com/ai-services/translator |
| **LibreTranslate** | Free/self-hosted | Open-source, no API key needed (self-host) | libretranslate.com |
---
## 🛠️ Build Your Own Minimal Translator API (FastAPI)
Uses `deep-translator` library (wraps multiple backends: Google, DeepL, etc.).
### 1. Install Dependencies
```bash
pip install fastapi uvicorn deep-translator pydantic
```
### 2. API Code (`translator_api.py`)
```python
from fastapi import FastAPI, HTTPException
from pydantic import BaseModel
from deep_translator import GoogleTranslator, DeepLTranslator
from typing import Optional
app = FastAPI(title="Translator API", version="1.0.0")
class TranslationRequest(BaseModel):
text: str
source_lang: str = "auto" # e.g. "en", "th", "zh-CN"
target_lang: str
provider: str = "google" # "google" or "deepl"
deepl_api_key: Optional[str] = None
class TranslationResponse(BaseModel):
translated_text: str
detected_source: Optional[str]
provider: str
@app.post("/translate", response_model=TranslationResponse)
async def translate(req: TranslationRequest):
try:
if req.provider.lower() == "google":
translator = GoogleTranslator(source=req.source_lang, target=req.target_lang)
result = translator.translate(req.text)
detected = translator.source if req.source_lang != "auto" else None
elif req.provider.lower() == "deepl":
if not req.deepl_api_key:
raise HTTPException(401, "DeepL API key required")
translator = DeepLTranslator(
api_key=req.deepl_api_key,
source=req.source_lang.upper() if req.source_lang != "auto" else None,
target=req.target_lang.upper()
)
result = translator.translate(req.text)
detected = None
else:
raise HTTPException(400, "Supported providers: google, deepl")
return TranslationResponse(
translated_text=result,
detected_source=detected,
provider=req.provider
)
except Exception as e:
raise HTTPException(500, detail=f"Translation error: {str(e)}")
@app.get("/languages/{provider}")
async def list_languages(provider: str):
"""Return supported language codes"""
if provider.lower() == "google":
return {"languages": GoogleTranslator.get_supported_languages(as_dict=True)}
raise HTTPException(400, f"Language list not available for {provider}")
if __name__ == "__main__":
import uvicorn
uvicorn.run(app, host="0.0.0.0", port=8000)
```
### 3. Run & Test
```bash
uvicorn translator_api:app --reload
# Docs at: http://127.0.0.1:8000/docs
```
**Example Request (curl):**
```bash
curl -X POST "http://127.0.0.1:8000/translate" \
-H "Content-Type: application/json" \
-d '{
"text": "Hello, welcome!",
"source_lang": "en",
"target_lang": "th",
"provider": "google"
}'
```
**Response:**
```json
{
"translated_text": "สวัสดี ยินดีต้อนรับ!",
"detected_source": "en",
"provider": "google"
}
```
---
## 🔑 Key Implementation Notes
- **Language Codes**: Use standard codes (`en`, `th`, `zh-CN`, `ja`, `ko`...) — `/languages` endpoint returns full list.
- **Authentication**: For production, add API key middleware, rate limiting, and environment-based secrets.
- **Error Handling**: Implement retries, timeouts, and input length limits.From ZyntroAI/fastapi-python-boilerplate, MIT.
More from ZyntroAI/fastapi-python-boilerplate
- 0.536score
run-backend-tests
ZyntroAI
Run Ruff linting, Mypy type checking, and Pytest test suite for the FastAPI backend.
SkillBFreshness: B★ 1Claude Code +9 - 0.536score
frontend-qa
ZyntroAI
Dedicated QA agent for verifying TypeScript types, lint rules, and React component tests.
SkillBFreshness: B★ 1Claude Code +9 - 0.318score
.fig
ZyntroAI
No description from the publisher yet.
SkillAFreshness: A★ 1Claude Code +9 - 0.315score
ZyntroAI_Organization
ZyntroAI
No description from the publisher yet.
SkillAFreshness: A★ 1Claude Code +9 - 0.294score
Discord
ZyntroAI
No description from the publisher yet.
SkillBFreshness: B★ 1Claude Code +9 - 0.294score
GitHub
ZyntroAI
No description from the publisher yet.
SkillBFreshness: B★ 1Claude Code +9 - 0.294score
Google Workspace
ZyntroAI
No description from the publisher yet.
SkillBFreshness: B★ 1Claude Code +9 - 0.294score
Jira
ZyntroAI
No description from the publisher yet.
SkillBFreshness: B★ 1Claude Code +9 - 0.294score
Linear
ZyntroAI
No description from the publisher yet.
SkillBFreshness: B★ 1Claude Code +9 - 0.294score
Notion
ZyntroAI
No description from the publisher yet.
SkillBFreshness: B★ 1Claude Code +9 - 0.294score
OAuth
ZyntroAI
No description from the publisher yet.
SkillBFreshness: B★ 1Claude Code +9 - 0.294score
book-to-skill
ZyntroAI
No description from the publisher yet.
SkillBFreshness: B★ 1Claude Code +9
Signals
- Stars
- 1
- Forks
- 0
- Open issues
- 0
- Last commit (this folder)
- Sep 13, 2026 (1 month ago)
- Last release
- Sep 14, 2026 (1 month ago)
From GitHub (fetched Oct 24, 2026).
Details
- License
- MIT
- First seen
- Oct 24, 2026
- Last checked
- Oct 24, 2026
- Source
- GitHubgithub-graphql
More from ZyntroAI
- 0.536score
frontend-qa
ZyntroAI
Dedicated QA agent for verifying TypeScript types, lint rules, and React component tests.
SkillBFreshness: B★ 1Claude Code +9 - 0.536score
run-backend-tests
ZyntroAI
Run Ruff linting, Mypy type checking, and Pytest test suite for the FastAPI backend.
SkillBFreshness: B★ 1Claude Code +9
Cite this page
translator-api skill. Agent Mart. https://agentmart.dev/skills/zyntroai-translator-api (last updated 2026-10-24)