Skip to main content
POST
Analyze an image

Authorizations

Authorization
string
header
required

API key authentication. Provide your key in the Authorization header with the ApiKey scheme:

Body

channelId
string
required

Identifier of the channel the image belongs to. Provided by Bodyguard.

imageUrl
string<uri>
required

Public URL of the image to analyze. The image must be a PNG, JPEG or WebP file no larger than 1 MiB. Only one of imageUrl or imageData can be provided.

When fetching the image, Bodyguard sends the user-agent Bodyguard-Analyze/1.0 (+https://bodyguard.ai/bot). If you allowlist Bodyguard on a CDN or firewall, match on the stable Bodyguard-Analyze product token rather than the full string — the version number and bot URL may change over time. Image fetches are not sent from a fixed set of IP addresses, so the user-agent is the signal to allowlist against.

publishedAt
string<date-time>

Publication date of the image.

imageData
string<byte>

Base64-encoded image bytes. The image must be a PNG, JPEG or WebP file no larger than 1 MiB. Only one of imageUrl or imageData can be provided.

Response

200 - application/json

Analysis completed.

imageAnalysis
object

Moderation result for an image.