The sentence you enter in any language is translated into English with Google Translate. Then, with this translation, DALL-E artificial intelligence creates as many pictures as the number entered on the screen for you.
Prompt: required
Piece: not requeired -> default: 1
Size: not required -> default: 1024x1024
---------------------------------------------------------------------------------------------------------------------------------------------------
###Go to https://openai.com/api/login
Create a OpenAI Account
Go to https://platform.openai.com/account/api-keys
Create new API key
DALL-E API is paid to use, for information about fees: https://openai.com/api/pricing/
DALL-E API Documentation: https://platform.openai.com/docs/api-reference/images
Example Request:
curl https://api.openai.com/v1/images/generations \
-H 'Content-Type: application/json' \
-H 'Authorization: Bearer YOUR_API_KEY' \
-d '{
"prompt": "A cute baby sea otter",
"n": 2,
"size": "1024x1024"
}'
---------------------------------------------------------------------------------------------------------------------------------------------------
Go to https://console.cloud.google.com/apis/dashboard
Create a Google Account
Create a new Project
Go to https://console.cloud.google.com/apis/credentials
Create a new API Key
Google Translate API is paid, but at the first stage, it gives a 300$ credit that you can use within 3 months.
Use to Google Translate Library Dependency
<dependency>
<groupId>com.google.cloud</groupId>
<artifactId>google-cloud-translate</artifactId>
<version>2.9.0</version>
</dependency>