diff --git a/src/services/covers.js b/src/services/covers.js index 697424a..512f054 100644 --- a/src/services/covers.js +++ b/src/services/covers.js @@ -279,7 +279,7 @@ async function generateCoverViaImageGenerations({ prompt }) { const res = await axios.post( `${baseUrl}/images/generations`, { model, prompt: prompt.slice(0, 4000), n: 1, size: '1024x1024', response_format: 'url' }, - { headers: { Authorization: `Bearer ${apiKey}` }, timeout: 120_000 } + { headers: { Authorization: `Bearer ${apiKey}` }, timeout: 45_000 } ); const item = res.data?.data?.[0]; if (!item) throw new Error('No image data in response'); diff --git a/src/services/postImages.js b/src/services/postImages.js index 9d100c0..c6f4a86 100644 --- a/src/services/postImages.js +++ b/src/services/postImages.js @@ -95,7 +95,7 @@ Strictly: no text, no letters, no logos, no faces of real people.`; const res = await axios.post( `${baseUrl}/images/generations`, { model, prompt: prompt.slice(0, 4000), n: 1, size: '1024x1024', response_format: 'url' }, - { headers: { Authorization: `Bearer ${apiKey}` }, timeout: 120_000 } + { headers: { Authorization: `Bearer ${apiKey}` }, timeout: 45_000 } ); const item = res.data?.data?.[0]; if (!item) throw new Error('No image data');