Black Friday: double credits on your first month, any plan · ends Sunday, Nov 29Cyber Monday extension: double credits on your first month, any plan · ends tonightBlack Friday: 2x creditsCyber Monday: 2x creditsSee plans
ScraperCity logo

AI Image Generator API Documentation

AI Image Generator

Turn up to 200 prompts a run into images (FLUX.1-schnell on our own GPUs), 1 to 4 images per prompt. The download is one .zip with every image and a results.csv.

$0.0038 per image up to about 1.1 megapixels (a bigger image counts as 2), minimum charge $0.052 a runPOST /api/v1/scrape/ai-image-generator

Parameters

NameTypeRequiredDescription
promptsstring[]RequiredOne image prompt each, up to 200 a run, up to 2,000 characters eachExample: ["A modern dental clinic waiting room, natural light, photo"]
widthnumberOptionalImage width in pixelsDefault: 1024Example: 1024
heightnumberOptionalImage height in pixelsDefault: 1024Example: 1024
num_imagesnumberOptionalImages per prompt, 1 to 4Default: 1Example: 1
formatstringOptionaljpg, png or webpDefault: jpgExample: jpg

Examples

Images for a list of prompts

curl -X POST https://app.scrapercity.com/api/v1/scrape/ai-image-generator \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "prompts": ["A modern dental clinic waiting room, natural light, photo", "A roofer on a sunny suburban roof, photo"],
    "num_images": 2
  }'

Check status and download

curl -X GET https://app.scrapercity.com/api/v1/scrape/status/{runId} \
  -H "Authorization: Bearer YOUR_API_KEY"

# When status is SUCCEEDED, download the images (.zip); add ?format=csv for the results table alone
curl -L https://app.scrapercity.com/api/downloads/{runId} -o images.zip

Use Cases

  • •Images for ads, landing pages and social posts in bulk
  • •A picture for each personalized email or landing page
  • •Product and blog images without a stock photo subscription

Best Practices

  • •Charged only for images made; prompts that fail or are not allowed are in results.csv and not charged
  • •results.csv columns: id, prompt, status, files, width, height, seeds, num_images, error

Every scrape returns a runId. Poll GET /api/v1/scrape/status/{runId} until it completes, then download via GET /api/downloads/{runId}?format=csv.

Authenticate every request with Authorization: Bearer YOUR_API_KEY. See the full API reference for authentication, rate limits and error codes.