Flux 1.Kontext Studio
State-of-the-art in-context image generation and editingβcombine text and images for precise results.
Checking backend...
Source Image
Drag & Drop or click to browse
No file selected
Prompt
Describe the transformation you want. Flux combines the uploaded image with your instructions.
Advanced Settings
Number of denoising steps (1-50). Higher values may produce better quality but take longer.
π API Access
Use Flux 1.Kontext programmatically with our REST API
π API Keys
To use the API, you need an API key. Manage your API keys β
POST
/api/v1/generate
Generate with Flux Kontext
Transform images using text instructions with Flux 1.Kontext model.
Cost:
0.025 credits per image
Request (cURL)
curl -X POST https://app.eigenai.com/api/v1/generate \
-H "Authorization: Bearer YOUR_API_KEY" \
-F "model=flux-kontext" \
-F "prompt=Change the bag to a macbook" \
-F "image=@/path/to/your/image.png" \
-F "num_inference_steps=15" \
-o /path/to/your/result.png
Request (Python)
import requests
url = "https://app.eigenai.com/api/v1/generate"
headers = {"Authorization": "Bearer YOUR_API_KEY"}
with open("image.png", "rb") as f:
files = {"image": f}
data = {
"model": "flux-kontext",
"prompt": "Change the bag to a macbook"
}
response = requests.post(url, headers=headers, data=data, files=files)
# Save the result image
with open("result.png", "wb") as out:
out.write(response.content)
Request (JavaScript/Node.js)
const FormData = require('form-data');
const fs = require('fs');
const axios = require('axios');
const form = new FormData();
form.append('model', 'flux-kontext');
form.append('prompt', 'Change the bag to a macbook');
form.append('image', fs.createReadStream('image.png'));
axios.post('https://app.eigenai.com/api/v1/generate', form, {
headers: {
...form.getHeaders(),
'Authorization': 'Bearer YOUR_API_KEY'
},
responseType: 'arraybuffer'
}).then(response => {
fs.writeFileSync('result.png', response.data);
console.log('Credits remaining:', response.headers['x-credits-remaining']);
});
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
model |
string | β Yes | Must be "flux-kontext" |
prompt |
string | β Yes | Text instruction for transformation |
image |
file | β Yes | Source image (PNG, JPG, WEBP) |
lora_strength |
number | β No | LoRA strength (default: 0.8) |
Output
Awaiting Flux magic
Upload an image, craft an instruction, and Flux 1.Kontext will render the result here.
Cost: 0.025 credits per image.