3 days trying to solve: Veo 3.0 403 error Generative Language API has not been used in project 542708778979 etc

Hi everyone,

I think this issue occurs when you try to access the video via the default url. The default url points to a project which you do not have access to hence the 403. You need to add your api key to the URL to make it point to your project.

const url = decodeURIComponent(generatedVideo.video.uri);
const res = await fetch(${url}&key=${process.env.API_KEY});

Source: The Veo3 sample in AI Studio