## Basic model info - Model name: black-forest-labs/black-forest-labs flux-3 - Model description: FLUX 3 is Black Forest Labs' frontier multimodal video model: generate up to 20 seconds of video with synchronized audio from text, images, keyframes, or an existing clip - with a low-cost draft mode and full-quality enhance. - Endpoint name: extend-video ## Model schema The model schema is defined in the OpenAPI schema: [OpenAPI Schema](https://oapi.sunra.ai/main/black-forest-labs/flux-3/latest.json) ### Model input schema The model input schema is: ```json { "description": "Input model for extend-video generation (video continuation).", "properties": { "prompt": { "description": "Text prompt describing how the video should continue, including dialogue and audio direction", "title": "Prompt", "type": "string", "x-sr-order": 201 }, "aspect_ratio": { "default": "auto", "description": "Aspect ratio of the generated video", "enum": [ "auto", "21:9", "2:1", "16:9", "4:3", "1:1", "3:4", "9:16" ], "title": "Aspect Ratio", "type": "string", "x-sr-order": 402 }, "video_url": { "anyOf": [ { "format": "uri", "maxLength": 2083, "minLength": 1, "type": "string" }, { "type": "string" } ], "description": "URL of the video to extend", "title": "Video Url", "x-sr-order": 301 }, "duration": { "default": "auto", "description": "Duration of the generated continuation in seconds, or \"auto\" to let the model decide", "enum": [ "auto", 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20 ], "title": "Duration", "x-sr-order": 403 }, "generate_audio": { "default": true, "description": "Whether to generate synchronized audio for the video", "title": "Generate Audio", "type": "boolean", "x-sr-order": 404 }, "resolution": { "default": "720p", "description": "Resolution of the generated video", "enum": [ "720p", "1080p" ], "title": "Resolution", "type": "string", "x-sr-order": 401 } }, "required": [ "prompt", "video_url" ], "title": "ExtendVideoInput", "type": "object" } ``` ### Model output schema The model output schema is: ```json { "description": "Output model with video duration for post_calculated pricing.", "properties": { "draft_cache": { "anyOf": [ { "properties": { "content_type": { "description": "The mime type of the file.", "title": "Content Type", "type": "string" }, "file_name": { "description": "The name of the file. It will be auto-generated if not provided.", "title": "File Name", "type": "string" }, "file_size": { "description": "The size of the file in bytes.", "title": "File Size", "type": "integer" }, "url": { "description": "The URL where the file can be downloaded from.", "title": "Url", "type": "string" } }, "required": [ "content_type", "file_name", "file_size", "url" ], "title": "SunraFile", "type": "object" }, { "type": "null" } ], "description": "Durable cache bundle produced by draft endpoints; pass its URL to draft-enhance for a full-quality render" }, "output_video_dur": { "description": "Duration of the output video in seconds (rounded)", "title": "Output Video Dur", "type": "integer" }, "video": { "properties": { "content_type": { "description": "The mime type of the file.", "title": "Content Type", "type": "string" }, "file_name": { "description": "The name of the file. It will be auto-generated if not provided.", "title": "File Name", "type": "string" }, "file_size": { "description": "The size of the file in bytes.", "title": "File Size", "type": "integer" }, "url": { "description": "The URL where the file can be downloaded from.", "title": "Url", "type": "string" } }, "required": [ "content_type", "file_name", "file_size", "url" ], "title": "SunraFile", "type": "object" } }, "required": [ "video", "output_video_dur" ], "title": "Flux3VideoOutput", "type": "object" } ``` ## Example inputs and outputs Use the following example inputs and outputs to understand the model. ### Input example ```json { "prompt": "", "aspect_ratio": "auto", "video_url": "", "duration": "auto", "generate_audio": true, "resolution": "720p" } ``` ### Output example ```json { } ``` ## Model code examples ### JavaScript ```javascript import { sunra } from "@sunra/client"; const result = await sunra.subscribe("black-forest-labs/flux-3/extend-video", { input: { prompt: '', video_url: '', resolution: '720p', aspect_ratio: 'auto', duration: 'auto', generate_audio: true }, logs: true, onQueueUpdate: (update) => { console.log(`Status Update: ${update.status}, Request ID: ${update.request_id}`); }, }); console.log(result.data); console.log(result.requestId); ``` ### Python ```python import sunra_client result = sunra_client.subscribe( "black-forest-labs/flux-3/extend-video", arguments={ "prompt": "", "video_url": "", "resolution": "720p", "aspect_ratio": "auto", "duration": "auto", "generate_audio": True }, with_logs=True, on_enqueue=print, on_queue_update=print, ) print(result) ``` ### Java ```java import ai.sunra.client.*; import java.util.Map; import com.google.gson.JsonObject; var client = SunraClient.withEnvCredentials(); var response = client.subscribe( "black-forest-labs/flux-3/extend-video", SubscribeOptions.builder() .input(Map.of( "prompt", "", "video_url", "", "resolution", "720p", "aspect_ratio", "auto", "duration", "auto", "generate_audio", true)) .resultType(JsonObject.class) .onQueueUpdate(update -> System.out.printf( "\nStatus Update: %s, Request ID: %s%n", update.getStatus(), update.getRequestId() )) .logs(true) .build() ); System.out.println("Completed!"); System.out.println(response.getData()); ``` ### Kotlin ```kotlin import ai.sunra.client.kt.* import com.google.gson.JsonObject val client = createSunraClient() val response = client.subscribe( endpointId = "black-forest-labs/flux-3/extend-video", input = mapOf( "prompt" to "", "video_url" to "", "resolution" to "720p", "aspect_ratio" to "auto", "duration" to "auto", "generate_audio" to true), options = ai.sunra.client.kt.SubscribeOptions(logs = true), onUpdate = { update -> println("\nStatus Update: ${update.status}, Request ID: ${update.requestId}") } ) println("Completed!") println(response.data) ``` ### Curl ```bash curl --request POST \ --url https://api.sunra.ai/v1/queue/black-forest-labs/flux-3/extend-video \ --header "Authorization: Key $SUNRA_KEY" \ --header "Content-Type: application/json" \ --data '{"prompt":"","video_url":"","resolution":"720p","aspect_ratio":"auto","duration":"auto","generate_audio":true}' ``` ## Model readme >