RL

Create model resources

Changed on

Provisions a standalone model resource that training sessions can attach to.

post/v1/rl/model-resources

Request

  • Base URL
    https://api.together.ai
  • URL
    https://api.together.ai/v1/rl/model-resources
  • Auth
    HTTP bearer

Request body

base_modelstring required

Base model to provision the resource for, selected from /rl/supported-models

base_weights_refstring

Model in this project's model registry whose weights the resource trains in place of the base model's own. It must be a full-weight model.

lora_enabledboolean

Whether the resource hosts LoRA sessions or a single full-weight session

inactive_timeoutinteger

Seconds without activity after which the resource stops and its sessions expire, counted from when it becomes ready and from its last activity. Every operation on any of its sessions restarts the count, and an extend expiry call can keep it up longer.

Example request

{
  "base_model": "Qwen/Qwen3.5-4B",
  "base_weights_ref": "together://ml_A1b2C3d4E5f6G7h8I9j0K",
  "compute_config": {
    "num_generator_replicas": 2,
    "gpu_type": "B200-SXM"
  },
  "lora_enabled": true,
  "inactive_timeout": 3600
}

Response

Model resource details

idstring required

Unique identifier for the model resource

status'MODEL_RESOURCES_STATUS_PENDING' | 'MODEL_RESOURCES_STATUS_CREATING' | 'MODEL_RESOURCES_STATUS_READY' | 'MODEL_RESOURCES_STATUS_ERROR' | 'MODEL_RESOURCES_STATUS_STOPPED' | 'MODEL_RESOURCES_STATUS_STOPPING' required

Lifecycle status of a model resource

base_modelstring required

Base model the resource is provisioned for

base_weights_refstring

Model-registry model whose weights the resource trains in place of the base model's own, pinned to the revision resolved when the resource was created. Absent when the resource trains the base model's own weights.

lora_enabledboolean required

Whether the resource hosts LoRA sessions or a full-weight session

created_atstring date-time required

Timestamp when the model resource was created

updated_atstring date-time required

Timestamp when the model resource was last updated

created_bystring required

ID of the user who created the model resource

inactive_timeoutinteger required

Seconds without activity after which the resource stops and its sessions expire. Every operation on any of its sessions restarts the count.

expires_atstring date-time

The earliest time the resource can stop for inactivity, which also expires its sessions. It is the resource's last activity plus inactive_timeout seconds. Becoming ready, a session start and every operation on any of its sessions count as activity, and the resource does not stop while an operation is running. An extend expiry call can move it later. It never moves earlier. Refreshed about once a minute. Set while the resource is ready.

Example response

{
  "id": "123e4567-e89b-12d3-a456-426614174000",
  "error": {
    "message": "Timed out waiting for cluster capacity. Try again later.",
    "occurred_at": "2026-01-02T00:00:05Z"
  },
  "status_details": {
    "queue_position": 3
  },
  "base_model": "Qwen/Qwen3.5-4B",
  "base_weights_ref": "together://ml_A1b2C3d4E5f6G7h8I9j0K@rv_A1b2C3d4E5f6G7h8I9j0K",
  "compute_config": {
    "num_generator_replicas": 1,
    "gpu_type": "B200-SXM"
  },
  "lora_enabled": true,
  "created_at": "2026-01-02T00:00:00Z",
  "updated_at": "2026-01-02T00:00:05Z",
  "created_by": "user_123",
  "inactive_timeout": 3600,
  "expires_at": "2026-01-02T01:00:05Z"
}

Changes

    • info

      added the new optional request property

    • info

      added the optional property to the response with the status

    • info

      added the required property to the response with the status

    • info

      endpoint added