{"record":{"id":"87ab71026e102309","repo":"HeyPuter/puter","slug":"unauthorized-87ab71","errorCode":"unauthorized","errorMessage":"Authentication required","messagePattern":"Authentication required","errorType":"http","errorClass":"HttpError","httpStatus":401,"severity":"error","filePath":"src/backend/drivers/ai-video/providers/together/TogetherVideoProvider.ts","lineNumber":117,"sourceCode":"        }\n\n        const costPerVideoCents = selectedModel?.costs?.['per-video'];\n        if (!costPerVideoCents) {\n            throw new Error(`No pricing configured for video model ${model}`);\n        }\n        const costInMicroCents = costPerVideoCents * 1_000_000;\n\n        let normalizedSeconds = this.#coercePositiveInteger(\n            seconds ?? duration,\n        );\n\n        if (!no_extra_params) {\n            normalizedSeconds ??= DEFAULT_DURATION_SECONDS;\n        }\n\n        const actor = Context.get('actor');\n        if (!actor) {\n            throw new HttpError(401, 'Authentication required', {\n                legacyCode: 'unauthorized',\n            });\n        }\n\n        const usageAllowed = await this.#meteringService.hasEnoughCredits(\n            actor,\n            costInMicroCents,\n        );\n        if (!usageAllowed) {\n            throw new HttpError(402, 'Insufficient funds', {\n                legacyCode: 'insufficient_funds',\n            });\n        }\n\n        const createPayload: Together.VideoCreateParams & {\n            metadata?: object;\n        } = {\n            prompt,","sourceCodeStart":99,"sourceCodeEnd":135,"githubUrl":"https://github.com/HeyPuter/puter/blob/908ec23eda38526170322c3edf71ba45ecb1ca95/src/backend/drivers/ai-video/providers/together/TogetherVideoProvider.ts#L99-L135","documentation":"Error \"Authentication required\" thrown in HeyPuter/puter.","triggerScenarios":"Thrown at src/backend/drivers/ai-video/providers/together/TogetherVideoProvider.ts:117 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Authenticate the request with a valid user or app token.","Ensure the caller is signed in before invoking the video generation driver."],"exampleFix":null,"handlingStrategy":null,"validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"908ec23eda38526170322c3edf71ba45ecb1ca95","analyzedAt":"2026-08-12T20:53:15.911Z","schemaVersion":2},"datasetVersion":"2026-08-12T23:17:12.415Z"}