# Analyzed video

## Retrieve Analyzed Video URL

> Retrieves the analyzed video URL for a specific session, or attempts to create it if it does not exist.\
> \
> \### Path Parameter\
> \- \*\*session\_id\*\* \*(string, required)\*: The unique identifier of the session.\
> \
> \### Query Parameters\
> These optional flags determine which kind of analysis to perform if the video doesn't exist:\
> \- \*\*is\_jump\*\* \*(boolean, optional)\*: Indicates whether this session is for jump analysis.\
> \- \*\*is\_weight\*\* \*(boolean, optional)\*: Indicates whether this session is for weightlifting analysis.\
> \- \*\*download\*\* \*(boolean, optional)\*: If \`true\`, returns a signed URL that forces the browser to download the video instead of displaying it.\
> \
> \### Response (HTTP 200)\
> \
> Returns a JSON object with an \`analyzed\_video\_url\` key if successful:\
> \
> \`\`\`json\
> {\
> &#x20; "analyzed\_video\_url": "<https://storage.googleapis.com/.../analyzed\\_video.mp4"\\>
> }\
> \`\`\`\
> \
> \### Error Handling\
> \
> \- \*\*400 Bad Request\*\*: Invalid parameters (e.g., missing or invalid admin UID).\
> \- \*\*401 Unauthorized\*\*: Token is missing or invalid.\
> \- \*\*403 Forbidden\*\*: The user does not have the right privileges or plan.\
> \- \*\*404 Not Found\*\*: The session data or resources could not be found.\
> \- \*\*500 Internal Server Error\*\*: An unexpected error occurred on the server.\
> \
> \### Security\
> A valid API-KEY token must be provided in the \`Authorization\` header.

````json
{"openapi":"3.1.1","info":{"title":"AIKYNETIX WEB API","version":"v2"},"servers":[{"url":"https://api.aikynetix.app"}],"security":[{"Bearer":[]},{"ApiKeyAuth":[]}],"components":{"securitySchemes":{"Bearer":{"type":"apiKey","name":"Authorization","in":"header","description":"Enter your bearer token (Firebase auth) in the format: Bearer <token>"},"ApiKeyAuth":{"type":"apiKey","name":"API-KEY","in":"header","description":"Enter your API key in the header: API-KEY: <api_key>"}}},"paths":{"/session-management/sessions/{session_id}/analyzed-video/":{"get":{"operationId":"session-management_sessions_analyzed-video_list","summary":"Retrieve Analyzed Video URL","description":"Retrieves the analyzed video URL for a specific session, or attempts to create it if it does not exist.\n\n### Path Parameter\n- **session_id** *(string, required)*: The unique identifier of the session.\n\n### Query Parameters\nThese optional flags determine which kind of analysis to perform if the video doesn't exist:\n- **is_jump** *(boolean, optional)*: Indicates whether this session is for jump analysis.\n- **is_weight** *(boolean, optional)*: Indicates whether this session is for weightlifting analysis.\n- **download** *(boolean, optional)*: If `true`, returns a signed URL that forces the browser to download the video instead of displaying it.\n\n### Response (HTTP 200)\n\nReturns a JSON object with an `analyzed_video_url` key if successful:\n\n```json\n{\n  \"analyzed_video_url\": \"https://storage.googleapis.com/.../analyzed_video.mp4\"\n}\n```\n\n### Error Handling\n\n- **400 Bad Request**: Invalid parameters (e.g., missing or invalid admin UID).\n- **401 Unauthorized**: Token is missing or invalid.\n- **403 Forbidden**: The user does not have the right privileges or plan.\n- **404 Not Found**: The session data or resources could not be found.\n- **500 Internal Server Error**: An unexpected error occurred on the server.\n\n### Security\nA valid API-KEY token must be provided in the `Authorization` header.","parameters":[{"schema":{"type":"string"},"name":"session_id","in":"path","description":"The session ID for which to retrieve or create an analyzed video.","required":true},{"schema":{"type":"boolean"},"name":"is_jump","in":"query","description":"Indicates whether this session is for jump analysis.","required":false},{"schema":{"type":"boolean"},"name":"is_weight","in":"query","description":"Indicates whether this session is for weightlifting analysis.","required":false},{"schema":{"type":"boolean"},"name":"download","in":"query","description":"If true, returns a signed URL that forces download of the video.","required":false}],"responses":{"200":{"description":"Analyzed video URL retrieved successfully.","content":{"application/json":{"schema":{"type":"object","properties":{"analyzed_video_url":{"description":"URL of the analyzed video.","type":"string","format":"uri"}}}}}},"400":{"description":"Bad Request - Possibly invalid parameters.","content":{"application/json":{"schema":{"description":"Error schema for invalid requests (e.g., malformed UID)","type":"object","properties":{"error":{"type":"string"}}}}}},"401":{"description":"Unauthorized - Token is invalid or missing.","content":{"application/json":{"schema":{"description":"Error schema for missing or invalid token","type":"object","properties":{"error":{"type":"string"}}}}}},"403":{"description":"Forbidden - User lacks privileges or plan.","content":{"application/json":{"schema":{"description":"Error schema for forbidden access","type":"object","properties":{"error":{"type":"string"}}}}}},"404":{"description":"Not Found - Session data or resource not found.","content":{"application/json":{"schema":{"description":"Error schema for missing session or resource","type":"object","properties":{"error":{"type":"string"}}}}}},"500":{"description":"Internal Server Error - A server-side error occurred.","content":{"application/json":{"schema":{"description":"Error schema for unexpected server failures","type":"object","properties":{"error":{"type":"string"}}}}}}},"tags":["session-management"]}}}}
````

