## Basic model info - Model name: black-forest-labs/black-forest-labs flux-3-max - Model description: FLUX 3 Max is a post-trained variant of FLUX 3 Video from Black Forest Labs, tuned for stronger prompt adherence and better visual quality at lower latency. Generates 5-20s videos with synchronized audio at 720p or 1080p from text, an image (with an optional last frame) or keyframe anchors. Billed per second of video. - Endpoint name: image-to-video ## Model schema The model schema is defined in the OpenAPI schema: [OpenAPI Schema](https://oapi.sunra.ai/main/black-forest-labs/flux-3-max/latest.json) ### Model input schema The model input schema is: ```json { "description": "Input model for FLUX 3 Max image-to-video generation, with an optional last frame.", "properties": { "prompt": { "description": "Text prompt describing the video, including dialogue and audio direction", "minLength": 1, "title": "Prompt", "type": "string", "x-sr-order": 201 }, "aspect_ratio": { "default": "auto", "description": "Aspect ratio of the generated video. auto uses 16:9 for text prompts and follows the first image otherwise", "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 }, "image_url": { "anyOf": [ { "format": "uri", "maxLength": 2083, "minLength": 1, "type": "string" }, { "type": "string" } ], "description": "URL of the image used as the first frame (PNG, JPEG, or WebP)", "title": "Image Url", "x-sr-order": 301 }, "seed": { "anyOf": [ { "maximum": 2147483647, "minimum": 0, "type": "integer" }, { "type": "null" } ], "description": "Seed for reproducibility; random when omitted", "title": "Seed", "x-sr-order": 501 }, "duration": { "default": 5, "description": "Duration of the generated video in seconds (5-20). Billed per second of output", "enum": [ 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20 ], "title": "Duration", "type": "integer", "x-sr-order": 403 }, "end_image_url": { "anyOf": [ { "format": "uri", "maxLength": 2083, "minLength": 1, "type": "string" }, { "type": "string" }, { "type": "null" } ], "description": "Optional URL of the image used as the last frame (PNG, JPEG, or WebP)", "title": "End Image Url", "x-sr-order": 302 }, "generate_audio": { "default": true, "description": "Whether to generate synchronized audio for the video", "title": "Generate Audio", "type": "boolean", "x-sr-order": 404 }, "reasoning_level": { "default": "high", "description": "How much effort is spent reasoning about the prompt before generating. high is slower; does not change the price", "enum": [ "low", "high" ], "title": "Reasoning Level", "type": "string", "x-sr-order": 405 }, "resolution": { "default": "720p", "description": "Resolution of the generated video. 1080p costs more per second", "enum": [ "720p", "1080p" ], "title": "Resolution", "type": "string", "x-sr-order": 401 } }, "required": [ "prompt", "image_url" ], "title": "ImageToVideoInput", "type": "object" } ``` ### Model output schema The model output schema is: ```json { "description": "Output model with video duration for post_calculated pricing.", "properties": { "seed": { "anyOf": [ { "type": "integer" }, { "type": "null" } ], "description": "Seed used for the generation; pass it back to reproduce the video", "title": "Seed" }, "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": "Flux3MaxVideoOutput", "type": "object" } ``` ## Example inputs and outputs Use the following example inputs and outputs to understand the model. ### Input example ```json { "prompt": "", "aspect_ratio": "auto", "image_url": "", "seed": null, "duration": 5, "end_image_url": null, "generate_audio": true, "reasoning_level": "high", "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-max/image-to-video", { input: { prompt: '', resolution: '720p', aspect_ratio: 'auto', duration: 5, generate_audio: true, reasoning_level: 'high', seed: null, image_url: '', end_image_url: null }, 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-max/image-to-video", arguments={ "prompt": "", "resolution": "720p", "aspect_ratio": "auto", "duration": 5, "generate_audio": True, "reasoning_level": "high", "seed": None, "image_url": "", "end_image_url": None }, 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-max/image-to-video", SubscribeOptions.builder() .input(Map.of( "prompt", "", "resolution", "720p", "aspect_ratio", "auto", "duration", 5, "generate_audio", true, "reasoning_level", "high", "seed", null, "image_url", "", "end_image_url", null)) .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-max/image-to-video", input = mapOf( "prompt" to "", "resolution" to "720p", "aspect_ratio" to "auto", "duration" to 5, "generate_audio" to true, "reasoning_level" to "high", "seed" to null, "image_url" to "", "end_image_url" to null), 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-max/image-to-video \ --header "Authorization: Key $SUNRA_KEY" \ --header "Content-Type: application/json" \ --data '{"prompt":"","resolution":"720p","aspect_ratio":"auto","duration":5,"generate_audio":true,"reasoning_level":"high","seed":null,"image_url":"","end_image_url":null}' ``` ## Model readme >