Generate Model through AI by Uploading Image for specific trained models
Developing
POST
/model/generate-AI
Request Request Example
Shell
JavaScript
Java
Swift
curl --location --request POST '/model/generate-AI' \
--header 'Content-Type: application/json' \
--data-raw '{
"type": "multipart/form-data",
"required": true,
"properties": {
"name": {
"type": "string",
"description": "Name of the root model",
"example": "Vehicle Model"
},
"description": {
"type": "string",
"description": "Description of the model",
"example": "Model for detected vehicle parts"
},
"guideline": {
"type": "string",
"description": "Optional guideline to be passed to prediction API",
"example": "Ensure all components are visible"
},
"file": {
"type": "file",
"description": "Image file to upload",
"required": true
}
}
}'
Response Response Example
{
"status": 200,
"message": "Image uploaded and model hierarchy created",
"data": {
"fileUrl": "https://storage-service.com/uploads/your-image.jpg",
"rootModel": {
"id": "model_123",
"name": "Vehicle Model",
"type": "default",
"imageUrl": "https://storage-service.com/uploads/your-image.jpg",
"description": "Model for detected vehicle parts",
"isRoot": true,
"createdById": "user_abc",
"createdAt": "2025-06-01T10:30:00.000Z",
"updatedAt": "2025-06-01T10:30:00.000Z",
"status": "active"
},
"childModels": [
{
"id": "model_456",
"name": "Vehicle Model - Engine 1",
"imageUrl": "https://storage-service.com/uploads/engine.jpg",
"iconName": "Engine",
"description": "Detected class: Engine with confidence 0.95",
"parentModelId": "model_123",
"rootModelId": "model_123",
"isRoot": false
}
// ... More child models
],
"components": [
{
"id": "component_789",
"name": "Engine",
"iconName": "Engine",
"imageUrl": "https://storage-service.com/uploads/engine.jpg",
"pickModelId": "model_456",
"isThumbnailIcon": false
}
// ... More components
]
}
}
Request
Body Params application/json
Responses
Modified at 2025-06-06 16:19:15