{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/parallel-ai/json-schema/parallel-ai-image-search-response-schema.json",
  "title": "ImageSearchResponse",
  "description": "Image search response.",
  "x-generated": "2026-11-17",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/parallel-ai-images-api-openapi.yml#/components/schemas/ImageSearchResponse",
  "properties": {
    "search_id": {
      "type": "string",
      "title": "Search Id",
      "description": "Search ID. Example: `search_cad0a6d2dec046bd95ae900527d880e7`"
    },
    "session_id": {
      "type": "string",
      "title": "Session Id",
      "description": "Session identifier, echoed back from the request when nonempty; otherwise generated by the server. Pass it to later calls made as part of the same task."
    },
    "results": {
      "items": {
        "$ref": "#/$defs/ImageSearchResult"
      },
      "type": "array",
      "title": "Results",
      "description": "A list of image results, ordered by decreasing relevance."
    },
    "warnings": {
      "anyOf": [
        {
          "items": {
            "$ref": "#/$defs/Warning"
          },
          "type": "array"
        },
        {
          "type": "null"
        }
      ],
      "title": "Warnings",
      "description": "Warnings for the search request, if any."
    },
    "usage": {
      "anyOf": [
        {
          "items": {
            "$ref": "#/$defs/UsageItem"
          },
          "type": "array"
        },
        {
          "type": "null"
        }
      ],
      "title": "Usage",
      "description": "Usage metrics for the search request."
    }
  },
  "type": "object",
  "required": [
    "search_id",
    "session_id",
    "results"
  ],
  "$defs": {
    "ImageSearchResult": {
      "properties": {
        "title": {
          "type": "string",
          "title": "Title",
          "description": "Image title, alt text, or caption."
        },
        "image_url": {
          "type": "string",
          "title": "Image Url",
          "description": "Direct URL of the full-size image."
        },
        "source_page_url": {
          "type": "string",
          "title": "Source Page Url",
          "description": "URL of the page the image appears on, for attribution and context."
        },
        "width": {
          "anyOf": [
            {
              "type": "integer"
            },
            {
              "type": "null"
            }
          ],
          "title": "Width",
          "description": "Image width in pixels, if known."
        },
        "height": {
          "anyOf": [
            {
              "type": "integer"
            },
            {
              "type": "null"
            }
          ],
          "title": "Height",
          "description": "Image height in pixels, if known."
        }
      },
      "type": "object",
      "required": [
        "title",
        "image_url",
        "source_page_url"
      ],
      "title": "ImageSearchResult",
      "description": "A single image search result."
    },
    "UsageItem": {
      "properties": {
        "name": {
          "type": "string",
          "title": "Name",
          "description": "Name of the SKU."
        },
        "count": {
          "type": "integer",
          "title": "Count",
          "description": "Count of the SKU."
        }
      },
      "type": "object",
      "required": [
        "name",
        "count"
      ],
      "title": "UsageItem",
      "description": "Usage item for a single operation."
    },
    "Warning": {
      "properties": {
        "type": {
          "type": "string",
          "enum": [
            "spec_validation_warning",
            "input_validation_warning",
            "warning"
          ],
          "title": "Type",
          "description": "Type of warning. Note that adding new warning types is considered a backward-compatible change."
        },
        "message": {
          "type": "string",
          "title": "Message",
          "description": "Human-readable message."
        },
        "detail": {
          "anyOf": [
            {
              "additionalProperties": true,
              "type": "object"
            },
            {
              "type": "null"
            }
          ],
          "title": "Detail",
          "description": "Optional detail supporting the warning."
        }
      },
      "type": "object",
      "required": [
        "type",
        "message"
      ],
      "title": "Warning",
      "description": "Human-readable message for a task."
    }
  }
}