HeyPuter/puter · error · HttpError
insufficient_funds
insufficient_funds
Error message
Insufficient funds
What it means
Error "Insufficient funds" thrown in HeyPuter/puter.
Source
Thrown at src/backend/drivers/ai-tts/providers/xai/XAITTSProvider.ts:138
throw new HttpError(
400,
'Text exceeds maximum length of 15,000 characters',
{ legacyCode: 'bad_request' },
);
}
const voice = voiceArg || DEFAULT_VOICE;
const actor = Context.get('actor')!;
const ucentsPerChar = XAI_TTS_COSTS['xai-tts'] ?? 0;
const totalCost = ucentsPerChar * text.length;
const usageAllowed = await this.meteringService.hasEnoughCredits(
actor,
totalCost,
);
if (!usageAllowed) {
throw new HttpError(402, 'Insufficient funds', {
legacyCode: 'insufficient_funds',
});
}
// Build request body
const body: Record<string, unknown> = {
text,
voice_id: voice,
language: language || 'en',
};
// Handle output format
const formatStr = output_format || response_format;
if (formatStr) {
const codec = typeof formatStr === 'string' ? formatStr : 'mp3';
body.output_format = { codec };
}
View on GitHub (pinned to 908ec23eda)
Solutions
- Add credits to the account before retrying the TTS request.
- Reduce usage or upgrade the plan to restore sufficient funds.
When it happens
Trigger: Thrown at src/backend/drivers/ai-tts/providers/xai/XAITTSProvider.ts:138 when the library encounters an invalid state.
Common situations: See trigger scenarios.
AI-assisted analysis of HeyPuter/puter@908ec23eda (2026-08-12).
Data as JSON: /api/errors/aa3a37146bcc231c.
Report an issue: GitHub.