Create with the V4V API.
Generate images, video and audio from your own applications. One API key. Your existing V4V credits.
https://v4v.ai/api/v1curl https://v4v.ai/api/v1/models \
-H "Authorization: Bearer $V4V_API_KEY"Authentication
Create a named key in Profile → API Keys. Save the API secret and webhook signing secret when they appear; they are shown only once. Multiple keys can be created and revoked independently. Key secrets are stored as SHA-256 hashes.
Send Authorization: Bearer v4v_live_… on every API request. Keep this key on your server, outside browser applications and source control. Revocation blocks future requests; already accepted generations continue.
Base URL: https://v4v.ai/api/v1.
Discover LAB models
GET /models lists current LAB model IDs, enabled state, inputs, parameters, defaults, conditions, and limits. GET /models/{model} describes one model. IDs and schemas come from the same catalog and defaults used by LAB. Studio configuration is separate.
Model names in examples below are actual catalog IDs. Use discovery to find the models currently enabled on your account. Field names are model-specific: retain the names returned by discovery, including camelCase names such as aspectRatio or referenceImageUrls. Select values are strings; numeric values for numeric-looking select options are also accepted. Fields may be supplied in input or parameters, but never both. Unknown fields are rejected. Models with selectable versions expose parameters.variant; use the values and defaults returned by discovery.
curl https://v4v.ai/api/v1/models \
-H "Authorization: Bearer $V4V_API_KEY"Timed speech captions
Discover ai.speech_to_text with type subtitle. Submit an owned media file ID or supported URL in input.audioUrl or input.videoUrl to POST /lab; optional parameters include language_code (for example uk, en, or auto) and diarize. The estimate uses the original source duration. Transcription spends normal account credits.
A completed task returns results[].type: "subtitle", transcript text, srt, and editable cues with start, end in seconds and text. A successful silent input can have an empty cue list. For montage, use Video Editor's MCP tools to align these cues to a source clip's trim, speed and timeline position.
Latest generation models
Omni Flash 1.2 (video.gemini_omni_flash-1-2) is the preferred model for video requests without an explicit model. Lab lists it first; Omni Flash 1.1 remains available under More and by its existing ID. Discover current parameters with GET /models/{model}. Version 1.2 supports 3–15-second generation and editing; first/last-frame interpolation is limited to 10 seconds. Shared 4/6/8/10-second tariffs match the configured 1.1 prices. Use current discovery and estimates for prices rather than storing this relationship as a permanent rule.
Choose GPT Image 2.6 through parameters.variant in image.text_to_image or ai.image_edit. Use parameters.outputFormat with these exact variant capabilities:
| Variant | Output formats |
|---|---|
gpt-image-2.6-flare-text | png, jpeg, webp, gif, svg |
gpt-image-2.6-sunburst-text | png, jpeg, webp, gif, svg |
gpt-image-2.6-flare-img | png, jpeg, webp |
gpt-image-2.6-sunburst-img | png, jpeg, webp |
gpt-image-2.6-economy-text | png, gif |
gpt-image-2.6-economy-img | png |
parameters_schema.outputFormat.allowed_by_variant is authoritative. Flare/Sunburst settle from actual input/output usage; SVG conversion usage is included in the final total. Economy is 1K only with per-image pricing. Downloads retain GIF frames and SVG vector bytes; SVG downloads use attachment delivery.
Nano Banana 2.1 uses parameters.variant: "nano-banana-v2.1" in the same image modules, with up to 10 references and 1K/2K/4K output. Its current billing mode is published in pricing_by_variant. Google/Vertex generation settles from verified input, cached input, image output, text output and thinking tokens, with markup applied and the combined total rounded up once. The image-output component is approximately 11/16/36 V4V credits for 1K/2K/4K before input and thinking. Lab and estimates show an approximate range; the initial reservation is separate from final cost. Other routing uses the configured per-image tariff. Routing remains managed by V4V; do not supply a routing parameter.
Kling 4.0 video models
Four separate nodes share the same generation and result handling in Lab, Workflows, API and MCP:
| Catalog ID | Model | Duration | Resolution |
|---|---|---|---|
video.kling_v40_ref | Kling 4.0 Reference | 3–30 seconds | 720p / 1080p |
video.kling_v40_key | Kling 4.0 Keyframe | 3–30 seconds | 720p / 1080p |
video.kling_v40_flash_ref | Kling 4.0 Flash Reference | 3–20 seconds | 720p |
video.kling_v40_flash_key | Kling 4.0 Flash Keyframe | 3–20 seconds | 720p |
All accept a required prompt (up to 8000 characters), integer duration, resolution and aspectRatio (auto, 16:9, 9:16, 1:1, 21:9; Flash Keyframe excludes auto). All can generate from text alone. Reference inputs are optional.
Reference models accept referenceImageUrls (up to 10), referenceVideoUrls (up to 5), elements (up to 7, at most 3 with video) and keepOriginalSound. A named element has name, either imageUrls (2–4 images) or videoUrl (one 3–8s character clip), optional tag, description (100 characters), and character voiceUrl. Flash also accepts element type (image or video). Standard Reference additionally accepts voices: up to 3 objects with name and audioUrl. Flash binds voices to character elements instead.
There are at most 15 combined images, video references, elements and standalone voices; reference videos plus video elements cannot exceed 5. Each reference video must be 2–30s (2–20s for Flash), and their combined duration including video elements is at most 30s (20s for Flash). Names must be unique ignoring case, 1–20 Chinese characters, letters, digits or underscores; built-in reference names are reserved. Mention supplied references as , or their declared . Undeclared mentions are rejected.
GPT-6 Astra chat
Discover chat.gpt_6_astra with GET /models/chat.gpt_6_astra (slug: gpt-6-astra). It has type chat and returns text. Discovery includes token rates and the rounding rule.
{
"model": "chat.gpt_6_astra",
"input": {
"prompt": "Explain what is in this image.",
"imageUrls": [
"https://example.com/image.png"
]
},
"parameters": {
"reasoningEffort": "high",
"webSearch": true,
"stream": false
}
}Send this body to POST /lab. Images are optional; up to 12 URLs or owned file IDs are accepted. Text-only requests use string input upstream; image requests use an array of message content. Reasoning effort: low, medium, high, xhigh (default low). Web search and streaming default to false. Streamed responses are returned as a completed task after generation finishes.
To offer a function, pass input.functionTools as a JSON string containing 1–10 definitions with type: "function", name, description, and parameters (an object JSON Schema). Set parameters.webSearch to false. The upstream request uses tool_choice: "auto"; function requests are returned in results[].function_calls for your application to handle. The model node does not execute functions or continue the conversation with a function result.
Chat reserves 1 credit before entering the queue. This is a minimum reservation, not a fixed price or spending cap. Rates per 1M tokens: input 560, cached input 56, cache writes 700, output 2,800 credits. The combined token cost is rounded up once to a whole credit, with a minimum charge of 1. After the response, any additional charge is deducted atomically from the available balance. If the balance is insufficient, the task fails and the unused reservation is released.
For usage-priced chat and images, the estimate endpoint also returns credits_range with min, max, assumptions, includes_markup: true, is_estimate: true and is_spending_cap: false. Display this as an approximate range in V4V credits. It includes the current markup and price adjustments. These are illustrative usage scenarios; actual cost can fall outside the range. and describe the initial reservation separately. The range does not alter actual-usage settlement or enable hard-budget admission.
LAB with an external image
Media inputs accept an external URL or a V4V file ID in the same field. Arrays can mix both. URLs must return actual media files without browser cookies or interactive login. HTTPS and sufficiently long-lived signed URLs are recommended. V4V validates and copies external media before generation; internal network URLs and unsafe redirects are rejected.
curl https://v4v.ai/api/v1/lab \
-H "Authorization: Bearer $V4V_API_KEY" \
-H 'Content-Type: application/json' \
-H 'Idempotency-Key: product-edit-001' \
-d '{"model":"ai.image_edit","input":{"prompt":"Place this product on a marble counter","referenceImageUrls":["https://example.com/product.jpg"]},"parameters":{"variant":"nano-banana-2","aspectRatio":"9:16","resolution":"2K"}}'Upload private media
POST /files accepts a file field using multipart/form-data. Images, video, and audio are supported, subject to model limits. The default upload limit is 100 MiB, further constrained by the deployment's storage upload limit and proxy limit. Files must contain decodable media; audio/video inspection requires ffprobe on the server.
curl https://v4v.ai/api/v1/files \
-H "Authorization: Bearer $V4V_API_KEY" \
-F 'file=@product.png'{
"id": "6aa962444bd1dd7ab65bc6b6",
"type": "image",
"content_type": "image/png",
"size": 123456
}Use the returned ID directly, without a file_ prefix. GET /files/{id} looks up your file's metadata without charging credits.
{
"model": "ai.image_edit",
"input": {
"prompt": "Create a studio product photograph",
"referenceImageUrls": [
"6aa962444bd1dd7ab65bc6b6",
"https://example.com/side.jpg"
]
},
"parameters": {
"variant": "nano-banana-2"
}
}Studio with external or private media
POST /studio uses the same selected Studio workflow, preparation, model execution, pricing multiplier, and subscription discount as the Studio UI.
{
"input": {
"product_name": "Example Product",
"product_description": "Lightweight everyday backpack",
"product_images": [
"https://example.com/front.jpg",
"6aa962444bd1dd7ab65bc6b6"
],
"prompt": "Show the product in everyday use"
},
"parameters": {
"duration": 10,
"aspect_ratio": "9:16",
"style": "UGC",
"language": "en",
"avatar": null
},
"callback_url": "https://partner.example/webhooks/v4v"
}For a fully private-media flow, first upload each product image using POST /files, then put the returned IDs in input.product_images. Upload avatar, audio, and video references in the same way.
Studio accepts product_id (an owned saved product), avatar_id (an owned or active public library avatar, with public: prefix supported), product_name, product_description, prompt, product_images, reference_images, avatar_media, audio, and video. Each media field accepts references; arrays support multiple files. parameters.avatar accepts a library avatar ID, a single image URL or file ID, or null. Choose either input.avatar_id or parameters.avatar. Explicit product fields override library defaults. Active style names/IDs apply the saved style instructions. Unknown, inactive and empty style values return 422 INVALID_PARAMETER, field: "parameters.style" and error.allowed_values containing the active IDs/names. Omit style to use the current default (UGC when active, otherwise the first active preset). Parameters also include style, language, voice, placement, duration, aspect_ratio, and quality.
Migration for clients that previously passed free-form text in parameters.style: move that creative direction into input.prompt and choose an active style from MCP describe_studio (or omit style for the current default). A misspelled style no longer becomes a custom style.
Tasks and credits
Generation returns HTTP 202 after input validation and, when capacity is available, credit reservation, without waiting for generation:
{
"task_id": "task_6aa962444bd1dd7ab65bc6b6",
"status": "queued",
"credits_reserved": 20,
"created_at": "2026-09-15T18:00:00Z"
}Optional project name
Both POST /lab and POST /studio accept project_name at the top level, alongside input, parameters, and callback_url:
{
"project_name": "Summer campaign — product photo",
"model": "image-upscale-topaz",
"input": {
"image_url": "https://example.com/product.png"
},
"parameters": {
"upscale_factor": "2"
}
}The trimmed name (1–200 characters, not blank) becomes the title in Projects and, for LAB, Old runs. If omitted, the existing default title is used. The task response includes project_name and project_id. Changing the name with the same idempotency key is a conflict, just like changing the generation inputs.
Task status
The server refreshes generation status in the background. Polling returns the latest saved status: queued, processing, completed, failed, or cancelled. While the task is queued or processing, show a loading indicator. When status is completed, read chat text from results[].text or download media files from results. For failed, inspect error (including the failed stage, brief_completed, retryable and suggested retry_after_seconds where known) and credits_used. Successful brief generation can retain its charge when rendering fails; a transient retry hint does not start or authorize a new paid attempt. cancelled is also terminal.
Webhooks are optional. Without callback_url, repeat the following request every 3–5 seconds until status is completed, failed, or cancelled:
curl "$V4V_BASE_URL/api/v1/tasks/$TASK_ID" \
-H "Authorization: Bearer $V4V_API_KEY"On completion, read text results inline; download media files from . While generated files are being saved, the task stays ; generation success alone is not completion. Repeat the status request to refresh expired download URLs. Polling does not start another generation or charge credits.
Rename and organize projects
Project organization uses the same folders as the Projects workspace. It does not generate media, reserve credits or change generation inputs, results or idempotency hashes. All operations require your API key and only access your account's projects and folders.
| Method and path | Purpose |
|---|---|
GET /projects | Find Studio, workflow and LAB projects, including queued API tasks |
PATCH /projects/{project_id} | Rename a project and/or move it to a folder |
GET /project-folders | List workspace folders |
POST /project-folders | Create a folder with {"name":"Summer campaign"} |
PATCH /project-folders/{folder_id} | Rename a folder with {"name":"Autumn campaign"} |
Both list endpoints accept offset (default 0) and limit (1–100, default 50), returning total and next_offset (null on the last page). Projects are sorted newest first with a stable ID tie-breaker; folders are sorted by name. Project filters are source=all|studio|workflow|lab, q (literal, case-insensitive title search, up to 200 characters), and folder_id (an owned folder ID, or unfiled for no folder). Omit folder_id to include all folders.
GET /projects returns projects with project_id, project_name, source, folder_id (string or null), status, created_at and updated_at. Status reflects the original project or LAB history; use GET /tasks/{task_id} for generation status. Use the returned project_id for updates; legacy LAB entries without a backing project use their LAB run ID. GET /project-folders returns folders with folder_id, , , and .
Idempotency
Send Idempotency-Key (1–200 characters) when submitting LAB or Studio requests. The same account, key value, endpoint, and JSON content return the original task, including across different API keys on that account. Object property order is ignored. Reusing a key for different content returns HTTP 409 IDEMPOTENCY_CONFLICT. If the original request is still validating, HTTP 409 REQUEST_IN_PROGRESS asks you to retry with the same key. A rejected submission remains associated with its key; correct it using a new key.
Persistent unique indexes prevent concurrent retries from creating another generation or reservation. Idempotency records remain with task history.
Signed callbacks
Provide an optional public callback_url. V4V posts task.completed or task.failed with the task fields, result list, and stable event_id. Callbacks have X-V4V-Timestamp and X-V4V-Signature: v1=<hex> headers. Verify using the webhook signing secret shown when the API key was created.
The signature is HMAC-SHA256 over the timestamp, a literal period, and the exact raw request body. Reject stale timestamps (for example, more than five minutes old) and compare signatures in constant time.
import crypto from 'node:crypto';
const expected = crypto.createHmac('sha256', webhookSecret)
.update(`${timestamp}.${rawBody}`).digest('hex');
const valid = /^v1=[a-f0-9]{64}$/.test(signature)
&& Math.abs(Date.now() / 1000 - Number(timestamp)) < 300
&& crypto.timingSafeEqual(Buffer.from(signature.slice(3), 'hex'), Buffer.from(expected, 'hex'));Return a 2xx response promptly. Delivery is at least once: deduplicate by event_id. Network failures, timeouts, HTTP 408/429, and 5xx responses are retried with exponential backoff, beginning at 30 seconds and capped at one hour, for up to 12 attempts by default. Other non-success responses, including redirects, stop delivery. Retries never create generations or charge credits. Poll task status if callback delivery is exhausted.
Studio batch callbacks
POST /studio/batches also accepts an optional callback_url. The same signed-callback verification applies. Events are batch.updated, batch.completed, batch.paused, and batch.cancelled, with a stable event_id, batch_id, batch_revision, observed_at, state_token, counts and credit totals. Read GET /studio/batches/{batch_id} for current paginated results. Events contain compact snapshots rather than expiring download URLs; intermediate changes can be coalesced between worker ticks.
Delivery is durable and retried independently of generation. Deduplicate by event_id and tolerate out-of-order events; repeated delivery retains the same body. Slow or failing receivers do not create new generations or block the generation queue. Cancellation may emit a further update when already admitted work finishes. A later requested restart or rework reactivates monitoring. A webhook is an HTTP integration and does not itself wake a finished browser chat.
Batch responses include , which changes with meaningful progress or controls, and stays stable when only signed URLs renew. MCP additionally exposes for bounded server-side waiting during an active conversation; see .
Errors and limits
Errors use one shape:
{
"error": {
"code": "INVALID_PARAMETER",
"message": "Allowed values: 5, 10.",
"field": "parameters.duration"
}
}HTTP 400/422 indicates invalid input or parameters; 401 an invalid/revoked key; 402 insufficient credits; 403 disabled models or denied access; 404 unavailable models/files/tasks; 409 an idempotency conflict or ongoing validation; 429 a rate/concurrency limit; 500 an internal error; and 503 temporary service unavailability. Error codes include INVALID_API_KEY, INSUFFICIENT_CREDITS, MODEL_NOT_FOUND, MODEL_DISABLED, INVALID_INPUT, INVALID_PARAMETER, INVALID_MEDIA_URL, MEDIA_NOT_ACCESSIBLE, UNSUPPORTED_MEDIA_TYPE, MEDIA_TOO_LARGE, FILE_NOT_FOUND, FILE_ACCESS_DENIED, RATE_LIMIT_EXCEEDED, GENERATION_FAILED, GENERATION_SERVICE_ERROR, and SERVICE_UNAVAILABLE. GENERATION_SERVICE_ERROR identifies a reported internal model-service error; it does not establish that the input size or parameters were invalid. Missing and inaccessible file IDs share a 404 response to avoid revealing other accounts' files.
Default limits are 120 requests per minute per key, 10 generation submissions per minute per account, and 3 concurrent accepted generations per account. Every HTTP 429 includes error.retryable and a positive integer error.retry_after_seconds; the HTTP Retry-After header uses the same value. Request-window errors also return reason: "request_rate_limit", the configured limit, and a public scope (key, generation, bulk, mcp-upload-link or mcp-upload), without internal account/key IDs. The retry delay is the rounded-up time remaining in the minute window, not always 60 seconds. MCP tool errors preserve these fields in their JSON even when HTTP headers are unavailable. Account contention uses its own reason: "account_busy" and one-second delay. Generation capacity is handled separately by the durable queue; wait for the accepted task rather than resubmitting it.
{
"error": {
"code": "RATE_LIMIT_EXCEEDED",
"message": "API rate limit exceeded. Retry after 18 seconds.",
"reason": "request_rate_limit",
"scope": "key",
"limit": 120,
"retryable": true,
"retry_after_seconds": 18
}
}For request-window rejections (before task creation), wait the stated delay and reuse the same idempotency key and arguments. A response identifying an already failed task is terminal for that task. This does not authorize another paid attempt after a terminal generation failure.
Studio bulk generation (API and MCP)
Bulk generation is available through the API and MCP. There is no bulk workspace in the Studio interface yet. Submit up to 300 products in one JSON request. Each item creates one Studio workflow with its own task, saved workflow/settings, results and credit accounting. Product import and reference downloads happen in the background; an invalid item fails independently while the remaining items continue.
Studio, LAB, REST, MCP, Shopify and avatar generation share a persistent server queue with an absolute ceiling of 10 active generation requests for this deployment. Waiting for a generation result occupies a slot. A finished generation frees that slot even while its file is being saved. Ordinary requests have priority over bulk requests; bulk uses the available capacity, subject to an administrator's global bulk and per-account limits. The defaults are 2 concurrent bulk workflows and 1 per account. Multiple batches belonging to one account share that limit. Processing continues without an open browser or client polling.
Create a batch
POST /api/v1/studio/batches — returns HTTP 202. Supply a required Idempotency-Key header of 1–200 characters. Reuse the same key and identical JSON after a network interruption. A changed body with the same key returns HTTP 409; acceptance never creates a second batch for a retry.
curl "$V4V_BASE_URL/api/v1/studio/batches" \
-H "Authorization: Bearer $V4V_API_KEY" \
-H 'Content-Type: application/json' \
-H 'Idempotency-Key: autumn-catalogue-001' \
--data '{
"name": "Autumn catalogue",
"max_credits": 600,
"input": { "prompt": "Show three benefits of this product in a calm reveal" },
"parameters": { "duration": 8, "aspect_ratio": "9:16", "quality": "720p" },
"items": [
{ "sku": "MUG-01", "product_id": "0123456789abcdef01234567" },
{ "sku": "BAG-02", "product_url": "https://shop.example/products/bag?variant=blue" },
{
"sku": "LAMP-03",
"input": {
"product_name": "Desk lamp",
"product_description": "Adjustable warm light",
"product_images": ["https://shop.example/lamp.jpg"]
},
"parameters": { "style": "TV Spot" }
}
]
}'Use the duration, format and quality supported by your deployment's current Studio workflow, as for POST /api/v1/studio. The example budgets 600 credits for three 8-second 720p Omni clips: 3 × 180 = 540 credits, leaving 60 credits of headroom. Three 10-second clips at 720p use 675 credits; at 1080p they use 990, and at 4K they use 1,980, before reference-video pricing, extra steps or retries. Always obtain current estimates for the exact inputs before choosing a batch budget.