Troubleshooting in Yandex Vision OCR
If something went wrong while sending API requests and you need help, contact technical support.
The support team will solve your issue faster if you use advanced HTTP request and response headers.
Request headers
When sending HTTP requests, use the following headers:
-
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 allows saving the data provided by the user in the request.By default, we do not save any audio or text you provide. If you provide the
true
value in this header, your data will be saved. This, along with the request ID, will help the technical support team to solve your problem.
Examples
For example, you can use these headers to facilitate finding requests.
Here is a sample request using cURL
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 "authorization: Bearer ${IAM_TOKEN}" \
--data '@body.json' \
https://vision.api.cloud.yandex.net/vision/v1/batchAnalyze
Where IAM_TOKEN
is the IAM token required for authentication.
Response headers
Each server response contains headers that provide even more information about the request execution:
x-request-id
: Unique response IDx-server-trace-id
: Unique request execution log ID
To retrieve the x-request-id
and x-server-trace-id
values, your application must log server response headers.
You can find an implementation example for access to gRPC headers in the grpc-go
library documentation