Skip to main content
POST
Create Dedicated Run

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Body

application/json
config
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.

wandbApiKey
string | null

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 | null

HF token for gated/private model downloads. Same storage rules as wandbApiKey above.

secrets
Secrets · object | null

Arbitrary env-var secrets projected into trainer / inference / orchestrator / env-server pods (parity with the LoRA path). Keys must be uppercase POSIX env-var names (e.g. 'OPENAI_API_KEY'); WANDB_API_KEY / HF_TOKEN / PRIME_API_KEY are reserved — use the dedicated fields for those. Materialised into the per-run k8s Secret. Held encrypted on the RFTRun row only for the sync -> dispatch-task hop, then cleared once the run deploys (or on stop / delete / rollback); never returned by any read endpoint.

mode
enum<string>
default:rl

Which prime-rl schema the config blob follows. 'rl' (default) is the RL mega-TOML (trainer + orchestrator + inference). 'sft' is the SFT mega-TOML (top-level model/data/optim blocks, trainer-only deployment): the validator validates it against SFTConfig and renders a trainer-only Helm release (no orchestrator, inference, or env-server pods). 'pretrain' is prime-rl's PretrainConfig, trainer-only like SFT, reading tokenized shards from the run's named volume; it runs only as a PrimeRun and needs a locally compiled config. The caller declares the mode; the backend never sniffs the config shape.

Available options:
rl,
sft,
pretrain
imageTag
string | null

prime-rl container image tag on ghcr.io/primeintellect-ai/prime-rl. Omit to use the deployment default: the operator-configured RL_FFT_DEFAULT_IMAGE_TAG when set, otherwise the validator's pinned build for RL runs and main for SFT runs. An explicit value, including main, is always used as-is.

sourceRef
string | null

prime-rl git ref (branch, tag, or sha in the canonical PrimeIntellect-ai/prime-rl repo) the pods check out over the image's baked source at start, so a branch can be tested without building an image. The validator resolves it to a commit and validates the config against that commit's schema; the resolved sha is pinned on the run. Not generally available: only team runs (teamId) may send it, the team needs sourceRef access granted (contact support), and the backend needs RL_SOURCE_REF_ENABLED.

name
string | null

Optional human-readable run name

teamId
string | null

Owning team (defaults to caller's user)

volume
string | null

Name of a volume in the caller's team (or personal) namespace. The run writes its outputs to runs/<runId>/ on it instead of to a per-run PVC.

resumeFrom
string | null

Id of a PAUSED run to resume: this run attaches its volume and starts from its checkpoint, on any cluster. Send the same config; volume may be omitted.

gpuType
string | null

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. On the on-demand path the type determines the price, so when it is omitted the cheapest purchasable type is chosen and echoed back on the response.

normalizedConfig
Normalizedconfig · object | null

Response

Successful Response

runId
string
required
jobId
string
required
tokenValue
string
required

PRIME_API_KEY for this run. Returned once — the platform stores only the token id.

onDemand
boolean
default:false

True when this run landed on billed shared capacity rather than a cluster the caller holds an allocation on. Derived at dispatch, not requested.

gpuType
string | null

GPU type the run was placed on.

pricePerGpuHour
number | null

USD per GPU-hour this run will be charged, discount applied and frozen for its lifetime. NULL on reserved capacity, which bills nothing per-hour. Echoed so a caller who named no gpuType sees the rate now rather than at invoice time.

estimatedCostPerHour
number | null

price_per_gpu_hour multiplied by the run's GPU count.

isBeta
boolean
default:false

Whether this run's capacity is in beta. Always false now that on-demand is GA.