Skip to main content
POST
/
compute
/
clusters
/
{cluster_id}
/
instances
/
{instance_id}
/
remediations
cURL
curl --request POST \
  --url https://api.together.ai/v1/compute/clusters/{cluster_id}/instances/{instance_id}/remediations \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "reason": "<string>"
}
'
import requests

url = "https://api.together.ai/v1/compute/clusters/{cluster_id}/instances/{instance_id}/remediations"

payload = { "reason": "<string>" }
headers = {
    "Authorization": "Bearer <token>",
    "Content-Type": "application/json"
}

response = requests.post(url, json=payload, headers=headers)

print(response.text)
const options = {
  method: 'POST',
  headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
  body: JSON.stringify({reason: '<string>'})
};

fetch('https://api.together.ai/v1/compute/clusters/{cluster_id}/instances/{instance_id}/remediations', options)
  .then(res => res.json())
  .then(res => console.log(res))
  .catch(err => console.error(err));
<?php

$curl = curl_init();

curl_setopt_array($curl, [
  CURLOPT_URL => "https://api.together.ai/v1/compute/clusters/{cluster_id}/instances/{instance_id}/remediations",
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_ENCODING => "",
  CURLOPT_MAXREDIRS => 10,
  CURLOPT_TIMEOUT => 30,
  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
  CURLOPT_CUSTOMREQUEST => "POST",
  CURLOPT_POSTFIELDS => json_encode([
    'reason' => '<string>'
  ]),
  CURLOPT_HTTPHEADER => [
    "Authorization: Bearer <token>",
    "Content-Type: application/json"
  ],
]);

$response = curl_exec($curl);
$err = curl_error($curl);

curl_close($curl);

if ($err) {
  echo "cURL Error #:" . $err;
} else {
  echo $response;
}
package main

import (
	"fmt"
	"strings"
	"net/http"
	"io"
)

func main() {

	url := "https://api.together.ai/v1/compute/clusters/{cluster_id}/instances/{instance_id}/remediations"

	payload := strings.NewReader("{\n  \"reason\": \"<string>\"\n}")

	req, _ := http.NewRequest("POST", url, payload)

	req.Header.Add("Authorization", "Bearer <token>")
	req.Header.Add("Content-Type", "application/json")

	res, _ := http.DefaultClient.Do(req)

	defer res.Body.Close()
	body, _ := io.ReadAll(res.Body)

	fmt.Println(string(body))

}
HttpResponse<String> response = Unirest.post("https://api.together.ai/v1/compute/clusters/{cluster_id}/instances/{instance_id}/remediations")
  .header("Authorization", "Bearer <token>")
  .header("Content-Type", "application/json")
  .body("{\n  \"reason\": \"<string>\"\n}")
  .asString();
require 'uri'
require 'net/http'

url = URI("https://api.together.ai/v1/compute/clusters/{cluster_id}/instances/{instance_id}/remediations")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n  \"reason\": \"<string>\"\n}"

response = http.request(request)
puts response.read_body
{
  "id": "<string>",
  "cluster_id": "<string>",
  "instance_id": "<string>",
  "reason": "<string>",
  "active_health_check_run_id": "<string>",
  "passive_health_check_event_id": "<string>",
  "requested_by": "<string>",
  "create_time": "2023-11-07T05:31:56Z",
  "reviewed_by": "<string>",
  "review_time": "2023-11-07T05:31:56Z",
  "review_comment": "<string>",
  "start_time": "2023-11-07T05:31:56Z",
  "end_time": "2023-11-07T05:31:56Z",
  "error_message": "<string>",
  "update_time": "2023-11-07T05:31:56Z",
  "instance_name": "<string>",
  "linked_alerts": [
    {
      "passive_health_check_alert_id": "<string>",
      "cluster_id": "<string>",
      "target_vm": "<string>",
      "alert_name": "<string>",
      "annotations": {},
      "started_at": "2023-11-07T05:31:56Z",
      "instance_id": "<string>",
      "resolved_at": "2023-11-07T05:31:56Z",
      "node_remediation_intent_id": "<string>"
    }
  ]
}

