Yandex Cloud
Search
Contact UsGet started
  • Blog
  • Pricing
  • Documentation
  • All Services
  • System Status
    • Featured
    • Infrastructure & Network
    • Data Platform
    • Containers
    • Developer tools
    • Serverless
    • Security
    • Monitoring & Resources
    • ML & AI
    • Business tools
  • All Solutions
    • By industry
    • By use case
    • Economics and Pricing
    • Security
    • Technical Support
    • Customer Stories
    • Gateway to Russia
    • Cloud for Startups
    • Education and Science
  • Blog
  • Pricing
  • Documentation
Yandex project
© 2025 Yandex.Cloud LLC
Yandex Foundation Models
    • All tutorials
    • Disabling request logging
    • Getting an API key
    • Batch processing
  • Yandex Cloud ML SDK
  • Compatibility with OpenAI
  • Access management
  • Pricing policy
  • Public materials
  • Release notes
  1. Step-by-step guides
  2. Disabling request logging

Disabling request logging

Written by
Yandex Cloud
Updated at March 3, 2025

Models log all request data by default. Disable logging if you provide personal or confidential data or any manner of sensitive information in your requests. 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.

To disable request logging:

SDK
cURL

When initializing a YCloudML class object, set the enable_server_data_logging parameter to False. In which case Yandex Cloud ML SDK will add x-data-logging-enabled: false to the meta information of each gRPC call.

Here is an example:

...
sdk = YCloudML(
    folder_id="<folder_ID>",
    auth="<API_key>",
    enable_server_data_logging=False,
)
...

Where:

  • <folder_ID>: ID of the folder in which the service account was created.
  • <API_key>: Service account API key required for authentication in the API. You can also use other authentication options. For more information, see Authentication in Yandex Cloud ML SDK.

Note

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.

Add the x-data-logging-enabled: false header to your REST request. Here is an example:

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. Examples:

    • 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.

    For a full list of available endpoints, see the relevant Yandex Foundation Models API references.

Was the article helpful?

Previous
All tutorials
Next
Getting an API key
Yandex project
© 2025 Yandex.Cloud LLC