---
title: "Reverse image search (paid, agent rail)"
method: POST
path: "/v1/agent/reverse-search"
tags: ["Agent payments"]
---

# Reverse image search (paid, agent rail)

`POST /v1/agent/reverse-search`

## Request

- Base URL: `https://api.memestack.ai`
- URL: `https://api.memestack.ai/v1/agent/reverse-search`
- Auth: none declared

Phash-based reverse image search over the approved catalog. PAID endpoint (agent payment rails — no account needed; the payment is the auth). Attach proof via PAYMENT-SIGNATURE or X-PAYMENT header (base64 JSON x402 payload, USDC on Base) or Authorization: L402 <macaroon>:<preimage> (Lightning sats). Without proof the response is 402 with a dual-rail offer. Rate limited 30/min/IP. Returns 404 while payments are disabled. Price: $0.02 per call (paid in sats over Lightning at the current BTC/USD rate, or in USDC on Base). Same SSRF hardening and input rules as /v1/images/reverse-search.

## Request body

- object
  - `image_url` string, required: HTTPS URL or data:image/...;base64,... URL of the query image.
  - `content` 'safe' | 'all': Safe by default: 'safe' (the default) excludes matches classified controversial; 'all' includes them, each carrying controversial: true. Case-insensitive; any other value is 400 INVALID_CONTENT, answered before any payment is read.

## Response `200`

Visually similar approved images (nearest first) + input metadata.

## Other responses

- `400`: Invalid URL/body or malformed payment header.
- `402`: Payment required. Body is the x402 v2 PaymentRequired envelope; the same envelope is base64-encoded in the PAYMENT-REQUIRED header, and WWW-Authenticate carries the L402 challenge (macaroon + bolt11 invoice). Pay on either rail and retry with proof.
- `429`: Rate limit exceeded (30/min/IP).
- `503`: Payment rails temporarily unavailable.

---

[API](https://skmtc.dev/memestack/apis/memestack-api.md) · [All operations](https://skmtc.dev/memestack/apis/memestack-api/llms.txt) · [OpenAPI document](https://skmtc.dev/memestack/apis/memestack-api/revisions/9d3a19565f75?raw)
