|
<< Click to Display Table of Contents >> Navigation: 3. Script Language > AI - Artificial Intelligence Commands > AIU. - OpenAI API > !Image Generation Settings > AIU. - Artificial Intelligence Utility |
MiniRobotLanguage (MRL)
AIU.SetImageQuality
Set the Quality for Generated Images
Intention
SetImageQuality Command: Define Image Quality
The SetImageQuality command specifies the quality level for images generated by commands like AIU.GenerateURL or AIU.GenerateFile.
This allows balancing detail and cost for visual output.
It’s part of the AIU - OpenAI API suite.
The SetImageQuality command sets the quality level for AI-generated images, accepting a string value such as "standard" or "hd" (high definition).
For OpenAI’s DALL-E 3, options are "standard" (default) and "hd" (higher detail), affecting generation cost and visual fidelity but not text token counts.
Setting the image quality is important for:
•Detail: "hd" provides sharper, more detailed images for professional use.
•Cost Efficiency: "standard" reduces generation cost for simpler needs.
•Performance: Lower quality may generate faster, useful for quick previews.
Provide a single string parameter: "standard" or "hd".
For DALL-E 3 (as of March 18, 2025), costs vary by quality and size:
•Standard: $0.040/image (1024x1024), $0.080/image (1792x1024 or 1024x1792).
•HD: $0.080/image (1024x1024), $0.120/image (1792x1024 or 1024x1792).
Quality affects cost and generation time, not text token usage.
Example Usage
AIU.SetImageQuality|hd
AIU.GenerateURL|A futuristic city|$$URL
DBP.HD Image URL: $$URL
Sets the quality to "hd" for a high-definition city image.
Illustration
┌──────────────┬────────────────────────────────────┐
│ Quality │ Characteristics │
├──────────────┼────────────────────────────────────┤
│ standard │ Basic detail, cost-effective │
├──────────────┼────────────────────────────────────┤
│ hd │ High detail, premium cost │
└──────────────┴────────────────────────────────────┘
Illustration of quality settings and their effects.
Syntax
AIU.SetImageQuality|P1
AIU.Set_ImageQuality|P1
Parameter Explanation
P1 - A string specifying the quality: "standard" or "hd". Required.
Example
AIU.SetImageQuality|standard
AIU.GenerateFile|A dog|dog.png|$$RES
DBP.File Path: $$RES
ENR.
Remarks
- No default quality is set initially; DALL-E 3 defaults to "standard" if unspecified.
- Invalid values (e.g., "low") may cause errors with DALL-E 3.
Limitations
- Requires exactly one parameter; omitting or adding extra parameters triggers an error (%IC_ER_PA).
- Limited to DALL-E 3’s supported quality options: "standard" and "hd".
See also: