API reference · Fine-tuning
Models that can be fine-tuned, how, on which hardware and at what price
/v1/fine-tunes/base-models- TypeScript
client.fineTuning.listBaseModels()- Python
client.fine_tuning.list_base_models()- CLI
hayonix fine-tunes base-models
Every base model accepted as model when creating a job, with the methods and adapter types it supports and its per-token training price from the price book in force. The list is returned whole, in one page.
Project API key (Authorization: Bearer sk_…), or a console session. Requires the fine_tune_job:read permission (a key's scope, or a role that includes it).
Examples
The samples read API_KEY and API_BASE_URL from the environment (see Setup). Values are examples.
curl -sS "$API_BASE_URL/fine-tunes/base-models" \
-H "Authorization: Bearer $API_KEY"Request
| Header | Required | Description |
|---|---|---|
Authorization | yes | Bearer and your API key. The key implies its project. |
X-Project-Id | session only | The project to act in, for console sessions. Requests with an API key leave it out. |
Response
200 JSON — Every fine-tunable model
The items
ShowHide 11 fields of
dataobjectstringrequiredAlways `fine_tune_base_model`: the type of this object
One of
fine_tune_base_modelidstringrequiredUnique ID (`mdl_…`)
ID with prefix mdl_
modelstringrequiredModel ID (`publisher/name`)
display_namestringrequiredName to show people
licensestring | nullrequiredLicence of the model's weights; null when not recorded
methodsarray of stringrequiredTraining methods the model supports
adaptersarray of stringrequiredAdapter types the model supports
max_seq_lengthintegerrequiredLongest example in tokens; longer ones are truncated
hardwarearray of stringrequiredSKUs it trains on (first = default)
priceTrainingPrice | any JSON | nullrequiredThe training price per token in the price book in force; null when fine-tuning this model is not priced (creating a job is refused)
ShowHide 5 fields of
priceunit_pricestringrequiredInteger nano-USD as a decimal string
pattern ^-?[0-9]+$
unit_quantitystringrequiredTokens the unit price is for
per_million_tokensstringrequiredInteger nano-USD as a decimal string
pattern ^-?[0-9]+$
display_unitstring | nullrequiredLabel of the unit for display; null when none is set
price_book_versionintegerrequiredVersion of the price book the price comes from
pricing_placeholderbooleanrequiredTrue while the model's prices are development placeholders
next_cursorany JSON | nullrequiredPass as `cursor` to get the next page; null when there is no more
Example response
{
"data": [
{
"object": "fine_tune_base_model",
"id": "mdl_01jc5zq4m8k3v6x9t2w7r0b1e4",
"model": "string",
"display_name": "string",
"license": "string",
"methods": [
"supervised"
],
"adapters": [
"lora"
],
"max_seq_length": 1,
"hardware": [
"string"
],
"price": {
"unit_price": "1500000000",
"unit_quantity": "string",
"per_million_tokens": "1500000000",
"display_unit": "string",
"price_book_version": 1
},
"pricing_placeholder": true
}
],
"next_cursor": {}
}Errors
Errors use the standard envelope. What this operation can answer:
| Status | Type | When |
|---|---|---|
401 | authentication_error | The key or session is missing, revoked or expired. |
403 | permission_error | The credential lacks the permission this needs, or the organization is suspended. |
429 | rate_limit_error rate_limited | Too many requests; retry after retry-after seconds. |