API Documentation · Overview

Ahsant API Documentation

Curl-first reference for Ahsant AI API and Scraper API on one Sneaky Peek AI key. Mint keys at Sneaky Peek AI Account → API Keys.

What is Ahsant?

Ahsant provides web automation, page capture, screenshot rendering, image similarity matching, and single-page AI browser tasks. It offers two products under a unified API key and credit balance:

  • AI API (https://ai.sneakypeekai.com): Page capture, screenshots, image similarity, and AI browser tasks.
  • Scraper API (https://api.sneakypeekai.com): Structured article summaries and stealth screenshots.

Links: Pricing | Examples | llms.txt

Authentication

Pass your API key in the X-API-Key HTTP request header on all calls. Scraper API also accepts api-key.

X-API-Key: $API_KEY

Get an API key from Sneaky Peek AI Account → API Keys.

AI API Endpoints

  • Page Information POST /get_page_info

    Open a public page and get a full capture: page title, final address after redirects, language, description, canonical link, favicon, social preview tags, headings, up to 50 outbound links, full HTML, visible text, a short human-readable summary paragraph, and a full-page screenshot. The screenshot is still returned when the page shows a login screen or cookie banner. Missing fields come back empty rather than null. Query parameters take precedence over body fields when both are set. Send a JSON body (e.g. {}) on POST requests.

  • Web Screenshot POST /get_screenshot

    Capture a full-page screenshot of a public URL as an image. A successful capture always returns the image, including login screens and cookie banners. Query parameters take precedence over body fields when both are set. You may send optional proxy, user_agent, and viewport in the JSON body or as query parameters.

  • Image Similarity POST /image_similarity

    Check whether the first image appears inside the second. Both images must be public PNG or JPEG files up to 5 MB each. You get a yes or no match plus a similarity score and related details. Pass image1_url and image2_url as query parameters with an empty JSON body {}.

  • AI Browser Task POST /ai_task

    Send a page address and a short instruction in plain English. An AI agent works that one page and returns a structured result with a summary, a direct_answer to the question, tips, and warnings. Extra fields may appear when your task asks for them. Expect tens of seconds. url and task MUST be passed in the query string with an empty JSON body {}.

Scraper API Endpoints

  • Page Summary POST /api/summary

    Send a public page address in the JSON body and get a structured brief: title, a human-readable summary paragraph, key points, topics, audience, insights, and related fields. You may also send optional proxy, userAgent, and viewport for that request.

  • Page Screenshot POST /api/ss-screenshot

    Capture a screenshot of a public page. A successful capture always returns the image, including login screens and cookie banners. Choose JPEG or PNG, optionally capture the full scrollable page, and get readable text from the image when available. You may also send optional proxy, userAgent, and viewport. Send the options in the JSON body.

Rate Limits & Quotas

  • Per Key Cap: 5 requests / minute, 100 requests / UTC day across all keyed routes.
  • AI Browser Task Cap: 5 attempts / UTC day per key.
  • Scraper API Concurrency: 1 concurrent job per key.

Frequently Asked Questions

What is Ahsant?

Ahsant provides developer APIs for browser-grade web page capture, screenshots, image similarity comparison, article summaries, and AI browser tasks. Powered by Sneaky Peek AI.

How do I authenticate with the API?

Send your API key in the X-API-Key HTTP request header on every request (Scraper API also accepts api-key). Pass a JSON body with POST calls.

Where do I get an API key?

Keys are minted and managed in your Sneaky Peek AI account UI at https://sneakypeekai.com/account/api-keys. One key authenticates both the AI API and Scraper API.

What does get_page_info do?

POST /get_page_info opens any public page and returns title, HTML, visible text, headings, outbound links, a short human-readable summary, and a full-page screenshot.

What does get_screenshot do?

POST /get_screenshot captures high-resolution full-page screenshots of any public URL as an image, including login screens or cookie dialogs.

What does ai_task do?

POST /ai_task executes natural-language browser instructions on a target page (e.g., 'Describe the page') and returns a structured result with direct_answer, summary, tips, and warnings.

Where is pricing and what are the credit burn rates?

Pricing starts at Free ($0 for 500 starting credits), Starter ($12/mo for 10,000 credits), and Builder ($39/mo for 50,000 credits). Credit costs range from 1 credit for page capture/summary to 3 credits for screenshots and 15 credits for AI browser tasks. Failed calls (HTTP 4xx/5xx) are refunded.

What are the rate limits and quotas?

All keys carry a shared cap of 5 requests per minute and 100 requests per UTC day across both APIs. AI browser tasks have an additional limit of 5 attempts per UTC day. Scraper API limits to 1 concurrent job.