|
<< 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.GetImageQuality
Retrieve the Current Image Quality Setting
Intention
GetImageQuality Command: Verify Image Quality
The GetImageQuality command retrieves the current quality setting for images generated by the AIU suite.
This helps confirm or utilize the quality level in your script.
It’s part of the AIU - OpenAI API suite.
The GetImageQuality command returns the current quality setting set by AIU.SetImageQuality, or an empty string if unset.
The result is a string ("standard" or "hd"), stored in an optional variable or pushed to the Top of Stack (TOS). For DALL-E 3, it reflects the quality affecting cost and detail.
Retrieving the image quality is useful for:
•Verification: Ensure the quality matches your generation needs.
•Cost Management: Confirm settings to predict DALL-E 3 generation costs.
•Debugging: Check if the correct quality is applied for output fidelity.
Call the command with an optional variable to store the result; if omitted, the value is pushed to the stack.
It applies to AIU.GenerateURL and AIU.GenerateFile. DALL-E 3 costs: "standard" ($0.040-$0.080/image), "hd" ($0.080-$0.120/image), based on size.
Example Usage
AIU.SetImageQuality|hd
AIU.GetImageQuality|$$QUA
DBP.Image Quality: $$QUA
Sets the quality to "hd" and retrieves it, storing "hd" in $$QUA.
Illustration
┌──────────────┬──────────────┐
│ Set Quality │ Retrieved │
├──────────────┼──────────────┤
│ standard │ standard │
├──────────────┼──────────────┤
│ (unset) │ "" │
└──────────────┴──────────────┘
Illustration of retrieving the quality setting, including unset state.
Syntax
AIU.GetImageQuality[|P1]
AIU.Get_ImageQuality[|P1]
Parameter Explanation
P1 - (Optional) The variable where the quality setting is stored. If omitted, the value is placed on the Top of Stack (TOS).
Example
AIU.SetImageQuality|standard
AIU.GetImageQuality|$$QTY
DBP.Current Quality: $$QTY
ENR.
Remarks
- Returns an empty string ("") if no quality is set; DALL-E 3 defaults to "standard".
- Reflects the last value set by AIU.SetImageQuality.
Limitations
- Accepts zero or one parameter; extra parameters trigger an error (%IC_ER_PA).
- Does not validate compatibility with DALL-E 3 options.
See also: