---
title: Image generation
description: Generate images and visual assets through OpenAI DALL-E and compatible models.
---

<ApiEndpoint method="POST" path="/v1/images/generations" auth="api_key" />

Generate images using models like `openai/dall-e-3`.

<KeyInserter type="api" label="API Key Tester" placeholder="zrv_your_api_key" />

---

## Code example

<CodeGroup titles={["Python (OpenAI SDK)", "TypeScript (OpenAI SDK)"]}>

```python
from openai import OpenAI

client = OpenAI(
    base_url="https://api.zorveus.com/v1",
    api_key="zrv_your_api_key",
)

response = client.images.generate(
    model="openai/dall-e-3",
    prompt="A modern minimalist geometric workspace with emerald mint lighting",
    size="1024x1024",
    quality="standard",
    n=1,
)

print(response.data[0].url)
```

```typescript
import OpenAI from "openai";

const client = new OpenAI({
  baseURL: "https://api.zorveus.com/v1",
  apiKey: "zrv_your_api_key",
});

async function main() {
  const image = await client.images.generate({
    model: "openai/dall-e-3",
    prompt: "A modern minimalist geometric workspace with emerald mint lighting",
    size: "1024x1024",
    n: 1,
  });

  console.log(image.data[0].url);
}

main();
```

</CodeGroup>

## Handle image data

Providers can return a temporary URL, base64 data, or another provider-specific result. The maintained Zorveus smoke test requests `b64_json` and verifies that the decoded file is non-empty.

Check `GET /v1/models` before using the example model. Image size, quality, count, response format, and content-policy behavior depend on the selected model.

Do not log base64 image output or place provider URLs in long-lived records unless your data policy permits it.
