v1
latestOpenAPI 3.1.02026-07-26157321426.3 KBCreates a training job
Creates a training job with the specified configuration.
post/v1/training_projects/{training_project_id}/jobs
Request body
Example request
{
"training_job": {
"image": {
"base_image": "hello-world",
"docker_auth": {
"gcp_service_account_json_docker_auth": {
"service_account_json_secret_ref": {
"name": "hf_token"
}
},
"aws_iam_docker_auth": {
"access_key_secret_ref": {
"name": "hf_token"
},
"secret_access_key_secret_ref": {
"name": "hf_token"
}
},
"registry_secret_docker_auth": {
"secret_ref": {
"name": "hf_token"
}
}
}
},
"compute": {
"node_count": 1,
"cpu_count": 1,
"memory": "2Gi",
"accelerator": {
"accelerator": "H100",
"count": 2
}
},
"runtime": {
"start_commands": [
"python main.py"
],
"environment_variables": {
"API_KEY": "your_api_key_here",
"PATH": "/usr/bin"
},
"artifacts": [
{
"s3_bucket": "my-s3-bucket",
"s3_key": "my-s3-key"
}
],
"enable_cache": true,
"cache_config": {
"enable_legacy_hf_mount": true,
"enabled": true,
"require_cache_affinity": true,
"mount_base_path": "/workspace/.cache"
},
"checkpointing_config": {
"enabled": true,
"checkpoint_path": "/mnt/ckpts",
"volume_size_gib": 10
}
},
"name": "gpt-oss-job",
"interactive_session": {
"timeout_minutes": 480
},
"weights": [
{
"allow_patterns": null,
"auth": null,
"auth_secret_name": null,
"ignore_patterns": null,
"mount_location": "/app/models/base",
"source": "hf://meta-llama/Llama-3-8B@main"
}
]
}
}Response
Example response
{
"training_job": {
"name": "gpt-oss-job"
}
}