Get started in under 5 minutes with working examples
Let's start by listing available models. This confirms your API is working.
Retrieves a list of all available models you can use for training and inference.
curl https://finetunelab.ai/api/models"Call the models API endpoint and show me the available models"
{
"models": [
{
"id": "llama-3-8b",
"name": "LLaMA 3 8B",
"status": "available"
},
{
"id": "mistral-7b",
"name": "Mistral 7B",
"status": "available"
}
]
}Now let's start training a model with your dataset.
Starts a new fine-tuning job with your specified model and dataset.
curl -X POST https://finetunelab.ai/api/training/start \
-H "Content-Type: application/json" \
-d '{
"model": "llama-3-8b",
"dataset": "my-dataset-id",
"config": "default"
}'"Start a training job using llama-3-8b with my dataset ID abc123"
{
"job_id": "job-12345",
"status": "queued",
"message": "Training job started successfully"
}Check the status of your training job using the job ID from step 2.
curl https://finetunelab.ai/api/training/status/job-12345{
"job_id": "job-12345",
"status": "running",
"progress": 45,
"current_epoch": 2,
"total_epochs": 5,
"loss": 0.234
}Once training completes, deploy your model to production with RunPod Serverless cloud inference.
Deploys your trained model to a serverless GPU endpoint with auto-scaling and budget controls. The deployment takes 2-5 minutes and gives you an API endpoint for inference.
curl -X POST https://finetunelab.ai/api/inference/deploy \
-H "Authorization: Bearer YOUR_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"provider": "runpod-serverless",
"deployment_name": "my-model-prod",
"training_job_id": "job-12345",
"gpu_type": "NVIDIA RTX A4000",
"budget_limit": 5.0
}'{
"success": true,
"deployment_id": "dep-xyz789",
"endpoint_url": "https://api.runpod.ai/v2/xyz789",
"status": "deploying",
"cost_per_request": 0.0004
}Wait 2-5 minutes for deployment to become active, then make inference requests to your endpoint.
Learn more: Deploy to Production Guide | Full Code Examples
The API server isn't running. Start it with:
npm run devCheck your dataset ID. List available datasets with:
curl https://finetunelab.ai/api/datasets