> ## 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

> تفعيل ميزة عدم الاحتفاظ بالبيانات (Zero Data Retention) في واجهة برمجة تطبيقات Krea بحيث لا يتم تخزين الموجِّهات والصور المرجعية.

## نظرة عامة

تتيح Krea للمؤسسات تفعيل ميزة عدم الاحتفاظ بالبيانات (Zero Data Retention). يتم حاليًا دعم 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 مقدَّم، على سبيل المثال صورة مرجعية للنمط، بصيغة data URI بترميز base64. سيؤدي استخدام رابط 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
      }
    ]
  }'
```
