HeyPuter/puter · error · HttpError
unauthorized
unauthorized
Error message
Authentication required
What it means
Error "Authentication required" thrown in HeyPuter/puter.
Source
Thrown at src/backend/drivers/ai-video/providers/gemini/GeminiVideoProvider.ts:142
const is4K = videoResolution === '4k';
const is1080p = videoResolution === '1080p';
const perSecondCents = is4K
? (selectedModel.costs?.['per-second-4k'] ??
selectedModel.costs?.['per-second'])
: is1080p
? (selectedModel.costs?.['per-second-1080p'] ??
selectedModel.costs?.['per-second'])
: selectedModel.costs?.['per-second'];
if (perSecondCents === undefined) {
throw new Error(
`No per-second cost configured for video model '${selectedModel.id}'`,
);
}
const perSecondMicroCents = Math.ceil(perSecondCents * 1_000_000);
const actor = Context.get('actor');
if (!actor) {
throw new HttpError(401, 'Authentication required', {
legacyCode: 'unauthorized',
});
}
// Clamp the clip to what remaining credit buys instead of rejecting
// the request outright. 1080p/4k and reference-image renders are
// locked to 8s by the upstream API, so those stay all-or-nothing.
durationSeconds = await capSecondsToRemainingCredits({
metering: this.#meteringService,
actor,
perSecondMicroCents,
requestedSeconds: durationSeconds,
allowedSeconds:
isHighRes || hasRefImages
? [durationSeconds]
: selectedModel.durationSeconds,
modelId: selectedModel.id,
});View on GitHub (pinned to 908ec23eda)
Solutions
- Authenticate the request with a valid user or app token.
- Ensure the caller is signed in before invoking the video generation driver.
When it happens
Trigger: Thrown at src/backend/drivers/ai-video/providers/gemini/GeminiVideoProvider.ts:142 when the library encounters an invalid state.
Common situations: See trigger scenarios.
Understand the failure class
- Authentication and authorization failures — expired tokens, bad credentials, and missing scopes.
AI-assisted analysis of HeyPuter/puter@908ec23eda (2026-08-12).
Data as JSON: /api/errors/7b1e697edb5cd8be.
Report an issue: GitHub.