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

> Tags an image without storing it. Any image format Dreep can read is accepted, HEIC and AVIF included. Charged per image at your plan's usage rate, unless the same image was tagged before. To keep tags on a stored image, use Tag Media instead.


Returns what's in an image without storing it. To keep tags on an image you've
uploaded, use [Tag Media](https://docs.dreep.cloud/api-reference/image-tags/tag-media.md).

```bash theme={null}
curl -X POST "https://api.dreep.cloud/api/v1/image-tagging" \
  -H "Authorization: Bearer drp_live_xxxxx" \
  -F "file=@sneaker.jpg"
```

```json theme={null}
{
  "tags": [
    { "name": "sneaker", "confidence": 98.2 },
    { "name": "shoe", "confidence": 98.2 },
    { "name": "red", "confidence": 91.0 }
  ],
  "cached": false
}
```

Charged per image, unless the same image was tagged before (`"cached": true`).
See [Image Tags and Search](https://docs.dreep.cloud/guides/image-tags.md#billing).


## OpenAPI

````yaml POST /api/v1/image-tagging
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/image-tagging:
    post:
      tags:
        - Image Tags
      summary: Tag Image
      description: >
        Tags an image without storing it. Any image format Dreep can read is
        accepted, HEIC and AVIF included. Charged per image at your plan's usage
        rate, unless the same image was tagged before. To keep tags on a stored
        image, use Tag Media instead.
      requestBody:
        required: true
        content:
          multipart/form-data:
            schema:
              type: object
              required:
                - file
              properties:
                file:
                  type: string
                  format: binary
                  description: The image to tag.
                minConfidence:
                  type: number
                  minimum: 0
                  maximum: 100
                  description: Leave out tags Dreep is less sure of than this.
      responses:
        '200':
          description: The image's tags
          content:
            application/json:
              schema:
                type: object
                properties:
                  tags:
                    type: array
                    items:
                      $ref: '#/components/schemas/ImageTag'
                  cached:
                    type: boolean
                    description: >-
                      True when the same image was tagged before; you weren't
                      charged.
        '400':
          $ref: '#/components/responses/BadRequest'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '402':
          description: >
            The account has no credit left for tagging. The body carries `code:
            "LIMIT_EXCEEDED"` and `featureKey: "image_taggings"`.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '502':
          description: Tagging failed. Nothing was charged; try again.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
components:
  schemas:
    ImageTag:
      type: object
      properties:
        name:
          type: string
          description: Lowercase label.
          example: sneaker
        confidence:
          type: number
          description: How sure Dreep is, from 0 to 100.
          example: 98.2
    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.