Pin a version
curl --request POST \
--url https://api.veri.studio/v1/models/{name}/versions/{version}/pin \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{
"pinned": true
}'import requests
url = "https://api.veri.studio/v1/models/{name}/versions/{version}/pin"
payload = { "pinned": True }
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({pinned: true})
};
fetch('https://api.veri.studio/v1/models/{name}/versions/{version}/pin', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));{
"object": "<string>",
"id": "<string>",
"model_id": "<string>",
"model": "<string>",
"version": 123,
"name": "<string>",
"artifact_type": "<string>",
"tags": [
"<string>"
],
"pinned": true,
"status": "<string>",
"aliases": [
"<string>"
],
"created_at": "2023-11-07T05:31:56Z",
"custom_model_id": "<string>",
"dataset_snapshot_id": "<string>",
"training_job_id": "<string>",
"parent_version_id": "<string>",
"pinned_at": "2023-11-07T05:31:56Z",
"purged_at": "2023-11-07T05:31:56Z",
"created_by": "<string>"
}Authorizations
API key with the vk_ prefix. Create one from the dashboard.
Body
Optional; defaults to pinned=true
true (default) pins; false unpins.
Response
The version with its new pinned state
One version of a lineage ({name}@v{version}).
Always "model_version".
Version id (mv...).
Lineage id.
Lineage name.
Dense, monotonic version number within the lineage.
Human handle: "{model}@v{version}".
'full' | 'adapter'.
Pinned versions are protected from retention.
'ready' | 'purged'. A purged version still lists (number, tags, audit and scorecards stay), but its weights are deleted and it can no longer be deployed, attached or promoted.
Aliases currently pointing at this version.
The library model (custom_models row) whose weights this version is; deploy or attach by this id.
Dataset snapshot or plain dataset id the version was trained on.
The version production pointed at when this one was registered.
curl --request POST \
--url https://api.veri.studio/v1/models/{name}/versions/{version}/pin \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{
"pinned": true
}'import requests
url = "https://api.veri.studio/v1/models/{name}/versions/{version}/pin"
payload = { "pinned": True }
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({pinned: true})
};
fetch('https://api.veri.studio/v1/models/{name}/versions/{version}/pin', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));{
"object": "<string>",
"id": "<string>",
"model_id": "<string>",
"model": "<string>",
"version": 123,
"name": "<string>",
"artifact_type": "<string>",
"tags": [
"<string>"
],
"pinned": true,
"status": "<string>",
"aliases": [
"<string>"
],
"created_at": "2023-11-07T05:31:56Z",
"custom_model_id": "<string>",
"dataset_snapshot_id": "<string>",
"training_job_id": "<string>",
"parent_version_id": "<string>",
"pinned_at": "2023-11-07T05:31:56Z",
"purged_at": "2023-11-07T05:31:56Z",
"created_by": "<string>"
}
