> ## Documentation Index
> Fetch the complete documentation index at: https://docs.octen.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# Image Search

> Searches the web for images.



## OpenAPI

````yaml /api-reference/openapi.json post /image-search
openapi: 3.1.0
info:
  title: Octen API
  description: >-
    Octen API provides Broad Search, Web Search, Image Search, Video Search,
    Extract, Embeddings, VL Embeddings, Answer, and Deep Research services. The
    Web Search API searches ranked web results with optional filters,
    highlights, and full content. The Image Search API searches for images from
    a text query or an image. The Video Search API searches for videos from a
    text query. The Broad Search API decomposes a query into multiple
    sub-queries, searches them in parallel, and returns results grouped by
    sub-query. The Extract API extracts clean content from URLs, with optional
    query-focused highlights, page classification, and multimedia resources. The
    Embeddings API converts text into vector representations. The VL Embeddings
    API converts multimodal inputs into vector representations. The Answer API
    decomposes queries into multiple sub-queries for comprehensive search and
    synthesis. The Deep Research API runs a multi-round adaptive research
    pipeline that produces a structured research plan, executes iterative
    searches, and streams a final long-form report.
  version: 1.0.0
servers:
  - url: https://api.octen.ai
security:
  - bearerAuth: []
  - apiKeyAuth: []
paths:
  /image-search:
    post:
      summary: Image Search
      description: Searches the web for images.
      operationId: image-search
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/ImageSearchRequest'
            examples:
              plainText:
                summary: Plain text query
                value:
                  inputs:
                    - type: text
                      data: DJI Mavic 4 Pro review
                  count: 5
              imageByUrl:
                summary: Search by image (image as URL)
                value:
                  inputs:
                    - type: image
                      url: https://cdn.example-fashion.com/refs/vintage-dress.jpg
                  count: 5
              imageByBase64:
                summary: Search by image (base64 upload)
                value:
                  inputs:
                    - type: image
                      data: >-
                        iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAQAAAC1HAwCAAAAC0lEQVR42mNkYAAAAAYAAjCB0C8AAAAASUVORK5CYII=
                  count: 5
      responses:
        '200':
          description: Successful image search response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ImageSearchResponse'
              examples:
                general:
                  summary: General image search
                  value:
                    code: 0
                    msg: success
                    request_id: req_9d1c4f7a2e6b0853
                    data:
                      results:
                        - title: Scandinavian Minimalist Living Room
                          url: >-
                            https://images.unsplash.com/photo-scandi-living-room.jpg
                          source_page: https://unsplash.com/photos/scandi-living-room
                          description: >-
                            A Scandinavian minimalist living room with light
                            wood flooring, an off-white sofa, and greenery; the
                            composition is very close to the uploaded image.
                          width: 1920
                          height: 1280
                          thumbnail: >-
                            https://images.unsplash.com/photo-scandi-living-room.jpg?w=200
                        - title: Minimalist Interior Inspiration
                          url: https://i.pinimg.com/originals/minimal-interior.jpg
                          source_page: >-
                            https://www.pinterest.com/pin/minimal-interior-inspiration
                          description: >-
                            Minimalist interior design inspiration; the palette
                            and layout are close to the uploaded image.
                          width: 736
                          height: 981
                          thumbnail: https://i.pinimg.com/236x/minimal-interior.jpg
                    meta:
                      usage:
                        num_search_queries: 1
                      latency: 642
        '400':
          description: >-
            Missing parameter inputs — Returned when a required parameter is
            missing.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              example:
                code: 400
                msg: Missing parameter inputs
                request_id: req_abc123def456
        '401':
          $ref: '#/components/responses/Unauthorized'
        '403':
          $ref: '#/components/responses/InsufficientBalance'
        '413':
          $ref: '#/components/responses/PayloadTooLarge'
        '415':
          $ref: '#/components/responses/UnsupportedMediaType'
        '422':
          description: >-
            Input unreadable or invalid — Returned when an input cannot be read
            or is otherwise invalid.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              example:
                code: 422
                msg: Input unreadable or invalid
                request_id: req_abc123def456
        '429':
          $ref: '#/components/responses/RateLimited'
        '500':
          $ref: '#/components/responses/InternalError'
