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.

πŸ”Œ 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.