files Endpoints
All endpoints for the files API group. Great for feeding into an LLM context.
/v1/files/token
Generate File Access Token
Generates a short-lived (5 min) access token. Used by the frontend to construct authorized video stream URLs.
Responses
200Successful Response
{}404Not found
/v1/files/stream/{file_id}
Stream File By Id Query Auth
Streams a file by ID using a query token for authentication. Supports Range requests.
Parameters
file_id*
token*
range
Responses
200Successful Response
{}404Not found
422Validation Error
{
"$ref": "#/components/schemas/HTTPValidationError"
}/v1/files/stream
Stream File By Location
Streams a file by location (deprecated/compatibility). SECURED: Now verifies the location exists in the user's organization.
Parameters
location*
token*
range
Responses
200Successful Response
{}404Not found
422Validation Error
{
"$ref": "#/components/schemas/HTTPValidationError"
}/v1/files/location
Get File By Location
Streams a file directly from S3 given its full location key. SECURED: Now verifies the location exists in the user's organization.
Request Body
{
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/GetFile"
}
}
},
"required": true
}Responses
200Successful Response
{}404Not found
422Validation Error
{
"$ref": "#/components/schemas/HTTPValidationError"
}/v1/files/{file_id}
Get File Route
Finds a file by its ID in the database and streams it from S3. SECURED: Added explicit ownership and admin checks.
Parameters
file_id*
Responses
200Successful Response
{}404Not found
422Validation Error
{
"$ref": "#/components/schemas/HTTPValidationError"
}/v1/files/{file_id}
Delete File Route
Deletes a file from DB and S3 via the service layer.
Parameters
file_id*
Responses
200Successful Response
{}404Not found
422Validation Error
{
"$ref": "#/components/schemas/HTTPValidationError"
}/v1/files
Upload Files Route
Handles multiple file uploads. Delegates complex video processing and S3 logic to the service layer.
Request Body
{
"content": {
"multipart/form-data": {
"schema": {
"$ref": "#/components/schemas/Body_upload_files_route_v1_files_post"
}
}
},
"required": true
}Responses
200Successful Response
{}404Not found
422Validation Error
{
"$ref": "#/components/schemas/HTTPValidationError"
}