Get usage report
Get usage report of the translation service. If no date range is provided, the default range is the last 24 months.
header Parameters
Authorization required | string Example: Bearer 123abc456def789abc012def345abc678 Authorization header containing an API key Bearer token |
Responses
Response samples
- 200
Content type
application/json
{- "columns": [
- "target_lang",
- "order_type",
- "year",
- "month",
- "day",
- "count"
], - "data": [
- {
- "target_lang": "en-gb",
- "order_type": "string",
- "year": 2021,
- "month": 9,
- "day": 17,
- "count": 123
}
]
}
Get translation results
Get translation results or status of a translation job
header Parameters
Authorization required | string Example: Bearer 123abc456def789abc012def345abc678 Authorization header containing an API key Bearer token |
Responses
Response samples
- 200
Content type
application/json
{- "job_id": "09e4ba01-d604-4dc2-88f4-490245c9bbe2",
- "translations": [
- "Hei maailma",
- "Tämä on käännös"
], - "language": {
- "source": "en-gb",
- "target": "fi-fi"
}, - "status": "Done",
- "meta": {
- "all_key_value_pairs": "are allowed"
}
}
Translate text
header Parameters
Authorization required | string Example: Bearer 123abc456def789abc012def345abc678 Authorization header containing an API key Bearer token |
Request Body schema: application/json
contents required | Array of strings Array of text to be translated |
required | object Language |
formality | string Enum: "FORMAL" "INFORMAL" "PREFER_FORMAL" "PREFER_INFORMAL" "DEFAULT" |
callback_url | string Callback URL to be called for 'Done' and 'Error' statuses |
object Translation metadata |
Responses
Request samples
- Payload
Content type
application/json
{- "contents": [
- "Hello world",
- "This is a translation"
], - "language": {
- "source": "en-gb",
- "target": "fi-fi"
}, - "formality": "FORMAL",
- "callback_url": "string",
- "meta": {
- "all_key_value_pairs": "are allowed"
}
}
Response samples
- 200
Content type
application/json
{- "job_id": "09e4ba01-d604-4dc2-88f4-490245c9bbe2",
- "status": "Done",
- "links": {
}, - "meta": {
- "all_key_value_pairs": "are allowed"
}
}