Skip to main content

Image Generation

Generate images from text prompts using models like FLUX.1, FLUX.2, and others.

Endpoint

POST https://api.runcrate.ai/v1/images/generations

Basic Usage

curl https://api.runcrate.ai/v1/images/generations \
  -H "Content-Type: application/json" \
  -H "Authorization: Bearer rc_live_YOUR_API_KEY" \
  -d '{
    "model": "black-forest-labs/FLUX.1-schnell",
    "prompt": "A futuristic cityscape at sunset, cyberpunk style",
    "aspect_ratio": "16:9"
  }'

Parameters

Parameters vary by model. Common parameters include:
ParameterTypeDescription
modelstringModel ID (required)
promptstringText description of the image (required)
aspect_ratiostringOutput ratio: 1:1, 16:9, 9:16, 4:3, 3:2, etc.
num_inference_stepsintegerNumber of diffusion steps (higher = more detail, slower)
guidancenumberHow closely to follow the prompt
seedintegerReproducibility seed (omit for random)
negative_promptstringWhat to avoid in the image

Model-Specific Parameters

Some models support additional inputs:
  • FLUX Kontext models: Accept input_image for image editing
  • FLUX Canny: Requires control_image for edge-guided generation
  • 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.

Response

{
  "data": [
    {
      "url": "https://...",
      "b64_json": "..."
    }
  ]
}
The response includes either a url to the generated image or b64_json base64-encoded image data.

Available Image Models

ModelSpeedQualityNotes
FLUX.1 SchnellFastGoodBest for rapid prototyping
FLUX.1 DevMediumHighOpen-weights, img2img support
FLUX.1 ProMediumVery HighProduction-grade
FLUX.1.1 ProMediumVery HighUpdated Pro model
FLUX.2 ProMediumHighestUp to 4MP, multi-reference
FLUX KontextMediumHighImage editing and generation