Create Model
Overview
This endpoint allows you to deploy a new model with the specified configurations.
- Method:
POST
Endpoint
https://api.gpulab.ai/model-upload
Headers
Key | Type | Description |
---|---|---|
api-key | string | API key for authorization. |
Attributes
Attribute | Type | Description |
---|---|---|
name | str | Name of the model. |
image_name | str | Docker image name. |
author_url | str | URL of the author. |
category_id | int | ID of the category. |
min_vram | int | Minimum VRAM required. |
isVisible | bool | Visibility status of the model. |
thumbnail_url | Optional[str] | URL of the thumbnail image(only jpeg). |
container_port | str | Ports exposed by the container. |
container_disk | int | Disk space allocated for the container. |
credentials_id | Optional[int] | ID of the credentials (if applicable). |
volume_disk | int | Volume disk space allocated. |
volume_mount_path | str | Mount path for the volume. |
docker_command | Optional[str] | Command to run the container. |
env_vars | Optional[Dict[str, str]] | Environment variables for the container. |
username | Optional[str] | Username for authentication. |
password | Optional[str] | Password for authentication. |
readme | Optional[str] | README or description for the model. |
Request Body
The request body must adhere to the following structure:
Example Request
{
"name": "Sample Model",
"image_name": "dockerhub/sample-model:latest",
"author_url": "https://example.com/author",
"category_id": 1,
"min_vram": 4,
"isVisible": true,
"thumbnail_url": "https://example.com/thumbnail.png",
"container_port": "8080,8888",
"container_disk": 20,
"credentials_id": 101,
"volume_disk": 50,
"volume_mount_path": "/mnt/volume",
"docker_command": "python app.py",
"env_vars": {
"API_KEY": "example_key"
},
"username": "admin",
"password": "securepassword",
"readme": "This is a sample model."
}