Together AI SDK (v2)
from together import Together
import os
client = Together(
api_key=os.environ.get("TOGETHER_API_KEY"),
)
client.endpoints.adapters.remove(
"endpoint-abc123",
model_id="username/my-endpoint-name:username/my-adapter-model",
)import Together from "together-ai";
const client = new Together({
apiKey: process.env.TOGETHER_API_KEY,
});
await client.endpoints.adapters.remove("endpoint-abc123", {
model_id: "username/my-endpoint-name:username/my-adapter-model",
});import Together from "together-ai";
const client = new Together({
apiKey: process.env.TOGETHER_API_KEY,
});
await client.endpoints.adapters.remove("endpoint-abc123", {
model_id: "username/my-endpoint-name:username/my-adapter-model",
});curl -X DELETE "https://api.together.ai/v1/endpoints/endpoint-abc123/adapters" \
-H "Authorization: Bearer $TOGETHER_API_KEY" \
-H "Content-Type: application/json" \
-d '{"model_id": "username/my-endpoint-name:username/my-adapter-model"}'<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.together.ai/v1/endpoints/{endpointId}/adapters",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "DELETE",
CURLOPT_POSTFIELDS => json_encode([
'model_id' => '<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/endpoints/{endpointId}/adapters"
payload := strings.NewReader("{\n \"model_id\": \"<string>\"\n}")
req, _ := http.NewRequest("DELETE", 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.delete("https://api.together.ai/v1/endpoints/{endpointId}/adapters")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"model_id\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.together.ai/v1/endpoints/{endpointId}/adapters")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Delete.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"model_id\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"model_id": "<string>",
"deleted": true
}{
"error": {
"message": "<string>",
"type": "<string>",
"param": null,
"code": null
}
}{
"error": {
"message": "<string>",
"type": "<string>",
"param": null,
"code": null
}
}{
"error": {
"message": "<string>",
"type": "<string>",
"param": null,
"code": null
}
}Endpoints
Remove a LoRA adapter from an endpoint
Removes the routing rule that binds an adapter to an endpoint. The adapter must be currently bound to this specific endpoint.
DELETE
/
endpoints
/
{endpointId}
/
adapters
Together AI SDK (v2)
from together import Together
import os
client = Together(
api_key=os.environ.get("TOGETHER_API_KEY"),
)
client.endpoints.adapters.remove(
"endpoint-abc123",
model_id="username/my-endpoint-name:username/my-adapter-model",
)import Together from "together-ai";
const client = new Together({
apiKey: process.env.TOGETHER_API_KEY,
});
await client.endpoints.adapters.remove("endpoint-abc123", {
model_id: "username/my-endpoint-name:username/my-adapter-model",
});import Together from "together-ai";
const client = new Together({
apiKey: process.env.TOGETHER_API_KEY,
});
await client.endpoints.adapters.remove("endpoint-abc123", {
model_id: "username/my-endpoint-name:username/my-adapter-model",
});curl -X DELETE "https://api.together.ai/v1/endpoints/endpoint-abc123/adapters" \
-H "Authorization: Bearer $TOGETHER_API_KEY" \
-H "Content-Type: application/json" \
-d '{"model_id": "username/my-endpoint-name:username/my-adapter-model"}'<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.together.ai/v1/endpoints/{endpointId}/adapters",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "DELETE",
CURLOPT_POSTFIELDS => json_encode([
'model_id' => '<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/endpoints/{endpointId}/adapters"
payload := strings.NewReader("{\n \"model_id\": \"<string>\"\n}")
req, _ := http.NewRequest("DELETE", 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.delete("https://api.together.ai/v1/endpoints/{endpointId}/adapters")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"model_id\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.together.ai/v1/endpoints/{endpointId}/adapters")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Delete.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"model_id\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"model_id": "<string>",
"deleted": true
}{
"error": {
"message": "<string>",
"type": "<string>",
"param": null,
"code": null
}
}{
"error": {
"message": "<string>",
"type": "<string>",
"param": null,
"code": null
}
}{
"error": {
"message": "<string>",
"type": "<string>",
"param": null,
"code": null
}
}Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Path Parameters
The endpoint ID
Body
application/json
Combined identifier in format "endpoint_name:adapter_model_name".
Was this page helpful?
⌘I