fix: wrong API key for aiprimetech image endpoints
covers.js lines 156, 220: generateCoverViaResponses и generateCoverViaImagesEndpoint используют config.ai.baseUrl (aiprimetech) — исправлен ключ imageApiKey → apiKey. До разделения провайдеров оба ключа были одинаковыми, поэтому не замечалось. postImages.js line 99: /responses через aiprimetech — аналогичный фикс. Обложка статьи 50 перегенерирована вручную (была SVG-заглушка).
This commit is contained in:
@@ -153,7 +153,7 @@ async function generateCoverViaResponses({ prompt }) {
|
||||
tool_choice: { type: 'image_generation' },
|
||||
},
|
||||
{
|
||||
headers: { Authorization: `Bearer ${config.ai.imageApiKey}` },
|
||||
headers: { Authorization: `Bearer ${config.ai.apiKey}` },
|
||||
timeout: 300_000, // GPT-5 reasoning + image — медленно, до 5 минут
|
||||
}
|
||||
);
|
||||
@@ -217,7 +217,7 @@ async function generateCoverViaImagesEndpoint({ prompt }) {
|
||||
`${config.ai.baseUrl}/images/generations`,
|
||||
{ model, prompt, n: 1, size: '1536x1024' },
|
||||
{
|
||||
headers: { Authorization: `Bearer ${config.ai.imageApiKey}` },
|
||||
headers: { Authorization: `Bearer ${config.ai.apiKey}` },
|
||||
timeout: 120_000,
|
||||
}
|
||||
);
|
||||
|
||||
@@ -96,7 +96,7 @@ Strictly: no text, no letters, no logos, no faces of real people.`;
|
||||
tool_choice: { type: 'image_generation' },
|
||||
},
|
||||
{
|
||||
headers: { Authorization: `Bearer ${config.ai.imageApiKey}` },
|
||||
headers: { Authorization: `Bearer ${config.ai.apiKey}` },
|
||||
timeout: 300_000,
|
||||
}
|
||||
);
|
||||
|
||||
Reference in New Issue
Block a user