Secrets
Create a new secret
Create a new secret to store sensitive configuration values
POST
Together AI SDK (Python)
Authorizations
Body
application/json
Secret configuration
Response
Secret created 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.
Create a new secret to store sensitive configuration values
from together import Together
client = Together()
client.beta.jig.secrets.create(name="my-secret", value="my-value")import Together from "together-ai";
const client = new Together();
await client.beta.jig.secrets.create({ name: "my-secret", value: "my-value" });
import Together from "together-ai";
const client = new Together();
await client.beta.jig.secrets.create({ name: "my-secret", value: "my-value" });
curl -X POST \
-H "Authorization: Bearer $TOGETHER_API_KEY" \
--data '{ "name": "my-secret", "value": "my-value" }' \
https://api.together.ai/v1/deployments/secrets
<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.together.ai/v1/deployments/secrets",
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([
'name' => '<string>',
'value' => '<string>',
'description' => '<string>',
'project_id' => '<string>',
'ttl_seconds' => 648000
]),
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/secrets"
payload := strings.NewReader("{\n \"name\": \"<string>\",\n \"value\": \"<string>\",\n \"description\": \"<string>\",\n \"project_id\": \"<string>\",\n \"ttl_seconds\": 648000\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/deployments/secrets")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"name\": \"<string>\",\n \"value\": \"<string>\",\n \"description\": \"<string>\",\n \"project_id\": \"<string>\",\n \"ttl_seconds\": 648000\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.together.ai/v1/deployments/secrets")
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 \"name\": \"<string>\",\n \"value\": \"<string>\",\n \"description\": \"<string>\",\n \"project_id\": \"<string>\",\n \"ttl_seconds\": 648000\n}"
response = http.request(request)
puts response.read_body{
"created_at": "<string>",
"created_by": "<string>",
"description": "<string>",
"expires_at": "2023-11-07T05:31:56Z",
"id": "<string>",
"last_updated_by": "<string>",
"name": "<string>",
"object": "secret",
"ttl_seconds": 123,
"updated_at": "<string>"
}{}{}Secret configuration
Secret created successfully
Was this page helpful?
from together import Together
client = Together()
client.beta.jig.secrets.create(name="my-secret", value="my-value")import Together from "together-ai";
const client = new Together();
await client.beta.jig.secrets.create({ name: "my-secret", value: "my-value" });
import Together from "together-ai";
const client = new Together();
await client.beta.jig.secrets.create({ name: "my-secret", value: "my-value" });
curl -X POST \
-H "Authorization: Bearer $TOGETHER_API_KEY" \
--data '{ "name": "my-secret", "value": "my-value" }' \
https://api.together.ai/v1/deployments/secrets
<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.together.ai/v1/deployments/secrets",
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([
'name' => '<string>',
'value' => '<string>',
'description' => '<string>',
'project_id' => '<string>',
'ttl_seconds' => 648000
]),
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/secrets"
payload := strings.NewReader("{\n \"name\": \"<string>\",\n \"value\": \"<string>\",\n \"description\": \"<string>\",\n \"project_id\": \"<string>\",\n \"ttl_seconds\": 648000\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/deployments/secrets")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"name\": \"<string>\",\n \"value\": \"<string>\",\n \"description\": \"<string>\",\n \"project_id\": \"<string>\",\n \"ttl_seconds\": 648000\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.together.ai/v1/deployments/secrets")
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 \"name\": \"<string>\",\n \"value\": \"<string>\",\n \"description\": \"<string>\",\n \"project_id\": \"<string>\",\n \"ttl_seconds\": 648000\n}"
response = http.request(request)
puts response.read_body{
"created_at": "<string>",
"created_by": "<string>",
"description": "<string>",
"expires_at": "2023-11-07T05:31:56Z",
"id": "<string>",
"last_updated_by": "<string>",
"name": "<string>",
"object": "secret",
"ttl_seconds": 123,
"updated_at": "<string>"
}{}{}