curl --request POST \
--url https://api.example.com/api/v1/nlp/translate \
--header 'Content-Type: application/json' \
--data '
{
"text": "<string>",
"target": "<string>",
"to": "<string>",
"texts": [
{}
]
}
'{
"translated": [
{}
],
"detail": "<string>",
"ok": true,
"engine": "<string>",
"available": true
}Translate text between languages using Google Translate API via deep-translator
curl --request POST \
--url https://api.example.com/api/v1/nlp/translate \
--header 'Content-Type: application/json' \
--data '
{
"text": "<string>",
"target": "<string>",
"to": "<string>",
"texts": [
{}
]
}
'{
"translated": [
{}
],
"detail": "<string>",
"ok": true,
"engine": "<string>",
"available": true
}Documentation Index
Fetch the complete documentation index at: https://mintlify.com/LuisCastilloCruz/VIGIA/llms.txt
Use this file to discover all available pages before exploring further.
"es" (Spanish), "en" (English), "fr" (French), "de" (German).target. Either parameter can be used.curl -X POST https://api.vigia.com/api/v1/nlp/translate \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"text": "The patient developed a severe allergic reaction",
"target": "es"
}'
import requests
url = "https://api.vigia.com/api/v1/nlp/translate"
headers = {
"Authorization": "Bearer YOUR_API_KEY",
"Content-Type": "application/json"
}
payload = {
"text": "The patient developed a severe allergic reaction",
"target": "es"
}
response = requests.post(url, json=payload, headers=headers)
print(response.json())
{
"translated": "El paciente desarrolló una reacción alérgica grave"
}
text/abstract/title fields, or mixed types.target.curl -X POST https://api.vigia.com/api/v1/nlp/translate/batch \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"texts": [
"Headache",
"Nausea",
"Dizziness",
"Fatigue"
],
"target": "es"
}'
import requests
url = "https://api.vigia.com/api/v1/nlp/translate/batch"
headers = {
"Authorization": "Bearer YOUR_API_KEY",
"Content-Type": "application/json"
}
payload = {
"texts": [
"Headache",
"Nausea and vomiting",
"Severe dizziness",
"Chronic fatigue"
],
"target": "es"
}
response = requests.post(url, json=payload, headers=headers)
print(response.json())
{
"translated": [
"Dolor de cabeza",
"Náuseas y vómitos",
"Mareos severos",
"Fatiga crónica"
]
}
payload = {
"texts": [
{"text": "Severe headache"},
{"abstract": "Patient reported dizziness"},
{"title": "Adverse Event Report"},
"Plain text string"
],
"target": "es"
}
text fieldabstract fieldtitle fieldGET /api/v1/nlp/translate?text=Hello%20world&target=es
GET /api/v1/nlp/translate/batch?texts=Hello&texts=World&target=es
| Language | Code |
|---|---|
| Spanish | es |
| English | en |
| French | fr |
| German | de |
| Italian | it |
| Portuguese | pt |
| Chinese | zh-CN |
| Japanese | ja |
| Korean | ko |
| Russian | ru |
| Arabic | ar |
source="auto" to automatically detect the source language, so you don’t need to specify it. This is particularly useful for:
"Error en GoogleTranslator: ..."{
"detail": "Demasiados ítems (máx. 200)"
}
null values are filtered out automatically
textabstracttitlestr(object)GET /api/v1/nlp/translate/health
{
"ok": true,
"engine": "deep-translator.GoogleTranslator",
"available": true
}
import requests
# Step 1: OCR a document
ocr_response = requests.post(
"https://api.vigia.com/api/v1/ocr/preview",
files={"file": open("report.pdf", "rb")},
headers={"Authorization": "Bearer YOUR_API_KEY"}
)
text = ocr_response.json()["text"]
# Step 2: Translate to Spanish if needed
translate_response = requests.post(
"https://api.vigia.com/api/v1/nlp/translate",
json={"text": text, "target": "es"},
headers={
"Authorization": "Bearer YOUR_API_KEY",
"Content-Type": "application/json"
}
)
translated_text = translate_response.json()["translated"]
# Step 3: Extract structured data
extract_response = requests.post(
"https://api.vigia.com/api/v1/nlp/extract",
json={"text": translated_text},
headers={
"Authorization": "Bearer YOUR_API_KEY",
"Content-Type": "application/json"
}
)
structured_data = extract_response.json()
print(structured_data)