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>",
"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
}
},
"pruningRuleIds": [],
"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>"
}Train a new model.
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>",
"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
}
},
"pruningRuleIds": [],
"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>"
}Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Show child attributes
openpipe The base model to train from. This could be a base model name or the slug of a previously trained model. Supported base models include: meta-llama/Meta-Llama-3.1-8B-Instruct, meta-llama/Meta-Llama-3.1-70B-Instruct, meta-llama/Llama-3.3-70B-Instruct, meta-llama/Llama-3.1-8B, meta-llama/Llama-3.1-70B, Qwen/Qwen2.5-72B-Instruct, Qwen/Qwen2.5-Coder-7B-Instruct, Qwen/Qwen2.5-Coder-32B-Instruct, Qwen/Qwen2.5-1.5B-Instruct, Qwen/Qwen2.5-7B-Instruct, Qwen/Qwen2-VL-7B-Instruct, Qwen/Qwen2.5-14B-Instruct, Qwen/Qwen3-8B, Qwen/Qwen3-14B, mistralai/Mistral-Nemo-Base-2407, mistralai/Mistral-Small-24B-Base-2501, meta-llama/Llama-3.2-1B-Instruct, meta-llama/Llama-3.2-3B-Instruct, google/gemma-3-1b-it, google/gemma-3-4b-it, google/gemma-3-12b-it, google/gemma-3-27b-it
Whether to enable SFT training. If true, the model will be trained using SFT. Can be used in conjunction with DPO training.
Whether to enable DPO training. If true, the model will be trained using DPO. Can be used in conjunction with SFT training.
Hyperparameters for SFT training job. Ensure enable_sft is true. If no SFT hyperparameters are provided, default values will be used.
Hyperparameters for DPO training job. Ensure enable_preference_tuning is true. If no preference hyperparameters are provided, default values will be used.
Show child attributes
DPO DEPRECATED: Use the sft_hyperparameters and preference_hyperparameters fields instead.
Show child attributes
auto DPO Successful response
model Show child attributes
PENDING, TRAINING, DEPLOYED, ERROR, DEPRECATED, PENDING_DEPRECATION, QUEUED, PROVISIONING chat, tools, json