Skip to content
Hayonix

API reference · Fine-tuning

Models that can be fine-tuned, how, on which hardware and at what price

GET/v1/fine-tunes/base-models
API keyfine_tune_job:readProject
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

Headers
HeaderRequiredDescription
AuthorizationyesBearer and your API key. The key implies its project.
X-Project-Idsession onlyThe project to act in, for console sessions. Requests with an API key leave it out.

Response

200 JSON — Every fine-tunable model

  • The items

    Show 11 fields of data
    • objectstringrequired

      Always `fine_tune_base_model`: the type of this object

      One offine_tune_base_model

    • idstringrequired

      Unique ID (`mdl_…`)

      ID with prefix mdl_

    • modelstringrequired

      Model ID (`publisher/name`)

    • display_namestringrequired

      Name to show people

    • licensestring | nullrequired

      Licence of the model's weights; null when not recorded

    • methodsarray of stringrequired

      Training methods the model supports

    • adaptersarray of stringrequired

      Adapter types the model supports

    • max_seq_lengthintegerrequired

      Longest example in tokens; longer ones are truncated

    • hardwarearray of stringrequired

      SKUs it trains on (first = default)

    • priceTrainingPrice | any JSON | nullrequired

      The training price per token in the price book in force; null when fine-tuning this model is not priced (creating a job is refused)

      Show 5 fields of price
      • unit_pricestringrequired

        Integer nano-USD as a decimal string

        pattern ^-?[0-9]+$

      • unit_quantitystringrequired

        Tokens the unit price is for

      • per_million_tokensstringrequired

        Integer nano-USD as a decimal string

        pattern ^-?[0-9]+$

      • display_unitstring | nullrequired

        Label of the unit for display; null when none is set

      • price_book_versionintegerrequired

        Version of the price book the price comes from

    • pricing_placeholderbooleanrequired

      True while the model's prices are development placeholders

  • next_cursorany JSON | nullrequired

    Pass as `cursor` to get the next page; null when there is no more

Example response
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:

Errors
StatusTypeWhen
401authentication_errorThe key or session is missing, revoked or expired.
403permission_errorThe credential lacks the permission this needs, or the organization is suspended.
429rate_limit_error rate_limitedToo many requests; retry after retry-after seconds.