The SOLVAN Translation API

One JSON endpoint that translates between English, Sinhala and Tamil, in every direction.

Base URLhttps://solvan.markquad.com/v1

Quick start

Your first translation takes about a minute.

  1. 01Get a keyCreate a free account and generate an API key.
  2. 02Send a requestPOST your text to /v1/translate with the key in a header.
  3. 03Read the replyThe translation comes back as JSON in translation.

Authentication

Every request needs an API key. Send it in either header. Keep keys secret and call the API from your server, not from code that runs in a visitor's browser.

Headers
Authorization: Bearer sol_your_key
X-API-Key: sol_your_key

Translate text

POST/v1/translate

Request body

FieldTypeDescription
textrequiredstringThe text to translate, up to 5,000 characters.
sourcerequiredstringLanguage of the text: en, si or ta.
targetrequiredstringLanguage to translate into. Must differ from source.

Response

FieldTypeDescription
translationstringThe translated text.
charactersnumberCharacters counted for this request.
usageobjectCharacters used this month and your monthly limit.
curl -X POST https://solvan.markquad.com/v1/translate \
  -H "Authorization: Bearer sol_your_key" \
  -H "Content-Type: application/json" \
  -d '{"text": "Welcome to Jaffna", "source": "en", "target": "ta"}'
200 OK
{
  "translation": "யாழ்ப்பாணத்திற்கு வரவேற்கிறோம்",
  "glossary": [],
  "characters": 17,
  "usage": {
    "used": 17,
    "limit": 100000
  }
}

Errors

When something goes wrong the status code tells you why, and the body explains it in one sentence.

StatusMeaning
400The text is empty or too long, or the language codes are not valid.
401The API key is missing, wrong or revoked.
403The account has been turned off by an admin.
429The monthly character limit has been reached.
503The translation model is busy or still starting. Try again shortly.

Example

429
{
  "error": "Monthly limit reached: 100,000 of 100,000 characters used."
}

Limits

5,000

characters per request

100,000

characters a month on the free plan

1st

of each month, usage resets

Need more? Contact us to raise your monthly limit.

Languages

CodeLanguageNative name
enEnglishEnglish
siSinhalaසිංහල
taTamilதமிழ்