Options
All
  • Public
  • Public/Protected
  • All
Menu

Interface TranslateDocumentParams

Parameters for the translateDocument operation.

Hierarchy

  • TranslateDocumentParams

Index

Properties

Optional documentId

documentId: string

To use a previously submitted document as the source for a new translation, enter the document_id of the document.

file

file: ReadableStream | Buffer

The contents of the source file to translate. The maximum file size for document translation is 20 MB for service instances on the Standard, Advanced, and Premium plans, and 2 MB for service instances on the Lite plan. For more information, see Supported file formats (Beta).

Optional fileContentType

fileContentType: FileContentType | string

The content type of file.

filename

filename: string

The filename for file.

Optional headers

headers: OutgoingHttpHeaders

Optional modelId

modelId: string

The model to use for translation. For example, en-de selects the IBM-provided base model for English-to-German translation. A model ID overrides the source and target parameters and is required if you use a custom model. If no model ID is specified, you must specify at least a target language.

Optional source

source: string

Language code that specifies the language of the source document. If omitted, the service derives the source language from the input text. The input must contain sufficient text for the service to identify the language reliably.

Optional target

target: string

Language code that specifies the target language for translation. Required if model ID is not specified.

Generated using TypeDoc