API Documentation
Complete reference for the LangBridge translation API
Quick Start
1. Get your API key
Sign up at langbridge.dev/login to get your API key. Free tier includes 1,000 translations/month.
2. Install the OpenClaw skill
Tell your OpenClaw agent:
Install the LangBridge skill from https://langbridge.dev/skill.md3. Configure your API key
Set the environment variable or configure in openclaw.json:
export LANGBRIDGE_API_KEY=lb_your_key_hereAuthentication
All API requests require a Bearer token in the Authorization header:
Authorization: Bearer lb_your_api_keyAPI keys start with lb_ and are 35 characters long.
API Endpoints
POST
/api/detectDetect the language of input text.
Request Body
JSON
{
"text": "こんにちは、元気ですか?"
}Response
JSON
{
"language": "ja",
"confidence": 0.98,
"name": "Japanese"
}Example
cURL
curl -X POST https://langbridge.dev/api/detect \
-H "Authorization: Bearer lb_your_key" \
-H "Content-Type: application/json" \
-d '{"text": "こんにちは"}'POST
/api/translateTranslate text between languages.
Request Body
JSON
{
"text": "Hello, how can I help you today?",
"to": "ja",
"from": "en" // optional, auto-detected if omitted
}Parameters
text(required) - Text to translateto(required) - Target language code (e.g., "ja", "zh", "ko")from(optional) - Source language code (auto-detected if omitted)
Response
JSON
{
"translated": "こんにちは、今日はどのようにお手伝いできますか?",
"from": "en",
"to": "ja",
"chars": 35
}Example
cURL
curl -X POST https://langbridge.dev/api/translate \
-H "Authorization: Bearer lb_your_key" \
-H "Content-Type: application/json" \
-d '{"text": "Hello!", "to": "ja"}'Supported Languages
Asian Languages
ja- Japanesezh- Chinese (Simplified)zh-TW- Chinese (Traditional)ko- Koreanhi- Hindith- Thaivi- Vietnameseid- Indonesianms- Malaytl- Tagalog
European Languages
en- Englishes- Spanishfr- Frenchde- Germanit- Italianpt- Portugueseru- Russiannl- Dutchpl- Polishsv- Swedish
Error Codes
401
INVALID_KEYInvalid or missing API key
429
RATE_LIMITMonthly rate limit exceeded. Upgrade your plan or wait for reset.
400
INVALID_REQUESTMissing required parameters or invalid format
Rate Limits
| Plan | Price | Translations/Month | API Keys |
|---|---|---|---|
| Free | $0 | 1,000 | 1 |
| Pro | $19/mo | 50,000 | 3 |
| Team | $79/mo | 500,000 | 10 |