Generator

Menu

AI GeneratorImages, video, audio and 3D

Browse categories

Docs menu
Search

API reference

Search

One search over every public source, with comparable scores and what generating instead would cost.

View as Markdown
For your agent https://imgsearch.com/llms.txt
On this page
GET /previews/{token}

Open a search result's preview #

  • previews.show
  • No key needed

A 1-hour link from a search card. It redirects to the small preview the website shows (watermarked where the website watermarks); for your own generations, which have no public page, it is a 10-minute link that answers the 384-pixel thumbnail itself. A preview grants no usage rights; download the file for that.

Parameters

NameInTypeDescription
tokenrequired path string

Responses

  • 200 An own generation's thumbnail.
  • 302 The preview.
  • Error Error envelope (error codes)

Examples

curl
# Opens a search result's preview_url without following it. A preview grants no usage rights.
# Needs LINK_URL.
curl -sS -o /dev/null -w '%{http_code} %{redirect_url}\n' \
  "$LINK_URL"
Python
# Opens a search result's preview_url without following it. A preview grants no usage rights.
# Needs LINK_URL.
import os

import httpx

r = httpx.get(os.environ["LINK_URL"], timeout=60)
print(r.status_code, r.headers.get("location") or r.headers.get("content-type"))
JavaScript
// Opens a search result's preview_url without following it. A preview grants no usage rights.
// Needs LINK_URL.

const r = await fetch(process.env.LINK_URL, { redirect: "manual" });
console.log(r.status, r.headers.get("location") ?? r.headers.get("content-type"));