Translation API for Developers

Add AI-powered translations to your applications with a single REST endpoint. Supports many languages with automatic source language detection.

Quick Start

1

Create an account

Register for free to get your monthly credit allocation.

2

Generate an API key

Go to your Dashboard and create a new API key. The full key is only shown once — store it securely.

3

Make your first request

Translate text with a single API call:

curl -X POST https://api.lingua-franca.ai/api/translation \
  -H "Authorization: ApiKey YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "text": "Hello world",
    "sourceLanguage": null,
    "targetLanguage": "French"
  }'

Authentication

All API requests require an API key sent in theAuthorizationheader:

Authorization: ApiKey YOUR_API_KEY

API keys can be created, revoked, and managed from your Dashboard. You can set expiration dates and reactivate revoked keys.

API Reference

POST/api/translation

Translates text from one language to another. The source language can be auto-detected or specified explicitly.

Request Body

FieldTypeRequiredDescription
textstringYesThe text to translate
targetLanguagestringYesLanguage to translate into (e.g. "English", "Spanish")
sourceLanguagestring | nullNoSource language, or null for auto-detection

Response

FieldTypeDescription
originalTextstringThe original input text
translatedTextstringThe translated output
detectedLanguagestring | nullDetected source language (when auto-detected)

Example: Auto-detect source language

curl -X POST https://api.lingua-franca.ai/api/translation \
  -H "Authorization: ApiKey YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "text": "Bonjour le monde",
    "sourceLanguage": null,
    "targetLanguage": "English"
  }'
{
  "originalText": "Bonjour le monde",
  "translatedText": "Hello world",
  "detectedLanguage": "French"
}

Example: Specify source language

curl -X POST https://api.lingua-franca.ai/api/translation \
  -H "Authorization: ApiKey YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "text": "Hola mundo",
    "sourceLanguage": "Spanish",
    "targetLanguage": "Japanese"
  }'
{
  "originalText": "Hola mundo",
  "translatedText": "こんにちは世界",
  "detectedLanguage": null
}
GET/api/credits/balance

Returns your current credit balance, monthly allocation, and last reset date.

Example

curl https://api.lingua-franca.ai/api/credits/balance \
  -H "Authorization: ApiKey YOUR_API_KEY"
{
  "currentMonthCredits": 4850,
  "monthlyAllocation": 5000,
  "lastReset": "2026-02-01T00:00:00Z"
}

Supported Languages

Use any of these values for the targetLanguage or sourceLanguage fields:

Arabic
Chinese
Czech
Danish
Dutch
English
Finnish
French
German
Greek
Hebrew
Hindi
Hungarian
Indonesian
Italian
Japanese
Korean
Norwegian
Polish
Portuguese
Romanian
Russian
Spanish
Swedish
Thai
Turkish
Ukrainian
Vietnamese

Error Handling

The API uses standard HTTP status codes. Errors include a JSON body with a message field.

StatusMeaning
200Success
400Bad request — check your request body
401Unauthorized — invalid or missing API key
402Insufficient credits
429Rate limited — too many requests
500Server error — try again later
{
  "message": "Insufficient credits to complete this translation."
}

Frequently Asked Questions

How do I get an API key for the LinguaFranca Translation API?
Register for a free account at lingua-franca.ai/register, then visit your Dashboard to create an API key. The full key is shown once at creation — store it securely.
How many languages does the Translation API support?
The LinguaFranca Translation API supports many languages including English, Spanish, French, German, Chinese, Japanese, Korean, Arabic, Hindi, Portuguese, Russian, and more.
Does the API auto-detect the source language?
Yes. Set the sourceLanguage field to null and the API will automatically detect the input language, returning it in the detectedLanguage field of the response.
Is the Translation API free to use?
Every account receives a monthly credit allocation for free. Each translation consumes credits based on the length of the text. Additional credit packs can be purchased if needed.
What authentication method does the API use?
The API uses ApiKey authentication. Include your API key in the Authorization header as: Authorization: ApiKey YOUR_API_KEY
What is the rate limit for the Translation API?
Rate limits are applied per API key. If you exceed the limit, you will receive a 429 status code. Wait a moment and retry your request.

Ready to get started?

Create a free account and start translating in minutes.