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

projectId
string
required

Project identifier.

endpointId
string
required

Endpoint identifier.

Body

application/json

Strategy, metric gates, timing, and cleanup policy for shifting traffic between two deployments under one endpoint.

sourceDeploymentId
string
required

Deployment that traffic shifts away from.

targetDeploymentId
string
required

Deployment that traffic shifts toward.

canary
object
required

Canary rollout strategy configuration. Mutually exclusive with blueGreen and rolling.

blueGreen
object

Blue-green rollout strategy configuration. Mutually exclusive with canary and rolling.

rolling
object

Rolling rollout strategy configuration. Mutually exclusive with canary and blueGreen.

metrics
object[]

Optional metric gates evaluated after each step's soak. Canary only; rejected on rolling and blue-green rollouts.

Metric gate evaluated during a rollout.

finalSourceReplicas
integer

Optional final replica count for the source deployment. Defaults to 0, which drains and stops the source.

finalTargetReplicas
integer

Optional target replica floor at completion. For rolling, the ladder climbs to this count one replica per rung. Must be at least 1 when set; defaults to the source deployment's replica count at create time, or to the source and target deployments' combined replica count when both already stand in the endpoint traffic split after a cancel. The completed target's autoscaling max lands at the landing ceiling, max(this value, the source max, the target's own max); the rollout may lift the target max at first wake, at the first step that needs it, or at completion unless an operator changes max mid-run. The lifted ceiling remains after completion, and PreviewRolloutDefaults reports a coming lift as ROLLOUT_WILL_RAISE_TARGET_MAX. A pre-existing target whose own autoscaling min is higher keeps that floor, reported as FINAL_BELOW_INHERITED_MIN. A target that starts stopped lands exactly at this value; if the source min was higher, PreviewRolloutDefaults reports FINAL_BELOW_SOURCE_MIN.

maxSurge
integer

Optional maximum target replicas one canary step may add. No canary step raises the target required replica count by more than this over the previous step (the target's current count before the first). Canary steps are admitted only when every raise fits. A rejection names the step, the counts, and the smallest maxSurge that admits the plan. Autoscaler growth on either deployment is not counted against the bound. Must be between 1 and 1000 when set. When unset, no step-raise bound applies. Available on the canary strategy only for now; a rolling or blue-green rollout that sets it is rejected at create and preview.

Required range: 1 <= x <= 1000
maxUnavailable
integer

Count of source replicas that may be missing or retired ahead of their replacements at any one time. Defaults to 0, so the rollout waits for capacity and refuses a degraded source. Spent three ways. A source already degraded at create (ready below desired by at most this many) is admitted. The engine retires source replicas ahead of a target raise to stay under maxSurge. When the target cannot be placed, it retires source replicas to make room, and only when both legs use the same GPU type; a target that cannot be placed on the source's cluster gains nothing from the retire, and the rollout then pauses naming it. It is a concurrent bound measured against the source's routed-share need, which drops after every traffic shift, so a full cluster is walked rung by rung. The last source replica is never retired before traffic moves, except at the final 100% rung, where the allowance may stop the source before the target's last replicas are ready. A 1-replica source with maxUnavailable 1 on a full cluster serves nothing while the replacement starts.

Required range: 0 <= x <= 1000

Response

OK

Public view of a rollout resource, including runtime progress and any pause or abort reason.

id
string
required
read-only

Output only. Unique rollout identifier.

endpointId
string
required
read-only

Output only. Endpoint this rollout belongs to.

sourceDeploymentId
string
required
read-only

Output only. Deployment that traffic is shifting away from.

targetDeploymentId
string
required
read-only

Output only. Deployment that traffic is shifting toward.

strategy
enum<string>
required
read-only

Output only. Rollout strategy selected at creation.

Available options:
ROLLOUT_STRATEGY_TYPE_ROLLING,
ROLLOUT_STRATEGY_TYPE_CANARY,
ROLLOUT_STRATEGY_TYPE_BLUE_GREEN
state
enum<string>
required
read-only

Output only. High-level rollout lifecycle state.

Available options:
ROLLOUT_STATE_RUNNING,
ROLLOUT_STATE_PAUSED,
ROLLOUT_STATE_STABILIZING,
ROLLOUT_STATE_COMPLETED,
ROLLOUT_STATE_PENDING,
ROLLOUT_STATE_SYSTEM_PAUSED,
ROLLOUT_STATE_CANCELLING,
ROLLOUT_STATE_CANCELED,
ROLLOUT_STATE_PAUSING
createdAt
string<date-time>
required
read-only

Output only. Timestamp when the rollout was created.

status
object
required

Output only. Derived runtime progress, step summary, and pause or abort failure details.

currentStep
integer
read-only

Output only. Zero-based index of the current step. Unset while PENDING; step 0 is reported explicitly after start.

currentTrafficPercent
integer
read-only

Output only. Applied percentage of traffic on the target deployment.

startedAt
string<date-time>
read-only

Output only. Timestamp when the rollout started running.

completedAt
string<date-time>
read-only

Output only. Timestamp when the rollout reached a terminal state.

etag
string
read-only

Output only. Opaque version tag for optimistic concurrency control.

pauseInfo
object

Output only. Why and when the rollout was paused. Set while a pause is pending or effective (PAUSING, PAUSED, or SYSTEM_PAUSED) and cleared after resume or abort; while PAUSING, pausedAt records when the pause was requested.

maxSurge
integer
read-only

Output only. The maxSurge the rollout was created with. Absent when it was not set.

maxUnavailable
integer
read-only

The maxUnavailable the rollout was created with. Absent when it was not set.