## Upload/Generate Analyzed Video

> Uploads or generates an analyzed video for a specific session, returning its URL.\
> \
> \### Path Parameter\
> \- \*\*session\_id\*\* \*(string, required)\*: The unique identifier of the session.\
> \
> \### Request Body (JSON)\
> \`\`\`json\
> {\
> &#x20; "is\_jump": true,\
> &#x20; "is\_weight": false\
> }\
> \`\`\`\
> \- \*\*is\_jump\*\* \*(boolean, optional)\*: If true, treat this as a jump session.\
> \- \*\*is\_weight\*\* \*(boolean, optional)\*: If true, treat this as a weightlifting session.\
> \
> \### Response Structure (HTTP 200)\
> On success, returns a JSON object with the \`analyzed\_video\_url\`:\
> \
> \`\`\`json\
> {\
> &#x20; "analyzed\_video\_url": "<https://storage.googleapis.com/.../analyzed\\_video.mp4"\\>
> }\
> \`\`\`\
> \### Error Handling\
> \
> \- \*\*400 Bad Request\*\*: Invalid parameters or session already analyzed.\
> \- \*\*401 Unauthorized\*\*: Token is missing or invalid.\
> \- \*\*403 Forbidden\*\*: The user does not have a valid plan.\
> \- \*\*404 Not Found\*\*: Session data not found.\
> \- \*\*500 Internal Server Error\*\*: An unexpected error occurred on the server.\
> \
> \### Security\
> A valid API-KEY token must be provided in the \`Authorization\` header.

````json
{"openapi":"3.1.1","info":{"title":"AIKYNETIX WEB API","version":"v2"},"servers":[{"url":"https://api.aikynetix.app"}],"security":[{"Bearer":[]},{"ApiKeyAuth":[]}],"components":{"securitySchemes":{"Bearer":{"type":"apiKey","name":"Authorization","in":"header","description":"Enter your bearer token (Firebase auth) in the format: Bearer <token>"},"ApiKeyAuth":{"type":"apiKey","name":"API-KEY","in":"header","description":"Enter your API key in the header: API-KEY: <api_key>"}}},"paths":{"/session-management/sessions/{session_id}/analyzed-video/":{"post":{"operationId":"session-management_sessions_analyzed-video_create","summary":"Upload/Generate Analyzed Video","description":"Uploads or generates an analyzed video for a specific session, returning its URL.\n\n### Path Parameter\n- **session_id** *(string, required)*: The unique identifier of the session.\n\n### Request Body (JSON)\n```json\n{\n  \"is_jump\": true,\n  \"is_weight\": false\n}\n```\n- **is_jump** *(boolean, optional)*: If true, treat this as a jump session.\n- **is_weight** *(boolean, optional)*: If true, treat this as a weightlifting session.\n\n### Response Structure (HTTP 200)\nOn success, returns a JSON object with the `analyzed_video_url`:\n\n```json\n{\n  \"analyzed_video_url\": \"https://storage.googleapis.com/.../analyzed_video.mp4\"\n}\n```\n### Error Handling\n\n- **400 Bad Request**: Invalid parameters or session already analyzed.\n- **401 Unauthorized**: Token is missing or invalid.\n- **403 Forbidden**: The user does not have a valid plan.\n- **404 Not Found**: Session data not found.\n- **500 Internal Server Error**: An unexpected error occurred on the server.\n\n### Security\nA valid API-KEY token must be provided in the `Authorization` header.","parameters":[{"schema":{"type":"string"},"name":"session_id","in":"path","description":"The session ID for which to upload/generate an analyzed video.","required":true}],"responses":{"200":{"description":"Analyzed video URL generated or updated successfully.","content":{"application/json":{"schema":{"type":"object","properties":{"analyzed_video_url":{"description":"URL of the newly generated or updated analyzed video.","type":"string","format":"uri"}}}}}},"400":{"description":"Bad Request - Possibly invalid session data or video already analyzed.","content":{"application/json":{"schema":{"description":"Error schema for invalid requests or already analyzed video","type":"object","properties":{"error":{"type":"string"}}}}}},"401":{"description":"Unauthorized - The token is missing or invalid.","content":{"application/json":{"schema":{"description":"Error schema for missing or invalid token","type":"object","properties":{"error":{"type":"string"}}}}}},"403":{"description":"Forbidden - The user does not have a valid payment plan.","content":{"application/json":{"schema":{"description":"Error schema for insufficient plan privileges","type":"object","properties":{"error":{"type":"string"}}}}}},"404":{"description":"Not Found - Session not found or creation failed.","content":{"application/json":{"schema":{"description":"Error schema for missing session data or resource","type":"object","properties":{"error":{"type":"string"}}}}}},"500":{"description":"Internal Server Error - A server-side error occurred.","content":{"application/json":{"schema":{"description":"Error schema for unexpected server failures","type":"object","properties":{"error":{"type":"string"}}}}}}},"tags":["session-management"],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"is_jump":{"description":"Whether this session is jump-related.","type":"boolean"},"is_weight":{"description":"Whether this session is weightlifting-related.","type":"boolean"}}}}},"required":true}}}}}
````


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.aikynetix.app/api-documentation/developer-resources-and-api-reference/api-reference/analyzed-video.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
