1"use strict";(self.webpackChunkdocs=self.webpackChunkdocs||[]).push([[3422],{1280:(e,t,i)=>{i.r(t),i.d(t,{assets:()=>h,contentTitle:()=>p,default:()=>m,frontMatter:()=>c,metadata:()=>n,toc:()=>u});const n=JSON.parse('{"id":"api/ai-for-image/image-text-editor/flux-kontext-dev-image-text-editor","title":"Flux Kontext Dev - Image Text Editor","description":"Flux Kontext Dev - Image Text Editor","source":"@site/docs/api/ai-for-image/image-text-editor/flux-kontext-dev.mdx","sourceDirName":"api/ai-for-image/image-text-editor","slug":"/api/ai-for-image/image-text-editor/flux-kontext-dev-image-text-editor","permalink":"/docs/api/ai-for-image/image-text-editor/flux-kontext-dev-image-text-editor","draft":false,"unlisted":false,"editUrl":null,"tags":[],"version":"current","frontMatter":{"id":"flux-kontext-dev-image-text-editor","title":"Flux Kontext Dev - Image Text Editor","description":"Flux Kontext Dev - Image Text Editor","sidebar_label":"Flux Kontext Dev","custom_edit_url":null},"sidebar":"apisidebar","previous":{"title":"Flux Kontext Dev LoRA","permalink":"/docs/api/ai-for-image/image-text-editor/flux-kontext-dev-lora-image-text-editor"},"next":{"title":"Flux Depth Dev","permalink":"/docs/api/ai-for-image/image-text-editor/flux-depth-dev-image-text-editor"}}');var r=i(4848),s=i(8453),a=i(1470),l=i(9365),d=i(1028),o=i(1696);const c={id:"flux-kontext-dev-image-text-editor",title:"Flux Kontext Dev - Image Text Editor",description:"Flux Kontext Dev - Image Text Editor",sidebar_label:"Flux Kontext Dev",custom_edit_url:null},p="Flux Kontext Dev - Image Text Editor",h={},u=[{value:"Endpoint",id:"endpoint",level:2},{value:"Request Headers",id:"request-headers",level:2},{value:"Parameters",id:"parameters",level:2},{value:"Prompt Object Parameters",id:"prompt-object-parameters",level:3},{value:"Code Examples",id:"code-examples",level:2},{value:"Interactive Playground",id:"interactive-playground",level:2},{value:"Response Format",id:"response-format",level:2},{value:"Use Cases",id:"use-cases",level:2},{value:"Tips for Best Results",id:"tips-for-best-results",level:2},{value:"Tips for Best Results",id:"tips-for-best-results-1",level:2}];function x(e){const t={a:"a",admonition:"admonition",code:"code",h1:"h1",h2:"h2",h3:"h3",header:"header",hr:"hr",li:"li",ol:"ol",p:"p",strong:"strong",table:"table",tbody:"tbody",td:"td",th:"th",thead:"thead",tr:"tr",ul:"ul",...(0,s.R)(),...e.components};return(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(t.header,{children:(0,r.jsx)(t.h1,{id:"flux-kontext-dev---image-text-editor",children:"Flux Kontext Dev - Image Text Editor"})}),"\n",(0,r.jsx)(t.p,{children:"Development-focused AI image editing model with advanced parameter control and high-quality output. Perfect for developers and researchers who need fine-grained control over the image generation process."}),"\n",(0,r.jsx)(t.h2,{id:"endpoint",children:"Endpoint"}),"\n",(0,r.jsxs)("div",{className:"api-endpoint",children:[(0,r.jsx)("span",{className:"badge badge--success",children:"POST"}),(0,r.jsx)("code",{children:(0,r.jsx)(t.a,{href:"https://api.1min.ai/api/features",children:"https://api.1min.ai/api/features"})})]}),"\n",(0,r.jsx)(t.h2,{id:"request-headers",children:"Request Headers"}),"\n",(0,r.jsxs)(t.table,{children:[(0,r.jsx)(t.thead,{children:(0,r.jsxs)(t.tr,{children:[(0,r.jsx)(t.th,{children:"Field"}),(0,r.jsx)(t.th,{children:"Value"})]})}),(0,r.jsxs)(t.tbody,{children:[(0,r.jsxs)(t.tr,{children:[(0,r.jsx)(t.td,{children:"API-KEY"}),(0,r.jsx)(t.td,{children:(0,r.jsx)(t.code,{children:"<api-key>"})})]}),(0,r.jsxs)(t.tr,{children:[(0,r.jsx)(t.td,{children:"Content-Type"}),(0,r.jsx)(t.td,{children:(0,r.jsx)(t.code,{children:"application/json"})})]})]})]}),"\n",(0,r.jsx)(t.h2,{id:"parameters",children:"Parameters"}),"\n",(0,r.jsxs)(t.table,{children:[(0,r.jsx)(t.thead,{children:(0,r.jsxs)(t.tr,{children:[(0,r.jsx)(t.th,{children:"Parameter"}),(0,r.jsx)(t.th,{children:"Type"}),(0,r.jsx)(t.th,{children:"Required"}),(0,r.jsx)(t.th,{children:"Description"})]})}),(0,r.jsxs)(t.tbody,{children:[(0,r.jsxs)(t.tr,{children:[(0,r.jsx)(t.td,{children:(0,r.jsx)(t.code,{children:"type"})}),(0,r.jsx)(t.td,{children:"string"}),(0,r.jsx)(t.td,{children:"Yes"}),(0,r.jsxs)(t.td,{children:["Feature type identifier. Must be ",(0,r.jsx)(t.code,{children:"IMAGE_EDITOR"})]})]}),(0,r.jsxs)(t.tr,{children:[(0,r.jsx)(t.td,{children:(0,r.jsx)(t.code,{children:"model"})}),(0,r.jsx)(t.td,{children:"string"}),(0,r.jsx)(t.td,{children:"Yes"}),(0,r.jsxs)(t.td,{children:["AI model identifier. Must be ",(0,r.jsx)(t.code,{children:"black-forest-labs/flux-kontext-dev"})]})]}),(0,r.jsxs)(t.tr,{children:[(0,r.jsx)(t.td,{children:(0,r.jsx)(t.code,{children:"promptObject"})}),(0,r.jsx)(t.td,{children:"object"}),(0,r.jsx)(t.td,{children:"Yes"}
1),(0,r.jsx)(t.td,{children:"Configuration object containing all image editing parameters"})]})]})]}),"\n",(0,r.jsx)(t.h3,{id:"prompt-object-parameters",children:"Prompt Object Parameters"}),"\n",(0,r.jsxs)(t.table,{children:[(0,r.jsx)(t.thead,{children:(0,r.jsxs)(t.tr,{children:[(0,r.jsx)(t.th,{children:"Parameter"}),(0,r.jsx)(t.th,{children:"Type"}),(0,r.jsx)(t.th,{children:"Required"}),(0,r.jsx)(t.th,{children:"Description"}),(0,r.jsx)(t.th,{children:"Default"})]})}),(0,r.jsxs)(t.tbody,{children:[(0,r.jsxs)(t.tr,{children:[(0,r.jsx)(t.td,{children:(0,r.jsx)(t.code,{children:"imageUrl"})}),(0,r.jsx)(t.td,{children:"string"}),(0,r.jsx)(t.td,{children:"Yes"}),(0,r.jsx)(t.td,{children:"Path to the source image to be edited"}),(0,r.jsx)(t.td,{children:"-"})]}),(0,r.jsxs)(t.tr,{children:[(0,r.jsx)(t.td,{children:(0,r.jsx)(t.code,{children:"prompt"})}),(0,r.jsx)(t.td,{children:"string"}),(0,r.jsx)(t.td,{children:"Yes"}),(0,r.jsx)(t.td,{children:"Text description of the desired image transformation"}),(0,r.jsx)(t.td,{children:"-"})]}),(0,r.jsxs)(t.tr,{children:[(0,r.jsx)(t.td,{children:(0,r.jsx)(t.code,{children:"aspect_ratio"})}),(0,r.jsx)(t.td,{children:"string"}),(0,r.jsx)(t.td,{children:"No"}),(0,r.jsx)(t.td,{children:"Output aspect ratio (1:1, 16:9, 9:16, 3:2, 2:3, 4:5, 5:4)"}),(0,r.jsx)(t.td,{children:"match_input_image"})]}),(0,r.jsxs)(t.tr,{children:[(0,r.jsx)(t.td,{children:(0,r.jsx)(t.code,{children:"num_inference_steps"})}),(0,r.jsx)(t.td,{children:"number"}),(0,r.jsx)(t.td,{children:"No"}),(0,r.jsx)(t.td,{children:"Number of denoising steps (1-50)"}),(0,r.jsx)(t.td,{children:"28"})]}),(0,r.jsxs)(t.tr,{children:[(0,r.jsx)(t.td,{children:(0,r.jsx)(t.code,{children:"guidance"})}),(0,r.jsx)(t.td,{children:"number"}),(0,r.jsx)(t.td,{children:"No"}),(0,r.jsx)(t.td,{children:"Guidance scale for prompt adherence (1.0-20.0)"}),(0,r.jsx)(t.td,{children:"3.5"})]}),(0,r.jsxs)(t.tr,{children:[(0,r.jsx)(t.td,{children:(0,r.jsx)(t.code,{children:"seed"})}),(0,r.jsx)(t.td,{children:"number"}),(0,r.jsx)(t.td,{children:"No"}),(0,r.jsx)(t.td,{children:"Random seed for reproducibility (0-4294967295)"}),(0,r.jsx)(t.td,{children:"0"})]}),(0,r.jsxs)(t.tr,{children:[(0,r.jsx)(t.td,{children:(0,r.jsx)(t.code,{children:"output_quality"})}),(0,r.jsx)(t.td,{children:"number"}),(0,r.jsx)(t.td,{children:"No"}),(0,r.jsx)(t.td,{children:"Output quality level (0-100)"}),(0,r.jsx)(t.td,{children:"80"})]}),(0,r.jsxs)(t.tr,{children:[(0,r.jsx)(t.td,{children:(0,r.jsx)(t.code,{children:"disable_safety_checker"})}),(0,r.jsx)(t.td,{children:"boolean"}),(0,r.jsx)(t.td,{children:"No"}),(0,r.jsx)(t.td,{children:"Disable content safety filtering"}),(0,r.jsx)(t.td,{children:"false"})]}),(0,r.jsxs)(t.tr,{children:[(0,r.jsx)(t.td,{children:(0,r.jsx)(t.code,{children:"go_fast"})}),(0,r.jsx)(t.td,{children:"boolean"}),(0,r.jsx)(t.td,{children:"No"}),(0,r.jsx)(t.td,{children:"Enable faster processing with reduced quality"}),(0,r.jsx)(t.td,{children:"false"})]}),(0,r.jsxs)(t.tr,{children:[(0,r.jsx)(t.td,{children:(0,r.jsx)(t.code,{children:"format"})}),(0,r.jsx)(t.td,{children:"string"}),(0,r.jsx)(t.td,{children:"No"}),(0,r.jsx)(t.td,{children:"Output image format (png, jpeg, webp)"}),(0,r.jsx)(t.td,{children:"webp"})]})]})]}),"\n",(0,r.jsx)(t.h2,{id:"code-examples",children:"Code Examples"}),"\n",(0,r.jsxs)(a.A,{children:[(0,r.jsx)(l.A,{value:"curl",label:"cURL",default:!0,children:(0,r.jsx)(d.A,{language:"bash",children:'curl --location \'https://api.1min.ai/api/features\' \\\n--header \'API-KEY: <api-key>\' \\\n--header \'Content-Type: application/json\' \\\n--data \'{\n"type": "IMAGE_EDITOR",\n"model": "black-forest-labs/flux-kontext-dev",\n"promptObject": {\n "imageUrl": "development/images/2025_02_16_15_42_40_711_human.jpg",\n "prompt": "transform into a professional studio portrait with dramatic lighting and elegant composition",\n "aspect_ratio": "match_input_image",\n "num_inference_steps": 28,\n "guidance": 3.5,\n "seed": 0,\n "output_quality": 80,\n "disable_safety_checker": false,\n "go_fast": true,\n "format": "webp"\n}\n}\''})}),(0,r.jsx)(l.A,{value:"javascript",label:"JavaScript",children:(0,r.jsx)(d.A,{language:"javascript",children:"fetch('https://api.1min.ai/api/features', {\nmethod: 'POST',\nheaders: {\n 'Content-Type': 'application/json',\n 'API-KEY': 'YOUR_API_KEY'\n},\nbody: JSON.stringify({\n type: 'IMAGE_EDITOR',\n model: 'flux-kontext-dev',\n promptObject: {\n imageUrl: 'development/images/2025_02_16_15_42_40_711_human.jpg',\n prompt: 'transform into a professional studio portrait with dramatic lighting and elegant composition',\n aspect_ratio: 'match_input_value',\n num_inference_steps: 30,\n guidance: 8.0,\n seed: 12345,\n output_quality: 'high'\n }\n})\n})"})}),(0,r.jsx)(l.A,{value:"python",label:"Python",children:(0,r.jsx)(d.A,{language:"python",children:'import requests\n\nurl = "https://api.1min.ai/api/features"\nheaders = {\n"Content-Type": "application/json",\n"API-KEY": "YOUR_API_KEY"\n}\n\ndata = {\n"type": "IMAGE_EDITOR",\n"model": "black-forest-labs/flux-kontext-dev",\n"promptObject": {\n "imageUrl": "development/images/2025_02_16_15_42_40_711_human.jpg",\n "prompt": "transform into a professional studio portrait with dramatic lighting and elegant composition",\n "aspect_ratio": "match_input_image",\n "num_inference_steps": 28,\n "guidance": 3.5,\n "seed": 0,\n "output_quality": 80,\n "disable_safety_checker": False,\n "go_fast": True,\n "format": "webp"\n}\n}\n\nresponse = requests.post(url, headers=headers, json=data)'})})]}),"\n",(0,r.jsx)(t.h2,{id:"interactive-playground",children:"Interactive Playground"}),"\n",(0,r.jsx)(o.A,{endpoint:"/api/features",method:"POST",baseUrl:"https://api.1min.ai",defaultHeaders:{"API-KEY":"<your-api-key>","Content-Type":"application/json"},defaultBody:{type:"IMAGE_EDITOR",model:"black-forest-labs/flux-kontext-dev",promptObject:{imageUrl:"development/images/2025_02_16_15_42_40_711_human.jpg",prompt:"transform into a professional studio portrait with dramatic lighting and elegant composition",aspect_ratio:"match_input_image",num_inference_steps:28,guid
1ance:3.5,seed:0,output_quality:80,disable_safety_checker:!1,go_fast:!0,format:"webp"}},parameterConfig:[{path:"model",label:"AI Model",type:"select",required:!0,options:[{label:"Flux Kontext Dev",value:"black-forest-labs/flux-kontext-dev"}],getValue:e=>e.model},{path:"promptObject.imageUrl",label:"Image URL",type:"text",required:!0,description:"Path to the source image to be edited",placeholder:"development/images/your_image.jpg",getValue:e=>e.promptObject?.imageUrl},{path:"promptObject.prompt",label:"Prompt",type:"textarea",required:!0,description:"Describe the transformation you want to apply",placeholder:"transform into a professional studio portrait with dramatic lighting and elegant composition",getValue:e=>e.promptObject?.prompt},{path:"promptObject.aspect_ratio",label:"Aspect Ratio",type:"select",required:!1,description:"Output aspect ratio",options:[{label:"Match Input Image",value:"match_input_image"},{label:"1:1 (Square)",value:"1:1"},{label:"16:9 (Widescreen)",value:"16:9"},{label:"9:16 (Portrait)",value:"9:16"},{label:"3:2 (Standard)",value:"3:2"},{label:"2:3 (Portrait)",value:"2:3"},{label:"4:5 (Instagram)",value:"4:5"},{label:"5:4 (Landscape)",value:"5:4"}],getValue:e=>e.promptObject?.aspect_ratio},{path:"promptObject.num_inference_steps",label:"Inference Steps",type:"number",required:!1,description:"Number of denoising steps (1-50)",placeholder:"28",min:1,max:50,getValue:e=>e.promptObject?.num_inference_steps},{path:"promptObject.guidance",label:"Guidance Scale",type:"number",required:!1,description:"Guidance scale for prompt adherence (1.0-20.0)",placeholder:"3.5",min:1,max:20,step:.1,getValue:e=>e.promptObject?.guidance},{path:"promptObject.seed",label:"Seed",type:"number",required:!1,description:"Random seed for reproducibility (0-4294967295)",placeholder:"0",min:0,max:4294967295,getValue:e=>e.promptObject?.seed},{path:"promptObject.output_quality",label:"Output Quality",type:"number",required:!1,description:"Output quality level (0-100)",placeholder:"80",min:0,max:100,getValue:e=>e.promptObject?.output_quality},{path:"promptObject.disable_safety_checker",label:"Disable Safety Checker",type:"select",options:[{label:"false",value:!1},{label:"true",value:!0}],required:!1,description:"Disable content safety filtering",getValue:e=>e.promptObject?.disable_safety_checker},{path:"promptObject.go_fast",label:"Go Fast",type:"select",options:[{label:"false",value:!1},{label:"true",value:!0}],required:!1,description:"Enable faster processing with reduced quality",getValue:e=>e.promptObject?.go_fast},{path:"promptObject.format",label:"Format",type:"select",required:!1,description:"Output image format",options:[{label:"WebP",value:"webp"},{label:"PNG",value:"png"},{label:"JPEG",value:"jpeg"}],getValue:e=>e.promptObject?.format}]}),"\n",(0,r.jsx)(t.h2,{id:"response-format",children:"Response Format"}),"\n",(0,r.jsx)(d.A,{language:"json",children:'{\n"aiRecord": {\n "uuid": "e8e3d645-d5a4-4c18-975b-95395d3b49e1",\n "userId": "c937fbcc-fa8f-4565-a440-c4d87f56fcb2",\n "teamId": "a4e176b2-dabb-451e-9c58-62b451fa9630",\n "model": "black-forest-labs/flux-kontext-dev",\n "type": "IMAGE_EDITOR",\n "status": "SUCCESS",\n "createdAt": "2025-10-24T08:00:44.752Z",\n "aiRecordDetail": {\n "promptObject": {\n "imageUrl": "development/images/2025_02_16_15_42_40_711_human.jpg",\n "prompt": "transform into a professional studio portrait with dramatic lighting and elegant composition",\n "aspect_ratio": "match_input_image",\n "num_inference_steps": 28,\n "guidance": 3.5,\n "seed": 0,\n "output_quality": 80,\n "disable_safety_checker": false,\n "go_fast": true,\n "format": "webp"\n },\n "resultObject": [\n "development/images/2025_10_24_15_00_52_401_480067.png"\n ]\n },\n "temporaryUrl": "https://s3.us-east-1.amazonaws.com/asset.1min.ai/development/images/2025_10_24_15_00_52_401_480067.png?X-Amz-Algorithm=AWS4-HMAC-SHA256..."\n}\n}'}),"\n",(0,r.jsx)(t.h2,{id:"use-cases",children:"Use Cases"}),"\n",(0,r.jsxs)(t.ul,{children:["\n",(0,r.jsxs)(t.li,{children:[(0,r.jsx)(t.strong,{children:"Development & Testing"}),": Fine-tune parameters for optimal results in research environments"]}),"\n",(0,r.jsxs)(t.li,{children:[(0,r.jsx)(t.strong,{children:"Professional Photography"}),": High-quality portrait and commercial photography enhancement"]}),"\n",(0,r.jsxs)(t.li,{children:[(0,r.jsx)(t.strong,{children:"Creative Projects"}),": Artistic transformations with precise control over generation parameters"]}),"\n",(0,r.jsxs)(t.li,{children:[(0,r.jsx)(t.strong,{children:"Content Creation"}),": Platform-optimized imagery with customizable quality levels"]}),"\n",(0,r.jsxs)(t.li,{children:[(0,r.jsx)(t.strong,{children:"Prototyping"}),": Rapid iteration with adjustable inference steps and guidance"]}),"\n"]}),"\n",(0,r.jsx)(t.h2,{id:"tips-for-best-results",children:"Tips for Best Results"}),"\n",(0,r.jsxs)(t.ol,{children:["\n",(0,r.jsxs)(t.li,{children:["\n",(0,r.jsxs)(t.p,{children:[(0,r.jsx)(t.strong,{children:"Parameter Tuning"}),":"]}),"\n",(0,r.jsxs)(t.ul,{children:["\n",(0,r.jsx)(t.li,{children:"Use higher inference steps (30-50) for better quality"}),"\n",(0,r.jsx)(t.li,{children:"Adjust guidance scale (7.5-10.0) for prompt adherence"}),"\n",(0,r.jsx)(t.li,{children:'Set output quality to "high" for final production images'}),"\n"]}),"\n"]}),"\n",(0,r.jsxs)(t.li,{children:["\n",(0,r.jsxs)(t.p,{children:[(0,r.jsx)(t.strong,{children:"Development Workflow"}),":"]}),"\n",(0,r.jsxs)(t.ul,{children:["\n",(0,r.jsx)(t.li,{children:'Start with "draft" quality for quick iterations'}),"\n",(0,r.jsx)(t.li,{children:"Use consistent seeds for reproducible results"}),"\n",(0,r.jsx)(t.li,{children:"Fine-tune guidance for your specific use case"}),"\n"]}),"\n"]}),"\n",(0,r.jsxs)(t.li,{children:["\n",(0,r.jsxs)(t.p,{children:[(0,r.jsx)(t.strong,{children:"Quality Optimization"}),":"]}),"\n",(0,r.jsxs)(t.ul,{children:["\n",(0,r.jsx)(t.li,{children:"Higher inference steps = better quality but slower generation"}),"\n",(0,r.jsx)(t.li,{children:"Standard quality sufficient for most use cases"}),"\n",(0,r.jsx)(t.li,{children:"Use specific aspect ratios for platform requirements"}),"\n"]}),"\n"]}),"\n"]}),"\n",(0,r.jsx)(t.admonition,{title:"Development Focus",type:"info",children:(0,r.jsx)(t.p,{children:"This model provides extensive parameter control ideal for developers and researchers who need fine-grained control over the generation process."})}),"\n",(0,r.jsxs)(t.ul,{children:["\n",(0,r.jsxs)(t.li,{children:[(0,r.jsx)(t.strong,{children:"Creative experimentation"}),": Explore different guidance scales and inference steps for artistic effects"]}),"\n",(0,r.jsxs)(t.li,{children:[(0,r.jsx)(t.strong,{children:"Batch processing"}),": Use consistent seeds for reproducible results across image sets"]}
1),"\n",(0,r.jsxs)(t.li,{children:[(0,r.jsx)(t.strong,{children:"Quality control"}),": Adjust output quality based on speed vs quality requirements"]}),"\n",(0,r.jsxs)(t.li,{children:[(0,r.jsx)(t.strong,{children:"Custom workflows"}),": Integrate precise parameter control into automated image processing pipelines"]}),"\n"]}),"\n",(0,r.jsx)(t.hr,{}),"\n",(0,r.jsx)(t.h2,{id:"tips-for-best-results-1",children:"Tips for Best Results"}),"\n",(0,r.jsxs)(t.ul,{children:["\n",(0,r.jsxs)(t.li,{children:[(0,r.jsx)(t.strong,{children:"Adjust inference steps for quality"}),": Use 30-50 steps for high quality, 15-25 for faster results"]}),"\n",(0,r.jsxs)(t.li,{children:[(0,r.jsx)(t.strong,{children:"Fine-tune guidance scale"}),": Higher values (10-15) for strict prompt adherence, lower (5-8) for creative freedom"]}),"\n",(0,r.jsxs)(t.li,{children:[(0,r.jsx)(t.strong,{children:"Use consistent seeds"}),": Save successful seeds for reproducible results across similar images"]}),"\n",(0,r.jsxs)(t.li,{children:[(0,r.jsx)(t.strong,{children:"Match quality to use case"}),": Use 'high' for final outputs, 'draft' for quick previews"]}),"\n",(0,r.jsxs)(t.li,{children:[(0,r.jsx)(t.strong,{children:"Experiment with aspect ratios"}),": Choose ratios that complement your subject matter"]}),"\n",(0,r.jsxs)(t.li,{children:[(0,r.jsx)(t.strong,{children:"Balance speed vs quality"}),": Lower inference steps and draft quality for rapid iteration"]}),"\n"]})]})}function m(e={}){const{wrapper:t}={...(0,s.R)(),...e.components};return t?(0,r.jsx)(t,{...e,children:(0,r.jsx)(x,{...e})}):x(e)}}}]);
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.