Translate
POST
https://api.curriculo.me/public/translate/On this page
Stateless. Translates strings, or whole PDF and DOCX documents, between 85 supported ISO 639-1 language codes. A language outside that set is refused with 422. See Languages.
Price: $0.01 per request, or three times the underlying model cost when that is higher. See Pricing and billing.
Text mode
application/json
| Field | Type | Notes |
|---|---|---|
text | string | One string. The response carries translation, not a list. |
texts | string[] | Several strings. Up to 200, and 50,000 characters in total. The response keeps your order. |
target_language (required) | string | ISO 639-1 code to translate into. |
source_language | string | ISO 639-1 code of the input. Defaults to en. |
Send either text or texts.
curl -X POST https://api.curriculo.me/public/translate/ \
-H 'Authorization: Bearer key_abc123_yoursecret' \
-H 'Content-Type: application/json' \
-d '{"texts": ["Senior backend engineer", "Remote within Europe"], "source_language": "en", "target_language": "fr"}'- One string returns
translationwith a singleokflag. - Several strings return
translationsin input order, with anokflag per item. If one item fails, the rest still come back. - For a large input, the response may include
recommended_async: true. Send that kind of work toPOST /translate/asyncinstead.
Document mode
multipart/form-data on the same path.
| Field | Type | Notes |
|---|---|---|
files | file[] | One or more documents, PDF or DOCX, up to 10 per request and 10 MB each. Each document can hold up to 200 blocks and 50,000 characters. |
target_language (required) | string | ISO 639-1 code to translate into. |
source_language | string | ISO 639-1 code of the source. Defaults to en. |
curl -X POST https://api.curriculo.me/public/translate/ \
-H 'Authorization: Bearer key_abc123_yoursecret' \
-F 'files=@job_description.docx' \
-F 'target_language=ko'The translation comes back as text. Each file returns:
{
"filename": "job_description.docx",
"text": "…",
"target_language": "ko",
"source_language": "en",
"ok": true,
"blocks": 14
}Timing
Under a second for text.
Errors
| Status | Typical cause |
|---|---|
400 | Blank text, an unreadable or password-protected document, or a duplicate JSON key. |
413 | More than 200 texts, more than 50,000 characters, or a document over the size limit. |
422 | target_language is missing, a language is outside the 85 supported codes, or a field is misnamed. |
Updated