> ## Documentation Index
> Fetch the complete documentation index at: https://www.krea.ai/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# Zero Data Retention

> Krea API에서 Zero Data Retention을 활성화하여 프롬프트와 참조 이미지가 저장되지 않도록 합니다.

## 개요

Krea는 기업이 Zero Data Retention을 활성화할 수 있도록 지원합니다. 현재 API에서는 Krea 2 Medium, Krea 2 Large, Krea 2 Medium Turbo가 지원됩니다. 워크스페이스에서 활성화하려면 [sales@krea.ai ↗](mailto:sales@krea.ai)로 문의해 주세요. 지원이 활성화된 후에는 다음과 같이 요청을 보내세요:

```bash theme={null}
curl -X POST https://api.krea.ai/generate/image/krea/krea-2/medium \
  -H "Authorization: Bearer YOUR_API_TOKEN" \
  -H "Content-Type: application/json" \
  -H "X-Api-Zero-Data-Retention: 1" \
  -d '{
    "prompt": "a serene mountain landscape at sunset",
    "aspect_ratio": "1:1",
    "resolution": "1K"
  }'
```

<Note>
  제공되는 모든 URL(예: 스타일 참조 이미지)은 반드시 base64 data URI여야 합니다. 외부 URL을 사용하면 `422` — `Zero data retention requires external asset inputs to be data URIs.` 오류가 반환됩니다.
</Note>

```bash theme={null}
STYLE_REF_DATA_URI="data:image/png;base64,$(base64 < ./style-reference.png | tr -d '\n')"

curl -X POST https://api.krea.ai/generate/image/krea/krea-2/medium \
  -H "Authorization: Bearer YOUR_API_TOKEN" \
  -H "Content-Type: application/json" \
  -H "X-Api-Zero-Data-Retention: 1" \
  -d '{
    "prompt": "a serene mountain landscape at sunset",
    "aspect_ratio": "1:1",
    "resolution": "1K",
    "image_style_references": [
      {
        "url": "'"$STYLE_REF_DATA_URI"'",
        "strength": 0.6
      }
    ]
  }'
```
