Flux Kontext Pro - Image Text Editor
Professional-grade AI image editing model designed for commercial applications. Flux Kontext Pro strikes the perfect balance between processing speed and output quality, delivering consistently excellent results with advanced contextual intelligence.
Endpoint
Request Headers
| Field | Value |
|---|---|
| API-KEY | <api-key> |
| Content-Type | application/json |
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
type | string | Yes | Feature type identifier. Must be IMAGE_EDITOR |
model | string | Yes | AI model identifier. Must be black-forest-labs/flux-kontext-pro |
promptObject | object | Yes | Configuration object containing all image editing parameters |
Prompt Object Parameters
| Parameter | Type | Required | Description | Default |
|---|---|---|---|---|
imageUrl | string | Yes | Path to the source image to be edited | - |
prompt | string | Yes | Text description of the desired image transformation | - |
aspect_ratio | string | No | Output aspect ratio (1:1, 16:9, 9:16, 3:2, 2:3, 4:5, 5:4) | match_input_image |
prompt_upsampling | boolean | No | Enable advanced prompt interpretation | false |
seed | number | No | Random seed for reproducibility (0-4294967295) | 0 |
safety_tolerance | number | No | Content safety threshold (1-6) | 2 |
format | string | No | Output image format (png, jpeg, webp) | png |
Code Examples
- cURL
- JavaScript
- Python
curl -X POST "https://api.1min.ai/api/features" \
-H "API-KEY: <api-key>" \
-H "Content-Type: application/json" \
-d '{
"type": "IMAGE_EDITOR",
"model": "black-forest-labs/flux-kontext-pro",
"promptObject": {
"imageUrl": "development/images/2025_02_16_15_42_40_711_human.jpg",
"prompt": "Transform this into a professional headshot with clean background",
"aspect_ratio": "match_input_image",
"prompt_upsampling": true,
"seed": 42,
"safety_tolerance": 2,
"format": "png"
}
}'
fetch('https://api.1min.ai/api/features', {
method: 'POST',
headers: {
'Content-Type': 'application/json',
'API-KEY': 'YOUR_API_KEY'
},
body: JSON.stringify({
type: 'IMAGE_EDITOR',
model: 'black-forest-labs/flux-kontext-pro',
promptObject: {
imageUrl: 'development/images/2025_02_16_15_42_40_711_human.jpg',
prompt: 'Transform this into a professional headshot with clean background',
aspect_ratio: 'match_input_image',
prompt_upsampling: true,
seed: 42,
safety_tolerance: 2,
format: 'png'
}
})
})
import requests
url = "https://api.1min.ai/api/features"
headers = {
"Content-Type": "application/json",
"API-KEY": "YOUR_API_KEY"
}
data = {
"type": "IMAGE_EDITOR",
"model": "black-forest-labs/flux-kontext-pro",
"promptObject": {
"imageUrl": "development/images/2025_02_16_15_42_40_711_human.jpg",
"prompt": "Transform this into a professional headshot with clean background",
"aspect_ratio": "match_input_image",
"prompt_upsampling": True,
"seed": 42,
"safety_tolerance": 2,
"format": "png"
}
}
response = requests.post(url, headers=headers, json=data)
Interactive Playground
API Playground
https://api.1min.ai/api/featuresPath to the source image to be edited
Description of desired edits
Output image aspect ratio
Enhance prompt with AI
Seed for reproducible results (0-4294967295)
Content filtering level (1-6)
Output image format
Generated cURL Command:
curl -X POST "https://api.1min.ai/api/features" \
-H "API-KEY: <your-api-key>" \
-H "Content-Type: application/json" \
-d '{
"type": "IMAGE_EDITOR",
"model": "black-forest-labs/flux-kontext-pro",
"promptObject": {
"imageUrl": "development/images/2025_02_16_15_42_40_711_human.jpg",
"prompt": "Transform this into a professional headshot with clean background",
"aspect_ratio": "match_input_image",
"prompt_upsampling": false,
"seed": 42,
"safety_tolerance": 2,
"format": "png"
}
}'
Response Format
Success Response (200)
{
"aiRecord": {
"uuid": "ac32acf4-0b2e-400e-9edf-cb3086c30a2c",
"userId": "c937fbcc-fa8f-4565-a440-c4d87f56fcb2",
"teamId": "a4e176b2-dabb-451e-9c58-62b451fa9630",
"teamUser": {
"teamId": "a4e176b2-dabb-451e-9c58-62b451fa9630",
"userId": "c937fbcc-fa8f-4565-a440-c4d87f56fcb2",
"userName": "John Doe",
"userAvatar": "https://lh3.googleusercontent.com/a/ACg8ocLqgsNsHRfmWF9d-E1RvJetVsEzxNOsOg-NXWNTpMxLDPJbwELI=s96-c",
"status": "ACTIVE",
"role": "ADMIN",
"creditLimit": 100000000,
"usedCredit": 8164605,
"createdAt": "2025-10-20T04:13:40.847Z",
"createdBy": "SYSTEM",
"updatedAt": "2025-10-27T05:06:17.651Z",
"updatedBy": "SYSTEM"
},
"model": "black-forest-labs/flux-kontext-pro",
"type": "IMAGE_EDITOR",
"metadata": null,
"rating": null,
"feedback": null,
"conversationId": null,
"status": "SUCCESS",
"createdAt": "2025-10-27T08:43:17.647Z",
"aiRecordDetail": {
"promptObject": {
"seed": 42,
"format": "png",
"prompt": "Transform this into a professional headshot with clean background",
"imageUrl": "development/images/2025_02_16_15_42_40_711_human.jpg",
"aspect_ratio": "match_input_image",
"safety_tolerance": 2,
"prompt_upsampling": false
},
"resultObject": [
"development/images/2025_10_27_15_43_26_155_702365.undefined"
],
"responseObject": {}
},
"additionalData": null,
"temporaryUrl": "https://s3.us-east-1.amazonaws.com/asset.1min.ai/development/images/2025_10_27_15_43_26_155_702365.undefined?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Content-Sha256=UNSIGNED-PAYLOAD&X-Amz-Credential=AKIAVRUVQEFIHSKAXGE7%2F20251027%2Fus-east-1%2Fs3%2Faws4_request&X-Amz-Date=20251027T084331Z&X-Amz-Expires=604800&X-Amz-Signature=5a66ff004deed5654ac44a823be7c4d1c8850503cb66a4445ce745c5caec5525&X-Amz-SignedHeaders=host&x-amz-checksum-mode=ENABLED&x-id=GetObject"
}
}
Use Cases
- Professional portraits: Transform casual photos into professional headshots
- Product photography: Enhance product images for e-commerce
- Social media content: Create engaging posts with perfect aspect ratios
- Marketing materials: Generate visuals for campaigns and advertisements
- Background replacement: Replace or enhance image backgrounds
- Style transfer: Apply artistic styles while preserving subject details
Tips for Best Results
- Be specific in prompts: Include style, lighting, and composition details
- Use professional terminology: "studio lighting", "high resolution", "commercial quality"
- Match aspect ratios: Choose the right ratio for your intended platform
- Enable prompt upsampling: For complex edits requiring detailed instructions
- Set appropriate safety tolerance: Use levels 1-3 for commercial applications
- Save successful seeds: Reuse seeds that produce desired results
- Test different formats: PNG for quality, JPEG for smaller files