Back to home

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.md

3. Configure your API key

Set the environment variable or configure in openclaw.json:

export LANGBRIDGE_API_KEY=lb_your_key_here

Authentication

All API requests require a Bearer token in the Authorization header:

Authorization: Bearer lb_your_api_key

API keys start with lb_ and are 35 characters long.

API Endpoints

POST/api/detect

Detect 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/translate

Translate 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 translate
  • to (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 - Japanese
  • zh - Chinese (Simplified)
  • zh-TW - Chinese (Traditional)
  • ko - Korean
  • hi - Hindi
  • th - Thai
  • vi - Vietnamese
  • id - Indonesian
  • ms - Malay
  • tl - Tagalog

European Languages

  • en - English
  • es - Spanish
  • fr - French
  • de - German
  • it - Italian
  • pt - Portuguese
  • ru - Russian
  • nl - Dutch
  • pl - Polish
  • sv - Swedish

Error Codes

401INVALID_KEY

Invalid or missing API key

429RATE_LIMIT

Monthly rate limit exceeded. Upgrade your plan or wait for reset.

400INVALID_REQUEST

Missing required parameters or invalid format

Rate Limits

PlanPriceTranslations/MonthAPI Keys
Free$01,0001
Pro$19/mo50,0003
Team$79/mo500,00010