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

# Index Media

> Index a stored image for similar and text search with dreep.indexMedia().

```ts theme={null}
const { indexStatus, cached } = await dreep.indexMedia({ id: asset.id });
```

To index images as they're uploaded, pass `autoIndex: true` to
[`upload()`](https://docs.dreep.cloud/node-sdk/upload/upload-media) or
[`presignUpload()`](https://docs.dreep.cloud/node-sdk/upload/create-presigned-upload) instead.

## Parameters

| Parameter | Type | Description |
| :- | :- | :- |
| `id` | `string` | **Required.** The image's ID |
| `signal` | `AbortSignal` | Cancels the request |

## Returns

| Field | Type | Description |
| :- | :- | :- |
| `indexStatus` | `"done"` | The image can be searched |
| `cached` | `boolean` | `true` when the same image was indexed before. You weren't charged again |

Indexing is charged per image. See [billing](https://docs.dreep.cloud/guides/image-search.md#billing).


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