MCPcopy Create free account
hub / github.com/pollinations/pollinations / getApiToken

Function getApiToken

apps/chat/src/utils/api.js:6–16  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

4export const BYOP_STORAGE_KEY = "pollinations_byop_api_key";
5
6const getApiToken = () => {
7 if (typeof window !== "undefined") {
8 try {
9 const userKey = window.localStorage.getItem(BYOP_STORAGE_KEY);
10 if (userKey) return userKey;
11 } catch {
12 /* ignore localStorage failures */
13 }
14 }
15 return ENV_API_TOKEN;
16};
17
18let textModels = [];
19let imageModels = [];

Callers 5

loadModelsFunction · 0.85
sendMessageFunction · 0.85
generateImageFunction · 0.85
generateVideoFunction · 0.85
generateAudioFunction · 0.85

Calls 1

getItemMethod · 0.65

Tested by

no test coverage detected