Skip to main content

Documentation Index

Fetch the complete documentation index at: https://mintlify.com/StarTrail-org/PixelRAG/llms.txt

Use this file to discover all available pages before exploring further.

PixelRAG offers two paths to visual retrieval. The hosted track lets you search a pre-built index of 8.28M Wikipedia pages at api.pixelrag.ai with a single curl command — no installation, no API key. The local track walks you through installing the pipeline, writing a config file, and building a searchable FAISS index from your own PDFs or web pages. Pick the track that fits your goal.
Prefer to follow along in a notebook? Open the interactive demo in Colab — it renders a page, searches the hosted index, and displays the screenshot tiles inline.Open In Colab

Choose your path

The hosted endpoint at api.pixelrag.ai serves a pre-built visual index of all 8.28M English Wikipedia pages. No setup, no API key, and no GPU required — just send a POST request.
1

Send a search query

Submit one or more natural-language queries. The n_docs parameter controls how many results are returned per query.
curl -X POST https://api.pixelrag.ai/search \
  -H "Content-Type: application/json" \
  -d '{"queries": [{"text": "What is the capital of France?"}], "n_docs": 5}'
2

Read the response

The API returns a list of result sets — one per query — each containing ranked hits with a similarity score and the source Wikipedia URL.
{
  "results": [
    {
      "query": "What is the capital of France?",
      "hits": [
        {
          "score": 0.921,
          "url": "https://en.wikipedia.org/wiki/Paris",
          "tile": "https://api.pixelrag.ai/tiles/paris_tile_0.jpg"
        },
        {
          "score": 0.887,
          "url": "https://en.wikipedia.org/wiki/France",
          "tile": "https://api.pixelrag.ai/tiles/france_tile_2.jpg"
        }
      ]
    }
  ]
}
The API also accepts an image as the query for visual search — useful when you have a screenshot or diagram and want to find similar pages. See the API reference for details.

Render pages from Python

The pixelrag_render package exposes a simple Python API for rendering URLs and PDFs to screenshot tiles. render_url returns a list of Path objects pointing to the created tile directories.
from pixelrag_render import render_url

# Render a single URL to JPEG tiles in ./tiles/
tile_dirs = render_url("https://en.wikipedia.org/wiki/Python", "./tiles")

# Each element is a Path to a directory of tile images for that page
for tile_dir in tile_dirs:
    print(tile_dir)
You can tune the rendering with keyword arguments that match the CLI flags:
from pixelrag_render import render_url

tile_dirs = render_url(
    "https://en.wikipedia.org/wiki/Python",
    "./tiles",
    backend="cdp",          # "cdp" (default, fastest) or "playwright"
    tile_height=8192,        # maximum tile height in pixels
    quality=85,              # JPEG quality 1–100
    viewport_width=875,      # browser viewport width in pixels
    workers=1,               # number of parallel browser processes
)
To render multiple URLs in one call, use render_urls instead:
from pixelrag_render import render_urls

urls = [
    "https://en.wikipedia.org/wiki/Python",
    "https://en.wikipedia.org/wiki/Rust_(programming_language)",
]

tile_dirs = render_urls(urls, "./tiles", workers=4)

Next steps

Render documents

Learn all the options for rendering URLs, PDFs, and local files with pixelshot and pixelrag_render.

Build an index

Configure FAISS and Qdrant backends, tune embedding settings, and run multi-GPU index builds.

Search API reference

Full reference for the /search endpoint, query formats, response schema, and image-query visual search.

Build docs developers (and LLMs) love