Skip to main content

Image Generation

Generate images from text prompts. Quality tiers, aspect ratios, negative prompts, and batch generation.

FairStack offers 39 image models. This guide covers the key concepts.

Basic image generation

curl -X POST https://api.fairstack.ai/v1/generations/image \
  -H "Authorization: Bearer $FAIRSTACK_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"model": "z-image-turbo", "input": {"prompt": "A serene mountain lake"}}'

Quality tiers

TierExample ModelPriceBest For
StandardFLUX.2$0.03/imageMarketing, social media
PremiumNano Banana Pro$0.1608/imageProfessional, print quality
Low-costZ-Image Turbo$0.0048/imagePrototyping, bulk generation

Aspect ratios

Most models support multiple aspect ratios: 1:1, 4:3, 16:9, 9:16, and more. Specify via the aspect_ratio or image_size parameter.

Negative prompts

Some models support negative prompts to exclude unwanted elements:

{
  "model": "seedream-4.5-t2i",
  "input": {
    "prompt": "A portrait photo, professional lighting",
    "negative_prompt": "blurry, low quality, watermark"
  }
}

Image editing

Upload a source image and describe what to change:

{
  "model": "flux-kontext-pro",
  "input": {
    "prompt": "Change the background to a beach",
    "image_url": "https://example.com/photo.jpg"
  }
}

Next steps