Skip to main content

Get images

Generates images based on the specified description

Function GetImages(Val URL, Val Token, Val Model, Val Description, Val AdditionalHeaders = "") Export

ParameterCLI optionTypeRequiredDescription
URL--urlStringOpenAI server URL
Token--tokenStringOpenAI authorization token
Model--modelStringModels name
Description--descrStructure Of KeyAndValueGeneration parameters. See GetImageDescriptionStructure
AdditionalHeaders--headersMap Of KeyAndValueAdditional 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);
    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": 1757982404,
"data": [
{
"revised_prompt": "An adorable, fluffy alpaca standing in a serene field. Its fur is the color of rich, vibrant yellow, appearing almost golden in the sunlight. The alpaca's gentle eyes and cute, rounded ears make it appear friendly and approachable. In the background, tall grasses and a cloudless blue sky portray a peaceful rural scene.",
"url": "https://oaidalleapiprodscus.blob.core.windows.net/private/org-vf0VrTZ44yHusk7vPGBYcYgW/user-HMyGZPKt7HooVlzCBP2dP9we/img-mcVZADShuw1V7jNhvLr4sGQ6.png?st=2025-09-15T23%3A26%3A44Z&se=2025-09-16T01%3A26%3A44Z&sp=r&sv=2024-08-04&sr=b&rscd=inline&rsct=image/png&skoid=ed3ea2f9-5e38-44be-9a1b-7c1e65e4d54f&sktid=a48cca56-e6da-484e-a814-9c849652bcb3&skt=2025-09-15T18%3A27%3A16Z&ske=2025-09-16T18%3A27%3A16Z&sks=b&skv=2024-08-04&sig=tSIPVLt4Wp1jFi4dZa%2BB%2BOdBpZOLgupNwosWvAmPMUc%3D"
}
]
}