> ## Documentation Index
> Fetch the complete documentation index at: https://docs.ariacompute.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Create Training Job with PIN API

> Submit a new training job to Aria PIN via POST /v1/jobs. Supports SFT, OPD, pretrain, distill, QAT, GRPO, DPO, KTO, ORPO, SimPO, and PPO with LoRA configuration.

Create a training job through the Aria PIN API by specifying the job type, base model, dataset, LoRA configuration, and hyperparameters. The endpoint returns immediately with a queued job identifier.

## Endpoint

`POST /v1/jobs`

Send an `Authorization: Bearer <api_key>` header with every request.

## Request body

<ParamField body="type" type="string" required>
  Training type: `sft`, `opd`, `pretrain`, `distill`, `qat`, `grpo`, `dpo`, `kto`, `orpo`, `simpo`, or `ppo`.
</ParamField>

<ParamField body="base_model" type="string" required>
  Hugging Face model identifier or local path for the trainable base.
</ParamField>

<ParamField body="teacher_model" type="string">
  Frozen teacher model identifier. Required when `type` is `opd` or `distill`, ignored otherwise.
</ParamField>

<ParamField body="lora" type="object" required>
  LoRA configuration object.

  <Expandable title="properties">
    <ParamField body="method" type="string" required>
      `lora`, `qlora`, or `none`.
    </ParamField>

    <ParamField body="rank" type="integer" required>
      LoRA rank (for example, 16).
    </ParamField>

    <ParamField body="alpha" type="integer" required>
      LoRA alpha (for example, 32).
    </ParamField>

    <ParamField body="lora_dropout" type="number">
      Dropout rate.
    </ParamField>

    <ParamField body="target_modules" type="string[]">
      Target module names (for example, `["q_proj", "v_proj"]`).
    </ParamField>

    <ParamField body="quantization" type="string">
      Quantization method when `method=qlora`, such as `4bit_nf4`.
    </ParamField>
  </Expandable>
</ParamField>

<ParamField body="dataset_id" type="string" required>
  Dataset identifier registered in PIN.
</ParamField>

<ParamField body="hyperparams" type="object" required>
  Training hyperparameters. Common fields include `epochs`, `lr`. Type-specific fields include `distill_alpha`, `temperature`, `fp8_recipe`, `max_tokens`, `qat_group_size`, `group_size`, and `beta`.
</ParamField>

<ParamField body="auto_intervention" type="object">
  Optional auto-intervention configuration with rules, cooldown, and enabled flag.
</ParamField>

## Response

<ResponseField name="job_id" type="string">
  Unique identifier for the created job.
</ResponseField>

<ResponseField name="status" type="string">
  Initial status, typically `queued`.
</ResponseField>

## Example

```bash theme={null}
curl -X POST http://host:8001/v1/jobs \
  -H "Authorization: Bearer $API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "type": "opd",
    "base_model": "thinkingmachines/Inkling",
    "teacher_model": "Qwen/Qwen2.5-1.5B-Instruct",
    "lora": {"method": "lora", "rank": 16, "alpha": 32},
    "dataset_id": "ds_xxx",
    "hyperparams": {"epochs": 1, "lr": 5e-5, "distill_alpha": 0.7, "temperature": 3.0}
  }'
```

```json Response theme={null}
{
  "code": 0,
  "data": {
    "job_id": "job_abc123",
    "status": "queued"
  },
  "message": ""
}
```


## Related topics

- [Aria Compute PIN API: Post-Training & Evaluation](/api-reference/pin/introduction.md)
- [List All Training Checkpoints - PIN API](/api-reference/pin/checkpoints/list.md)
- [List All Model Export Jobs - PIN API](/api-reference/pin/exports/list.md)
- [Get Model Export Job Status - PIN API](/api-reference/pin/exports/get.md)
- [POST /v1/apikeys — Create PIN API Key](/api-reference/pin/apikeys/create.md)
