Skip to main content
POST
/
tag
/
image
Tag an image
curl --request POST \
  --url https://api.wesog.com/tag/image \
  --header 'API-Key: <api-key>' \
  --header 'Content-Type: multipart/form-data' \
  --form 'image=<string>' \
  --form 'image_url=<string>' \
  --form lang=en \
  --form mode=editorial \
  --form date=2025-10-16 \
  --form 'event=Carabao Cup winners presentation' \
  --form city=London \
  --form 'country=United Kingdom' \
  --form caption=false \
  --form keywords=false \
  --form ocr=false \
  --form colors=false \
  --form 0.image='@example-file' \
  --form 1.image='@example-file'
import requests

url = "https://api.wesog.com/tag/image"

files = {
"0.image": ("example-file", open("example-file", "rb")),
"1.image": ("example-file", open("example-file", "rb"))
}
payload = {
"image": "<string>",
"image_url": "<string>",
"lang": "en",
"mode": "editorial",
"date": "2025-10-16",
"event": "Carabao Cup winners presentation",
"city": "London",
"country": "United Kingdom",
"caption": "false",
"keywords": "false",
"ocr": "false",
"colors": "false"
}
headers = {"API-Key": "<api-key>"}

response = requests.post(url, data=payload, files=files, headers=headers)

print(response.text)
const form = new FormData();
form.append('image', '<string>');
form.append('image_url', '<string>');
form.append('lang', 'en');
form.append('mode', 'editorial');
form.append('date', '2025-10-16');
form.append('event', 'Carabao Cup winners presentation');
form.append('city', 'London');
form.append('country', 'United Kingdom');
form.append('caption', 'false');
form.append('keywords', 'false');
form.append('ocr', 'false');
form.append('colors', 'false');
form.append('0.image', '{
"fileName": "example-file"
}');
form.append('1.image', '{
"fileName": "example-file"
}');

const options = {method: 'POST', headers: {'API-Key': '<api-key>'}};

options.body = form;

fetch('https://api.wesog.com/tag/image', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));
<?php

$curl = curl_init();

curl_setopt_array($curl, [
CURLOPT_URL => "https://api.wesog.com/tag/image",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => "-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"image\"\r\n\r\n<string>\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"image_url\"\r\n\r\n<string>\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"lang\"\r\n\r\nen\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"mode\"\r\n\r\neditorial\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"date\"\r\n\r\n2025-10-16\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"event\"\r\n\r\nCarabao Cup winners presentation\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"city\"\r\n\r\nLondon\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"country\"\r\n\r\nUnited Kingdom\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"caption\"\r\n\r\nfalse\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"keywords\"\r\n\r\nfalse\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"ocr\"\r\n\r\nfalse\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"colors\"\r\n\r\nfalse\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"0.image\"; filename=\"example-file\"\r\nContent-Type: application/octet-stream\r\n\r\n{\r\n \"fileName\": \"example-file\"\r\n}\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"1.image\"; filename=\"example-file\"\r\nContent-Type: application/octet-stream\r\n\r\n{\r\n \"fileName\": \"example-file\"\r\n}\r\n-----011000010111000001101001--",
CURLOPT_HTTPHEADER => [
"API-Key: <api-key>",
"Content-Type: multipart/form-data"
],
]);

$response = curl_exec($curl);
$err = curl_error($curl);

curl_close($curl);

if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
package main

import (
"fmt"
"strings"
"net/http"
"io"
)

func main() {

url := "https://api.wesog.com/tag/image"

payload := strings.NewReader("-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"image\"\r\n\r\n<string>\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"image_url\"\r\n\r\n<string>\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"lang\"\r\n\r\nen\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"mode\"\r\n\r\neditorial\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"date\"\r\n\r\n2025-10-16\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"event\"\r\n\r\nCarabao Cup winners presentation\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"city\"\r\n\r\nLondon\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"country\"\r\n\r\nUnited Kingdom\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"caption\"\r\n\r\nfalse\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"keywords\"\r\n\r\nfalse\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"ocr\"\r\n\r\nfalse\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"colors\"\r\n\r\nfalse\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"0.image\"; filename=\"example-file\"\r\nContent-Type: application/octet-stream\r\n\r\n{\r\n \"fileName\": \"example-file\"\r\n}\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"1.image\"; filename=\"example-file\"\r\nContent-Type: application/octet-stream\r\n\r\n{\r\n \"fileName\": \"example-file\"\r\n}\r\n-----011000010111000001101001--")

req, _ := http.NewRequest("POST", url, payload)

req.Header.Add("API-Key", "<api-key>")

res, _ := http.DefaultClient.Do(req)

defer res.Body.Close()
body, _ := io.ReadAll(res.Body)

fmt.Println(string(body))

}
HttpResponse<String> response = Unirest.post("https://api.wesog.com/tag/image")
.header("API-Key", "<api-key>")
.body("-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"image\"\r\n\r\n<string>\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"image_url\"\r\n\r\n<string>\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"lang\"\r\n\r\nen\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"mode\"\r\n\r\neditorial\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"date\"\r\n\r\n2025-10-16\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"event\"\r\n\r\nCarabao Cup winners presentation\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"city\"\r\n\r\nLondon\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"country\"\r\n\r\nUnited Kingdom\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"caption\"\r\n\r\nfalse\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"keywords\"\r\n\r\nfalse\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"ocr\"\r\n\r\nfalse\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"colors\"\r\n\r\nfalse\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"0.image\"; filename=\"example-file\"\r\nContent-Type: application/octet-stream\r\n\r\n{\r\n \"fileName\": \"example-file\"\r\n}\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"1.image\"; filename=\"example-file\"\r\nContent-Type: application/octet-stream\r\n\r\n{\r\n \"fileName\": \"example-file\"\r\n}\r\n-----011000010111000001101001--")
.asString();
require 'uri'
require 'net/http'

