Custom Model Assets
Page Outline
This endpoint is only applicable to models with model_type: "custom". It is not available for AutoML (model_type: "auto") models.
Manages the upload and listing of custom model assets — the user-provided code, weights, and configuration files required to run a custom training pipeline.
Base Path: /api/v1/models
Auth: Requires a valid Bearer token (Authorization: Bearer <JWT>)
Upload Custom Asset
Uploads a custom asset file for a model. Multiple assets can be uploaded; together they constitute the custom training package.
Method: POST
Path: /{model_id}/custom/assets
Path Parameters
| Parameter | Type | Description |
|---|---|---|
model_id | string | Unique identifier of the custom model |
Request
Multipart form upload (Content-Type: multipart/form-data).
| Form Field | Type | Required | Description |
|---|---|---|---|
file | binary | ✅ | The asset file to upload |
asset_type | string | ✅ | script (entry point code), weights (pre-trained weights), requirements (pip requirements file), config (YAML/JSON config), other |
filename | string | ✅ | Name the file should be stored under |
description | string | ❌ | Optional description of the file's purpose |
Behavior
- Max file size: 500 MB per asset. Returns
HTTP 413if exceeded. - An
asset_type: "script"asset is required before training can be triggered. - An audit log entry is written with action
model.custom_asset_uploaded.
Response
Returns the uploaded CustomAsset record.
{
"asset_id": "ast-001",
"model_id": "mdl-7f3a19bc",
"asset_type": "script",
"filename": "train.py",
"size_bytes": 14284,
"uploaded_at": "2026-03-13T16:05:00Z"
}
List Custom Assets
Returns all uploaded assets for a custom model.
Method: GET
Path: /{model_id}/custom/assets
Response
Returns a list of CustomAsset objects (same schema as above, without file content).
Delete Custom Asset
Removes a specific asset from the model.
Method: DELETE
Path: /{model_id}/custom/assets/{asset_id}
Returns HTTP 204 No Content on success.