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.

28 credits
per image (tiered by go_fast and custom size; input images billed per image)
Image editing capabilities
Reference image support
Balanced speed and quality
Great for iterative workflows
Cost-effective for development

Run it right now

Test this model instantly in the Console Playground โ€” no code required

Sign in to try

Use with AI Assistant

Copy usage instructions for Claude, ChatGPT, or other AI

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",
    "aspect_ratio": "4:3"
  }
}'

Parameters

ParameterTypeRequiredDefaultDescription
promptstringYes-Text description of the image to generate
input_imagesarrayNo[]Input images for image-to-image generation (max 4)
go_fastbooleanNotrueRun faster predictions with additional optimizations
aspect_ratiostringNo1:1Aspect ratio for the generated image (use 'match_input_image' to match input)
match_input_imagecustom1:116:93:22:34:55:49:163:44:3
widthintegerNo-Width of the generated image in text-to-image mode. Only used when aspect_ratio=custom. Must be a multiple of 32 (if it's not, it will be rounded to nearest multiple of 32).
heightintegerNo-Height of the generated image in text-to-image mode. Only used when aspect_ratio=custom. Must be a multiple of 32 (if it's not, it will be rounded to nearest multiple of 32).
seedintegerNo-Random seed for reproducibility
output_formatstringNowebpFormat of the output images
webpjpgpng
output_qualityintegerNo80Quality of output images (0-100)
disable_safety_checkerbooleanNofalseDisable safety checker for generated images.

How to Provide File Input

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

Recommended

Image URL

Pass a publicly accessible URL directly. With the Storage API (POST /v1/files/upload-url) the file uploads straight to S3 (50MB per file) and you pass the returned file_url.

{
  "model": "black-forest-labs/flux-2-dev",
  "input": {
    "prompt": "your prompt here",
    "input_images": ["https://example.com/image.jpg"]
  }
}

Direct Upload (Multipart)

Attach files directly to POST /v1/predictions/upload. No separate upload step, but the bytes pass through the API server so the whole request is capped at 10MB.

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"
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",
    "aspect_ratio": "4:3"
  }
}'

Tips & Best Practices

1Provide a reference image URL to guide the style of generation
2Turn go_fast off for the highest-fidelity render; leave it on for drafts
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

Model Info

ProviderBlack Forest Labs
Version-
CategoryImage Generation
Price28 credits

API Endpoint

POST /v1/predictions
Try in ConsoleBack to Docs