> For the complete documentation index, see [llms.txt](https://doc.ozforensics.com/oz-knowledge-ru/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://doc.ozforensics.com/oz-knowledge-ru/rukovodstva/rukovodstvo-razrabotchika/api/oz-api/instant-api-rezhim-raboty-bez-sokhraneniya-dannykh.md).

# Instant API: режим работы без сохранения данных

В версии 6.0.1 мы добавили новый режим работы API — Instant. В этом режиме мы не сохраняем никакие данные, все, что вы отправляете и получаете, существует только в рамках вашего запроса и ответа на него. Таким образом вы экономите место в хранилище и, что может быть особенно важно в рамках соблюдения требований законодательства, не передаете и не храните чувствительные данные. Однако, если вам все же требуется записывать данные, вы можете [настроить сохранение артефактов Instant API в S3](/oz-knowledge-ru/rukovodstva/rukovodstvo-administratora/kak-sokhranyat-artefakty-instant-api-v-khranilishe-s3.md).

Чтобы включить режим Instant API, при подготовке файла конфигурации (config.py) для API установите параметру `OZ_APP_COMPONENTS` значение `stateless`. Чтобы никакие данные запроса и ответа не сохранялись, отправьте следующий запрос: `POST /api/instant/folders/` . Авторизация настраивается на вашей стороне.

{% hint style="info" %}
Обратите внимание: поскольку Instant API не хранит данные, работа в таком режиме с черным списком (1:N) не предусмотрена.
{% endhint %}

При использовании Instant API с Web SDK при [конфигурации адаптера](/oz-knowledge-ru/rukovodstva/rukovodstvo-administratora/web-adapter/nastroiki-faila-konfiguracii.md) установите параметру `architecture` значение `lite`. Версия Web SDK должна быть не ниже 1.7.14.

### Минимальные системные требования

* CPU: 16 ядер, 32 потока, базовая частота — 2.3 GHz, максимальная частота в турборежиме для одного ядра — 4 GHz.
* RAM: 32 GB, DDR 5, Dual Channel.

Для расчета RPS и RPM и подбора оптимальной конфигурации под ваши задачи обратитесь к нам.

## Параметры конфигурации

Перед запуском подготовьте файл конфигурации со следующими параметрами.

### Обязательные параметры

Без этих параметров Instant API не запустится.

```bash
# список компонентов Oz API. Для Instant API укажите stateless
# для компонента авторизации добавьте auth
OZ_APP_COMPONENTS=stateless
# поддержка локального хранилища
OZ_LOCAL_STORAGE_SUPPORT_ENABLE=false
# адрес сервиса tfss
OZ_SERVICE_TFSS_HOST=http://xxx.xxx.xxx.xxx:xxxx
# разрешенные хосты
APP_ALLOWED_HOSTS=example-host1.com,example-host2.com
# секретный ключ
OZ_API_SECRET_KEY=long_secret_key
```

## Установка

### Docker

```bash
CONTAINER_NAME=<container name> \
DEPLOY_INSTANT_PORT_EXT=<external port> \
INSTANT_IMAGE=<provided image name> \
ADDITIONAL_PARAMS="-e LICENSE_KEY=<your license key>" \

docker run -d --name $CONTAINER_NAME
      $ADDITIONAL_PARAMS
      -p ${DEPLOY_INSTANT_PORT_EXT}:8080
      $INSTANT_IMAGE
```

### Docker Compose

```bash
services:
  oz-api-instant:
    image: <provided image>
    container_name: oz-api-instant
    environment:
        - LICENSE_KEY=<your license key>
        # - TF_ENABLE_ONEDNN_OPTS=1 # In some cases, especially for AMD CPUs, set to 0
        # - API_LISTEN_PORT=8080
        # - LOG_LEVEL=info # ['critical', 'error', 'warning', 'info', 'debug', 'trace']
    restart: always
    ports:
      - 8080:8080
```

### Методы Instant API <a href="#instant-api-methods" id="instant-api-methods"></a>

Список методов доступен по [ссылке](https://documenter.getpostman.com/view/28105966/2sB34eJMYC). Также вы можете скачать коллекцию для Postman:

{% file src="/files/SDYvfkmR95OWTvCmiYcs" %}


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://doc.ozforensics.com/oz-knowledge-ru/rukovodstva/rukovodstvo-razrabotchika/api/oz-api/instant-api-rezhim-raboty-bez-sokhraneniya-dannykh.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
