DEVELOPER API REFERENCE

Programmatic access to Sniper Scraper, AI Generation, and Deep Vision.

Authentication & Limits

Authentication

Authenticate requests via Header or Query Parameter.

X-API-Key: YOUR_API_KEY

Rate Limits

Standard Tier: 20 requests/day

Burst Limit: 60 requests/minute

Response Format

All endpoints return JSON.

Success is indicated by "success": true.

POST /api/scrape Async

Initialize a scraping mission. Supports both Deep Dive (crawl) and Sniper (precision) modes.

Request Body

{
  "url": "https://example.com/gallery",
  "sniper_mode": true,          // true = Current page only (High precision)
                                // false = Crawl mode (Follow links)
  
  // Extraction Filters
  "max_files": 10,              // Limit assets retrieved
  "min_size_kb": 10,            // Filter small icons/thumbnails
  "keyword_filter": "portrait", // Only download URLs containing string
  
  // Media Types
  "download_videos": true,      // Extract .mp4, .mov, etc.
  "download_docs": false,       // Extract .pdf, .zip, etc.
  
  // Intelligence
  "ai_labeling": true,          // Use Vision AI to analyze/rename files
  "crawl_depth": 0,             // 0-2 (Only used if sniper_mode is false)
  
  "force": false                // Bypass cache
}

Response

{
  "success": true,
  "status": "queued",
  "job_id": 1024,
  "message": "Job queued successfully",
  "poll_url": "/api/jobs/1024"
}
GET /api/jobs/{job_id}

Poll this endpoint to check the status of a Scraping or AI Generation job.

Response

{
  "success": true,
  "status": "completed", // queued, processing, completed, failed
  "job_id": 1024,
  "assets": {
    "count": 5,
    "items": [
      {
        "id": 501,
        "filename": "labeled_sunset_beach_a1b2.jpg",
        "url": "https://example.com/img.jpg",
        "type": "image",
        "size": 1048576,
        "ai_label": "Sunset, Ocean, Horizon", // If ai_labeling was true
        "ai_confidence": 0.98,
        "download_url": "/files/1024/labeled_sunset_beach_a1b2.jpg"
      }
    ]
  }
}
POST /api/replace/generate Async

Generate images using Gemini/Imagen AI based on text prompts.

Request Body

{
  "description": "Futuristic cyberpunk street food stall",
  "style": "cinematic",         // professional, cinematic, minimalist, cyberpunk
  "orientation": "landscape",   // landscape, portrait, square
  "count": 2,                   // Number of variations (1-4)
  "user_gemini_key": "..."      // Optional: Use your own key for higher limits
}

Response

{
  "success": true,
  "job_id": 1025,
  "status": "queued",
  "poll_url": "/api/jobs/1025"
}
POST /api/replace/batch Async

Process multiple descriptions in parallel.

Request Body

{
  "descriptions": [
    "A red apple on a wooden table",
    "A blue car driving in the rain"
  ],
  "style": "photorealistic"
}
GET /download/{job_id}

Download all assets from a completed job as a ZIP archive.

GET /files/{job_id}/{filename}

Direct access to a specific file processed by the system.