Flux Img2Img
Transform existing images using our advanced Flux image-to-image technology. This endpoint allows you to modify images while maintaining their core structure and adding new artistic elements.
Request Format
Send a POST request to the generate endpoint with the following parameters:
Required Parameters
initImage
: Base64 encoded image stringimageNumber
: Must be set to "1" for tool operationsimageStrength
: Number between 0 and 1 (e.g., 0.8)generationMode
: Must be set to "TOOLS"toolType
: Must be set to "Flux Img2Img B64"webhookUrl
: URL where the generated image will be sent upon completion
Optional Parameters
previousBatch
: String - ID of a previous batch to group resultsfolderId
: String - Folder ID for organization (default: "0")
Image Strength
The imageStrength
parameter controls how much of the original image is preserved. A value of 0.8 means 80% of the new generation will be based on the input image.
Try it out
Example Request
curl -X POST https://api.supermachine.art/v1/generate \
-H "Content-Type: application/json" \
-H "Authorization: Bearer YOUR_API_TOKEN" \
-d '{
"webhookUrl": "https://your-webhook-url.com/callback",
"imageStrength": "0.8",
"imageNumber": "1",
"generationMode": "TOOLS",
"toolType": "Flux Img2Img B64",
"previousBatch": "1208674",
"folderId": "0",
"initImage": "BASE64_STRING_HERE"
}'
ⓘ Add your API key above to try this endpoint
Important Notes
- The input image must be base64 encoded
- Maximum input image size is 1.2MB
- Supported input formats: PNG, JPEG, WebP
- The API response will include:
{ "batchID": 1208513, "method": "Flux Img2Img B64", "type": "TOOLS", "paidCredits": 12776, "subscriptionCredits": 2846.400000000003, "imageIds": [ 6370941 ] }
- The generated image will be sent to your webhook URL when processing is complete