Skip to main content

Upload Training Data

Upload data files for custom model training.

Endpoint

PUT /api/v3/custom_models/{id}/data

Path Parameters

ParameterTypeRequiredDescription
idnumberYesModel ID

Query Parameters

ParameterTypeRequiredDescription
data_typenumberYesData type identifier

Request Type

type AddTranscriptPayload = {
modelId: number;
file: File;
dataType: number;
};

Request Format

  • Content-Type: multipart/form-data
  • Form field: file containing the file to upload
  • Query parameter: data_type specifying the type

Response Type

type TranscriptResponse = {
transcriptId: number;
message: string;
};

Wrapped in:

type BaseResponse<T> = {
// Response wrapper structure
};

Notes

  • Uploads a single file via multipart/form-data
  • Data type is specified as a numeric query parameter
  • On success, invalidates related queries:
    • Model data query to show the new file
    • Model detail query as dataset count may have changed
    • All list queries to show updated model
  • Does not show error boundary on failure

See Custom Models Overview for complete workflow.