# W-Agent API

W-Agent provides public APIs for person identity recognition, emotion recognition, video parsing, sequence parsing, and human 2D/3D keypoints.

## Capabilities

- Parse video into person sequences.
- Parse tracked person image sequences.
- Extract gait, face, and ReID feature vectors.
- Compare same-type feature vectors by dot product similarity.
- Return ReID structured attributes.
- Return human 2D/3D keypoints.
- Support registered API Key calls.
- Support anonymous x402 payment calls.

## Base URL

https://www.w-agent.cn/api

## Authentication

Registered users call APIs with:

Authorization: Bearer <api_key>

Anonymous agents use public endpoints and x402 payment challenges.

MCP task tools are currently for registered API Key users. Anonymous x402 payment is not part of the MCP protocol flow here; anonymous agents should call the public HTTP APIs, receive HTTP 402 payment_context, sign the x402 payment, and retry the HTTP request.

## MCP

MCP Streamable HTTP endpoint:

https://www.w-agent.cn/api/mcp

## Main Endpoints

- POST /v1/sequences
- PUT /v1/uploads/{task_id}/{index}
- POST /v1/sequences/{task_id}/parse
- POST /v1/sequences/{task_id}/gait-pose
- POST /v1/videos
- PUT /v1/video-uploads/{task_id}?token=<upload_token>
- POST /v1/videos/{task_id}/complete
- GET /v1/videos/{task_id}
- GET /v1/videos/{task_id}/result

## Pricing

- Video parsing: charged by video frames.
- Video result fetch: charged by sequence count plus sequence frames.
- Sequence parsing: charged by one sequence plus sequence frames.
- Human 2D/3D keypoints: charged by sequence frames.

## Payments

Registered users prepay with account balance.
Anonymous agents can pay per call through x402.

## Output

JSON results may include:

- gait_feature
- face_feature
- reid_feature
- reid_struct
- pose_2ds
- pose_3ds
- emotion
- frame boxes
- task-scoped asset URLs

## Contact

support@watrix.ai
