POST/v2/projects/{projectId}/suggest/machine-translations-streaming

Stream machine translation suggestions

Requests machine translation suggestions for a project and streams the results as newline-delimited JSON. Supply targetLanguageId and optionally select services with services; provider-specific errors are included in result items while the response retains a 200 status.

  • IdempotentThe SDK sends Idempotency-Key, so a retried request is only applied once.

1 parameter · 6 body fields
projectIdintegerrequired
The integer ID of the project for which to stream translation suggestions.

Request for streamed machine translation suggestions for a target language, with optional key or source text and service selection.

baseTextstringoptional
Text value of base translation. Useful, when base translation is not stored yet.
isPluralbooleanoptional
Whether base text is plural. This value is ignored if baseText is null.
keyIdintegeroptional
Key Id to get results for. Use when key is stored already.
pluralbooleanoptional
Plurality flag for the base text. This field is write-only.
servicesarray<string>optional
List of services to use. If null, then all enabled services are used.
targetLanguageIdintegerrequired
The integer ID of the target language.

5 status codes
200Returns a stream of newline-delimited JSON result items. Errors from individual service providers are represented in result items and do not change the response status.
400Returned when a required field is missing or a request value fails validation.
codestringrequired
Allowed:unauthenticatedapi_access_forbiddenapi_key_not_foundinvalid_api_keyinvalid_project_api_keyproject_api_key_expiredbad_credentialsmfa_enabledinvalid_otp_codemfa_not_enabledcan_not_revoke_own_permissionsdata_corrupted
paramsarray<object>optional
401Returned when the request has no valid authentication.
codestringrequired
Allowed:unauthenticatedapi_access_forbiddenapi_key_not_foundinvalid_api_keyinvalid_project_api_keyproject_api_key_expiredbad_credentialsmfa_enabledinvalid_otp_codemfa_not_enabledcan_not_revoke_own_permissionsdata_corrupted
paramsarray<object>optional
403Returned when the authenticated user does not have permission to request machine translation suggestions for the project.
codestringrequired
Allowed:unauthenticatedapi_access_forbiddenapi_key_not_foundinvalid_api_keyinvalid_project_api_keyproject_api_key_expiredbad_credentialsmfa_enabledinvalid_otp_codemfa_not_enabledcan_not_revoke_own_permissionsdata_corrupted
paramsarray<object>optional
404Returned when the project or requested resource is not found.
codestringrequired
Allowed:unauthenticatedapi_access_forbiddenapi_key_not_foundinvalid_api_keyinvalid_project_api_keyproject_api_key_expiredbad_credentialsmfa_enabledinvalid_otp_codemfa_not_enabledcan_not_revoke_own_permissionsdata_corrupted
paramsarray<object>optional

Error handling

A 400 is returned when the request is invalid; a 401 when authentication is missing or invalid; a 403 when the authenticated user lacks permission; and a 404 when the project or requested resource is not found. targetLanguageId is required, and each services value must be one of GOOGLE, AWS, DEEPL, AZURE, BAIDU, or PROMPT. The projectId path parameter must identify an existing project.