url = URI("https://api.wesog.com/tag/image")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Post.new(url)
request["API-Key"] = '<api-key>'
request.body = "-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"image\"\r\n\r\n<string>\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"image_url\"\r\n\r\n<string>\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"lang\"\r\n\r\nen\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"mode\"\r\n\r\neditorial\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"date\"\r\n\r\n2025-10-16\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"event\"\r\n\r\nCarabao Cup winners presentation\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"city\"\r\n\r\nLondon\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"country\"\r\n\r\nUnited Kingdom\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"caption\"\r\n\r\nfalse\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"keywords\"\r\n\r\nfalse\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"ocr\"\r\n\r\nfalse\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"colors\"\r\n\r\nfalse\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"0.image\"; filename=\"example-file\"\r\nContent-Type: application/octet-stream\r\n\r\n{\r\n \"fileName\": \"example-file\"\r\n}\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"1.image\"; filename=\"example-file\"\r\nContent-Type: application/octet-stream\r\n\r\n{\r\n \"fileName\": \"example-file\"\r\n}\r\n-----011000010111000001101001--"

response = http.request(request)
puts response.read_body
{
  "height": 123,
  "width": 123,
  "ratio": 123,
  "orient": "<string>",
  "n_faces": 123,
  "shot": "<string>",
  "illumination": "<string>",
  "shape": "<string>",
  "date": "2023-12-25",
  "people": [
    {
      "face_box_as_dict": {},
      "celeb_name": "<string>",
      "gender": "<string>",
      "nationality": "<string>",
      "occupation": "<string>",
      "race": "<string>",
      "age_group": "<string>",
      "current_age": 123,
      "face_expression": "<string>",
      "date_birth": "2023-12-25",
      "date_death": "2023-12-25",
      "wesog_id": "<string>"
    }
  ],
  "photo_or_illus": "<string>",
  "type_of_photo": "<string>",
  "type_of_illus": "<string>",
  "categories": [
    "<string>"
  ],
  "colors": [
    "<string>"
  ],
  "bw": true,
  "caption": "<string>",
  "keywords": [
    "<string>"
  ],
  "ocr": "<string>"
}
{
"error": "<string>"
}

Authorizations

API-Key
string
header
required

Body

multipart/form-data
image
file
required

Binary image file to analyze. Use this or image_url, but not both.

image_url
string<uri>

Publicly reachable image URL to analyze instead of uploading a file.

lang
string
default:en

Language used for language-dependent outputs such as caption or keywords.

Example:

"en"

mode
string
default:editorial

Tagging profile. Currently the default documented mode is editorial.

Example:

"editorial"

date
string
default:""

Optional image context date, typically in ISO format YYYY-MM-DD. Helps downstream people and caption enrichment.

Example:

"2025-10-16"

event
string
default:""

Optional event name associated with the image, used as context for enriched outputs.

Example:

"Carabao Cup winners presentation"

city
string
default:""

Optional city associated with the image context.

Example:

"London"

country
string
default:""

Optional country associated with the image context.

Example:

"United Kingdom"

caption
boolean
default:false

When true, include an AI-generated caption in the response.

keywords
boolean
default:false

When true, include generated keyword tags in the response.

ocr
boolean
default:false

When true, include OCR text extracted from the image.

colors
boolean
default:false

When true, include dominant colors and black-and-white detection.

Response

Successful Response

height
integer | null

Image height in pixels.

width
integer | null

Image width in pixels.

ratio
number | null

Aspect ratio of the image.

orient
string | null

Image orientation.

n_faces
integer | null

Number of detected faces.

shot
string | null

Predicted shot type.

illumination
string | null

Predicted lighting type.

shape

Predicted image shape/style or raw shape dimensions.

date

Image date when available.

people
TagPersonResponse · object[] | null

Detected people metadata.

photo_or_illus
string | null

Whether the input is a photo or illustration.

type_of_photo
string | null

Predicted photo subtype.

type_of_illus
string | null

Predicted illustration subtype.

categories
string[] | null

General image categories.

colors
string[] | null

Representative image colors when requested.

bw
boolean | null

Whether the image is black and white.

caption
string | null

Generated caption when requested.

keywords
string[] | null

Generated keywords when requested.

ocr
string | null

Extracted OCR text when requested.