MCPcopy Create free account
hub / github.com/Datakitpage/Datakit / checkCredits

Method checkCredits

frontend/src/lib/api/userService.ts:79–91  ·  view source on GitHub ↗
(
    model: string,
    estimatedTokens: number
  )

Source from the content-addressed store, hash-verified

77 }
78
79 async checkCredits(
80 model: string,
81 estimatedTokens: number
82 ): Promise<{
83 hasEnoughCredits: boolean;
84 creditsNeeded: number;
85 creditsAvailable: number;
86 }> {
87 return apiClient.post('/credits/check', {
88 model,
89 estimatedTokens,
90 });
91 }
92
93 // Subscription management
94 async getCurrentSubscription(): Promise<any> {

Callers 1

useCreditsFunction · 0.45

Calls 1

postMethod · 0.80

Tested by

no test coverage detected