Troubleshooting in Yandex Translate

If you encounter an error while making API requests and need help, contact support.

Technical support will resolve your issue faster if you use additional HTTP request and response headers.

Request headers

Use the following headers when making HTTP requests:

  • x-client-request-id is a unique request ID. We recommend using a UUID. Send this ID to the technical support team to help us find a specific request in the system and assist you.

    You can generate a UUID either online or through the library for the programming language you use.

  • x-data-logging-enabled: Flag that enables saving user-provided data from the request.

    By default, the service does not store data you send via the API. Your data will be stored if you provide true in this header. Along with the request ID, this will help technical support solve your problem.

Examples

For example, you can use these headers to let us know that your text was poorly translated and help us refine our translation model.

export IAM_TOKEN=<IAM_token>
        
        curl \
          --request POST \
          --header "x-client-request-id: fa18fa9b-176d-4ae0-92b8-bd78********" \
          --header "x-data-logging-enabled: true" \
          --header "Content-Type: application/json" \
          --header "Authorization: Bearer ${IAM_TOKEN}" \
          --data '@<path_to_JSON_file>' \
          "https://translate.api.cloud.yandex.net/translate/v2/translate"
        

Where IAM_TOKEN is the IAM token required for authentication.

Response headers

Each server response contains headers that provide even more information about request execution, e.g., x-server-trace-id, which is the unique request execution log ID.

To get the x-server-trace-id value, your application must log server response headers.

You can find an example of implementing access to gRPC headers in the grpc-go documentation.

Next