Pangeanic MT API
The Pangeanic API is a simple RESTful implementation where requests are typically sent as POST with a JSON-encoded body.
External programs, legacy systems, programmers using the console, or API clients can access all the solution's functionalities using these generic APIs.
SERVER URL: http://prod.pangeamt.com:8080/NexRelay/v1/
APIKEY
All endpoints require the apikey parameter. If not provided or incorrect, the API will respond with a 400 or 401 error.
POST /corp/engines
This endpoint is required to list the IDs of the available engines associated with your API Key.
Request Parameters
| Parameter | Type | Description |
|---|---|---|
apikey |
string |
Required. Your personal access key. |
POST /translate
Processes a text segment. Processing works best if the segment is a sentence with full semantic content.
Request Parameters
| Parameter | Type | Description |
|---|---|---|
apikey |
string |
Required. Your personal access key. |
src |
string |
Required. Language code (e.g., "es"). |
tgt |
string |
Required. Language code (e.g., "en"). |
engine |
string |
Required. ID of the engine to use. |
text |
array |
Required. List of texts to translate. |
POST /sendfile
Host: http://prod.pangeamt.com:8080/PGFile/v1
Sends a file to the service for translation.
import requests
import json
url = "http://prod.pangeamt.com:8080/PGFile/v1/sendfile"
config = {
"title": "file.docx",
"engine": "123",
"src": "es",
"tgt": "en",
"apikey": "your-api-key-here"
}
files = {'file': open('file.docx', 'rb')}
data = {'json': json.dumps(config)}
res = requests.post(url, files=files, data=data)
print(res.json())
GET /checkfile
Queries the processing status of one or more files.
POST /retrievefile
Retrieves the processed file in Base64 format.
GET /download
Downloads the file directly as a data stream.
POST /glossaries
Returns a list of available glossaries, optionally filtered by glossaryid.
Parameters
| Parameter | Type | Description |
|---|---|---|
apikey |
string |
Required. Your access key. |
glossaryid |
int |
Optional. Filter by a specific ID. |
POST /deleteglossary
Permanently deletes a specific glossary.
Parameters
| Parameter | Type | Description |
|---|---|---|
apikey |
string |
Required. Your access key. |
glossaryid |
int |
Required. ID of the glossary to delete. |
POST /addglossary
Allows uploading a glossary file and associating it with an engine (engineid). Requires multipart/form-data.
Parameters (Form-Data)
| Field | Type | Description |
|---|---|---|
file |
file |
Glossary file (CSV). |
name |
string |
Descriptive name of the glossary. |
engineid |
int |
Associated engine ID. |
apikey |
string |
Your access key. |