Disabling request logging
Written by
Updated at December 25, 2024
Models log all request data by default. If you provide personal or private data or any kind of sensitive information in your requests, you may want to disable logging. To do this, add the x-data-logging-enabled: false
option to the REST request header or gRPC call metadata. The requests you submit without logging will not be saved on Yandex Cloud servers.
Request example:
cURL
To use the examples, install cURL
The example below is intended to be run in MacOS and Linux. To run it in Windows, see how to work with Bash in Microsoft Windows.
export FOLDER_ID=<folder_ID>
export IAM_TOKEN=<IAM_token>
curl \
--request POST \
--header "Content-Type: application/json" \
--header "Authorization: Bearer ${IAM_TOKEN}" \
--header "x-data-logging-enabled: false" \
--header "x-folder-id: ${FOLDER_ID}" \
--data "@<path_to_JSON_file>" \
"<model_endpoint>"
Where:
FOLDER_ID
: ID of the folder for which your account has the required role.IAM_TOKEN
: IAM token used for authentication.@<path_to_JSON_file>
: Path to the JSON file containing a request to the model.<model_endpoint>
: Endpoint to access the model. Possible values:https://llm.api.cloud.yandex.net/foundationModels/v1/completion
: For synchronous requests to YandexGPT.https://llm.api.cloud.yandex.net/foundationModels/v1/completionAsync
: For asynchronous requests to YandexGPT.https://llm.api.cloud.yandex.net:443/foundationModels/v1/textClassification
: For fine-tuned classifiers.https://llm.api.cloud.yandex.net/foundationModels/v1/fewShotTextClassification
: For zero-shot and few-shot classifiers.https://llm.api.cloud.yandex.net/foundationModels/v1/imageGenerationAsync
: For YandexART.