---
title: "Create Dedicated Run"
method: POST
path: "/api/v1/training/runs"
tags: ["training"]
---

# Create Dedicated Run

`POST /api/v1/training/runs`

Dispatch a dedicated full-FT prime-rl run on a registered PrimeCluster.

Access is gated by ClusterAllocation - the picker in
`training_service.create_dedicated_run` rejects callers whose
team/user has no matching allocation on a live PrimeCluster. When
`team_id` is set the caller must additionally be a member of that
team (mirrors the LoRA/shared dispatch path).

Config validation (validator schema, hub env ids, HF repo names,
per-run GPU cap) runs sync so bad configs return 400 immediately.
Cluster-side probes (GPU capacity, model cache) and the helm
install run async in a Cloud Task; callers poll
`GET /api/v1/rft/runs/{run_id}` for status transitions PENDING ->
CREATING -> RUNNING (or FAILED with errorMessage on a cluster-side
rejection).

## Request body

- CreateDedicatedRunRequest
  - `config` object, required — Full prime-rl-style TOML, parsed to a dict. Same shape as `prime-rl/examples/*/rl.toml`; the platform splits it into trainer / orchestrator / inference subconfigs and bakes each into the corresponding pod's startup command.
  - `imageTag` string — prime-rl container image tag
  - `name` string, nullable — Optional human-readable run name
  - `teamId` string, nullable — Owning team (defaults to caller's user)
  - `wandbApiKey` string, nullable — W&B key. On the PENDING fast-path it's materialised straight into the run's k8s Secret. On the QUEUED path it's stashed AES-encrypted on the RFTRun row so the drainer can rebuild the same Secret at promotion time without re-prompting.
  - `hfToken` string, nullable — HF token for gated/private model downloads. Same storage rules as wandbApiKey above.
  - `gpuType` string, nullable — Optional GPU type constraint (e.g. 'H200_141GB', 'B200_180GB'). When set, dispatch is restricted to PrimeClusters whose `gpuType` matches. When omitted, the picker chooses the oldest eligible cluster with no type preference.

## Response `201`

Successful Response

- CreateDedicatedRunResponse
  - `runId` string, required
  - `jobId` string, required
  - `tokenValue` string, required — PRIME_API_KEY for this run. Returned once — the platform stores only the token id.

## Other responses

- `401` — Authorization failed
- `422` — Invalid request data

---

[API](https://skmtc.net/primeintellect/apis/pi-api.md) · [All operations](https://skmtc.net/primeintellect/apis/pi-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/primeintellect/pi-api/versions/60efc9b3ff2a/schema)
