From 2d978c2a45c86a526c4ee36b8678edf6a10695fb Mon Sep 17 00:00:00 2001 From: G-Fourteen Date: Thu, 11 Sep 2025 07:51:02 -0600 Subject: [PATCH] Include seed and token in Pollinations requests --- chat-core.js | 4 +++- screensaver.js | 6 ++++-- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/chat-core.js b/chat-core.js index b12a1e1..5d4bb03 100644 --- a/chat-core.js +++ b/chat-core.js @@ -506,7 +506,9 @@ document.addEventListener("DOMContentLoaded", () => { } const model = (document.getElementById("model-select")?.value) || currentSession.model || "unity"; - const apiUrl = `https://text.pollinations.ai/openai?&model=${encodeURIComponent(model)}`; + const seed = randomSeed(); + const token = encodeURIComponent(getPollinationsToken()); + const apiUrl = `https://text.pollinations.ai/openai?model=${encodeURIComponent(model)}&seed=${seed}&token=${token}`; try { const res = await window.pollinationsFetch(apiUrl, { diff --git a/screensaver.js b/screensaver.js index edbd6cf..7646a27 100644 --- a/screensaver.js +++ b/screensaver.js @@ -140,8 +140,10 @@ document.addEventListener("DOMContentLoaded", () => { } async function fetchDynamicPrompt() { - const metaPrompt = "Generate unique, new, fucked up and explicit wild image prompts as text only of outlandish and psychologically thrilling images. ie demented, evil, psychotic art, under 125 characters."; - const apiUrl = `https://text.pollinations.ai/openai?&model=unity`; + const metaPrompt = "Generate unique, new, fucked up and explicit wild image prompts as text only of outlandish and psychologically thrilling images. ie demented, evil, psychotic art, under 125 characters."; + const seed = generateSeed(); + const token = encodeURIComponent(getPollinationsToken()); + const apiUrl = `https://text.pollinations.ai/openai?model=unity&seed=${seed}&token=${token}`; try { const response = await window.pollinationsFetch(apiUrl, { method: "POST",