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

# إنشاء الصور

> استدعِ /images/generations باستخدام SDK TypeScript.

**الطريقة**: `client.generateImage()`.

### مثال

```typescript theme={null}
const image = await client.generateImage({
  model: "openai/gpt-image-1",
  prompt: "A lighthouse at golden hour",
  size: "1024x1024",
  n: 1,
  response_format: "url",
});
```

### المعلمات الأساسية

* `model` (مطلوب): معرّف نموذج يدعم الصور (مثل `openai/gpt-image-1`).
* `prompt` (مطلوب): نص المطالبة.
* `n` (1–10): عدد الصور المطلوب إنشاؤها.
* `size`: مثل `1024x1024` أو `1024x1792` أو `1792x1024`.
* `quality`: `standard` أو `hd` (يعتمد على النموذج).
* `style`: مثل `vivid` أو `natural` (يعتمد على النموذج).
* `response_format`: `url` أو `b64_json`.
* `user`: وسم اختياري للمستخدم النهائي لتتبّع السلامة وإساءة الاستخدام.

### القيمة المعادة

`ImageGenerationResponse`

```json theme={null}
{
  "data": [
    {
      "url": "https://example.com/generated_image.png"
    }
  ]
}
```


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.