curl --request PUT \
--url https://{controlPlaneURL}/api/ml/v1/model-versions \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"manifest": {
"name": "<string>",
"metadata": {},
"ml_repo": "<string>",
"source": {
"type": "truefoundry",
"uri": "<string>"
},
"version": 2,
"type": "model-version",
"description": "<string>",
"version_alias": "<string>",
"framework": {
"type": "transformers",
"library_name": "transformers",
"pipeline_tag": "<string>",
"base_model": "<string>"
},
"environment": {
"python_version": "<string>",
"pip_packages": [
"<string>"
]
},
"step": 0,
"run_id": "<string>"
}
}
'{
"data": {
"id": "<string>",
"fqn": "<string>",
"created_by_subject": {
"subjectId": "<string>",
"subjectType": "user",
"subjectSlug": "<string>",
"subjectDisplayName": "<string>",
"subjectPatName": "<string>",
"subjectControllerName": "<string>",
"subjectExternalIdentitySlug": "<string>"
},
"manifest": {
"name": "<string>",
"metadata": {},
"ml_repo": "<string>",
"source": {
"type": "truefoundry",
"uri": "<string>"
},
"version": 2,
"type": "model-version",
"description": "<string>",
"version_alias": "<string>",
"framework": {
"type": "transformers",
"library_name": "transformers",
"pipeline_tag": "<string>",
"base_model": "<string>"
},
"environment": {
"python_version": "<string>",
"pip_packages": [
"<string>"
]
},
"step": 0,
"run_id": "<string>"
},
"ml_repo_id": "<string>",
"model_id": "<string>",
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z",
"tags": [
"<string>"
],
"version_alias": "<string>",
"usage_code_snippet": "<string>",
"metrics": [
{
"key": "<string>",
"value": 123,
"timestamp": 123,
"step": 0
}
],
"deployable": false
}
}Create or update a model version.
curl --request PUT \
--url https://{controlPlaneURL}/api/ml/v1/model-versions \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"manifest": {
"name": "<string>",
"metadata": {},
"ml_repo": "<string>",
"source": {
"type": "truefoundry",
"uri": "<string>"
},
"version": 2,
"type": "model-version",
"description": "<string>",
"version_alias": "<string>",
"framework": {
"type": "transformers",
"library_name": "transformers",
"pipeline_tag": "<string>",
"base_model": "<string>"
},
"environment": {
"python_version": "<string>",
"pip_packages": [
"<string>"
]
},
"step": 0,
"run_id": "<string>"
}
}
'{
"data": {
"id": "<string>",
"fqn": "<string>",
"created_by_subject": {
"subjectId": "<string>",
"subjectType": "user",
"subjectSlug": "<string>",
"subjectDisplayName": "<string>",
"subjectPatName": "<string>",
"subjectControllerName": "<string>",
"subjectExternalIdentitySlug": "<string>"
},
"manifest": {
"name": "<string>",
"metadata": {},
"ml_repo": "<string>",
"source": {
"type": "truefoundry",
"uri": "<string>"
},
"version": 2,
"type": "model-version",
"description": "<string>",
"version_alias": "<string>",
"framework": {
"type": "transformers",
"library_name": "transformers",
"pipeline_tag": "<string>",
"base_model": "<string>"
},
"environment": {
"python_version": "<string>",
"pip_packages": [
"<string>"
]
},
"step": 0,
"run_id": "<string>"
},
"ml_repo_id": "<string>",
"model_id": "<string>",
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z",
"tags": [
"<string>"
],
"version_alias": "<string>",
"usage_code_snippet": "<string>",
"metrics": [
{
"key": "<string>",
"value": 123,
"timestamp": 123,
"step": 0
}
],
"deployable": false
}
}Documentation Index
Fetch the complete documentation index at: https://www.truefoundry.com/llms.txt
Use this file to discover all available pages before exploring further.
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Manifest containing metadata for the model to apply
Show child attributes
The created or updated model version
The model version data
Show child attributes
Was this page helpful?