Authentication
Every request to the VideoGen API must include a bearer credential — an API key or an OAuth 2.1 access token.
The VideoGen API accepts two kinds of bearer credentials: an API key (best when you call the API from your own backend) and an OAuth 2.1 access token (best when your app acts on behalf of other VideoGen users). Both are sent the same way — in the Authorization header — and every endpoint works identically regardless of which you use.
If you’re building an integration that connects to other people’s VideoGen accounts, see Sign in with VideoGen for the OAuth flow. Otherwise, use an API key as described below.
API keys
The VideoGen API uses Bearer token authentication. Include your API key in the Authorization header of every request:
Creating a key
- Go to app.videogen.io/api
- Click Create API key
- Copy the key immediately; it is only displayed once
Keeping your key safe
Your API key is a secret. Do not expose it in client-side code (browsers, mobile apps) or commit it to version control. Use environment variables or a secrets manager instead.
Making requests
TypeScript
Python
cURL
Error responses
If your key is missing or invalid, the API returns 401 Unauthorized: