Seedream 5.0 Pro ya está aquí | Pruébalo en el Generador de Imágenes →

Flux Kontext Max Multi

wavespeed-ai /

Experimental FLUX.1 Kontext [max] (multi) supports multi-image context handling for combined inputs. Ready-to-use REST inference API, best performance, no coldstarts, affordable pricing.

image-to-image
Entrada

Inactivo

A girl holding up flowers.

$0.08por ejecución·~12 / $1

Siguiente:

EjemplosVer todo

A girl holding up flowers.

A girl holding up flowers.

Doll in the crystal ball.

Doll in the crystal ball.

Modelos relacionados

README

FLUX Kontext Max Multi — wavespeed-ai/flux-kontext-max/multi

FLUX Kontext Max Multi is a high-end multi-image model for context-rich generation and editing. Provide a text prompt plus up to 5 reference images, and the model uses them as visual grounding to improve identity consistency, style matching, and scene coherence—ideal for premium creative work where one image is not enough.

Key capabilities

  • Multi-image contextual generation with up to 5 reference images
  • Strong identity and style consistency by grounding outputs in references
  • Handles complex scenes and cinematic composition with high detail
  • Great for iterative workflows: refine results while keeping the same visual target

Typical use cases

  • Character consistency using multiple portraits/outfits/angles
  • Product and branding consistency (packaging + logo + lighting references)
  • Style steering with multiple exemplars (art style + texture + lighting mood)
  • Scene creation or recomposition guided by reference frames
  • High-fidelity creative direction for storyboards and marketing visuals

Pricing

$0.08 per image.

Total cost = num_images × $0.08 Example: num_images = 4 → $0.32

Inputs and outputs

Input:

  • prompt (required): The generation or edit instruction
  • images (required): Up to 5 reference images (upload or public URLs)

Output:

  • One or more generated images (controlled by num_images, if available in your interface)

Parameters

  • prompt (required): Instruction describing what to generate and how to use references
  • images (required): Up to 5 reference images
  • guidance_scale: Prompt adherence strength (higher = stricter; too high may over-constrain)
  • aspect_ratio: Output aspect ratio (e.g., 16:9, 1:1, 9:16)

Prompting guide (multi-reference)

Assign roles to your references to reduce ambiguity:

Template: Use image 1 for [identity]. Use image 2 for [outfit]. Use image 3 for [style]. Use image 4 for [lighting]. Use image 5 for [background/scene]. Generate [shot description]. Keep [constraints].

Example prompts

  • Use image 1 for the face identity, image 2 for outfit, image 3 for illustration style. Create a 16:9 cinematic medium shot in a rainy city street at night, neon reflections, shallow depth of field.
  • Use images 1–2 to keep the same person identity from different angles. Generate a clean studio portrait with softbox lighting, neutral background, natural skin texture.
  • Use image 4 for lighting mood (sunset) and image 5 for environment. Keep the subject identity from image 1 and maintain consistent color palette.

Best practices

  • Use high-quality references: sharp subjects, minimal occlusion, clear lighting.
  • Avoid conflicting references (e.g., drastically different styles) unless you explicitly say which one dominates.
  • Keep guidance_scale moderate; let references do most of the steering.
  • Pick an aspect_ratio that matches your target layout to avoid awkward cropping.
Nota:Este sitio web utiliza modelos de IA proporcionados por terceros.

Flux Kontext Max Multi API — Quick start

Grab a WaveSpeedAI API key, then call POST https://api.wavespeed.ai/api/v3/wavespeed-ai/flux-kontext-max/multi with your input as JSON. The endpoint returns a prediction id. Start polling the result endpoint around every 2 seconds, increase the interval for long-running tasks, and stop on any terminal status. On completed, read output values from data.outputs. Examples for Flux Kontext Max Multi below.

HTTP example
set -euo pipefail

: "${WAVESPEED_API_KEY:?Set WAVESPEED_API_KEY}"

