Get images
Generates images based on the specified description
Function GetImages(Val URL, Val Token, Val Model, Val Description, Val AdditionalHeaders = "") Export
Parameter | CLI option | Type | Required | Description |
---|---|---|---|---|
URL | --url | String | ✔ | OpenAI server URL |
Token | --token | String | ✔ | OpenAI authorization token |
Model | --model | String | ✔ | Models name |
Description | --descr | Structure Of KeyAndValue | ✔ | Generation parameters. See GetImageDescriptionStructure |
AdditionalHeaders | --headers | Map Of KeyAndValue | ✖ | Additional request headers, if necessary |
Returns: Map Of KeyAndValue - Processing result
tip
Method at API documentation: Create image
1C:Enterprise/OneScript code example
URL = "https://bothub.chat/api/v2/openai/";
Token = "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpZCI6IjUzYTUwNWFiLTdhYmEtNDkyNy05YmQ0LTZlNDFlZGEyZGRmYyIsImlzRGV2Z...";
Model = "dall-e-3";
Description = OPI_OpenAI.GetImageDescriptionStructure("Yellow alpaca", 1, , "1024x1024");
Result = OPI_OpenAI.GetImages(URL, Token, Model, Description);
- Bash
- CMD/Bat
# JSON data can also be passed as a path to a .json file
oint openai GetImages \
--url "https://bothub.chat/api/v2/openai/" \
--token "***" \
--model "dall-e-3" \
--descr "{'prompt':'Yellow alpaca','n':1,'size':'1024x1024'}"
:: JSON data can also be passed as a path to a .json file
oint openai GetImages ^
--url "https://bothub.chat/api/v2/openai/" ^
--token "***" ^
--model "dall-e-3" ^
--descr "{'prompt':'Yellow alpaca','n':1,'size':'1024x1024'}"
Result
{
"created": 1750098846,
"data": [
{
"revised_prompt": "A charming yellow-colored alpaca standing freely in a pasture. The alpaca is adorned with a lush, thick yellow coat that appears to be sun-kissed. It has impressive, moderately curved ears, and expressive eyes that reveal a gentle and docile nature. The scene is idyllic, representing rural tranquility, with the alpaca being the center of attention.",
"url": "https://oaidalleapiprodscus.blob.core.windows.net/private/org-Dy8ARyqBtu507OGoMBxfUU0S/user-n4L5wc2dF1fH9APAG2dE3Rw9/img-StR6prDRbPDFcwREXKuTv5wU.png?st=2025-06-16T17%3A34%3A06Z&se=2025-06-16T19%3A34%3A06Z&sp=r&sv=2024-08-04&sr=b&rscd=inline&rsct=image/png&skoid=475fd488-6c59-44a5-9aa9-31c4db451bea&sktid=a48cca56-e6da-484e-a814-9c849652bcb3&skt=2025-06-16T07%3A23%3A15Z&ske=2025-06-17T07%3A23%3A15Z&sks=b&skv=2024-08-04&sig=61%2B3ssgypoSq6e9cEYAq1EI8WuxfypYrI1u3EvkzeBc%3D"
}
]
}