Skip to main content

Webhooks

Webhooks let you subscribe to events from your LLMTune workspace for automation and monitoring.

Supported Events

EventTrigger
training.startedA fine-tuning job enters the running state
training.completedA job finishes successfully
training.failedA job fails or is cancelled
deployment.createdA new endpoint becomes active
deployment.pausedAn endpoint is paused
deployment.deletedAn endpoint is permanently removed
usage.threshold_reachedUsage metrics cross configured thresholds

Register a Webhook

  1. Navigate to Webhooks.
  2. Click Create Endpoint.
  3. Provide:
    • Target URL (HTTPS recommended)
    • Secret for signature validation (optional but recommended)
    • Events to subscribe to
  4. Save and test using the Send Test Event button.

Payload Format

{
  "id": "evt_12345",
  "type": "training.completed",
  "workspace_id": "ws_6789",
  "data": {
    "job_id": "ft_job_abc",
    "model_id": "meta/llama-3.1-8b",
    "metrics": {
      "loss": 1.12,
      "tokens": 3250000,
      "duration_seconds": 1450
    }
  },
  "created_at": "2025-11-09T10:15:00Z",
  "signature": "sha256=..."
}
  • Verify signatures using the shared secret.
  • Respond with 2xx status. LLMTune retries failed deliveries with backoff.

Best Practices

  • Use unique secrets per webhook.
  • Acknowledge quickly; perform heavy processing asynchronously.
  • Log received events for debugging and auditing.