Authorizations

Authorization
string
header
default:default
required

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

Path Parameters

cluster_id
string
required
instance_id
string
required

Query Parameters

remediation_id
string

Client-specified ID for idempotency.

Body

application/json

Remediation represents a node remediation request for an instance. An instance can have multiple remediations over time (e.g., failed attempts followed by retries).

mode
enum<string>
required

Remediation mode specifies how the remediation should be performed.

  • REMEDIATION_MODE_VM_ONLY: Deletes the VM and provisions a new one on any available host.
  • REMEDIATION_MODE_HOST_AWARE: Cordons the host, deletes the VM, and provisions a new one on a different host.
Available options:
REMEDIATION_MODE_VM_ONLY,
REMEDIATION_MODE_HOST_AWARE,
REMEDIATION_MODE_EVICT_WITHOUT_REPLACEMENT,
REMEDIATION_MODE_REBOOT_VM
reason
string

User-provided reason for the remediation.

Response

200 - application/json

OK

Remediation represents a node remediation request for an instance. An instance can have multiple remediations over time (e.g., failed attempts followed by retries).

id
string
required
read-only
cluster_id
string
required
read-only
instance_id
string
required
read-only
mode
enum<string>
required

Remediation mode specifies how the remediation should be performed.

  • REMEDIATION_MODE_VM_ONLY: Deletes the VM and provisions a new one on any available host.
  • REMEDIATION_MODE_HOST_AWARE: Cordons the host, deletes the VM, and provisions a new one on a different host.
Available options:
REMEDIATION_MODE_VM_ONLY,
REMEDIATION_MODE_HOST_AWARE,
REMEDIATION_MODE_EVICT_WITHOUT_REPLACEMENT,
REMEDIATION_MODE_REBOOT_VM
trigger
enum<string>
required
read-only

RemediationTrigger specifies how the remediation was triggered.

  • REMEDIATION_TRIGGER_MANUAL: A user-initiated remediation (either via web UI or API call).
  • REMEDIATION_TRIGGER_AUTOMATED: A system-initiated remediation that requires approval.
Available options:
REMEDIATION_TRIGGER_MANUAL,
REMEDIATION_TRIGGER_AUTOMATED
state
enum<string>
required
read-only

RemediationState represents the lifecycle state of a remediation.

  • PENDING_APPROVAL: Awaiting approval before processing can begin.
  • PENDING: Approved and queued for processing.
  • RUNNING: Actively being processed.
  • SUCCEEDED: Successfully completed.
  • FAILED: Failed with an error.
  • CANCELLED: Cancelled by user or system.
  • AUTO_RESOLVED: The underlying issue was automatically resolved before processing.
Available options:
PENDING_APPROVAL,
PENDING,
RUNNING,
SUCCEEDED,
FAILED,
CANCELLED,
AUTO_RESOLVED
reason
string

User-provided reason for the remediation.

active_health_check_run_id
string
read-only

Active health check run ID (UUID) that triggered this remediation.

passive_health_check_event_id
string
read-only

Passive health check event ID that triggered this remediation.

requested_by
string
read-only

Who requested the remediation.

create_time
string<date-time>
read-only

When the remediation was created.

reviewed_by
string
read-only

Who reviewed the remediation.

review_time
string<date-time>
read-only

When the remediation was reviewed.

review_comment
string
read-only

Review comment.

start_time
string<date-time>
read-only

When processing started.

end_time
string<date-time>
read-only

When the remediation completed.

error_message
string
read-only

Error message if the remediation failed.

update_time
string<date-time>
read-only

When the remediation was last updated.

instance_name
string
read-only

Display name of the targeted instance.

linked_alerts
object[]
read-only

Passive health check alerts linked to this remediation, including resolved alerts.