cURL
curl --request POST \
--url http://studio.premai.io/api/v1/public/finetuning/create \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"snapshot_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"name": "<string>",
"experiments": [
{
"base_model_id": "<string>",
"batch_size": 2,
"learning_rate_multiplier": 1,
"n_epochs": 2,
"refinetune_from_experiment_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
}
]
}
'import requests
url = "http://studio.premai.io/api/v1/public/finetuning/create"
payload = {
"snapshot_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"name": "<string>",
"experiments": [
{
"base_model_id": "<string>",
"batch_size": 2,
"learning_rate_multiplier": 1,
"n_epochs": 2,
"refinetune_from_experiment_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
}
]
}
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({
snapshot_id: '3c90c3cc-0d44-4b50-8888-8dd25736052a',
name: '<string>',
experiments: [
{
base_model_id: '<string>',
batch_size: 2,
learning_rate_multiplier: 1,
n_epochs: 2,
refinetune_from_experiment_id: '3c90c3cc-0d44-4b50-8888-8dd25736052a'
}
]
})
};
fetch('http://studio.premai.io/api/v1/public/finetuning/create', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));{
"job_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
}{
"error": "<string>"
}{
"error": "<string>"
}{
"error": "<string>"
}{
"error": "<string>"
}{
"error": "<string>"
}Fine-Tuning API
Create Fine-Tuning Job
Launch a fine-tuning job from a snapshot and experiment plan.
POST
/
api
/
v1
/
public
/
finetuning
/
create
cURL
curl --request POST \
--url http://studio.premai.io/api/v1/public/finetuning/create \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"snapshot_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"name": "<string>",
"experiments": [
{
"base_model_id": "<string>",
"batch_size": 2,
"learning_rate_multiplier": 1,
"n_epochs": 2,
"refinetune_from_experiment_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
}
]
}
'import requests
url = "http://studio.premai.io/api/v1/public/finetuning/create"
payload = {
"snapshot_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"name": "<string>",
"experiments": [
{
"base_model_id": "<string>",
"batch_size": 2,
"learning_rate_multiplier": 1,
"n_epochs": 2,
"refinetune_from_experiment_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
}
]
}
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({
snapshot_id: '3c90c3cc-0d44-4b50-8888-8dd25736052a',
name: '<string>',
experiments: [
{
base_model_id: '<string>',
batch_size: 2,
learning_rate_multiplier: 1,
n_epochs: 2,
refinetune_from_experiment_id: '3c90c3cc-0d44-4b50-8888-8dd25736052a'
}
]
})
};
fetch('http://studio.premai.io/api/v1/public/finetuning/create', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));{
"job_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
}{
"error": "<string>"
}{
"error": "<string>"
}{
"error": "<string>"
}{
"error": "<string>"
}{
"error": "<string>"
}Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Body
application/json
Response
Fine-tuning job created successfully
Was this page helpful?
⌘I