free-translation-api
Translate text using free LibreTranslate API. Use when: (1) Translating content between languages, (2) Creating multilingual documentation, (3) Processing international data, or (4) Building translation workflows.
What this skill does
# Free Translation API β LibreTranslate
Translate text between 100+ languages using free LibreTranslate instances. Open-source, privacy-respecting alternative to Google Translate API ($20/million characters).
## Why This Replaces Paid Translation APIs
**π° Cost savings:**
- β
**100% free** β no API keys required for public instances
- β
**No rate limits** β generous limits on public instances
- β
**Open source** β self-hostable for unlimited usage
- β
**Privacy-first** β no data collection or tracking
**Perfect for AI agents that need:**
- Text translation without Google Translate API costs
- Privacy-respecting translation (no data retention)
- High volume translation without quotas
- Offline translation capability (self-hosted)
## Quick comparison
| Service | Cost | Rate limit | Privacy | API key required |
|---------|------|------------|---------|------------------|
| Google Translate API | $20/1M chars | Unlimited with payment | β Tracked | β
Yes |
| DeepL API | $5-25/1M chars | 500k chars/month free | β Tracked | β
Yes |
| **LibreTranslate** | **Free** | **Varies by instance** | **β
Private** | **β No** |
## Skills
### translate_text
Basic text translation using LibreTranslate.
```bash
# Translate text (English to Spanish)
curl -s -X POST "https://libretranslate.com/translate" \
-H "Content-Type: application/json" \
-d '{
"q": "Hello, how are you?",
"source": "en",
"target": "es"
}' | jq -r '.translatedText'
# Auto-detect source language
curl -s -X POST "https://libretranslate.com/translate" \
-H "Content-Type: application/json" \
-d '{
"q": "Bonjour le monde",
"source": "auto",
"target": "en"
}' | jq -r '.translatedText'
# Translate from file
TEXT=$(cat document.txt)
curl -s -X POST "https://libretranslate.com/translate" \
-H "Content-Type: application/json" \
-d "{
\"q\": \"$TEXT\",
\"source\": \"en\",
\"target\": \"fr\"
}" | jq -r '.translatedText' > document_fr.txt
```
**Node.js:**
```javascript
async function translateText(text, targetLang, sourceLang = 'auto', instance = 'https://libretranslate.com') {
const res = await fetch(`${instance}/translate`, {
method: 'POST',
headers: { 'Content-Type': 'application/json' },
body: JSON.stringify({
q: text,
source: sourceLang,
target: targetLang
})
});
if (!res.ok) {
const error = await res.text();
throw new Error(`Translation failed: ${error}`);
}
const data = await res.json();
return data.translatedText;
}
// Usage
// translateText('Hello world', 'es', 'en')
// .then(translated => console.log(translated));
// Output: "Hola mundo"
```
### get_supported_languages
List all supported languages for an instance.
```bash
# Get all supported languages
curl -s "https://libretranslate.com/languages" | jq '.[] | {code: .code, name: .name}'
# Get language codes only
curl -s "https://libretranslate.com/languages" | jq -r '.[].code'
# Check if specific language is supported
curl -s "https://libretranslate.com/languages" | jq -r '.[] | select(.code == "ja") | .name'
```
**Node.js:**
```javascript
async function getSupportedLanguages(instance = 'https://libretranslate.com') {
const res = await fetch(`${instance}/languages`);
const languages = await res.json();
return languages.map(lang => ({
code: lang.code,
name: lang.name
}));
}
// Usage
// getSupportedLanguages().then(langs => {
// console.log('Supported languages:', langs.length);
// langs.slice(0, 10).forEach(l => console.log(`${l.code}: ${l.name}`));
// });
```
### detect_language
Detect the language of a text.
```bash
# Detect language
curl -s -X POST "https://libretranslate.com/detect" \
-H "Content-Type: application/json" \
-d '{
"q": "Bonjour, comment allez-vous?"
}' | jq -r '.[0] | {language: .language, confidence: .confidence}'
# Detect language for multiple texts
curl -s -X POST "https://libretranslate.com/detect" \
-H "Content-Type: application/json" \
-d '{
"q": "Hola mundo. CΓ³mo estΓ‘s?"
}' | jq -r '.[]'
```
**Node.js:**
```javascript
async function detectLanguage(text, instance = 'https://libretranslate.com') {
const res = await fetch(`${instance}/detect`, {
method: 'POST',
headers: { 'Content-Type': 'application/json' },
body: JSON.stringify({ q: text })
});
if (!res.ok) {
throw new Error('Language detection failed');
}
const results = await res.json();
return results[0]; // Returns {language: 'en', confidence: 0.99}
}
// Usage
// detectLanguage('Hello world')
// .then(result => console.log(`Detected: ${result.language} (${result.confidence})`));
```
### batch_translate
Translate multiple texts or paragraphs.
```bash
#!/bin/bash
# Translate multiple lines from a file
INPUT_FILE="content_en.txt"
OUTPUT_FILE="content_es.txt"
TARGET_LANG="es"
> "$OUTPUT_FILE" # Clear output file
while IFS= read -r line; do
if [ -n "$line" ]; then
translated=$(curl -s -X POST "https://libretranslate.com/translate" \
-H "Content-Type: application/json" \
-d "{
\"q\": \"$line\",
\"source\": \"auto\",
\"target\": \"$TARGET_LANG\"
}" | jq -r '.translatedText')
echo "$translated" >> "$OUTPUT_FILE"
sleep 1 # Rate limiting
fi
done < "$INPUT_FILE"
echo "Translation complete: $OUTPUT_FILE"
```
**Node.js:**
```javascript
async function batchTranslate(texts, targetLang, sourceLang = 'auto', delayMs = 1000) {
const results = [];
for (const text of texts) {
try {
const translated = await translateText(text, targetLang, sourceLang);
results.push({ original: text, translated, success: true });
// Rate limiting delay
if (delayMs > 0) {
await new Promise(resolve => setTimeout(resolve, delayMs));
}
} catch (err) {
results.push({ original: text, translated: null, success: false, error: err.message });
}
}
return results;
}
// Usage
// const texts = [
// 'Hello world',
// 'How are you?',
// 'Goodbye'
// ];
// batchTranslate(texts, 'fr', 'en', 1000)
// .then(results => results.forEach(r =>
// console.log(`${r.original} -> ${r.translated}`)
// ));
```
### translate_with_fallback
Production-ready translation with instance fallback and retry logic.
```bash
#!/bin/bash
translate_with_fallback() {
local TEXT="$1"
local TARGET_LANG="$2"
local SOURCE_LANG="${3:-auto}"
# List of LibreTranslate instances
local INSTANCES=(
"https://libretranslate.com"
"https://translate.argosopentech.com"
"https://translate.terraprint.co"
)
for instance in "${INSTANCES[@]}"; do
result=$(curl -fsS --max-time 10 -X POST "${instance}/translate" \
-H "Content-Type: application/json" \
-d "{
\"q\": \"$TEXT\",
\"source\": \"$SOURCE_LANG\",
\"target\": \"$TARGET_LANG\"
}" 2>&1)
if [ $? -eq 0 ]; then
echo "$result" | jq -r '.translatedText'
return 0
else
echo "Instance $instance failed, trying next..." >&2
fi
done
echo "Error: All translation instances failed" >&2
return 1
}
# Usage
translate_with_fallback "Hello world" "es" "en"
```
**Node.js:**
```javascript
async function translateWithFallback(text, targetLang, sourceLang = 'auto') {
const instances = [
'https://libretranslate.com',
'https://translate.argosopentech.com',
'https://translate.terraprint.co'
];
const maxRetries = 3;
for (let attempt = 0; attempt < maxRetries; attempt++) {
for (const instance of instances) {
try {
const controller = new AbortController();
const timeout = setTimeout(() => controller.abort(), 10000);
const res = await fetch(`${instance}/translate`, {
method: 'POST',
headers: { 'Content-Type': 'application/json' },
body: JSON.stringify({
q: text,
source: sourceLang,
target: targetLang
}),
Related in Backend & APIs
jfrog
IncludedInteract with the JFrog Platform via the JFrog CLI and REST/GraphQL APIs. Use this skill when the user wants to manage Artifactory repositories, upload or download artifacts, manage builds, configure permissions, manage users and groups, work with access tokens, configure JFrog CLI servers, search artifacts, manage properties, set up replication, manage JFrog Projects, run security audits or scans, look up CVE details, query exposures scan results from JFrog Advanced Security, manage release bundles and lifecycle operations, aggregate or export platform data, or perform any JFrog Platform administration task. Also use when the user mentions jf, jfrog, artifactory, xray, distribution, evidence, apptrust, onemodel, graphql, workers, mission control, curation, advanced security, exposures, or any JFrog product name.
cupynumeric-migration-readiness
IncludedPre-migration readiness assessor for porting NumPy to cuPyNumeric. Use BEFORE substantial porting work begins when the user asks whether code will scale on GPU, whether they should migrate to cuPyNumeric, which NumPy patterns transfer cleanly, what must be refactored before porting, or mentions pre-port assessment, scaling analysis, or refactor planning. Inspect the user's source code, look up NumPy usage, cross-reference the cuPyNumeric API support manifest, and distinguish distributed-scaling-friendly patterns from blockers such as unsupported APIs, scalar synchronization, host round-trips, Python/object-heavy control flow, shape/data-dependent branching, and in-place mutation hazards. Produce a verdict of READY, LIGHT REFACTOR, SIGNIFICANT REFACTOR, or NOT RECOMMENDED, with concrete refactor pointers.
alibabacloud-data-agent-skill
IncludedInvoke Alibaba Cloud Apsara Data Agent for Analytics via CLI to perform natural language-driven data analysis on enterprise databases. Data Agent for Analytics is an intelligent data analysis agent developed by Alibaba Cloud Database team for enterprise users. It automatically completes requirement analysis, data understanding, analysis insights, and report generation based on natural language descriptions. This tool supports: discovering data resources (instances/databases/tables) managed in DMS, initiating query or deep analysis sessions, real-time progress tracking, and retrieving analysis conclusions and generated reports. Use this Skill when users need to query databases, analyze data trends, generate data reports, ask questions in natural language, or mention "Data Agent", "data analysis", "database query", "SQL analysis", "data insights".
token-optimizer
IncludedReduce OpenClaw token usage and API costs through smart model routing, heartbeat optimization, budget tracking, and native 2026.2.15 features (session pruning, bootstrap size limits, cache TTL alignment). Use when token costs are high, API rate limits are being hit, or hosting multiple agents at scale. The 4 executable scripts (context_optimizer, model_router, heartbeat_optimizer, token_tracker) are local-only β no network requests, no subprocess calls, no system modifications. Reference files (PROVIDERS.md, config-patches.json) document optional multi-provider strategies that require external API keys and network access if you choose to use them. See SECURITY.md for full breakdown.
resend-cli
IncludedUse this skill when the task is specifically about operating Resend from an AI agent, terminal session, or CI job via the official resend CLI: installing/authenticating the CLI, sending/listing/updating/cancelling emails, batch sends, domains and DNS, webhooks and local listeners, inbound receiving, contacts, topics, segments, broadcasts, templates, API keys, profiles, or debugging Resend CLI/API failures. Trigger on mentions of Resend CLI, `resend`, `resend doctor`, `resend emails send`, `resend domains`, `resend webhooks listen`, `resend emails receiving`, or agent-friendly terminal automation.
alibabacloud-odps-maxframe-coding
IncludedUse this skill for MaxFrame SDK development and documentation navigation on Alibaba Cloud MaxCompute (ODPS). Helps answer MaxFrame API, concept, official example, and supported pandas API questions; create data processing programs; read/write MaxCompute tables; debug jobs (remote or local); and build custom DPE runtime images. Trigger when users mention MaxFrame, MaxCompute with MaxFrame, ODPS table processing, DPE runtime, MaxFrame docs/examples, DataFrame/Tensor operations, or GPU runtime setup. Works for both English and Chinese queries about Alibaba Cloud data processing with MaxFrame.