Developers
AI video and image generation API
Create videos and images from your own app, script or automation with a simple REST API. It uses the same models and the same credits as the studio, and failed generations are refunded automatically.
Quick start
- Choose a plan so your account has credits.
- Create a key under Account → Developer API. It is shown once, so store it safely.
- Send a request:
curl https://aivideogt.com/api/v1/generations \
-H "Authorization: Bearer $AIVIDEOGT_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "genesis-flash",
"mode": "text",
"prompt": "A red fox runs through fresh snow at sunrise, slow tracking shot",
"aspect_ratio": "16:9"
}'The request stays open until the file is ready, usually between 10 seconds and 3 minutes for video, and returns the finished generation with a download URL. This example costs 4 credits.
Authentication
Send your key in the Authorization header on every request. Keys start with vgt_. Keep them on your server: never put a key in browser or mobile app code. You can have up to 5 keys and revoke any of them from your account page at any time.
Authorization: Bearer vgt_xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxCreate a generation
POST https://aivideogt.com/api/v1/generations
| Field | Type | Description |
|---|---|---|
model | string, required | A model id from the list below. |
mode | string | Video: text or image. Image: create, edit or upscale. Defaults to the first. |
prompt | string | Up to 4,000 characters. Required except for image-to-video and upscale. |
image | string | A PNG, JPEG or WebP image as a base64 data URL (data:image/png;base64,...), up to 4 MB. Required for image-to-video, edit and upscale. |
aspect_ratio | string | One of the model's aspect ratios, e.g. 16:9 or 9:16. |
resolution | string | One of the model's resolutions, e.g. 720p or 1080p. |
duration | number | Video length in seconds, one of the model's durations. |
Options a model doesn't support fall back to its default (the first value listed for it).
const res = await fetch("https://aivideogt.com/api/v1/generations", {
method: "POST",
headers: {
Authorization: `Bearer ${process.env.AIVIDEOGT_API_KEY}`,
"Content-Type": "application/json",
},
body: JSON.stringify({
model: "genesis-flash",
mode: "text",
prompt: "Macro shot of coffee being poured into a glass cup, steam rising",
aspect_ratio: "9:16",
}),
signal: AbortSignal.timeout(10 * 60 * 1000), // allow up to 10 minutes
});
const generation = await res.json();
if (!res.ok) throw new Error(generation.error.message);
console.log(generation.url);import base64, os, requests
with open("product.jpg", "rb") as f:
image = "data:image/jpeg;base64," + base64.b64encode(f.read()).decode()
r = requests.post(
"https://aivideogt.com/api/v1/generations",
headers={"Authorization": f"Bearer {os.environ['AIVIDEOGT_API_KEY']}"},
json={"model": "genesis-flash", "mode": "image", "image": image,
"prompt": "Slow orbit around the product, soft studio light"},
timeout=600,
)
r.raise_for_status()
print(r.json()["url"]){
"id": "4f0c2a8e-...",
"object": "generation",
"status": "done",
"kind": "video",
"model": "genesis-flash",
"model_name": "Genesis Flash",
"mode": "text",
"prompt": "A red fox runs through fresh snow at sunrise, slow tracking shot",
"aspect_ratio": "16:9",
"resolution": "360p",
"duration": 5,
"cost": 4,
"url": "https://aivideogt.com/media/g....mp4",
"error": null,
"created_at": "2026-11-20T10:00:00.000Z",
"credits_remaining": 1175
}If the model fails, you get a 502 with the generation id and the credits are refunded. Files are kept until you delete them in your library or delete your account.
Get a generation
GET https://aivideogt.com/api/v1/generations/{id}
Returns one generation. Use it if your connection dropped while waiting: status is pending, done or failed. A job still pending after 12 minutes is marked failed and refunded.
List generations
GET https://aivideogt.com/api/v1/generations?kind=video
Your 100 most recent generations, newest first, as { "object": "list", "data": [...] }. kind is optional (video or image). Generations made in the studio are included.
Account and credits
GET https://aivideogt.com/api/v1/account
{ "object": "account", "name": "Ada", "email": "ada@example.com", "plan": "creator pro", "credits": 540, "email_verified": true }Models
GET https://aivideogt.com/api/v1/models
Public, no key needed. Returns every model with its modes, options and whether it is accepting jobs right now. A video model lists prices: the exact credits for each resolution and duration. An image model lists rates: the credits per image at each resolution. Otherwise cost = base credits × (duration ÷ shortest duration) × (1 + 0.5 per resolution step above the lowest), rounded. Credits for each plan are on the pricing page.
| Model id | Kind | Modes | Aspect ratios | Resolutions | Durations | Base credits |
|---|---|---|---|---|---|---|
| genesis-flash | video | text, image | 16:9, 9:16 | 360p, 720p, 1080p, 4K | 5s, 8s, 10s, 15s | 4 |
| vanta-ultra | video | text, image | 16:9, 9:16 | 1080p, 4K | 4s, 6s, 8s | 48 |
| vanta-fast | video | text, image | 16:9, 9:16 | 720p, 1080p | 4s, 6s, 8s | 14 |
| vanta-lite | video | text, image | 16:9, 9:16 | 720p, 1080p | 4s, 6s, 8s | 7 |
| nimbus-pro | image | create, edit, upscale | 1:1, 3:4, 4:3, 9:16, 16:9 | 1K, 2K, 4K | — | 1 |
| spectra-5 | image | create, edit, upscale | 1:1, 3:4, 4:3, 9:16, 16:9 | 1K | — | 1 |
| fusion-2 | image | create, edit, upscale | 1:1, 3:4, 4:3, 9:16, 16:9 | 1K, 2K, 4K | — | 2 |
| graphite-2 | image | create, edit, upscale | 1:1, 3:4, 4:3 | 1K, 2K, 4K | — | 4 |
Errors and limits
Errors return JSON as { "error": { "message": "...", "code": "..." } } with one of these statuses:
| Status | Meaning |
|---|---|
| 400 | Invalid request: unknown model, missing prompt or image. |
| 401 | Missing, malformed or revoked API key. |
| 402 | Not enough credits. Top up or change plan. |
| 403 | Email not confirmed yet, or the account is suspended. |
| 404 | No generation with that id on your account. |
| 413 | Image larger than 4 MB. |
| 429 | Rate limited: over 60 requests a minute per key, or 4 generations already running on your account. |
| 502 | The model failed. Credits were refunded; try again. |
| 503 | That model isn't accepting jobs right now. Pick another or check the status page. |
Use of the API is covered by the Terms of Service, including the acceptable use rules. Questions or higher limits: contact us.
