Generator

Menu

AI GeneratorImages, video, audio and 3D

Browse categories

Docs menu
Overview

Start

Overview

What the ImgSearch API and MCP server do, the three ways in, and the order every agent follows.

View as Markdown
For your agent https://imgsearch.com/llms.txt
On this page

What the API is #

ImgSearch is a library of photos, SVG illustrations and packs, brand logos, sound effects, 3D models and videos, with an AI Generator for what the library lacks. The API lets your code and your agents use both:

  • Search every source at once, with scores that mean roughly the same across sources, and with what generating instead would cost.
  • Download what fits, under the same fair use as the website. Files you already downloaded are free to fetch again.
  • Generate with the AI Generator when nothing fits: images, videos, voiceovers, memes, music, 3D models and SVGs, at the website’s prices, in US dollars.

It also lists your own generations, your AI balance and its history, and sends events to your webhooks.

Three ways in #

  • The REST API with an API key: for your scripts, servers and agents. Start with the quickstart.
  • The MCP server at https://imgsearch.com/mcp: for AI tools such as Claude Code, Codex and Cursor. The person signs in once and the tool gets its own token. See MCP.
  • llms.txt at https://imgsearch.com/llms.txt: a short Markdown file that tells an agent what ImgSearch is, how to call it and the order to follow. Point your agent at it, or paste the AGENTS snippet into your project.

The order #

Every guide and every agent text uses the same four steps:

  1. Search first. For any need for an image, illustration, icon, video, sound, music, voice or 3D model, search once per distinct need, in the user’s own generations and the ImgSearch library. Searching is free.
  2. Inspect. Read each result’s description, size and license, and its band where one is given: strong usually fits when the description shows what was asked for; possible needs a closer look. Prefer results the user made or already owns, which cost nothing. If a search says it is incomplete, search again before deciding.
  3. Reuse if one fits. Download only the items you chose.
  4. Generate only if nothing fits, and only where generating is offered. Check the estimate first and stay within the most the user allowed; ask the user before going higher. If a request is refused for its content, tell the user; do not rephrase or retry it.

The search first guide explains each step.

Basics #

  • Base URL https://imgsearch.com/api/v2, version 2.0.0. Every answer carries ImgSearch-Api-Version.
  • Send Authorization: Bearer <key> on every call but the public ones (the index, status, models, licenses and the OpenAPI document).
  • JSON in and out, except uploads (multipart), files, redirects and the YAML spec. Every answer carries an X-Request-Id header; send your own (letters, digits, ., _, :, -, up to 128 characters) to trace a call.
  • Every error has one envelope with a code: see errors.
  • Lists page with next_cursor, at most 100 items a page.
  • The OpenAPI document is at https://imgsearch.com/api/v2/openapi.yaml and https://imgsearch.com/api/v2/openapi.json.
  • Changes within v2 only add. The changelog lists them.

Where to go next #