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

# Search with a Base64 Image

Encode a local image as base64 and pass `base64_image`. Useful for camera flows or screenshots. See also [Image search](/guides/image-search).

<CodeGroup>
  ```typescript TypeScript theme={null}
  import fs from "node:fs";
  import Channel3 from "@channel3/sdk";

  const client = new Channel3();

  async function main() {
    const b64 = fs.readFileSync("shoe.jpg").toString("base64");
    const response = await client.products.search({
      base64_image: b64,
    });
    console.log(response.products[0]?.title);
  }

  main();
  ```

  ```python Python theme={null}
  import base64
  from channel3_sdk import Channel3

  client = Channel3()

  def main():
      with open("shoe.jpg", "rb") as f:
          b64 = base64.b64encode(f.read()).decode("utf-8")

      response = client.products.search(
          base64_image=b64,
      )
      print(response.products[0].title)

  if __name__ == "__main__":
      main()
  ```
</CodeGroup>

For a publicly hosted image, prefer [Search with an image URL](/sdk/image-url).
