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

Function requireKey

packages/polli-cli/src/lib/api.ts:14–24  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

12}
13
14export const requireKey = (): string => {
15 const key = resolveApiKey();
16 if (!key) {
17 printError("Not logged in. Run: polli auth login");
18 printError(
19 "Or pipe a key: printf '%s' '<your-key>' | polli auth login --with-token",
20 );
21 process.exit(1);
22 }
23 return key;
24};
25
26interface RequestOptions {
27 method?: string;

Callers 12

my-models.tsFile · 0.85
keys.tsFile · 0.85
listAccountQuestsFunction · 0.85
upload.tsFile · 0.85
usage.tsFile · 0.85
createTextCommandFunction · 0.85
createVideoCommandFunction · 0.85
createTranscribeCommandFunction · 0.85
createAudioCommandFunction · 0.85
createImageCommandFunction · 0.85
createChatCommandFunction · 0.85
budgetHintFunction · 0.85

Calls 2

resolveApiKeyFunction · 0.85
printErrorFunction · 0.85

Tested by

no test coverage detected