Training API
Fine-tune a custom model, inspect held-out evaluations, and export its LoRA adapter.
Enterprise: this feature is gated behind a separate software license.
Get access
The Training API is available to select customers through early access; contact founders@experientiallabs.ai to request access.
Enable Read or Read and manage on your API key under Access > API Keys > Training permissions.
| Permission | Allows |
|---|---|
training:read | Models, recipes, environments, runs, metrics and adapter downloads |
training:write | Importing environments, previewing, launching and cancelling runs |
Your API key determines the organization. No organization ID is needed in the URL or headers.
GET/v1/training/accesscurl --fail-with-body https://api.staging.experientiallabs.ai/v1/training/access \
-H "Authorization: Bearer <YOUR_API_KEY>"{
"training_enabled": true,
"recorded_runs": false
}Set the API host
These examples use https://api.staging.experientiallabs.ai. Use the host and API key provided with your access.
| Step | API |
|---|---|
| Choose a custom model | GET /v1/custom-models |
| Import tasks | Harbor environments |
| Review and launch | Training runs |
| Compare evals and export | Metrics and LoRA adapters |
https://api.staging.experientiallabs.ai
Authorization: Bearer <YOUR_API_KEY>
Content-Type: application/jsonChoose a custom model
Reuse a model from GET /v1/custom-models, or create one with an existing organization identity_id and a model slug available from GET /v1/models. Replace the example IDs and model slug with your own values.
/v1/custom-modelsUse the returned id as project_id in training requests. baseline_model is the model this custom model uses for inference. The training recipe selects the model to train.
curl --fail-with-body -X POST https://api.staging.experientiallabs.ai/v1/custom-models \
-H "Authorization: Bearer <YOUR_API_KEY>" \
-H "Content-Type: application/json" \
-d '{
"display_name": "Terminal agent",
"alias": "terminal-agent",
"identity_id": "00000000-0000-4000-8000-000000000002",
"baseline_model": "<MODEL_SLUG_FROM_V1_MODELS>"
}'Choose a recipe
List recipes and select a version to see its defaults and supported settings. The example below uses Qwen3.5 9B with asynchronous GRPO, LoRA rank 128, 64K context and two H100s: one trainer and one sampler. Check compute profiles for available GPUs.
| Recipe setting | Example |
|---|---|
| Recipe key | async-grpo-lora-qwen35-9b-64k-r128 |
| Recipe version | 1 |
| Rollouts per task group | 8 |
| Trajectories per optimizer update | 32 |
| Task groups per collection | 32 |
This recipe collects 256 trajectories and trains in mini-batches of 32. max_optimizer_steps counts optimizer updates. The recipe sets optimizer parameters, rollout grouping and LoRA targets.
curl --fail-with-body https://api.staging.experientiallabs.ai/v1/training/recipes/async-grpo-lora-qwen35-9b-64k-r128/versions/1 \
-H "Authorization: Bearer <YOUR_API_KEY>"Preview a run
Save this body as run.json, replacing the model and ready environment-version IDs. The environment must contain enough distinct tasks for the held-out split and training groups.
/v1/training/preview| Setting | Meaning |
|---|---|
tasks_per_step | Task groups collected before mini-batching |
max_optimizer_steps | Maximum optimizer updates |
max_turns | Agent turns per trajectory |
max_output_tokens_per_turn | Output limit per turn |
max_context_tokens | Total context budget |
eval_interval_steps | Updates between held-out evaluations |
eval_task_count | Distinct held-out tasks |
rollout_concurrency | Concurrent rollouts |
max_wall_seconds | Work-time limit |
max_credit_nano_usd | Charge ceiling; 1 USD = 1,000,000,000 nano-USD |
seed | Reproducible task split |
Preview returns the configuration and estimated cost without starting a run.
{
"source_ref": "terminal_grpo_001",
"project_id": "00000000-0000-4000-8000-000000000001",
"environment_version_ids": [
"00000000-0000-4000-8000-000000000004"
],
"recipe_key": "async-grpo-lora-qwen35-9b-64k-r128",
"recipe_version": 1,
"settings": {
"tasks_per_step": 32,
"max_optimizer_steps": 50,
"max_turns": 32,
"max_output_tokens_per_turn": 8192,
"max_context_tokens": 65536,
"eval_interval_steps": 5,
"eval_task_count": 32,
"rollout_concurrency": 16,
"max_wall_seconds": 21600,
"max_credit_nano_usd": 100000000000,
"seed": 20261115
}
}curl --fail-with-body -X POST https://api.staging.experientiallabs.ai/v1/training/preview \
-H "Authorization: Bearer <YOUR_API_KEY>" \
-H "Content-Type: application/json" \
--data @run.json > preview.jsonStart training
Review configuration and estimate in preview.json. You can start training when launchable is true. If it is false, retry the preview when capacity is available.
To accept the settings and cost, add the returned config_sha256 as approved_config_sha256 and submit the same request.
/v1/trainingIf a request times out, retry with the same source_ref and body to retrieve the same run. Use a new source_ref for a new run.
Queued time is free. GPU time includes model loading, rollouts, evaluation and checkpoints. Billing ends when the GPUs are released.
# After accepting the settings and cost in preview.json:
jq --arg digest "$(jq -r .config_sha256 preview.json)" \
'. + {approved_config_sha256: $digest}' run.json > approved-run.json
curl --fail-with-body -X POST https://api.staging.experientiallabs.ai/v1/training \
-H "Authorization: Bearer <YOUR_API_KEY>" \
-H "Content-Type: application/json" \
--data @approved-run.json{
"id": "00000000-0000-4000-8000-000000000005",
"project_id": "00000000-0000-4000-8000-000000000001",
"source_ref": "terminal_grpo_001",
"status": "queued"
}Poll, cancel and handle errors
Poll run.status until it is completed, failed or cancelled. The response also includes compute details, environments, events and charges.
/v1/training/{run_id}POST/v1/training/{run_id}/cancel| Status / code | Action |
|---|---|
401 | Check the key and training scopes |
404 | Check the ID and your access to the resource |
409 config_approval_required | Preview and approve before launch |
409 config_approval_stale | Preview again and review the new terms |
409 source_ref_conflict | Retry the identical request, or use a new reference for new work |
409 allocation_unavailable | Wait for capacity and preview again |
422 | Fix settings, task split or recipe constraints |
503 | A required service is unavailable |
Cancellation may take time. Keep polling until the run is cancelled, completed or failed.
{
"error": "Review and explicitly approve the configuration before launching",
"code": "config_approval_required"
}curl --fail-with-body -X POST https://api.staging.experientiallabs.ai/v1/training/00000000-0000-4000-8000-000000000005/cancel \
-H "Authorization: Bearer <YOUR_API_KEY>"Read incremental metrics
Read train and eval metrics. The fields in data depend on the recipe.
/v1/training/{run_id}/metricsStart with after=0. Use next_after when present, even if metrics is empty. Otherwise use the last returned metric ID, or keep your previous cursor when nothing was returned. Poll run status to check for completion.
Use events for state transitions and run details for charges.
curl --fail-with-body "https://api.staging.experientiallabs.ai/v1/training/00000000-0000-4000-8000-000000000005/metrics?after=0&limit=100" \
-H "Authorization: Bearer <YOUR_API_KEY>"Compare held-out evaluation
Compare the baseline evaluation (baseline: true) with the final evaluation on the same held-out tasks. Check that both evaluations completed and used the same number of tasks before comparing scores.
{
"id": 42,
"at": "2026-11-20T01:00:00Z",
"kind": "eval",
"optimizer_step": 50,
"data": {
"score": 0.5,
"tasks": 32,
"complete": true,
"baseline": false
}
}Open Trackio
Open dashboard_url and select the returned project in Trackio. Sign in to Trackio if prompted.
/v1/training/{run_id}/trackioRuns without hosted charts may have no dashboard URL. A 503 response means the dashboard is unavailable.
curl --fail-with-body https://api.staging.experientiallabs.ai/v1/training/00000000-0000-4000-8000-000000000005/trackio \
-H "Authorization: Bearer <YOUR_API_KEY>"Export the LoRA adapter
List the model's versions, choose the adapter for your training run, and wait for state: "available". Model versions include the training run, checksum, size and manifest.
/v1/custom-models/{model_id}/versionsPOST/v1/custom-models/{model_id}/versions/{model_version_id}/downloadRequires training:read. Download from the signed URL within 300 seconds and verify sha256 and bytes. Do not send your API key to the download URL. If the adapter is not ready, the request returns 409 artifact_not_archived.
The download contains the LoRA adapter. Deploy it to a compatible inference server to use the trained model.
{
"url": "https://example.invalid/signed-adapter",
"expires_in_seconds": 300,
"sha256": "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
"bytes": 185000000
}