---
title: "Optimizer step"
method: POST
path: "/rl/training-sessions/{session_id}/operations/optim-step"
tags: ["RL"]
---

# Optimizer step

`POST /rl/training-sessions/{session_id}/operations/optim-step`

Submits an optimizer step operation that will asynchronously apply accumulated gradients to update model parameters. Does not make the updated parameters available for sampling; call `weights-sync` afterwards when you want subsequent samples to use the updated policy.

## Path parameters

- `session_id` string, required — Training session ID

## Request body

- RLOptimStepBody — Request body for an optimizer step.
  - `adam_params` RLAdamParams — Per-step Adam optimizer overrides.
    - `learning_rate` number — Learning rate for the Adam-tuned parameters
    - `beta1` number — Exponential decay rate for the first-moment estimate
    - `beta2` number — Exponential decay rate for the second-moment estimate
    - `eps` number — Epsilon for numerical stability
    - `weight_decay` number — Weight decay coefficient
    - `grad_clip_norm` number — Maximum gradient norm for this step, gradients across all model parameters are clipped to this value. Set to 0 to disable gradient clipping. When unset, gradients are clipped to the session default (1.0).
  - `muon_params` RLMuonParams — Per-step Muon optimizer overrides
    - `learning_rate` number — Learning rate for this Muon optimizer step.
    - `momentum` number — Momentum coefficient
    - `newton_schulz_steps` integer — Number of Newton-Schulz iterations
    - `weight_decay` number — Weight decay coefficient
    - `grad_clip_norm` number — Maximum gradient norm for this step, gradients across all model parameters are clipped to this value. Set to 0 to disable gradient clipping. When unset, gradients are clipped to the session default (1.0).
    - `adam` RLAdamParams — Per-step Adam optimizer overrides.
      - `learning_rate` number — Learning rate for the Adam-tuned parameters
      - `beta1` number — Exponential decay rate for the first-moment estimate
      - `beta2` number — Exponential decay rate for the second-moment estimate
      - `eps` number — Epsilon for numerical stability
      - `weight_decay` number — Weight decay coefficient
      - `grad_clip_norm` number — Maximum gradient norm for this step, gradients across all model parameters are clipped to this value. Set to 0 to disable gradient clipping. When unset, gradients are clipped to the session default (1.0).

## Response `200`

Optimizer step operation details

- RLOptimStepOperation — Async optimizer step operation
  - `id` string, required — Operation ID
  - `status` 'TRAINING_OPERATION_STATUS_UNSPECIFIED' | 'TRAINING_OPERATION_STATUS_PENDING' | 'TRAINING_OPERATION_STATUS_RUNNING' | 'TRAINING_OPERATION_STATUS_COMPLETED' | 'TRAINING_OPERATION_STATUS_FAILED', required
  - `output` RLOptimStepResult — Result of an optimizer step operation
    - `step` union, required — Step number
      - string
      - integer
  - `error` RLTrainingOperationError — Error details for a failed training operation
    - `code` 'TRAINING_OPERATION_ERROR_CODE_UNSPECIFIED' | 'TRAINING_OPERATION_ERROR_CODE_RESOURCE_EXHAUSTED' | 'TRAINING_OPERATION_ERROR_CODE_TIMEOUT' | 'TRAINING_OPERATION_ERROR_CODE_INTERNAL_ERROR' | 'TRAINING_OPERATION_ERROR_CODE_SESSION_NOT_ACTIVE' | 'TRAINING_OPERATION_ERROR_CODE_INVALID_INPUT' | 'TRAINING_OPERATION_ERROR_CODE_NON_FINITE_LOSS' — Application error code for a failed training operation
    - `message` string — Human-readable error message

## Other responses

- `default` — An unexpected error response.

## Changes

- **2026-08-08** `f26a23fab8e0` — 1 warning
  - removed the request property `weight_sync_type`
- **2026-08-04** `ebd4756a41e4` — 1 warning
  - added the new `TRAINING_OPERATION_ERROR_CODE_NON_FINITE_LOSS` enum value to the `error/code` response property for the response status `200`
- **2026-07-31** `9ccc57e5e4b9` — 3 warning, 3 info
  - removed the request property `adamw_params`
  - removed the request property `max_grad_norm`
  - removed the request property `muon_params/adamw`
  - added the new optional request property `adam_params`
  - …2 more
- **2026-07-26** `0c4fdad77435` — 3 warning, 11 info
  - removed the request property `adamw_params/lr`
  - removed the request property `learning_rate`
  - removed the request property `muon_params/lr`
  - added the new optional request property `adamw_params/learning_rate`
  - …10 more

[Change history](https://skmtc.dev/together/apis/together-apis/changes/rl/training-sessions/:session_id/operations/optim-step/post.md)

---

[API](https://skmtc.dev/together/apis/together-apis.md) · [All operations](https://skmtc.dev/together/apis/together-apis/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/together/together-apis/revisions/f4885bc38424/schema)
