Skip to main content
Black Forest LabsMediumUltra

FLUX 2 Pro

Professional-grade FLUX 2 with high-quality editing and up to 8 reference image support. Excellent balance of quality, speed, and creative control.

70 credits
per image
Up to 8 reference images supported
High-quality image editing
Ultra-quality generation
Professional-grade output
Excellent prompt understanding

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-pro",
  "input": {
    "prompt": "Luxury perfume bottle on polished marble surface, soft diffused lighting, editorial advertisement quality, shallow depth of field, 8k ultra detailed",
    "image_size": "square_hd",
    "guidance_scale": 3.5
  }
}'

Parameters

ParameterTypeRequiredDefaultDescription
promptstringYes-Text description of the image to generate
input_imagesarrayNo[]List of input images for image-to-image generation. Maximum 8 images. Must be jpeg, png, gif, or webp.
aspect_ratiostringNo1:1Aspect ratio for the generated image. Use 'match_input_image' to match the first input image's aspect ratio.
match_input_imagecustom1:116:93:22:34:55:49:163:44:3
resolutionstringNo1 MPResolution in megapixels. Up to 4 MP is possible, but 2 MP or below is recommended. The maximum image size is 2048x2048, which means that high-resolution images may not respect the resolution if aspect ratio is not 1:1. Resolution is not used when aspect_ratio is 'custom'. When aspect_ratio is 'match_input_image', use 'match_input_image' to match the input image's resolution (clamped to 0.5-4 MP).
match_input_image0.5 MP1 MP2 MP4 MP
widthintegerNo-Width of the generated image. Only used when aspect_ratio=custom. Must be a multiple of 16 (if it's not, it will be rounded to nearest multiple of 16).
heightintegerNo-Height of the generated image. Only used when aspect_ratio=custom. Must be a multiple of 16 (if it's not, it will be rounded to nearest multiple of 16).
safety_toleranceintegerNo2Content safety level (1-6)
seedintegerNo-Random seed for reproducibility
output_formatstringNowebpFormat of the output images.
webpjpgpng
output_qualityintegerNo80Quality when saving the output images, from 0 to 100. 100 is best quality, 0 is lowest quality. Not relevant for .png outputs

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-pro" \
  -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-pro",
  "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

Premium Product Shot

Generate high-end product photography

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-pro",
  "input": {
    "prompt": "Luxury perfume bottle on polished marble surface, soft diffused lighting, editorial advertisement quality, shallow depth of field, 8k ultra detailed",
    "image_size": "square_hd",
    "guidance_scale": 3.5
  }
}'

Tips & Best Practices

1Use reference images to guide the style and composition
2Ideal for commercial projects requiring ultra-quality output
3Adjust guidance_scale for more creative or more faithful results
4Combine with safety_tolerance for content control in production

Use Cases

Commercial advertising campaigns
Professional product photography
High-end image editing
Brand visual creation
Print-quality imagery

Model Info

ProviderBlack Forest Labs
Version-
CategoryImage Generation
Price70 credits

API Endpoint

POST /v1/predictions
Try in ConsoleBack to Docs