Find the people in a photo
/v2/agent/poseThe people in a photo, with MediaPipe's 33 body points for each (at most two people). It is the server fallback of the shopper widget's "See it on you" photo check, which normally runs the same models in the browser: the widget calls it only in a browser with neither WebGL nor WebAssembly. Deciding what the points mean (one person, face in view, head to shin) is the caller's.
The photo is the request body itself: the raw bytes, with
Content-Type: image/jpeg, image/png or image/webp, at most 2 MB.
It is read in memory and dropped, never stored or logged. The photo is
turned upright and read at up to 1280px on its long edge; width and
height are the size it was read at.
curl https://stylor.ai/api/v2/agent/pose \
-H "Authorization: Bearer $STYLOR_API_KEY" \
-H "Content-Type: image/jpeg" \
--data-binary @photo.jpgIt is metered on api.v2.agent.pose, which is unlimited on every
plan.
Request body
image/jpegrequiredThe photo's bytes. image/png and image/webp are accepted the same way.
Response
Response headers
X-RateLimit-ResourceThe quota resource this endpoint is metered against: api.v2.agent.chat
for the chat endpoint, api.v2.agent.looks.render for the looks
endpoint (api.v2.agent.looks on a plan not yet moved to it),
api.v2.agent.match for shop the look, api.v2.agent.looks.complete
for complete the look and api.v2.agent.pose for the pose endpoint.
These are separate from the v1 resources, so Agent API usage never
draws down a v1 allowance.
X-RateLimit-Quota-LimitRequests allowed in the current billing period, or unlimited.
X-RateLimit-Quota-RemainingRequests left in the current billing period, or unlimited.
X-RateLimit-Quota-ResetUnix epoch seconds at which the billing period resets.
X-RateLimit-RPM-LimitRequests allowed per minute for this resource.
X-RateLimit-RPM-RemainingRequests left in the current one-minute window.
X-RateLimit-RPM-ResetUnix epoch seconds at which the one-minute window resets.
One entry per person found, each 33 points in MediaPipe Pose's
order, each point [x, y, z, visibility, presence]. x and y
are fractions of the photo's width and height as read, z is the
model's depth estimate, and visibility and presence are 0 to 1.
Rounded to five decimals. Empty when nobody is found.
The width the photo was read at, upright.
The height the photo was read at, upright.
How long finding the people took, in milliseconds.
Errors
20Every error is JSON with a single error string unless noted. Match on the status code; the message is for humans.
The request body is empty: send the photo as the body.The body has no bytes.
The body could not be read as a JPEG, PNG or WebP photo.The bytes are not an image in the declared format, or the image is over 40 million pixels.
The photo is <size> KB; the most this endpoint reads is 2048 KB. Send it smaller.The Content-Length header declares more than 2 MB (refused without reading the body), or the body is larger than 2 MB. Checked after the API key and Content-Type.
Send the photo as the request body with Content-Type image/jpeg, image/png, image/webp.Content-Type is not image/jpeg, image/png or image/webp.
curl -X POST "https://stylor.ai/api/v2/agent/pose" \
-H "Authorization: Bearer $STYLOR_API_KEY"{
"people": [
[
[
0.51234,
0.18321,
-0.41023,
0.99871,
0.99912
],
[
0.52011,
0.16544,
-0.39871,
0.99702,
0.99854
]
]
],
"width": 960,
"height": 1280,
"ms": 41
}