REQUEST_BODY=$(cat <<'JSON'
{
    "prompt": "A cinematic shot of a city at sunset, soft golden light",
    "images": [
        "https://interactive-examples.mdn.mozilla.net/media/cc0-images/painted-hand-298-332.jpg"
    ],
    "guidance_scale": 3.5,
    "aspect_ratio": "21:9"
}
JSON
)

# 1. Submit the prediction.
SUBMIT_RESPONSE=$(curl --silent --show-error --fail-with-body \
  -X POST "https://api.wavespeed.ai/api/v3/wavespeed-ai/flux-kontext-max/multi" \
  -H "Content-Type: application/json" \
  -H "Authorization: Bearer $WAVESPEED_API_KEY" \
  -d "$REQUEST_BODY")

TASK=$(printf '%s' "$SUBMIT_RESPONSE" | jq 'if has("data") then .data else . end')
PREDICTION_ID=$(printf '%s' "$TASK" | jq -r '.id')
if [ -z "$PREDICTION_ID" ] || [ "$PREDICTION_ID" = "null" ]; then
  printf 'Submission response did not contain a prediction id
' >&2
  exit 1
fi
RESULT_URL=$(printf '%s' "$TASK" | jq -r '.urls.get // empty')
if [ -z "$RESULT_URL" ]; then
  RESULT_URL="https://api.wavespeed.ai/api/v3/predictions/$PREDICTION_ID/result"
fi

# 2. Poll until the prediction finishes.
while true; do
  RESPONSE=$(curl --silent --show-error --fail-with-body "$RESULT_URL" \
    -H "Authorization: Bearer $WAVESPEED_API_KEY")
  RESULT=$(printf '%s' "$RESPONSE" | jq 'if has("data") then .data else . end')
  STATUS=$(printf '%s' "$RESULT" | jq -r '.status')
  case "$STATUS" in
    completed) printf '%s\n' "$RESULT" | jq '.outputs'; break ;;
    failed|cancelled|timeout) printf '%s\n' "$RESULT" | jq . >&2; exit 1 ;;
    created|processing) sleep 2 ;;
    *) printf 'Unexpected status: %s
' "$STATUS" >&2; exit 1 ;;
  esac
done
Node.js example
const submitUrl = "https://api.wavespeed.ai/api/v3/wavespeed-ai/flux-kontext-max/multi";
const apiKey = process.env.WAVESPEED_API_KEY;
if (!apiKey) throw new Error('Set WAVESPEED_API_KEY');

async function requestJson(url, options = {}) {
  const response = await fetch(url, options);
  if (!response.ok) throw new Error(await response.text());
  return response.json();
}

// 1. Submit the prediction.
const body = await requestJson(submitUrl, {
  method: "POST",
  headers: {
    "Authorization": `Bearer ${apiKey}`,
    "Content-Type": "application/json",
  },
  body: JSON.stringify({
        "prompt": "A cinematic shot of a city at sunset, soft golden light",
        "images": [
                "https://interactive-examples.mdn.mozilla.net/media/cc0-images/painted-hand-298-332.jpg"
        ],
        "guidance_scale": 3.5,
        "aspect_ratio": "21:9"
}),
});
const task = body.data ?? body;
if (!task.id) throw new Error("Submission response did not contain a prediction id");
const resultUrl = task.urls?.get ||
  `https://api.wavespeed.ai/api/v3/predictions/${task.id}/result`;

// 2. Poll until the prediction finishes.
while (true) {
  const resultBody = await requestJson(resultUrl, {
    headers: { "Authorization": `Bearer ${apiKey}` },
  });
  const result = resultBody.data ?? resultBody;
  if (result.status === "completed") {
    console.log(result.outputs);
    break;
  }
  if (["failed", "cancelled", "timeout"].includes(result.status)) throw new Error(JSON.stringify(result));
  if (!["created", "processing"].includes(result.status)) throw new Error("Unexpected status: " + result.status);
  await new Promise(resolve => setTimeout(resolve, 2000));
}
Python example
import json
import os
import time
from urllib.request import Request, urlopen