components:
  schemas:
    ImageSearchRequest:
      type: object
      required:
        - inputs
      description: Request body for the Image Search API.
      properties:
        inputs:
          type: array
          minItems: 1
          maxItems: 1
          description: >-
            Multimodal input array. Currently only a single input is supported:
            either one text input or one image input.
          items:
            $ref: '#/components/schemas/ImageSearchInput'
        count:
          type: integer
          minimum: 1
          maximum: 10
          default: 5
          description: Number of results to return.
        include_domains:
          type: array
          items:
            type: string
          description: Domains to include, matched against each result's `source_page` URL.
        exclude_domains:
          type: array
          items:
            type: string
          description: Domains to exclude, matched against each result's `source_page` URL.
        safesearch:
          type: string
          enum:
            - 'off'
            - strict
          default: strict
          description: >-
            Controls filtering of explicit/adult content. `off` disables
            filtering; `strict` drops all adult content.
    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: '#/components/schemas/ImageSearchData'
        meta:
          $ref: '#/components/schemas/ImageSearchMeta'
    ErrorResponse:
      type: object
      properties:
        code:
          type: integer
          description: Business status code. Non-zero values indicate an error.
        msg:
          type: string
          description: A message describing the error.
        request_id:
          type: string
          description: Unique identifier for the request.
      required:
        - code
        - msg
        - request_id
    ImageSearchInput:
      type: object
      required:
        - type
      description: >-
        A single multimodal input. Currently each request accepts exactly one
        input: either one text input or one image input.
      properties:
        type:
          type: string
          enum:
            - text
            - image
          description: >-
            The input type. A single image must be at most 5MB and one of: JPEG,
            PNG, WEBP, BMP, TIFF, ICO, DIB, ICNS, SGI.
        url:
          type: string
          description: >-
            Image input as a public URL. For an image input, provide either
            `url` or `data`, not both.
        data:
          type: string
          description: >-
            When `type` is `text`: the query content, max 500 characters. When
            `type` is `image`: base64-encoded image data, at most 5MB after
            encoding.
    ImageSearchData:
      type: object
      description: The main response payload.
      properties:
        results:
          type: array
          description: A list of image search results.
          items:
            $ref: '#/components/schemas/ImageSearchResult'
    ImageSearchMeta:
      type: object
      description: Additional metadata for the Image Search request.
      properties:
        usage:
          $ref: '#/components/schemas/ImageSearchUsage'
        latency:
          type: number
          description: Response time in milliseconds.
        warning:
          type: string
          nullable: true
          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.
    ImageSearchUsage:
      type: object
      description: Usage information for the Image Search request.
      properties:
        num_search_queries:
          type: integer
          description: Number of search queries executed.
  responses:
    Unauthorized:
      description: Invalid API Key — Returned when the API key is missing or invalid.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
          example:
            code: 401
            msg: Invalid API Key
            request_id: req_abc123def456
    InsufficientBalance:
      description: >-
        Insufficient balance in account — Returned when the account balance is
        insufficient to complete the request.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
          example:
            code: 403
            msg: Insufficient balance in account
            request_id: req_abc123def456
    PayloadTooLarge:
      description: >-
        Payload too large — Returned when the request payload exceeds the size
        limit.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
          example:
            code: 413
            msg: Payload too large
            request_id: req_abc123def456
    UnsupportedMediaType:
      description: >-
        Unsupported media type — Returned when the input media format is not
        supported.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
          example:
            code: 415
            msg: Unsupported media type
            request_id: req_abc123def456
    RateLimited:
      description: >-
        Exceeding the rate limit — Returned when the request exceeds the
        configured rate limit.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
          example:
            code: 429
            msg: Exceeding the rate limit
            request_id: req_abc123def456
    InternalError:
      description: Internal error — Returned when an unexpected server-side error occurs.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
          example:
            code: 500
            msg: Internal error
            request_id: req_abc123def456
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      description: >-
        Bearer token used for request authentication. Alternatively, you can
        send the API key in the `x-api-key` header. Note: A payment method is
        required to use the API.
    apiKeyAuth:
      type: apiKey
      in: header
      name: x-api-key
      description: >-
        API key used for request authentication. Alternatively, you can send the
        key as a Bearer token in the `Authorization` header. Note: A payment
        method is required to use the API.

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.