Storage
Update a volume
Update an existing volume’s configuration or contents
PATCH
Together AI SDK (Python)
Authorizations
Body
application/json
Updated volume configuration
Response
Volume updated successfully
Together AI SDK (Python)
Documentation Index
Fetch the complete documentation index at: /llms.txt
Use this file to discover all available pages before exploring further.
Update an existing volume’s configuration or contents
from together import Together
client = Together()
# Point the volume at a new version of its files. The CLI's
# `tg beta jig volumes update` uploads the files and makes this call for you.
volume = client.beta.jig.volumes.update(
"my-volume",
content={"type": "files", "source_prefix": "my-volume/1"},
)
print(volume.current_version)import Together from "together-ai";
const client = new Together();
// Point the volume at a new version of its files. The CLI's
// `tg beta jig volumes update` uploads the files and makes this call for you.
const volume = await client.beta.jig.volumes.update("my-volume", {
content: { type: "files", source_prefix: "my-volume/1" },
});
console.log(volume.current_version);
import Together from "together-ai";
const client = new Together();
// Point the volume at a new version of its files. The CLI's
// `tg beta jig volumes update` uploads the files and makes this call for you.
const volume = await client.beta.jig.volumes.update("my-volume", {
content: { type: "files", source_prefix: "my-volume/1" },
});
console.log(volume.current_version);
curl --request PATCH \
--url https://api.together.ai/v1/deployments/storage/volumes/{id} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"content": {
"source_prefix": "models/",
"type": "files"
},
"name": "<string>",
"type": "readOnly"
}
'<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.together.ai/v1/deployments/storage/volumes/{id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PATCH",
CURLOPT_POSTFIELDS => json_encode([
'content' => [
'source_prefix' => 'models/',
'type' => 'files'
],
'name' => '<string>',
'type' => 'readOnly'
]),
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/deployments/storage/volumes/{id}"
payload := strings.NewReader("{\n \"content\": {\n \"source_prefix\": \"models/\",\n \"type\": \"files\"\n },\n \"name\": \"<string>\",\n \"type\": \"readOnly\"\n}")
req, _ := http.NewRequest("PATCH", 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.patch("https://api.together.ai/v1/deployments/storage/volumes/{id}")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"content\": {\n \"source_prefix\": \"models/\",\n \"type\": \"files\"\n },\n \"name\": \"<string>\",\n \"type\": \"readOnly\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.together.ai/v1/deployments/storage/volumes/{id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Patch.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"content\": {\n \"source_prefix\": \"models/\",\n \"type\": \"files\"\n },\n \"name\": \"<string>\",\n \"type\": \"readOnly\"\n}"
response = http.request(request)
puts response.read_body{
"content": {
"files": [
{
"last_modified": "<string>",
"name": "<string>",
"size": 123
}
],
"origin": {
"s3": {
"role_arn": "arn:aws:iam::123456789012:role/together-volumes",
"uri": "s3://my-bucket/models/custom-weights"
}
},
"source_prefix": "models/",
"type": "files"
},
"created_at": "<string>",
"current_version": 123,
"id": "<string>",
"mounted_by": [
"<string>"
],
"name": "<string>",
"object": "<string>",
"status": "ready",
"status_message": "<string>",
"type": "readOnly",
"updated_at": "<string>",
"version_history": {}
}{}{}{}Updated volume configuration
Volume updated successfully
Was this page helpful?
from together import Together
client = Together()
# Point the volume at a new version of its files. The CLI's
# `tg beta jig volumes update` uploads the files and makes this call for you.
volume = client.beta.jig.volumes.update(
"my-volume",
content={"type": "files", "source_prefix": "my-volume/1"},
)
print(volume.current_version)import Together from "together-ai";
const client = new Together();
// Point the volume at a new version of its files. The CLI's
// `tg beta jig volumes update` uploads the files and makes this call for you.
const volume = await client.beta.jig.volumes.update("my-volume", {
content: { type: "files", source_prefix: "my-volume/1" },
});
console.log(volume.current_version);
import Together from "together-ai";
const client = new Together();
// Point the volume at a new version of its files. The CLI's
// `tg beta jig volumes update` uploads the files and makes this call for you.
const volume = await client.beta.jig.volumes.update("my-volume", {
content: { type: "files", source_prefix: "my-volume/1" },
});
console.log(volume.current_version);
curl --request PATCH \
--url https://api.together.ai/v1/deployments/storage/volumes/{id} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"content": {
"source_prefix": "models/",
"type": "files"
},
"name": "<string>",
"type": "readOnly"
}
'<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.together.ai/v1/deployments/storage/volumes/{id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PATCH",
CURLOPT_POSTFIELDS => json_encode([
'content' => [
'source_prefix' => 'models/',
'type' => 'files'
],
'name' => '<string>',
'type' => 'readOnly'
]),
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/deployments/storage/volumes/{id}"
payload := strings.NewReader("{\n \"content\": {\n \"source_prefix\": \"models/\",\n \"type\": \"files\"\n },\n \"name\": \"<string>\",\n \"type\": \"readOnly\"\n}")
req, _ := http.NewRequest("PATCH", 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.patch("https://api.together.ai/v1/deployments/storage/volumes/{id}")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"content\": {\n \"source_prefix\": \"models/\",\n \"type\": \"files\"\n },\n \"name\": \"<string>\",\n \"type\": \"readOnly\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.together.ai/v1/deployments/storage/volumes/{id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Patch.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"content\": {\n \"source_prefix\": \"models/\",\n \"type\": \"files\"\n },\n \"name\": \"<string>\",\n \"type\": \"readOnly\"\n}"
response = http.request(request)
puts response.read_body{
"content": {
"files": [
{
"last_modified": "<string>",
"name": "<string>",
"size": 123
}
],
"origin": {
"s3": {
"role_arn": "arn:aws:iam::123456789012:role/together-volumes",
"uri": "s3://my-bucket/models/custom-weights"
}
},
"source_prefix": "models/",
"type": "files"
},
"created_at": "<string>",
"current_version": 123,
"id": "<string>",
"mounted_by": [
"<string>"
],
"name": "<string>",
"object": "<string>",
"status": "ready",
"status_message": "<string>",
"type": "readOnly",
"updated_at": "<string>",
"version_history": {}
}{}{}{}