Embeds
Last updated
Last updated
Endpoint: Upload Image
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.
Request Method: POST Endpoint: /uploadImage
Request Body Parameters:
Parameter | Type | Description |
---|---|---|
Response:
The response returns JSON data with the following structure:
Field | Type | Description |
---|---|---|
Error Responses:
If an error occurs during the request, the response will contain an error message with the appropriate status code.
Status Code | Error Message | Description |
---|---|---|
file
File
The image file to be uploaded.
user_id
String
The ID of the user/organization associated with the image.
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.
compute
Number
The remaining compute value of the organization after processing the image.
400
{ "isSuccess": false, "msgError": "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.