API documentation
Generate an image or video, check its status, and download the result. The public API is at https://api.vidgena.com. Authenticate with Authorization: Bearer <key>.
Run each step in the same terminal. Step 1 submits a real job using your account credits.
API='https://api.vidgena.com/v2'
read -rsp 'API Key: ' VIDGENA_KEY
printf '\n'
# 1. Submit and note the returned task_id.
curl "$API/image_generation" \
-H "Authorization: Bearer $VIDGENA_KEY" \
-H 'Content-Type: application/json' \
-d '{"model":"image","content":[{"type":"text","text":"An illustrated mountain town at sunrise."}]}'# 2. Replace <task_id> and check the task status.
curl "$API/query/image_generation/<task_id>" -H "Authorization: Bearer $VIDGENA_KEY"# 3. Once the task succeeds, replace <download_url> with task.content.url.
curl -fL '<download_url>' -o result.pngIf the job is still processing, run step 2 again. Each run of step 1 creates a new job. For safe submission retries, see Submission retries.
Endpoints
| Method | Path | Use |
|---|---|---|
| GET | /v2/models | List available models, current prices, and limits. |
| POST | /v2/quotes | Quote the credits for a generation request. |
| POST | /v2/image_generation | Create an image task. |
| GET | /v2/query/image_generation/{task_id} | Read image status and download the result. |
| POST | /v2/video_generation | Create a 768P or 2K video task. |
| POST | /v2/video_regeneration | Create a 2K task from an eligible video. |
| GET | /v2/query/video_generation/{task_id} | Read video or regeneration status and download the result. |
| GET | /v2/account/credits | Read available and held credits. |
Image generation
Set model to image. Include a text prompt to generate an image, or include one image_url to edit a reference image. Pass options.negative_prompt to override the default. An empty string clears it.
{
"model": "image",
"content": [
{
"type": "text",
"text": "Keep the ceramic teapot and replace the background with a softly lit kitchen."
},
{
"type": "image_url",
"image_url": {
"url": "https://example.com/teapot.png"
}
}
],
"options": {
"seed": 42,
"negative_prompt": "Text, watermarks, and harsh shadows"
}
}Video generation
Set model to MiniMax-H3. Pick duration from the catalog in seconds and choose 768P or 2K. For text-to-video, set an explicit ratio such as 16:9.
Reference media
Use up to 6 images, 3 videos, and 3 audio clips. Refer to media by type and position with <Picture 1>, <Video 1>, and <Audio 1>.
{
"model": "MiniMax-H3",
"resolution": "2K",
"duration": 5,
"ratio": "16:9",
"content": [
{
"type": "text",
"text": "Animate the fox from <Picture 1>. Follow the camera movement in <Video 1> and use <Audio 1> as the soundtrack."
},
{
"type": "image_url",
"image_url": {
"url": "https://example.com/fox.png"
},
"role": "reference_image"
},
{
"type": "video_url",
"video_url": {
"url": "https://example.com/camera-motion.mp4"
},
"role": "reference_video"
},
{
"type": "audio_url",
"audio_url": {
"url": "https://example.com/forest-ambience.wav"
},
"role": "reference_audio"
}
]
}First and last frames
Use one or both keyframes with 768P. Each generation request may use keyframes or reference media.
{
"model": "MiniMax-H3",
"resolution": "768P",
"duration": 5,
"content": [
{
"type": "text",
"text": "Move smoothly from a wide view of the shore to a close-up of the lighthouse."
},
{
"type": "image_url",
"image_url": {
"url": "https://example.com/shore.png"
},
"role": "first_frame"
},
{
"type": "image_url",
"image_url": {
"url": "https://example.com/lighthouse.png"
},
"role": "last_frame"
}
]
}Regenerate in 2K
Send a completed video task ID with task.content.refinable set to true to POST /v2/video_regeneration. Query the new task ID at the video query endpoint.
{
"model": "MiniMax-H3",
"source_task_id": "<source_task_id>",
"resolution": "2K"
}Downloads and billing
Replace the example media links with directly accessible HTTPS URLs. For large seeds above the JavaScript safe-integer range, send options.seed as a decimal string.
When task.status is succeeded, download the result from task.content.url. Query the task again to refresh an expired link.
Images are billed per task (default 3 credits). Video credits are billed in 5-second units, rounded up. Regeneration uses the source task's duration.
| Default video credits | 5 seconds | 10 seconds | 15 seconds |
|---|---|---|---|
| 768P video generation | 5 | 10 | 15 |
| Direct 2K video generation | 8 | 16 | 24 |
| 2K regeneration of an eligible video | 3 | 6 | 9 |
Credits are held on acceptance, charged on success, and released on failure. Quotes, status checks, URL references, and downloads are free.
Check GET /v2/models for current prices in credits and video totals in credits_by_duration. To lock in a quote, send the generation body to POST /v2/quotes, then pass its quote_id in the optional X-Vidgena-Quote-Id request header.
Submission retries
Without an Idempotency-Key, each accepted submission creates a new task, even if the generation parameters are identical.
For safe retries, send a unique Idempotency-Key on the first attempt and reuse it with the same request body. A retry returns the original task_id without charging again. Reusing the key with different generation parameters returns HTTP 409.