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

# sdxl

> Stable Diffusion XL text-to-image on Prodia's inference network; one image per job, priced per completed job.

**Image generation** · Stability AI · served by Prodia

> [!WARNING]
>
> **Requires an organization opt-in:** Unverified-retention opt-in. Until an administrator enables it from the admin console the model is hidden from pickers and API requests to it are refused. See [organization consent gates](https://docs.aireserve.com/models.md#organization-consent-gates).

## Call it

Endpoint: `POST /v1/images/generations` — set `model` to `sdxl`.

```bash cURL theme={"dark"}
curl https://api.aireserve.com/v1/images/generations \
  -H "Authorization: Bearer $AIRESERVE_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "sdxl",
    "prompt": "A watercolor painting of a fox in a snowy forest",
    "n": 1,
    "size": "1024x1024"
  }'
```

```python Python theme={"dark"}
import os
from openai import OpenAI

client = OpenAI(
    base_url="https://api.aireserve.com/v1",
    api_key=os.environ["AIRESERVE_API_KEY"],
)

res = client.images.generate(
    model="sdxl",
    prompt="A watercolor painting of a fox in a snowy forest",
    n=1,
    size="1024x1024",
)
print(res.data[0].url)
```

```typescript TypeScript theme={"dark"}
import OpenAI from "openai";

const client = new OpenAI({
  baseURL: "https://api.aireserve.com/v1",
  apiKey: process.env.AIRESERVE_API_KEY,
});

const res = await client.images.generate({
  model: "sdxl",
  prompt: "A watercolor painting of a fox in a snowy forest",
  n: 1,
  size: "1024x1024",
});
console.log(res.data[0].url);
```

Full request and response reference: [Image generation guide](https://docs.aireserve.com/capabilities/image-generation.md).

## IDs & aliases

| Send as `model` | What it is |
| - | - |
| `sdxl` | Canonical gateway id |

## Specs

| Spec | Detail |
| - | - |
| Modality | Image — Image generation |
| Model maker | Stability AI |
| Served by | Prodia |
| Pricing | \$0.002 / image |
| Hosting | United States |
| Opt-ins | Unverified-retention opt-in |

Prices are public list rates at generation time and may lag the provider card; `GET /v1/models` and the portal's pricing page are authoritative for billing.

> [card] [Browse all models](https://docs.aireserve.com/models.md)
>
> Search and filter every model by modality, maker, capability and price.


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