Skip to main content
Generate images from text prompts using FLUX.1, FLUX.2, Stable Diffusion, and Ideogram through a single API. One API key, one endpoint, seven models: no GPU management.

Available models


Basic text-to-image


Image editing with FLUX Kontext

FLUX Kontext models accept an existing image and a text instruction describing the edit. Pass a file path, URL, or base64 string as the image parameter.
The image field accepts three formats:
  • File path: "./photo.png" (auto-detected, read and base64-encoded)
  • URL: "https://..." (passed through as-is)
  • Base64 string: raw base64 data (passed through as-is)

Batch generation: product catalog

Generate a full set of product images in one script. This example creates hero images for an e-commerce catalog:
For higher throughput, run generations in parallel:

Parameters reference

Parameters vary by model. These are the most common:

Model-specific parameters

  • FLUX Kontext models: Accept image for image editing
  • FLUX.2 Pro: Accepts up to 8 input_images for reference-based generation
  • FLUX Dev/Krea: Accept image for img2img mode with prompt_strength control
Check the Playground to see the exact parameters available for each model.

Next.js API route

Add image generation to a web app with a single API route:
Call it from the frontend:

Response format

All image generation requests return the same shape:
The response includes either a url to the generated image or b64_json base64-encoded image data. The Runcrate SDKs provide a .save() helper that handles both formats automatically.

Pricing

Image generation pricing varies by model. Higher-quality models like FLUX.2 Pro cost more per generation than FLUX.1 Schnell. Check the live model pricing page or the Model Catalog for current per-model pricing.