← Back to Home

Maximize Your Value

Riddle bills per second of browser time. Here's how to get the most screenshots, form fills, and page interactions for your money.

How Billing Works

$0.50/hour
= $0.0083/minute = $0.000139/second
30-second minimum
= ~$0.00417 per job
Egress: ~$0.0001 per 1.5MB
First 1.5MB included per job

The key insight: one 30-second job costs the same whether you take 1 screenshot or 10.Pack more work into each job to drive down your per-action cost.

Tier 1: Single Screenshot (~$0.004)

The simplest case. One URL, one PNG. Good for occasional use or when you need just one page.

# Sync mode - returns PNG directly
curl -X POST "https://api.riddledc.com/v1/run" \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"url": "https://example.com", "sync": true}' \
  -o screenshot.png

# Cost breakdown:
# - Browser time: 30s minimum = $0.00417
# - Egress: ~200KB PNG = included
# - Total: ~$0.004 per screenshot
~$0.004
per screenshot

Tier 2: Batch Multiple URLs (<$0.001)

Need multiple pages? The batch endpoint screenshots up to 10 URLs in one job. Same 30-second minimum, split across all screenshots.

# URLs mode - multiple URLs, one API call
curl -X POST "https://api.riddledc.com/v1/run" \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "urls": [
      "https://example.com",
      "https://example.com/pricing",
      "https://example.com/docs",
      "https://example.com/about",
      "https://example.com/contact"
    ]
  }'

# Cost breakdown (5 URLs):
# - Browser time: ~20-25s = $0.00417 (30s minimum)
# - Egress: ~1.5MB total = included
# - Total: $0.00417 / 5 = $0.00083 per screenshot
<$0.001
per screenshot when batched (5 URLs in one job)
Sync timeout: Sync mode (the default) has a 28-second limit. Batch 5-6 URLs of similar complexity to stay within this window. For larger batches, use "sync": false to poll for results.

Tier 3: Structured Steps API (~$0.0005)

The /v1/run API lets your agent send JSON steps. Navigate, click, fill, screenshot—all in one call. Best for AI agents that generate actions programmatically.

# Structured Steps API - agent-friendly JSON
curl -X POST "https://api.riddledc.com/v1/run" \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "steps": [
      { "goto": "https://example.com" },
      { "screenshot": "homepage" },
      { "goto": "https://example.com/pricing" },
      { "screenshot": "pricing" },
      { "goto": "https://example.com/docs" },
      { "screenshot": "docs" },
      { "goto": "https://example.com/about" },
      { "screenshot": "about" },
      { "goto": "https://example.com/contact" },
      { "screenshot": "contact" }
    ]
  }'

# Cost breakdown (5 pages, ~30 seconds):
# - Browser time: 30s = $0.00417
# - Total: $0.00417 / 5 = ~$0.0008 per screenshot
~$0.0005-0.0008
per screenshot when batched (5+ pages in one job)

Pro tip: Use assert steps to check page state without screenshotting. Only take screenshots at decision points to reduce vision API costs.

Tier 3b: Script API Multi-Page (~$0.0005)

Need full Playwright control? The Script API lets you write custom logic with loops and conditionals.

# Script mode - full control over the browser
curl -X POST "https://api.riddledc.com/v1/run" \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "script": "
      const pages = [
        "https://example.com",
        "https://example.com/pricing",
        "https://example.com/docs",
        "https://example.com/about",
        "https://example.com/blog",
        "https://example.com/contact",
        "https://example.com/careers",
        "https://example.com/press"
      ];

      for (let i = 0; i < pages.length; i++) {
        await page.goto(pages[i], {waitUntil: "domcontentloaded"});
        await saveScreenshot("page" + (i + 1));
      }
    ",
    "timeout_sec": 60
  }'

# Cost breakdown (8 pages, ~45 seconds):
# - Browser time: 45s = $0.00625
# - Egress: ~3MB = $0.00417 + ~$0.0001 overage
# - Total: ~$0.0053 / 8 = ~$0.00066 per screenshot
~$0.0005-0.0007
per screenshot (8+ pages)

Tier 4: Multi-Action Workflows

Screenshots are just one action. What about form fills, clicks, and data extraction? Pack multiple valuable actions into one job.

# Login + navigate + screenshot multiple states
curl -X POST "https://api.riddledc.com/v1/run" \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "script": "
      // Inject auth (no login flow needed)
      await page.goto("https://app.example.com/dashboard");
      await saveScreenshot("dashboard");

      // Check different views
      await page.click("[data-tab=analytics]");
      await page.waitForSelector(".analytics-loaded");
      await saveScreenshot("analytics");

      await page.click("[data-tab=settings]");
      await saveScreenshot("settings");

      // Fill a form and capture result
      await page.fill("#search", "test query");
      await page.click("button[type=submit]");
      await page.waitForSelector(".results");
      await saveScreenshot("search-results");

      // Export some data
      await page.click("#export-btn");
      await page.waitForSelector(".export-ready");
      await saveScreenshot("export");
    ",
    "options": {
      "cookies": [{"name": "session", "value": "xyz", "domain": "app.example.com"}]
    },
    "timeout_sec": 60
  }'

