Joints from video, in one request.
Upload a clip, pick the athlete, get the 3D position of every joint in every frame as JSON. The fastest way to use it is to give your AI agent the skill; the raw HTTP API is below it.
Quickstart with an agent
- Create an account and make an API key. Save it: it is shown once.
- Download the skill and unzip it where your agent keeps skills (Claude Code:
.claude/skills/). Agents without skills can read itsSKILL.mdas plain instructions. - Put your key in the skill's
.envfile:
POSE_API_URL=https://api.fencingai.org POSE_API_KEY=fai_your_key_here
Then ask your agent something like "get the 3D joints from lunge.mp4 and tell me my front knee angle at the deepest point."
The two models
| mediapipe | fencingai | |
|---|---|---|
| In short | Fast and reliable, but not as accurate. | Real-world 3D space, gravity aligned, tracks the person you choose. Needs more time, higher quality. |
| Joints | 33 | 24 |
| Space | Body-relative: origin at the hips every frame | World: floor at y = 0, the athlete moves through it |
| Distance, speed across the floor, jump height | No | Yes |
| Cost | 1 token per second of video | 5 tokens per second of video |
Tokens
Every account has a token budget, shared by all its keys. A video costs seconds of video × the model's rate, rounded up. A job that fails is refunded. Check your balance on the Usage page or with GET /v1/usage. Try ideas on short clips with MediaPipe, and spend FencingAI tokens on the clips that matter.
HTTP API
Base URL https://api.fencingai.org. Send your key on every request: Authorization: Bearer fai_...
1. See who is in the video (free)
curl https://api.fencingai.org/v1/people \ -H "Authorization: Bearer $POSE_API_KEY" \ -F video=@clip.mp4 -F t=0
Returns each person numbered left to right with the target to use for them, and a picture of the frame with the numbers drawn on it (image_jpeg_base64).
2. Send the video
curl https://api.fencingai.org/v1/pose3d \
-H "Authorization: Bearer $POSE_API_KEY" \
-F video=@clip.mp4 -F model=fencingai \
-F 'target={"x":0.18,"y":0.55,"t":0}'
{"job_id": "4be1c0…", "status": "queued", "jobs_ahead": 1,
"tokens_charged": 60, "tokens_remaining": 1140}
Fields: video (mp4, mov or webm, up to 60 s and 200 MB), model, target (largest, or a point from step 1), static_cam (true if the camera is on a tripod; FencingAI model only).
3. Poll for the result
curl https://api.fencingai.org/v1/jobs/4be1c0… -H "Authorization: Bearer $POSE_API_KEY"
{"status": "done", "result": {
"model": "fencingai",
"video": {"fps": 30, "frame_count": 360, "width": 1280, "height": 720},
"coordinate_system": {"units": "meters", "axes": {"y": "up, aligned with gravity"}, …},
"joint_names": ["pelvis", "left_hip", …],
"skeleton": [[0, 1], [0, 2], …],
"frames": [{"i": 0, "t": 0.0, "detected": true,
"joints": [[x, y, z], …], // meters
"joints_2d": [[u, v], …]}, …] // pixels, for drawing on the video
}}
Poll every 2 to 5 seconds. One FencingAI job and two MediaPipe jobs can run per account at a time.
Other calls
| GET /v1/models | Which models are available right now, their limits and token rates |
| GET /v1/usage | Your budget, tokens used and tokens left |
Errors
| 401 | Missing or wrong key |
| 402 | Not enough tokens for this video |
| 400 | Video too long, unreadable, or a bad target |
| 429 | You already have a job of that model running, or you are polling too fast |
| 503 | The models are offline. They run during events. |
Good footage
- Film the whole body, head to feet, in one continuous shot.
- Side-on for lunges and sprints; front-on for squats and landings.
- Good light, the athlete large in the frame.
- Only upload videos of people who agreed to be filmed. Uploads are deleted as soon as a job finishes.
What this is not
Results are measurements of movement, not medical advice. Treat anything injury-related as "worth a look", never a diagnosis. And an API account does not include the fencingai.org app: see fencingai.org access.