Input
Configure model parameters
Output
View generated results
Result
Preview, share or download your results with a single click.

Prerequisites
- Create an API Key from the Eachlabs Console
- Install the required dependencies for your chosen language (e.g., requests for Python)
API Integration Steps
1. Create a Prediction
Send a POST request to create a new prediction. This will return a prediction ID that you'll use to check the result. The request should include your model inputs and API key.
import requestsimport timeAPI_KEY = "YOUR_API_KEY" # Replace with your API keyHEADERS = {"X-API-Key": API_KEY,"Content-Type": "application/json"}def create_prediction():response = requests.post("https://api.eachlabs.ai/v1/prediction/",headers=HEADERS,json={"model": "multi-image-kontext-max","version": "0.0.1","input": {"seed": 0,"prompt": "your prompt here","aspect_ratio": "match_input_image","input_image_1": "your input image 1 here","input_image_2": "your input image 2 here","output_format": "png","safety_tolerance": 2},"webhook_url": ""})prediction = response.json()if prediction["status"] != "success":raise Exception(f"Prediction failed: {prediction}")return prediction["predictionID"]
2. Get Prediction Result
Poll the prediction endpoint with the prediction ID until the result is ready. The API uses long-polling, so you'll need to repeatedly check until you receive a success status.
def get_prediction(prediction_id):while True:result = requests.get(f"https://api.eachlabs.ai/v1/prediction/{prediction_id}",headers=HEADERS).json()if result["status"] == "success":return resultelif result["status"] == "error":raise Exception(f"Prediction failed: {result}")time.sleep(1) # Wait before polling again
3. Complete Example
Here's a complete example that puts it all together, including error handling and result processing. This shows how to create a prediction and wait for the result in a production environment.
try:# Create predictionprediction_id = create_prediction()print(f"Prediction created: {prediction_id}")# Get resultresult = get_prediction(prediction_id)print(f"Output URL: {result['output']}")print(f"Processing time: {result['metrics']['predict_time']}s")except Exception as e:print(f"Error: {e}")
Additional Information
- The API uses a two-step process: create prediction and poll for results
- Response time: ~15 seconds
- Rate limit: 60 requests/minute
- Concurrent requests: 10 maximum
- Use long-polling to check prediction status until completion
Overview
Flux Kontext Max Multi Image is designed to generate highly context-aware and visually coherent images by combining two input images with a guided prompt. Flux Kontext Max Multi Image focuses on visual storytelling by blending visual cues from two distinct sources and interpreting user-defined prompts. It supports multiple aspect ratios, format options, and prompt structures, giving users creative flexibility for structured image generation with visual alignment.
Technical Specifications
Capable of understanding spatial relationships and object positioning across multiple inputs.
Utilizes spatial-attention fusion to merge image data with textual descriptions.
Supports a wide range of output aspect ratios, including cinematic formats like 21:9 and vertical formats like 9:16.
Includes safety control mechanisms to detect and avoid inappropriate content.
Key Considerations
Input images should be well-lit, clear, and thematically aligned for best results.
Prompts that include conflicting or contradictory instructions may result in blurred or abstract outputs.
Very high or very low values in safety_tolerance can either overly restrict or inadequately filter sensitive outputs.
The selected aspect_ratio strongly affects framing — mismatches may cause cropping or empty areas.
Tips & Tricks
prompt:
Use descriptive, concise, and contextually rich prompts. Avoid using terms like "sexy", "nude", or violent content-related keywords — these can trigger safety filters or produce blank outputs.
✅ Good:
- "A futuristic city skyline at dusk with flying cars"
- "A young child and a robot reading together under a tree"
❌ Avoid:
- Ambiguous: "cool thing happening"
- Unsafe: "naked character in dark alley"
input_image_1 & input_image_2:
Use visually compatible images. Matching styles (e.g., two illustrations, or two real-life photos) results in smoother transitions.
aspect_ratio:
- Use match_input_image for automatic fitting.
- Choose 16:9 or 4:3 for general framing.
- Select 9:16 or 1:2 for mobile-oriented or vertical results.
- 21:9 is useful for cinematic looks.
seed:
- Use a fixed integer (e.g., 12345) to recreate identical results.
- Leave blank for variation.
output_format:
- png for higher quality and transparency needs.
- jpg for smaller file size and fast rendering.
safety_tolerance:
- Suggested range: 2 (strict) to 6 (looser).
- Start with 4 for a balanced approach.
- Avoid maximum values unless necessary.
Capabilities
Multi-image context fusion with prompt interpretation.
Wide support for custom aspect ratios and formats.
Repeatable results using seeding.
Built-in content moderation controls.
Visual coherence between image inputs and textual intent.
What can I use for?
Concept art creation from sketches or real-world images.
Visual storytelling with multiple reference inputs.
Educational illustrations combining diagrams and descriptions.
Fantasy and sci-fi world-building.
Image expansion and scene re-imagination.
Things to be aware of
Combine a child's drawing with a photo of a landscape and use a prompt like “a dreamlike journey through the forest.”
Blend two portraits with the prompt “two people merging into one digital avatar.”
Input a black-and-white image and a colored image with the prompt “reimagine the scene with vibrant energy.”
Limitations
May generate unrealistic or abstract results with incompatible input images.
Safety filters can prevent generation if sensitive content is detected, even when unintended.
Long or overly complex prompts may cause loss of focus in the generated image.
Not ideal for precise photorealistic edits like facial retouching or object removal.
Output Format: JPG,PNG
Related AI Models
You can seamlessly integrate advanced AI capabilities into your applications without the hassle of managing complex infrastructure.