Spaces:
Runtime error
Runtime error
Update server.js
Browse files
server.js
CHANGED
@@ -27,11 +27,11 @@ app.post('/generate-image', async (req, res) => {
|
|
27 |
try {
|
28 |
// Запрос на API OpenAI для генерации изображения
|
29 |
const response = await axios.post('https://api.openai.com/v1/images/generations', {
|
30 |
-
|
31 |
-
|
32 |
-
|
33 |
-
|
34 |
-
|
35 |
}, {
|
36 |
headers: {
|
37 |
'Authorization': `Bearer ${openai_key}`,
|
|
|
27 |
try {
|
28 |
// Запрос на API OpenAI для генерации изображения
|
29 |
const response = await axios.post('https://api.openai.com/v1/images/generations', {
|
30 |
+
model="dall-e-3",
|
31 |
+
prompt=prompt,
|
32 |
+
size="1024x1024",
|
33 |
+
quality="hd",
|
34 |
+
n=1
|
35 |
}, {
|
36 |
headers: {
|
37 |
'Authorization': `Bearer ${openai_key}`,
|