Estimate the fee of continuing a family
The exact fee POST /v1/families/{family}/continue would hold for the same body now,
without max_price_usd, worked out as the continuation does: the same new rows and the same
sample of earlier rows. Nothing is queued or held. The estimate is exact if nothing
changes before you start; pass it as max_price_usd to cap the price.
curl --request POST \
--url https://console.sqwish.ai/v1/families/{family}/continue/estimate \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"hyperparameters": {
"steps": 1000,
"learning_rate": 0.00005,
"lora_rank": 8,
"seed": 42,
"checkpoint_every": 10,
"kl_coefficient": 0.05
},
"latest": "<string>"
}
'import requests
url = "https://console.sqwish.ai/v1/families/{family}/continue/estimate"
payload = {
"hyperparameters": {
"steps": 1000,
"learning_rate": 0.00005,
"lora_rank": 8,
"seed": 42,
"checkpoint_every": 10,
"kl_coefficient": 0.05
},
"latest": "<string>"
}
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({
hyperparameters: {
steps: 1000,
learning_rate: 0.00005,
lora_rank: 8,
seed: 42,
checkpoint_every: 10,
kl_coefficient: 0.05
},
latest: '<string>'
})
};
fetch('https://console.sqwish.ai/v1/families/{family}/continue/estimate', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));{
"currency": "USD",
"price_usd": "<string>",
"minimum_applied": true,
"trained_tokens": 123,
"steps": 123,
"seed": 123,
"passes": 123,
"train_rows": 123,
"dataset_version": 123
}{
"error": {
"code": "<string>",
"message": "<string>",
"retryable": true,
"request_id": "<string>",
"details": [
{
"path": [
"<string>"
],
"message": "<string>",
"type": "<string>"
}
]
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"retryable": true,
"request_id": "<string>",
"details": [
{
"path": [
"<string>"
],
"message": "<string>",
"type": "<string>"
}
]
}
}Authorizations
Create an API key in the console. Required when accounts are enabled.
Path Parameters
Body
A family's next fine-tune, from its latest model on its dataset's newer rows, as its estimate takes it: the body that starts it, without max_price_usd.
Response
Successful Response
"USD"The fee a fine-tune started now with the same body would hold, as exact USD: its base's fine_tune_million_tokens_usd for trained_tokens, and at least fine_tune_minimum_usd. 0 when it would be free. The job's price_usd is this sum while the prices, the account, the dataset and the family stay as they are; send it as max_price_usd, and a job that would cost more is refused with price_changed.
True when the fee is fine_tune_minimum_usd, which is more than its training tokens cost.
The training tokens it would train, as the job's split.trained_tokens counts them. Null only for a free fine-tune whose rows can't be counted.
Its training steps: the ones sent, or the default passes.
Its seed, which orders the rows its steps take.
How many times its steps go over its training rows, to two decimals.
The training rows it trains on: a continuation's new rows and the earlier rows sampled with them.
The dataset version it would train on: its newest.
curl --request POST \
--url https://console.sqwish.ai/v1/families/{family}/continue/estimate \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"hyperparameters": {
"steps": 1000,
"learning_rate": 0.00005,
"lora_rank": 8,
"seed": 42,
"checkpoint_every": 10,
"kl_coefficient": 0.05
},
"latest": "<string>"
}
'import requests
url = "https://console.sqwish.ai/v1/families/{family}/continue/estimate"
payload = {
"hyperparameters": {
"steps": 1000,
"learning_rate": 0.00005,
"lora_rank": 8,
"seed": 42,
"checkpoint_every": 10,
"kl_coefficient": 0.05
},
"latest": "<string>"
}
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({
hyperparameters: {
steps: 1000,
learning_rate: 0.00005,
lora_rank: 8,
seed: 42,
checkpoint_every: 10,
kl_coefficient: 0.05
},
latest: '<string>'
})
};
fetch('https://console.sqwish.ai/v1/families/{family}/continue/estimate', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));{
"currency": "USD",
"price_usd": "<string>",
"minimum_applied": true,
"trained_tokens": 123,
"steps": 123,
"seed": 123,
"passes": 123,
"train_rows": 123,
"dataset_version": 123
}{
"error": {
"code": "<string>",
"message": "<string>",
"retryable": true,
"request_id": "<string>",
"details": [
{
"path": [
"<string>"
],
"message": "<string>",
"type": "<string>"
}
]
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"retryable": true,
"request_id": "<string>",
"details": [
{
"path": [
"<string>"
],
"message": "<string>",
"type": "<string>"
}
]
}
}