Lanquora

Developer documentation

A small API for your next project.

The translation endpoint is authenticated with your API key. Login sessions are only for account management.

Your first translation

Create a named key, save its secret, and send a request from your application. The credentials below are placeholders.

curl https://api.lanquora.com/v1/translate   -H 'Authorization: Bearer YOUR_API_KEY'   -H 'Content-Type: application/json'   -d '{"text":"Good morning.","source_language":"en","target_language":"fr"}'

Example successful response:

{
  "translation": "Bonjour.",
  "source_language": "en",
  "target_language": "fr"
}

Request format

FieldValue
textNonempty text, at most 768 UTF-8 bytes.
source_languageSource code from GET /v1/languages.
target_languageAn enabled target for the selected source, from language discovery.
model · optionalOmit to use the default. Available IDs are listed by GET /v1/models.

Only configured directions are enabled. See quality notes. Arbitrary prompts and raw inference controls are not available.

Limits & free allowance

Accounts start with 10,000 free API translations per UTC day, shared across keys. Your account page shows your allowance and lets you request a higher total for free. Minute limits and server capacity determine how quickly you can use that allowance.

The request body must be no larger than 4,096 bytes. Translation input is limited to 768 UTF-8 bytes. The model runs one inference at a time, with at most two waiting requests and a 3-second queue wait. A full queue returns a clear error.

To request more, open your account, enter the total you need per day, and confirm you’ll avoid overloading the server. Staff review your request and post the decision on your account page.

Quota is charged once at inference dispatch, even if the model later fails or times out. Retrying is a new attempt. There is no translation cache or idempotency-key support. Incomplete results are rejected rather than returned as complete translations.

Look after your keys

Key secrets are shown once. Store them privately and use named keys for your integrations. Never embed a shared key in a public client or commit one to source control.

Rotate a key from your account. The old key may overlap for up to 24 hours; the default is one hour. Old and new keys share the key allowance. Revoke the old key after updating your caller. Revocation stops new and waiting dispatches; a request already running may finish.

Errors you can handle

{ "error": { "code": "quota_exceeded" } }
StatusCommon codes
401unauthorized · invalid, expired or revoked key
413text_too_large, body_too_large
422unsupported_language_pair, unsupported_model
429quota_exceeded, rate_limited, queue_full, queue_timeout
502–504Inference or availability failure; a dispatched request may already count.

Respect Retry-After when supplied and use backoff. Save the response’s X-Request-ID for troubleshooting, never the bearer key or private text. The full contract is in the OpenAPI document.

Privacy & model

Translation inputs, outputs, passwords and keys stay out of gateway request logs. No shared translation cache is enabled. API key secrets are stored as digests; developer passwords use Django’s password hashing.

Translation can be wrong, especially for experimental directions. Review important output. See model attribution and license terms, including terms applying to models trained on translation outputs.