POST price info - TextKing/textking-api GitHub Wiki
Request: POST /price-info
Returns price information for a document for all available quality levels. The document must be supplied in the request body. This endpoint is public and does not require authorization.
Parameter | Description |
---|---|
source_language | ISO 639 language code of the source language (required). |
target_language | ISO 639 language code of the target language (required). |
topic | Topic UUID (optional). |
Header | Description |
---|---|
Accept |
application/json or application/xml
|
Content-Type | The content type of the posted data. Can be any content type supported by TEXTKING. |
HTTP status | Description |
---|---|
200 Ok | Successful request. |
400 Bad Request | Invalid language codes or wrong parameter formats. |
406 Not Acceptable | The posted content type is not supported. |
Return the pricing for the translation of a plain text document from German to English with the topic area “Technology / Engineering”:
GET /v1/price-info?words=200&source_language=de&target_language=en&topic=8576549a-097f-45b3-8c59-fb3d6a03147d HTTP/1.1 Host: api.textking.com Accept: application/json Content-Type: text/plain Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua. At vero eos et accusam et justo duo dolores et ea rebum. Stet clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor sit amet. Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua. At vero eos et accusam et justo duo dolores et ea rebum. Stet clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor sit amet.
Response:
HTTP/1.1 200 Ok Content-Type: application/json; charset=utf-8 { "source_language": "de", "target_language": "en", "topic": "8576549a-097f-45b3-8c59-fb3d6a03147d", "words": 100, "prices": [ { "quality": "translation", "price_per_word": 0.134, "total_price": 13.4, "currency": "EUR" }, { "quality": "translation-and-correction", "price_per_word": 0.157, "total_price": 15.7, "currency": "EUR" } ] }