> ## 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.md).

```typescript TypeScript theme={"theme":{"light":"github-light","dark":"github-dark"}}
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={"theme":{"light":"github-light","dark":"github-dark"}}
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()
```

For a publicly hosted image, prefer [Search with an image URL](/sdk/image-url.md). For a scene with several products, use [Find products in image](/sdk/find-products-in-image.md).


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