Create Model

View as Markdown
Create a new model entity. This endpoint creates a new Model Entity in the Models service database. The Model Entity will be registered for use within the platform.

Path parameters

workspacestringRequired

Request

This endpoint expects an object.
namestringRequiredformat: "^[\w\-.]+$"<=255 characters

Name of the model entity. Allowed characters: letters (a-z, A-Z), digits (0-9), underscores, hyphens, and dots.

projectstringOptionalformat: "^[\w\-./]+$"<=255 characters
The URN of the project associated with this model entity
descriptionstringOptional<=1000 characters
Optional description of the model
specobjectOptional

Detailed specification for the model - Automatically generated by the platform at creation when fileset provided.

finetuning_typeenumOptional
Set for full weight finetuned models
filesetstringOptional

A set of checkpoint files, configs, and other auxiliary info associated with this model - expected format {workspace}/{fileset_name}

base_modelstringOptional
Link to another model which is used as a base for the current model
api_endpointobjectOptional
Data about the inference endpoint for this model
backend_formatenum or nullOptional

Inference API wire format expected by the backend. If unset, inference routing treats the model as OPENAI_CHAT.

promptobjectOptional
Configuration for prompt engineering
custom_fieldsmap from strings to anyOptional
Custom fields for additional metadata
ownershipmap from strings to anyOptional
Ownership information for the model
model_providerslist of stringsOptional

List of ModelProvider workspace/name resource names that provide inference for this Model Entity

trust_remote_codebooleanOptionalDefaults to false

Whether to trust remote code for the checkpoint. Some models without support in certain libraries such as Transformers require additional custom Python code to execute. Due to security ramifications of running arbitrary code, this can only be set to true on one of the following conditions: (1) the model’s fileset’s source is pre-approved in the platform config, or (2) the user creating this model is an administrator.

Response

Create a new model entity
idstring
Autogenerated id
namestringformat: "^[\w\-.]+$"<=255 characters

Name of the entity. Name/workspace combo must be unique across all entities. Allowed characters: letters (a-z, A-Z), digits (0-9), underscores, hyphens, and dots.

workspacestringformat: "^[\w\-.]+$"<=255 characters

The workspace of the entity. Allowed characters: letters (a-z, A-Z), digits (0-9), underscores, hyphens, and dots.

created_atdatetime
The timestamp of model entity creation
updated_atdatetime
The timestamp of the last model entity update
projectstring<=255 characters
The URN of the project associated with this model entity.
descriptionstring<=1000 characters
Optional description of the model.
specobject
Detailed specification for the model
finetuning_typeenum
Set for full weight finetuned models
filesetstring

A set of checkpoint files, configs, and other auxiliary info associated with this model - expected format {workspace}/{fileset_name}

trust_remote_codebooleanDefaults to false
Whether to trust remote code to load this model checkpoint.
base_modelstring
Link to another model which is used as a base for the current model
api_endpointobject
Data about the inference endpoint for this model
backend_formatenum or null

Inference API wire format expected by the backend. If unset, inference routing treats the model as OPENAI_CHAT.

adapterslist of objects
Adapters that have been created against this model
promptobject
Configuration for prompt engineering
custom_fieldsmap from strings to any
Custom fields for additional metadata
ownershipmap from strings to any
Ownership information for the model
model_providerslist of strings

List of ModelProvider workspace/name resource names that provide inference for this Model Entity

Errors

422
Unprocessable Entity Error