Constructor
new ImageGenerationService()
- Source:
Methods
call(user, prompt, sizeopt, qualityopt, quantityopt, engineopt) → {Promise.<Object>}
Parameters:
Name |
Type |
Attributes |
Default |
Description |
user |
string
|
|
|
The ID of the user accessing the Soffos API.
This string will be used for throttling and profanity tracking.
Soffos assumes that the owner of the API Key is an application (app) and that app has users.
Soffos API will accept any string." |
prompt |
string
|
|
|
the prompt to be sent to the LLM. |
size |
string
|
<optional>
|
"1024x1024"
|
the required size of the image. |
quality |
string
|
<optional>
|
"standard"
|
the quality of the image |
quantity |
number
|
<optional>
|
1
|
how many images should be created. |
engine |
string
|
<optional>
|
null
|
The LLM engine to be used. |
- Source:
Returns:
image_urls - list of image URLs
-
Type
-
Promise.<Object>
Example
Examples are available at "https://github.com/Soffos-Inc/soffosai-js/tree/master/samples"
Parameters:
Name |
Type |
Attributes |
Default |
Description |
name |
string
|
|
|
Reference name of this Service.
It will be used by the Pipeline to reference this Service. |
prompt |
string
|
InputConfig
|
|
|
the prompt to be sent to the LLM. |
size |
string
|
InputConfig
|
<optional>
|
"1024x1024"
|
the required size of the image. |
quality |
string
|
InputConfig
|
<optional>
|
"standard"
|
the quality of the image |
quantity |
number
|
InputConfig
|
<optional>
|
1
|
how many images should be created |
engine |
string
|
InputConfig
|
<optional>
|
null
|
The LLM engine to be used. |
- Source: