Files changed (1) hide show
  1. app.py +3 -2
app.py CHANGED
@@ -272,7 +272,8 @@ def check_rate_limit(ip: str):
272
 
273
  entry["count"] += 1
274
 
275
- PKEY = os.getenv("POLLINATIONS_KEY", "")
 
276
 
277
  CHAT_RATE_LIMIT = 50
278
  CHAT_WINDOW_SECONDS = 60 * 60
@@ -375,7 +376,7 @@ async def generate_image(request: Request, prompt: str = None):
375
 
376
  print(f"[IMAGE GEN] Routing to model: {chosen_model}")
377
 
378
- url = f"https://gen.pollinations.ai/image/{prompt}?model={chosen_model}&key={PKEY}"
379
 
380
  async with httpx.AsyncClient(timeout = timeout) as client:
381
  response = await client.get(url)
 
272
 
273
  entry["count"] += 1
274
 
275
+ PKEY = os.getenv("POLLINATIONS_KEY", "")
276
+ PKEY2 = os.getenv("POLLINATIONS2_KEY", "")
277
 
278
  CHAT_RATE_LIMIT = 50
279
  CHAT_WINDOW_SECONDS = 60 * 60
 
376
 
377
  print(f"[IMAGE GEN] Routing to model: {chosen_model}")
378
 
379
+ url = f"https://gen.pollinations.ai/image/{prompt}?model={chosen_model}&key={PKEY2}"
380
 
381
  async with httpx.AsyncClient(timeout = timeout) as client:
382
  response = await client.get(url)