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

# Set Media Tags

> Replaces the image's tags with your list. Tags the image already has keep their source and confidence; new ones are saved as yours. Send an empty list to remove every tag. Free.


Makes the list you send the image's tags. Anything not in the list is removed,
including Dreep's own tags, so this is also how you correct a wrong tag.

```bash theme={null}
curl -X PUT "https://api.dreep.cloud/api/v1/media/2f928a3f-1d2a-4a2b/tags" \
  -H "Authorization: Bearer drp_live_xxxxx" \
  -H "Content-Type: application/json" \
  -d '{ "tags": ["sneaker", "red shoe", "summer sale"] }'
```

Here `sneaker` keeps its confidence and stays an `ai` tag, while `red shoe` and
`summer sale` are saved as `manual`. Send `{ "tags": [] }` to remove every tag.


## OpenAPI

````yaml PUT /api/v1/media/{mediaId}/tags
openapi: 3.0.0
info:
  title: Dreep API
  description: The universal media processing and storage API.
  version: 1.0.0
servers:
  - url: https://api.dreep.cloud
    description: Production
security:
  - ApiKeyAuth: []
paths:
  /api/v1/media/{mediaId}/tags:
    put:
      tags:
        - Image Tags
      summary: Set Media Tags
      description: >
        Replaces the image's tags with your list. Tags the image already has
        keep their source and confidence; new ones are saved as yours. Send an
        empty list to remove every tag. Free.
      parameters:
        - name: mediaId
          in: path
          required: true
          description: The image's ID.
          schema:
            type: string
            format: uuid
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              required:
                - tags
              properties:
                tags:
                  type: array
                  maxItems: 50
                  description: >
                    Up to 50 tags of letters, numbers, spaces and hyphens, each
                    at most 64 characters. Stored lowercase; repeats are
                    dropped.
                  items:
                    type: string
                  example:
                    - red shoe
                    - summer sale
      responses:
        '200':
          description: The saved tags
          content:
            application/json:
              schema:
                type: object
                properties:
                  tags:
                    type: array
                    items:
                      $ref: '#/components/schemas/SavedTag'
        '400':
          $ref: '#/components/responses/BadRequest'
        '401':
          $ref: '#/components/responses/Unauthorized'
components:
  schemas:
    SavedTag:
      type: object
      properties:
        name:
          type: string
          example: sneaker
        confidence:
          type: number
          nullable: true
          description: From 0 to 100. Null for tags you set yourself.
          example: 98.2
        source:
          type: string
          enum:
            - ai
            - manual
          description: '`ai` when Dreep added it, `manual` when you did.'
    Error:
      type: object
      properties:
        error:
          type: boolean
          example: true
        message:
          type: string
          example: Invalid request parameters
        code:
          type: string
          example: invalid_request
  responses:
    BadRequest:
      description: Bad Request
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
    Unauthorized:
      description: Unauthorized
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
  securitySchemes:
    ApiKeyAuth:
      type: http
      scheme: bearer

````

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