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

# Image Config • Rust AI Agent SDK

> ImageConfig: Configuration for image generation settings.

# ImageConfig

> Defined in the [**agents**](../modules/agents) module.

<Badge color="orange">Rust AI Agent SDK</Badge>

Configuration for image generation settings.

## Fields

| Name              | Type                   | Description                                 |
| ----------------- | ---------------------- | ------------------------------------------- |
| `style`           | `String`               | Style of the generated image                |
| `response_format` | `String`               | Response format (url or b64\_json)          |
| `timeout`         | `u32`                  | Timeout in seconds                          |
| `size`            | `Option&lt;String&gt;` | Image size (e.g., "1024x1024", "1792x1024") |
| `quality`         | `Option&lt;String&gt;` | Image quality (standard or hd)              |
| `api_base`        | `Option&lt;String&gt;` | API base URL                                |
| `api_key`         | `Option&lt;String&gt;` | API key                                     |

## Methods

### `new`

```rust theme={"theme":{"light":"vitesse-light","dark":"vitesse-dark"}}
fn new() -> Self
```

Create a new ImageConfig

### `style`

```rust theme={"theme":{"light":"vitesse-light","dark":"vitesse-dark"}}
fn style(mut self, style: impl Into<String>) -> Self
```

Set the style

**Parameters:**

| Name    | Type                      |
| ------- | ------------------------- |
| `style` | `impl Into&lt;String&gt;` |

### `size`

```rust theme={"theme":{"light":"vitesse-light","dark":"vitesse-dark"}}
fn size(mut self, size: impl Into<String>) -> Self
```

Set the size

**Parameters:**

| Name   | Type                      |
| ------ | ------------------------- |
| `size` | `impl Into&lt;String&gt;` |

### `quality`

```rust theme={"theme":{"light":"vitesse-light","dark":"vitesse-dark"}}
fn quality(mut self, quality: impl Into<String>) -> Self
```

Set the quality

**Parameters:**

| Name      | Type                      |
| --------- | ------------------------- |
| `quality` | `impl Into&lt;String&gt;` |

## Source

<Card title="View on GitHub" icon="github" href="https://github.com/MervinPraison/PraisonAI/blob/main/src/praisonai-rust/praisonai/src/agents/mod.rs#L230">
  `praisonai/src/agents/mod.rs` at line 230
</Card>

***

## Related Documentation

<CardGroup cols={2}>
  <Card title="Rust Configuration" icon="gear" href="/docs/rust/configuration" />

  <Card title="Rust Installation" icon="download" href="/docs/rust/installation" />

  <Card title="Rust Image" icon="image" href="/docs/rust/image" />

  <Card title="Rust Vision" icon="eye" href="/docs/rust/vision" />
</CardGroup>
