{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/octen-ai/json-schema/octen-ai-image-search-response-schema.json",
  "title": "ImageSearchResponse",
  "x-generated": "2026-11-10",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/octen-ai-image-search-api-openapi.yml#/components/schemas/ImageSearchResponse",
  "type": "object",
  "properties": {
    "code": {
      "type": "integer",
      "description": "Business status code. 0 indicates success."
    },
    "msg": {
      "type": "string",
      "description": "A message describing the result."
    },
    "request_id": {
      "type": "string",
      "description": "The unique identifier for this request."
    },
    "data": {
      "$ref": "#/$defs/ImageSearchData"
    },
    "meta": {
      "$ref": "#/$defs/ImageSearchMeta"
    }
  },
  "$defs": {
    "ImageSearchData": {
      "type": "object",
      "description": "The main response payload.",
      "properties": {
        "results": {
          "type": "array",
          "description": "A list of image search results.",
          "items": {
            "$ref": "#/$defs/ImageSearchResult"
          }
        }
      }
    },
    "ImageSearchMeta": {
      "type": "object",
      "description": "Additional metadata for the Image Search request.",
      "properties": {
        "usage": {
          "$ref": "#/$defs/ImageSearchUsage"
        },
        "latency": {
          "type": "number",
          "description": "Response time in milliseconds."
        },
        "warning": {
          "type": [
            "string",
            "null"
          ],
          "description": "Warning message, if any."
        }
      }
    },
    "ImageSearchResult": {
      "type": "object",
      "description": "A single image search result.",
      "properties": {
        "title": {
          "type": "string",
          "description": "The title of the image."
        },
        "url": {
          "type": "string",
          "description": "The image URL."
        },
        "source_page": {
          "type": "string",
          "description": "URL of the original page hosting the image."
        },
        "description": {
          "type": "string",
          "description": "Server-generated text description of the image content."
        },
        "width": {
          "type": "integer",
          "description": "Image width in pixels."
        },
        "height": {
          "type": "integer",
          "description": "Image height in pixels."
        },
        "thumbnail": {
          "type": "string",
          "description": "Thumbnail URL."
        },
        "summary": {
          "type": "string",
          "description": "Structured description of the design asset, covering category, layout, style, tags, and more. Returned only when `topic=design`."
        },
        "html_snippet": {
          "type": "string",
          "description": "HTML/CSS snippet that an LLM can reuse directly. Returned only when `topic=design` and `html_snippet.enable` is `true`."
        }
      }
    },
    "ImageSearchUsage": {
      "type": "object",
      "description": "Usage information for the Image Search request.",
      "properties": {
        "num_search_queries": {
          "type": "integer",
          "description": "Number of search queries executed."
        }
      }
    }
  }
}