Image Generation

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

FairStack offers 142 image models ranging from $0.003 to $0.06 per image. 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", "prompt": "A serene mountain lake"}'

Quality tiers

TierExample ModelPriceBest For
BudgetZ-Image Turbo$0.004Prototyping, bulk generation
StandardFLUX.1 Ultra$0.025Marketing, social media
PremiumImagen 4 Ultra$0.06Professional, print quality

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-v4-t2i",
  "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-dev",
  "prompt": "Change the background to a beach",
  "image": "https://example.com/photo.jpg"
}

Next steps