api_key = os.environ["WAVESPEED_API_KEY"]
headers = {"Authorization": f"Bearer {api_key}", "Content-Type": "application/json"}
payload = {
    "prompt": "A cinematic shot of a city at sunset, soft golden light",
    "images": [
        "https://interactive-examples.mdn.mozilla.net/media/cc0-images/painted-hand-298-332.jpg"
    ],
    "guidance_scale": 3.5,
    "aspect_ratio": "21:9"
}

def request_json(url, data=None):
    request = Request(url, data=data, headers=headers, method="POST" if data else "GET")
    with urlopen(request) as response:
        return json.load(response)

# 1. Submit the prediction.
body = request_json("https://api.wavespeed.ai/api/v3/wavespeed-ai/flux-kontext-max/multi", json.dumps(payload).encode())
task = body.get("data", body)
if not task.get("id"):
    raise RuntimeError("Submission response did not contain a prediction id")
result_url = task.get("urls", {}).get("get") or f"https://api.wavespeed.ai/api/v3/predictions/{task['id']}/result"

# 2. Poll until the prediction finishes.
while True:
    result_body = request_json(result_url)
    result = result_body.get("data", result_body)
    status = result.get("status")
    if status == "completed":
        print(result.get("outputs", []))
        break
    if status in {"failed", "cancelled", "timeout"}:
        raise RuntimeError(result)
    if status not in {"created", "processing"}:
        raise RuntimeError(f"Unexpected status: {status}")
    time.sleep(2)

Flux Kontext Max Multi API — Frequently asked questions

What is the Flux Kontext Max Multi API?

Flux Kontext Max Multi is a WaveSpeedAI model for image editing, exposed as a REST API on WaveSpeedAI. Experimental FLUX.1 Kontext [max] (multi) supports multi-image context handling for combined inputs. Ready-to-use REST inference API, best performance, no coldstarts, affordable pricing. You can call it programmatically or try it from the playground above.

How do I call the Flux Kontext Max Multi API?

POST your input parameters to the model's REST endpoint (shown in the API tab of this playground) with your WaveSpeedAI API key in the Authorization header. Submission returns a prediction ID. Poll the result endpoint starting around every 2 seconds, increase the interval for long-running tasks, and stop on any terminal status. The playground generates production-oriented Python, JavaScript, and cURL examples with timeouts, transient-error handling, and safe GET retries. Full request/response shape is documented at https://wavespeed.ai/docs/docs-api/wavespeed-ai/flux-kontext-max-multi.

How much does Flux Kontext Max Multi cost per run?

Flux Kontext Max Multi starts at $0.080 per run. That figure is the base price — the final charge scales with the parameters you set in the form (output size, length, count, references, or whatever knobs this model exposes), so a higher-quality or larger output costs more than a minimal one. The exact cost for your current input is shown live next to the Generate button before you submit, and the actual per-call charge is recorded on the prediction afterwards.

What inputs does Flux Kontext Max Multi accept?

Key inputs: `prompt`, `images`, `aspect_ratio`, `guidance_scale`, `enable_sync_mode`. The full JSON schema (types, defaults, allowed values) is rendered above the Generate button and mirrored in the API reference at https://wavespeed.ai/docs/docs-api/wavespeed-ai/flux-kontext-max-multi.

How long does Flux Kontext Max Multi take to generate?

Median end-to-end generation time on WaveSpeedAI is around 17 seconds per request, based on recent successful runs. Queue time varies with global demand; live status is visible in the prediction record.

Can I use Flux Kontext Max Multi outputs commercially?

Commercial usage rights depend on the model's license, set by its provider (WaveSpeedAI). The license summary appears on the model card above; see WaveSpeedAI's Terms of Service for platform-level conditions.