⚡ Quick Start

Get started in under 5 minutes with working examples

1. Make Your First API Call

Let's start by listing available models. This confirms your API is working.

📘 What this does:

Retrieves a list of all available models you can use for training and inference.

curl https://finetunelab.ai/api/models

💬 Ask Your AI Assistant:

"Call the models API endpoint and show me the available models"

✅ Response you'll get:

{
  "models": [
    {
      "id": "llama-3-8b",
      "name": "LLaMA 3 8B",
      "status": "available"
    },
    {
      "id": "mistral-7b",
      "name": "Mistral 7B",
      "status": "available"
    }
  ]
}

2. Start a Training Job

Now let's start training a model with your dataset.

📘 What this does:

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"
  }'

💬 Ask Your AI Assistant:

"Start a training job using llama-3-8b with my dataset ID abc123"

✅ Response you'll get:

{
  "job_id": "job-12345",
  "status": "queued",
  "message": "Training job started successfully"
}

3. Monitor Training Progress

Check the status of your training job using the job ID from step 2.

curl https://finetunelab.ai/api/training/status/job-12345

✅ Response you'll get:

{
  "job_id": "job-12345",
  "status": "running",
  "progress": 45,
  "current_epoch": 2,
  "total_epochs": 5,
  "loss": 0.234
}

4. Deploy Your Model

Once training completes, deploy your model to production with RunPod Serverless cloud inference.

📘 What this does:

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
  }'

✅ Expected Response:

{
  "success": true,
  "deployment_id": "dep-xyz789",
  "endpoint_url": "https://api.runpod.ai/v2/xyz789",
  "status": "deploying",
  "cost_per_request": 0.0004
}

🎯 What's Next

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

⚠️ Common Issues

❌ "Connection refused"

The API server isn't running. Start it with:

npm run dev

❌ "Dataset not found"

Check your dataset ID. List available datasets with:

curl https://finetunelab.ai/api/datasets

🎉 What's Next?