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

# Tag Media

> Tag a stored image and save the tags on it with dreep.tagMedia().

```ts theme={null}
const { tags } = await dreep.tagMedia({ id: asset.id });
// [{ name: "sneaker", confidence: 98.2, source: "ai" }, …]
```

To tag images as they're uploaded, pass `autoTag: 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 |
| :- | :- | :- |
| `tags` | `SavedTag[]` | The image's tags: `name`, `confidence` (`null` for yours) and `source` (`"ai"` or `"manual"`) |
| `tagStatus` | `"done"` | Tagging finished |
| `cached` | `boolean` | `true` when the same image was tagged before. You weren't charged again |

Running it again replaces Dreep's tags. Tags you set with
[`setMediaTags()`](https://docs.dreep.cloud/node-sdk/tags/set-media-tags) are kept.


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