POST
/
models
curl --request POST \
  --url https://api.openpipe.ai/api/v1/models \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '{
  "datasetId": "<string>",
  "slug": "<string>",
  "pruningRuleIds": [],
  "trainingConfig": {
    "provider": "openpipe",
    "baseModel": "<string>",
    "enable_sft": true,
    "enable_preference_tuning": false,
    "sft_hyperparameters": {},
    "preference_hyperparameters": {},
    "hyperparameters": {
      "is_sft_enabled": true,
      "batch_size": "auto",
      "learning_rate_multiplier": 123,
      "num_epochs": 123,
      "is_preference_tuning_enabled": true,
      "preference_tuning_variant": "DPO",
      "preference_tuning_learning_rate_multiplier": 123,
      "preference_tuning_num_epochs": 123,
      "preference_tuning_training_beta": 123,
      "preference_tuning_adapter_weight": 123
    }
  },
  "defaultTemperature": 123
}'
{
  "id": "<string>",
  "name": "<string>",
  "object": "model",
  "description": "<string>",
  "created": "<string>",
  "updated": "<string>",
  "openpipe": {
    "baseModel": "<string>",
    "hyperparameters": {},
    "status": "PENDING",
    "datasetId": "<string>",
    "errorMessage": "<string>"
  },
  "contextWindow": 123,
  "maxCompletionTokens": 123,
  "capabilities": [
    "chat"
  ],
  "pricing": {
    "chatIn": 123,
    "chatOut": 123
  },
  "owned_by": "<string>"
}

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Body

application/json

Response

200
application/json

Successful response

The response is of type object.