Skip to main content
Black Forest LabsMediumHigh

FLUX.2 Dev

Development version of FLUX.2 with image editing capabilities and reference image support. Ideal for iterative design workflows and experimentation.

25 credits
per image
Image editing capabilities
Reference image support
Balanced speed and quality
Great for iterative workflows
Cost-effective for development

Use with AI Assistant

Copy usage instructions for Claude, ChatGPT, or other AI

llms.txt

Quick Start

curl -X POST "https://api.core.today/v1/predictions" \
  -H "Content-Type: application/json" \
  -H "X-API-Key: cdt_your_api_key" \
  -d '{
  "model": "black-forest-labs/flux-2-dev",
  "input": {
    "prompt": "A cozy reading nook with warm lighting, vintage armchair, floor-to-ceiling bookshelves, photorealistic interior design",
    "image_size": "landscape_4_3",
    "num_inference_steps": 28,
    "guidance_scale": 3.5
  }
}'

Parameters

ParameterTypeRequiredDefaultDescription
promptstringYes-Text description of the image to generate
input_imagesarrayNo-Input images for image-to-image generation (max 4)
go_fastbooleanNo-Run faster predictions with additional optimizations
aspect_ratiostringNo1:1Aspect ratio for the generated image (use 'match_input_image' to match input)
1:116:99:164:33:4match_input_imagecustom
seedintegerNo-Random seed for reproducibility
output_formatstringNojpgFormat of the output images
pngjpgwebp
output_qualityintegerNo80Quality of output images (0-100)

How to Provide File Input

There are 3 ways to provide files for the input_images parameter:

Recommended

Direct Upload (Multipart)

Attach files directly to POST /v1/predictions/upload. No separate upload step needed.

curl -X POST "https://api.core.today/v1/predictions/upload" \
  -H "X-API-Key: cdt_your_api_key" \
  -F "model=black-forest-labs/flux-2-dev" \
  -F 'input={"prompt":"your prompt here"}' \
  -F "file:input_images=@your_file.png"

Image URL

Pass a publicly accessible URL directly. You can also use file_url from the Storage API.

{
  "model": "black-forest-labs/flux-2-dev",
  "input": {
    "prompt": "your prompt here",
    "input_images": ["https://example.com/image.jpg"]
  }
}
See the File Upload docs for more upload methods including Presigned URLs.

Common Parameters

Common parameters used when calling POST /v1/predictions.

ParameterTypeRequiredDefaultDescription
modelstringYes-Model identifier
inputobjectYes-Object containing the model-specific parameters from the table above
output_folderstringNo-Folder path for output files (max 256 chars, '..' not allowed)
webhook_urlstringNo-Webhook URL to call on completion
is_publicbooleanNofalseIf true, output files are also available via permanent public URLs

Examples

Reference-based Generation

Generate an image guided by a reference

curl -X POST "https://api.core.today/v1/predictions" \
  -H "Content-Type: application/json" \
  -H "X-API-Key: cdt_your_api_key" \
  -d '{
  "model": "black-forest-labs/flux-2-dev",
  "input": {
    "prompt": "A cozy reading nook with warm lighting, vintage armchair, floor-to-ceiling bookshelves, photorealistic interior design",
    "image_size": "landscape_4_3",
    "num_inference_steps": 28,
    "guidance_scale": 3.5
  }
}'

Tips & Best Practices

1Provide a reference image URL to guide the style of generation
2Use guidance_scale to control how closely the output follows your prompt
3Great for testing before upgrading to FLUX 2 Pro
4Combine reference images with detailed prompts for best editing results

Use Cases

Image editing and modification
Style transfer using reference images
Development and testing workflows
Iterative design prototyping