MCPcopy
hub / github.com/betomoedano/snapai / validateApiKey

Method validateApiKey

src/utils/validation.ts:14–20  ·  view source on GitHub ↗
(apiKey: string)

Source from the content-addressed store, hash-verified

12 }
13
14 static validateApiKey(apiKey: string): string | null {
15 if (!apiKey || !apiKey.startsWith('sk-')) {
16 return 'Invalid OpenAI API key format';
17 }
18
19 return null;
20 }
21
22 static validateOutputPath(outputPath: string): string | null {
23 if (!outputPath || outputPath.trim().length === 0) {

Callers 1

setApiKeyMethod · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected