Videos
Endpoint: Upload Video
This endpoint allows developers to upload an image file. The endpoint performs various checks and operations on the uploaded image and returns the processed data.
Headers
The request should include the following header:
Request Method: POST
Request Body Parameters:
file
File
The image file to be uploaded.
user_id
String
The ID of the user/organization associated with the image.
_id
String
Associated _id of file used to identify it.
Response:
The response returns JSON data with the following structure:
isSuccess
Boolean
Indicates whether the request was successful or not.
data
Object
Contains the processed data of the uploaded image.
data.file_url
String
The URL/path of the uploaded file.
data.extra_vision
Array
An array of objects representing additional vision information about the image. Each object contains a "description" field.
compute
Number
The remaining compute value of the organization after processing the image.
Error Responses:
If an error occurs during the request, the response will contain an error message with the appropriate status code.
400
{ "isSuccess": false, "message": "file is required" }
The file parameter is missing in the request.
404
{ "isSuccess": false, "message": "Organization not found" }
The organization associated with the user_id was not found.
403
{ "isSuccess": false, "message": "Insufficient compute available" }
The compute reduction exceeds the available compute.
Last updated