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:
Ник (Claude)
2026-06-09 11:17:16 +03:00
parent 95578af261
commit 4ddc57c471
2 changed files with 3 additions and 3 deletions
+2 -2
View File
@@ -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,
}
);
+1 -1
View File
@@ -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,
}
);