Skip to main content
POST
Together AI SDK (Python)

Authorizations

Authorization
string
header
default:default
required

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

Path Parameters

model_resources_id
string
default:false
required

ID of the model resource

Body

application/json

Request to keep a model resource from stopping for inactivity

seconds
integer
required

Seconds from now the resource must not stop for inactivity.

Required range: 60 <= x <= 86400
Example:

7200

Response

Model resource details

Allocated GPU resources that training sessions attach to

id
string
required

Unique identifier for the model resource

Example:

"123e4567-e89b-12d3-a456-426614174000"

status
enum<string>
required

Lifecycle status of the model resource

Available options:
MODEL_RESOURCES_STATUS_PENDING,
MODEL_RESOURCES_STATUS_CREATING,
MODEL_RESOURCES_STATUS_READY,
MODEL_RESOURCES_STATUS_ERROR,
MODEL_RESOURCES_STATUS_STOPPED,
MODEL_RESOURCES_STATUS_STOPPING
Example:

"MODEL_RESOURCES_STATUS_READY"

status_details
object
required

Details of the resource's current status, such as its place in the queue.

base_model
string
required

Base model the resource is provisioned for

Example:

"Qwen/Qwen3.5-4B"

compute_config
object
required

Compute layout provisioned for the resource.

lora_enabled
boolean
required

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

Example:

true

created_at
string<date-time>
required

Timestamp when the model resource was created

Example:

"2026-01-02T00:00:00Z"

updated_at
string<date-time>
required

Timestamp when the model resource was last updated

Example:

"2026-01-02T00:00:05Z"

optimizer_config
object
required

Optimizer configuration for this resource.

created_by
string
required

ID of the user who created the model resource

Example:

"user_123"

inactive_timeout
integer
required

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

Example:

3600

error
object

Structured detail for the model resource's current error. Set when the resource is in an error state.

base_weights_ref
string

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.

Example:

"together://ml_A1b2C3d4E5f6G7h8I9j0K@rv_A1b2C3d4E5f6G7h8I9j0K"

expires_at
string<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:

"2026-01-02T01:00:05Z"