API v1

API Documentation

Integrate powerful AI-driven image analysis into your applications. Extract clothing, accessories, colors, and style attributes from any image.

Introduction

The ImgTags API provides AI-powered image analysis capabilities. Upload an image or provide a URL, and receive detailed structured data about the contents including clothing items, accessories, colors, materials, and styling information.

1. Get API Key

Create an account and generate your API key

2. Send Image

Upload a file or provide an image URL

3. Get Results

Receive structured JSON with detailed analysis

Authentication

Authenticate your API requests by including your API key in the X-API-Key header.

Header
X-API-Key: your_api_key_here

You can create and manage API keys from your dashboard.

Base URL

Base URL
https://imgtags.com/api/v1
POST

/analyze

Analyze an image and receive detailed structured data about clothing, accessories, colors, and more.

Request Parameters

Parameter Type Description
url string URL of the image to analyze. Required if image is not provided.
image file Image file upload. Supports JPEG, PNG, GIF, WebP. Max 10MB.

Example Request

curl -X POST "https://imgtags.com/api/v1/analyze" \
     -H "X-API-Key: YOUR_API_KEY" \
     -H "Content-Type: application/json" \
     -d '{
       "url": "https://example.com/image.jpg"
     }'
const response = await fetch('https://imgtags.com/api/v1/analyze', {
  method: 'POST',
  headers: {
    'X-API-Key': 'YOUR_API_KEY',
    'Content-Type': 'application/json',
  },
  body: JSON.stringify({
    url: 'https://example.com/image.jpg'
  })
});

const data = await response.json();
console.log(data);
import requests

response = requests.post(
    'https://imgtags.com/api/v1/analyze',
    headers={
        'X-API-Key': 'YOUR_API_KEY',
        'Content-Type': 'application/json',
    },
    json={
        'url': 'https://example.com/image.jpg'
    }
)

data = response.json()
print(data)
$ch = curl_init('https://imgtags.com/api/v1/analyze');

curl_setopt_array($ch, [
    CURLOPT_RETURNTRANSFER => true,
    CURLOPT_POST => true,
    CURLOPT_HTTPHEADER => [
        'X-API-Key: YOUR_API_KEY',
        'Content-Type: application/json',
    ],
    CURLOPT_POSTFIELDS => json_encode([
        'url' => 'https://example.com/image.jpg'
    ]),
]);

$response = curl_exec($ch);
$data = json_decode($response, true);
curl_close($ch);

Example Response

response.json 200 OK
{
    "success": true,
    "data": {
        "image": {
            "person": {
                "gender": "female",
                "hair_color": "dark brown",
                "hair_style": "half-up, wavy",
                "skin_tone": "medium",
                "expression": "neutral",
                "pose": "standing, hands near waist/holding bag"
            },
            "clothing": {
                "blazer": {
                    "color": "white",
                    "style": "short-sleeved, oversized, V-neck, lapels",
                    "material": "light fabric"
                },
                "skirt": {
                    "color": "light blue",
                    "style": "pleated, midi/maxi length",
                    "material": "flowy"
                }
            },
            "accessories": {
                "handbag": {
                    "color": "black",
                    "style": "quilted, top handle, detachable shoulder strap, flap closure",
                    "material": "leather or faux leather",
                    "hardware_color": "gold-toned"
                },
                "earrings": {
                    "color": "silver-toned",
                    "style": "small hoops or huggies",
                    "material": "metal"
                }
            },
            "background": {
                "color": "white/off-white",
                "texture": "plain wall"
            }
        }
    }
}

Code Examples

Here are complete examples for uploading files in different programming languages.

// File upload example
const formData = new FormData();
formData.append('image', fileInput.files[0]);

const response = await fetch('https://imgtags.com/api/v1/analyze', {
  method: 'POST',
  headers: {
    'X-API-Key': 'YOUR_API_KEY',
  },
  body: formData
});

const data = await response.json();

if (data.success) {
  console.log('Analysis:', data.data);
} else {
  console.error('Error:', data.error);
}
import requests

# File upload example
with open('image.jpg', 'rb') as f:
    response = requests.post(
        'https://imgtags.com/api/v1/analyze',
        headers={
            'X-API-Key': 'YOUR_API_KEY',
        },
        files={
            'image': f
        }
    )

data = response.json()

if data['success']:
    print('Analysis:', data['data'])
else:
    print('Error:', data['error'])
// File upload example
$ch = curl_init('https://imgtags.com/api/v1/analyze');

$file = new CURLFile('image.jpg', 'image/jpeg', 'image.jpg');

curl_setopt_array($ch, [
    CURLOPT_RETURNTRANSFER => true,
    CURLOPT_POST => true,
    CURLOPT_HTTPHEADER => [
        'X-API-Key: YOUR_API_KEY',
    ],
    CURLOPT_POSTFIELDS => [
        'image' => $file
    ],
]);

$response = curl_exec($ch);
$data = json_decode($response, true);
curl_close($ch);

if ($data['success']) {
    print_r($data['data']);
} else {
    print_r($data['error']);
}
# File upload example
curl -X POST "https://imgtags.com/api/v1/analyze" \
     -H "X-API-Key: YOUR_API_KEY" \
     -F "image=@/path/to/image.jpg"

Rate Limits

API rate limits vary based on your plan. When limits are exceeded, you'll receive a 429 Too Many Requests response.

Free
  • 5 requests per day
  • 1 request per minute
  • IP-based limiting
Pro
  • 10,000 requests per month
  • 60 requests per minute
  • Multiple API keys

Error Codes

The API uses standard HTTP response codes and returns detailed error information.

Status Code Description
422 Validation Error Missing or invalid request parameters
429 RATE_LIMIT_EXCEEDED Too many requests. Check reset timestamp.
500 ANALYSIS_FAILED Image analysis failed. Check error message.

Ready to get started?

Sign up for free and start analyzing images with our powerful API.

Get Started Free