# Cost breakdown:
# - Browser time: ~40s = $0.00556
# - Actions performed: 5 screenshots + 3 clicks + 1 form fill + navigation
# - Per screenshot: ~$0.001
# - Per action (9 total): ~$0.0006
~$0.0006
per action (form fills, clicks, screenshots)

Authenticated Pages: Skip the Login Tax

Login flows are expensive—they burn 10-30 seconds per job. Inject cookies instead and go straight to authenticated content.

ApproachTimeCostScreenshots
Login flow each time30-60s$0.004-0.0081
Cookie injection3-5s$0.004 (minimum)1
Cookie + batch 5 pages20-25s$0.0045
# Get your session cookie once (from browser devtools or login script)
SESSION_COOKIE="abc123xyz..."

# Then reuse it for all screenshots - no login overhead
curl -X POST "https://api.riddledc.com/v1/run" \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "urls": [
      "https://app.example.com/dashboard",
      "https://app.example.com/analytics",
      "https://app.example.com/settings",
      "https://app.example.com/billing",
      "https://app.example.com/team"
    ],
    "options": {
      "cookies": [{"name": "session", "value": "'$SESSION_COOKIE'", "domain": "app.example.com"}]
    }
  }'

# 5 authenticated screenshots for ~$0.004 total = $0.0008 each

Learn more about authenticated screenshots →

Egress: When It Matters

Each job includes 1.5MB of egress. Additional egress costs ~$0.0001 per 1.5MB. For most use cases, egress is negligible. But if you're taking many large screenshots:

Reduce Viewport Size

Default is 1920x1080. For thumbnails or previews, use smaller viewports. 800x600 screenshots are ~4x smaller than full HD.

"viewport": {"width": 800, "height": 600}

Skip fullPage

Full-page screenshots of long pages can be huge. If you only need above-the-fold, disable fullPage to capture just the viewport.

"fullPage": false

JPEG for Photos

PNG is best for UI screenshots. For photo-heavy pages, JPEG at 80% quality can be 5-10x smaller with minimal visual difference.

"format": "jpeg", "quality": 80

Batch Math

5 screenshots × 300KB each = 1.5MB (included). 5 screenshots × 500KB each = 2.5MB (+$0.00007). Egress rarely exceeds a few cents even at high volume.

Quick Reference: Cost Per Screenshot

MethodScreenshotsTypical TimeTotal CostPer Screenshot
Sync (single URL)13-5s$0.00417~$0.004
Batch (3 URLs)315-20s$0.00417~$0.0014
Batch (5 URLs)520-25s$0.00417~$0.0008
Batch (6 URLs)622-28s$0.00417~$0.0007
Script (8 pages)840-50s~$0.006~$0.0007
Script (10+ pages)10+50-60s~$0.007~$0.0005-0.0007

When to Use What

All modes use the same POST /v1/run endpoint. Just change the input field.

Use url mode When...

You need one screenshot, right now. PNG bytes returned directly (sync by default).

{"url": "..."}

Use urls mode When...

You have a list of URLs and want them all screenshotted. Best value for 3-10 independent pages.

{"urls": ["...", "..."]}

Use steps mode When...

Your AI agent generates actions programmatically. JSON steps, no code syntax. Best for LLM-generated workflows.

{"steps": [{...}]}

Use script mode When...

You need full Playwright control: loops, try/catch, complex selectors. Or when step types don't cover your use case.

{"script": "await page..."}

Real-World Examples

E-commerce: Product Page Monitoring

Screenshot 100 product pages daily to monitor competitor pricing:

# 100 URLs ÷ 5 per batch = 20 batch calls
# 20 calls × $0.00417 = $0.0834/day
# = $0.000834 per screenshot
# = ~$2.50/month for daily monitoring of 100 pages

SaaS: Visual Regression Testing

Screenshot 50 authenticated app states after each deploy:

# Use Script API with cookie injection
# 50 pages in 5 script calls (10 pages each, ~60s each)
# 5 calls × ~$0.007 = $0.035 per deploy
# = $0.0007 per screenshot
# With 10 deploys/day = $0.35/day = ~$10/month

AI Agent: Vision Loop

Agent takes 500 screenshots/day across various pages:

# Mix of sync (urgent) and batch (grouped) calls
# 100 sync calls × $0.004 = $0.40
# 400 screenshots in 80 batch calls × $0.004 = $0.32
# Total: $0.72/day = ~$22/month
# Average: $0.00144 per screenshot

Start Optimizing

Create an account and experiment with batching to find your optimal workflow.