Strings Translation API (1.0.0)

Download OpenAPI specification:Download

This API provides on-demand text translation.

Translation

Translates text from one language to another.

Authorizations:
ApiKeyAuth
Request Body schema: application/json
required
context
string

Additional context to help with the translation. Optional.

text
required
string

The text to translate.

targetLanguage
required
string

The target language code (e.g., 'en', 'es').

Responses

Request samples

Content type
application/json
{
  • "context": "Do you have any safety concerns?",
  • "text": "No hay suficientes cascos para la tripulación.",
  • "targetLanguage": "en"
}

Response samples

Content type
application/json
{
  • "translatedText": "This is the translated text",
  • "originalLanguage": "es"
}

Translate the next message in a conversation.

Translates the next message in a conversation using the context provided by previous messages.

Authorizations:
ApiKeyAuth
Request Body schema: application/json
required
required
Array of objects (Message)
required
object (Message)
targetLanguage
required
string

Responses

Request samples

Content type
application/json
{
  • "previousMessages": [
    ],
  • "nextMessage": {
    },
  • "targetLanguage": "en"
}

Response samples

Content type
application/json
{
  • "translatedText": "This is the translated text",
  • "originalLanguage": "es"
}

Translate Message with Chat ID

Uses a chatID to provide context for translating the next message in a conversation.

Authorizations:
ApiKeyAuth
Request Body schema: application/json
required
chatID
required
string

The unique identifier for the conversation.

required
object (Message)
targetLanguage
required
string

The target language code.

Responses

Request samples

Content type
application/json
{
  • "chatID": "123456789",
  • "nextMessage": {
    },
  • "targetLanguage": "en"
}

Response samples

Content type
application/json
{
  • "translatedText": "This is the translated text",
  • "originalLanguage": "es"
}