---
title: "Tag an image"
method: POST
path: "/tag/image"
tags: ["Wesog Tag"]
---

# Tag an image

`POST /tag/image`

Analyze a single image and return visual metadata. The request must provide exactly one input source: either `image` or `image_url`. This endpoint does not accept batches or multiple files in the same call.

## Response `200`

Successful Response

- TagImageResponse
  - `height` integer, nullable — Image height in pixels.
  - `width` integer, nullable — Image width in pixels.
  - `ratio` number, nullable — Aspect ratio of the image.
  - `orient` string, nullable — Image orientation.
  - `n_faces` integer, nullable — Number of detected faces.
  - `shot` string, nullable — Predicted shot type.
  - `illumination` string, nullable — Predicted lighting type.
  - `shape` union — Predicted image shape/style or raw shape dimensions.
    - string
    - integer[]
    - string[]
  - `date` union — Image date when available.
    - string, date
    - string
  - `people` TagPersonResponse[], nullable — Detected people metadata.
    - `face_box_as_dict` object, nullable — Face bounding box coordinates.
    - `celeb_name` string, nullable — Matched celebrity name if available.
    - `gender` string, nullable — Predicted gender.
    - `nationality` union — Detected or linked nationality.
      - string
      - string[]
    - `occupation` union — Detected or linked occupation.
      - string
      - string[]
    - `race` string, nullable — Predicted ethnicity/race label.
    - `age_group` string, nullable — Predicted age group.
    - `current_age` integer, nullable — Estimated or linked age.
    - `face_expression` string, nullable — Detected face expression.
    - `date_birth` union — Birth date when available.
      - string, date
      - string
    - `date_death` union — Death date when available.
      - string, date
      - string
    - `wesog_id` string, nullable — Internal Wesog identifier.
  - `photo_or_illus` string, nullable — Whether the input is a photo or illustration.
  - `type_of_photo` string, nullable — Predicted photo subtype.
  - `type_of_illus` string, nullable — Predicted illustration subtype.
  - `categories` string[], nullable — General image categories.
  - `colors` string[], nullable — Representative image colors when requested.
  - `bw` boolean, nullable — Whether the image is black and white.
  - `caption` string, nullable — Generated caption when requested.
  - `keywords` string[], nullable — Generated keywords when requested.
  - `ocr` string, nullable — Extracted OCR text when requested.

## Other responses

- `400` — Invalid input combination.
- `422` — Validation error in multipart form fields.

---

[API](https://skmtc.dev/wesog/apis/wesog-api.md) · [All operations](https://skmtc.dev/wesog/apis/wesog-api/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/wesog/wesog-api/revisions/97381dd1ff4c/schema)
