Supported Methods

Account > Get account details

GET: /account

Request Params:

none

Response Params:

  • credits
  • account_id
  • account_username

Resources > Create a text resource

This method allows creating a new Text entity on One Hour Translation. After the resource entity is created, it can be used on job requests such as translation, proofreading, etc.

Read more about supported content formats here.

POST: /resources/text

Request Params:

  • text

Response Params:

  • resource_uuid

Resources > Create a new file resource

This method allows creating a new File entity on One Hour Translation. After the resource entity is created, it can be used on job requests such as translation, proofreading, etc.

Read more about supported content formats here.

POST: /resources/file

Request Params:

  • file_name
  • file_mime - optional
  • @upload (http file uplaod)

Response Params:

  • resource_uuid

Resources > Get resource

GET: /resources/< resource_uuid >

Request Params:

  • project_id - (optional) Project ID, needed when requesting a resource that was uploaded by another user - e.g. as a project’s translation .

  • fetch - (optional) possible values:

  • false - (default) do not fetch content
  • base64 - fetch content, base64 encoded

Response Params:

  • type - text | file
  • length
  • file_name - only for files
  • file_mime - only for files
  • download_url - URL to download this resource as a file
  • content - base64 encoded (only if fetch=”base64”)

Resources > Download resource

GET: /resources/< resource_uuid >/download

Request Params:

  • project_id = (optional) Project ID, needed when requesting a resource that was uploaded by another user - e.g. as a project’s translation .

Response Params:

Return a “file download” response, not JSON. See here.
File is downloaded with original name, text content is downloaded with file name: “oht_.txt”

Tools > Get Quote

GET: /tools/quote

Request Params:

  • resources = array of resource_uuid
  • wordcount = integer, words count
  • expertise = optional - See Expertise Codes
  • proofreading = optional, 0 | 1 *currency = optional, USD | EUR

Response Params:

  • currency - currency selected by user (or default)
  • resources - array of results per resource
  • resource_uuid
  • wordcount
  • credits
  • price
  • total
  • wordcount - total words count
  • credits - sum of credits to charge
  • net_price - price in selected currency, based on credits and discounts
  • transaction_fee - price in selected currency, based on fee from payment vendors
  • price - total price in selected currency, based on net price and transaction fee.

Tools > Get Word Count

GET: /tools/wordcount

Request Params:

  • resources = comma delimited list of resource_uuid

Response Params:

  • wordcount - total words count
  • resources - array of results per resource
  • resource_uuid
  • total

Project > Create a new project

POST: /projects

POST: /projects/< project_type >

Translation Project

Request Params:

  • project_type - “translation” - default
  • source_language - See Language Codes
  • target_language - See Language Codes
  • sources - comma separated list of Resource UUIDs
  • wordcount - (optional) integer, if empty use automatic counting
  • notes - (optional)
  • expertise - (optional) See Expertise Codes
  • callback_url - (optional), See Callbacks section
  • custom0..9 - (optional)

Response Params:

  • project_id
  • wordcount
  • credits

Proofreading (only source docs):

Request Params:

  • project_type - “proof-general”
  • source_language- See Language Codes
  • sources - comma separated list of Resource UUIDs
  • wordcount - (optional) integer, if empty use automatic counting
  • notes - (optional)
  • callback_url - (optional), See Callbacks section
  • custom0..9 - (optional)

Response Params:

  • project_id
  • wordcount
  • credits

Proofreading (source and translated docs):

Request Params:

  • project_type - “proof-translated”
  • source_language - See Language Codes
  • target_language - See Language Codes
  • sources - comma separated list of Resource UUIDs
  • translations - comma separated list of Resource UUIDs
  • wordcount - (optional) integer, if empty use automatic counting
  • notes - (optional)
  • callback_url - (optional), See Callbacks section
  • custom0..9 - (optional)

Response Params:

  • project_id
  • wordcount
  • credits

Transcription:

Request Params:

  • project_type - “transcription”
  • source_language - See Language Codes
  • sources - comma separated list of Resource UUIDs
  • length - (optional) integer of seconds, if empty use automatic counting
  • notes - (optional)
  • callback_url - (optional), See Callbacks section
  • custom0..9 - (optional)

Response Params:

  • project_id
  • length
  • credits

Project > Get project details

GET: /projects/< project_id >

Request Params:

None

Response Params:

  • project_id
  • project_type
  • source_language - See Language Codes
  • target_language - See Language Codes
  • resources
  • sources
  • translations | proofs | transcriptions
  • wordcount | length (seconds, transcription projects only)
  • custom 0..9

Project > Cancel project

DELETE: /projects/< project_id >

Constraints: Available only before actual translation starts

Request Params:

None

Response Params:

None

Project > Comments > Get comments

GET: /projects/< project_id >/comments

Request Params:

None

Response Params:

  • comments - array of comments
  • id
  • date
  • commenter_name - Short representation of the user’s name
  • commenter_role - admin | customer | provider | potential-provider
  • admin = OHT support team
  • provider = The translator / proofreader / transcriber that is assigned to the project
  • potential-provider = A translator / proofreader / transcriber that was allowed to view the project before it was assigned
  • content - text content

Project > Comments > New comment

POST: /projects/< project_id >/comments

Request Params:

  • content - text content

Response Params:

None

Machine Translation > Translate

GET,POST: /mt/translate/text

GET,POST: /mt/translate/json

GET,POST: /mt/translate/xml

Request Params:

Response Params:

  • translation - the translated content in the original format

Machine Translation > Detect Language

GET,POST: /mt/detect/text

GET,POST: /mt/detect/json

GET,POST: /mt/detect/xml

Request Params:

  • source_content

Response Params: