Uploading Videos via API
Uploading videos is the critical first step in the AiKYNETIX Video Upload & Processing Workflow. This guide outlines how to upload your video files via our REST API.
Overview
The AiKYNETIX API allows both regular users and administrators to initiate video processing sessions. Whether you’re uploading for personal analysis or acting on behalf of another user, the API provides dedicated endpoints for each activity type (Running, Jumping, and Weightlifting). Once a video is uploaded, the system creates a session resource that triggers the processing pipeline.
Prerequisites
Before uploading a video, ensure that you have:
Valid API Credentials: All requests must include a valid API-KEY token in the
Authorization
header. For example:
Authorization: API-KEY <YOUR_API_TOKEN>
Appropriate Permissions:
Regular Users: Can upload videos directly to create their own session.
Administrators/Sub-Admins: May upload on behalf of another user. In these cases, the request must include an additional
user_id
parameter.
Multipart/Form-Data Format: Video uploads are performed using a
multipart/form-data
POST request. Your request should include the raw video file along with any additional parameters required by the endpoint.
Upload Endpoints Overview
Depending on the activity type and user role, use one of the following endpoints:
Request Payload & Multipart/Form-Data Requirements
When constructing your upload request, ensure that you:
Set the Content-Type header to
multipart/form-data
.Include the video file as a binary field.
Pass additional parameters as form fields:
For admin-initiated uploads, include the
user_id
field.For weightlifting sessions, include
exercise_name
(and optionallybarbell_mass
).Optionally, include a descriptive
session_name
to help identify your session.
Example cURL Command (Admin Upload for a Jumping Session)
curl -X POST \
-H 'Content-Type: multipart/form-data' \
-H 'Authorization: API-KEY <YOUR_ADMIN_TOKEN>' \
-F 'user_id=someUserId123' \
-F 'video=@/path/to/video.mp4' \
-F 'session_name=Custom Jump Session' \
-F 'incline_degree=5' \
https://aikpy-nsz2.onrender.com/jumping/management/sessions/
Workflow Sequence
Authentication: The client sends the request with a valid API-KEY token. For admin uploads, the additional
user_id
is also provided.File Upload & Session Creation: The video file, along with any extra form data, is transmitted to the server. The API then creates a new processing session for the video.
Server Response: On success, the API responds with a JSON object containing:
session_id: A unique identifier for the new session.
title: The session title (either user-specified or a fallback).
Next Steps: The returned
session_id
can be used to:Poll for processing status.
Retrieve the analyzed video.
Access detailed session metrics and analysis reports via subsequent API calls.
Handling the Response
A successful upload response will resemble the following JSON:
{
"session_id": "abcd1234efgh5678",
"title": "Custom Session"
}
Note: For details on parameters, request/response formats, and error handling, please see the respective sections in our API Reference.
Last updated
Was this helpful?