EXCITING NEWS! OpenAI’s ChatGPT-4o now included as your AI-powered translation assistant!

menu

translation api documentationTranslation API Documentation

Pairaphrase Translation API

The Pairaphrase translation API is an interface for processing translations using HTTP and JSON. The translation API makes it easy to create web and desktop applications.

Pricing is simple, just $0.0005 per word translated. Volume discounts are available. Learn more about why you should use the Pairaphrase API for your app, versus others on the market.

When you get your Pairaphrase API Token (account required), please note the use of https:// in the Primary API URL. All Pairaphrase API communication is encrypted over HTTPS.

Any nonsecure requests are automatically rejected, so we recommend establishing a test connection with the secure API entry point before sending sensitive data.

Have Questions?

We’re happy to answer any questions you have about the Pairaphrase translation API and how your organization can deliver high-quality translations to all your Apps.

Request Limits

There are no limits on the number of API requests per day. However, requests will be rate-limited if too many calls are made within a short period of time.

Response Format

All Pairaphrase translation API responses are composed of valid JSON. Booleans are either “true” or “false”.

Authentication

All HTTPS requests must include the token in the URL query. An error will be presented if the token has expired or is invalid.

Language Codes

All requests must include a source language and target language, indicated by language codes in the URL query. View the list of language codes compatible with Pairaphrase.

API Calls

Segment Translation

Translate single sentences or multiple paragraphs. This request uses standard form POST to allow a binary POST, e.g., content-type: multipart/form-data.

POST https://app.pairaphrase.com/apiv2/translate?token=[token]&source=enUS&target=fr-FR

Body / Data
text=Hello, my name is Jack. What is your name?

Response
{“status”: 200, “translation”:”Bonjour, je m’appelle Jack. Comment vous appelez-vous?” }

Upload Documents for Translation

Prepare a single or batch of files for translation. The immediate response will include the translation ID and word count. You will need the ID to submit the file for translation as well as retrieve it’s status. This request uses standard form POST to allow a binary POST, e.g., content-type: multipart/form-data.

POST https://app.pairaphrase.com/apiv2/addfiles?token=[token]

Body / Data (Binary)
document1[]=@excel.csv document2[]=@books.docx document3[]=@resume.pdf

Response
{“status”: 200, “result”:{ “id”:”[document ID]“, “status”:”Accepted”, “word_count”:10530 } }

Submit File for Translation

Submit a document’s ID for full translation.

GET https://app.pairaphrase.com/apiv2/translatefile?
token=[token]&id=[document ID]&source=en-US&target=fr-FR

Response
{“status”: 200 }

Document Translation Status / Response

Fetch the document translation status as well as the translated document location.

GET https://app.pairaphrase.com/apiv2/file?token=[token]&id=[document ID]

Response
{“status”: 200, “file”: “excel.csv”, “file_status”:”Ready”, “export”: “https://…” }

Want API Access?

Sign up for a Pairaphrase account to get your token, at the link below.

Get Your API Token