Image Config • Rust AI Agent SDK

ImageConfig: Configuration for image generation settings.

ImageConfig

Defined in the agents module.

Rust AI Agent SDK

Configuration for image generation settings.

Fields

NameTypeDescription
styleStringStyle of the generated image
response_formatStringResponse format (url or b64_json)
timeoutu32Timeout in seconds
sizeOption<String>Image size (e.g., “1024×1024”, “1792×1024”)
qualityOption<String>Image quality (standard or hd)
api_baseOption<String>API base URL
api_keyOption<String>API key

Methods

new

rust
fn new() -> Self

Create a new ImageConfig

style

rust
fn style(mut self, style: impl Into<String>) -> Self

Set the style

Parameters:

NameType
styleimpl Into&lt;String&gt;

size

rust
fn size(mut self, size: impl Into<String>) -> Self

Set the size

Parameters:

NameType
sizeimpl Into&lt;String&gt;

quality

rust
fn quality(mut self, quality: impl Into<String>) -> Self

Set the quality

Parameters:

NameType
qualityimpl Into&lt;String&gt;

Source

View on GitHub

praisonai/src/agents/mod.rs at line 230


Related Documentation