Estimate on-demand model resource cost
curl --request POST \
--url https://api.together.ai/v1/rl/model-resources/estimate-cost \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"base_model": "Qwen/Qwen3.5-4B",
"base_weights_ref": "together://ml_A1b2C3d4E5f6G7h8I9j0K",
"compute_config": {
"num_generator_replicas": 2,
"gpu_type": "B200-SXM"
},
"lora_enabled": true,
"optimizer_config": {
"adam": {},
"muon": {
"scaling_strategy": "MUON_SCALING_STRATEGY_ORIGINAL"
}
}
}
'import requests
url = "https://api.together.ai/v1/rl/model-resources/estimate-cost"
payload = {
"base_model": "Qwen/Qwen3.5-4B",
"base_weights_ref": "together://ml_A1b2C3d4E5f6G7h8I9j0K",
"compute_config": {
"num_generator_replicas": 2,
"gpu_type": "B200-SXM"
},
"lora_enabled": True,
"optimizer_config": {
"adam": {},
"muon": { "scaling_strategy": "MUON_SCALING_STRATEGY_ORIGINAL" }
}
}
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({
base_model: 'Qwen/Qwen3.5-4B',
base_weights_ref: 'together://ml_A1b2C3d4E5f6G7h8I9j0K',
compute_config: {num_generator_replicas: 2, gpu_type: 'B200-SXM'},
lora_enabled: true,
optimizer_config: {adam: {}, muon: {scaling_strategy: 'MUON_SCALING_STRATEGY_ORIGINAL'}}
})
};
fetch('https://api.together.ai/v1/rl/model-resources/estimate-cost', 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/rl/model-resources/estimate-cost",
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([
'base_model' => 'Qwen/Qwen3.5-4B',
'base_weights_ref' => 'together://ml_A1b2C3d4E5f6G7h8I9j0K',
'compute_config' => [
'num_generator_replicas' => 2,
'gpu_type' => 'B200-SXM'
],
'lora_enabled' => true,
'optimizer_config' => [
'adam' => [
],
'muon' => [
'scaling_strategy' => 'MUON_SCALING_STRATEGY_ORIGINAL'
]
]
]),
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/rl/model-resources/estimate-cost"
payload := strings.NewReader("{\n \"base_model\": \"Qwen/Qwen3.5-4B\",\n \"base_weights_ref\": \"together://ml_A1b2C3d4E5f6G7h8I9j0K\",\n \"compute_config\": {\n \"num_generator_replicas\": 2,\n \"gpu_type\": \"B200-SXM\"\n },\n \"lora_enabled\": true,\n \"optimizer_config\": {\n \"adam\": {},\n \"muon\": {\n \"scaling_strategy\": \"MUON_SCALING_STRATEGY_ORIGINAL\"\n }\n }\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/rl/model-resources/estimate-cost")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"base_model\": \"Qwen/Qwen3.5-4B\",\n \"base_weights_ref\": \"together://ml_A1b2C3d4E5f6G7h8I9j0K\",\n \"compute_config\": {\n \"num_generator_replicas\": 2,\n \"gpu_type\": \"B200-SXM\"\n },\n \"lora_enabled\": true,\n \"optimizer_config\": {\n \"adam\": {},\n \"muon\": {\n \"scaling_strategy\": \"MUON_SCALING_STRATEGY_ORIGINAL\"\n }\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.together.ai/v1/rl/model-resources/estimate-cost")
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 \"base_model\": \"Qwen/Qwen3.5-4B\",\n \"base_weights_ref\": \"together://ml_A1b2C3d4E5f6G7h8I9j0K\",\n \"compute_config\": {\n \"num_generator_replicas\": 2,\n \"gpu_type\": \"B200-SXM\"\n },\n \"lora_enabled\": true,\n \"optimizer_config\": {\n \"adam\": {},\n \"muon\": {\n \"scaling_strategy\": \"MUON_SCALING_STRATEGY_ORIGINAL\"\n }\n }\n}"
response = http.request(request)
puts response.read_body{
"price_per_hour": 56,
"currency": "USD"
}{
"error": {
"message": "<string>",
"type": "<string>",
"param": null,
"code": null
}
}Model resources
Estimate on-demand model resource cost
Estimates a model resource’s on-demand hourly price without creating it.
POST
/
rl
/
model-resources
/
estimate-cost
Estimate on-demand model resource cost
curl --request POST \
--url https://api.together.ai/v1/rl/model-resources/estimate-cost \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"base_model": "Qwen/Qwen3.5-4B",
"base_weights_ref": "together://ml_A1b2C3d4E5f6G7h8I9j0K",
"compute_config": {
"num_generator_replicas": 2,
"gpu_type": "B200-SXM"
},
"lora_enabled": true,
"optimizer_config": {
"adam": {},
"muon": {
"scaling_strategy": "MUON_SCALING_STRATEGY_ORIGINAL"
}
}
}
'import requests
url = "https://api.together.ai/v1/rl/model-resources/estimate-cost"
payload = {
"base_model": "Qwen/Qwen3.5-4B",
"base_weights_ref": "together://ml_A1b2C3d4E5f6G7h8I9j0K",
"compute_config": {
"num_generator_replicas": 2,
"gpu_type": "B200-SXM"
},
"lora_enabled": True,
"optimizer_config": {
"adam": {},
"muon": { "scaling_strategy": "MUON_SCALING_STRATEGY_ORIGINAL" }
}
}
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({
base_model: 'Qwen/Qwen3.5-4B',
base_weights_ref: 'together://ml_A1b2C3d4E5f6G7h8I9j0K',
compute_config: {num_generator_replicas: 2, gpu_type: 'B200-SXM'},
lora_enabled: true,
optimizer_config: {adam: {}, muon: {scaling_strategy: 'MUON_SCALING_STRATEGY_ORIGINAL'}}
})
};
fetch('https://api.together.ai/v1/rl/model-resources/estimate-cost', 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/rl/model-resources/estimate-cost",
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([
'base_model' => 'Qwen/Qwen3.5-4B',
'base_weights_ref' => 'together://ml_A1b2C3d4E5f6G7h8I9j0K',
'compute_config' => [
'num_generator_replicas' => 2,
'gpu_type' => 'B200-SXM'
],
'lora_enabled' => true,
'optimizer_config' => [
'adam' => [
],
'muon' => [
'scaling_strategy' => 'MUON_SCALING_STRATEGY_ORIGINAL'
]
]
]),
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/rl/model-resources/estimate-cost"
payload := strings.NewReader("{\n \"base_model\": \"Qwen/Qwen3.5-4B\",\n \"base_weights_ref\": \"together://ml_A1b2C3d4E5f6G7h8I9j0K\",\n \"compute_config\": {\n \"num_generator_replicas\": 2,\n \"gpu_type\": \"B200-SXM\"\n },\n \"lora_enabled\": true,\n \"optimizer_config\": {\n \"adam\": {},\n \"muon\": {\n \"scaling_strategy\": \"MUON_SCALING_STRATEGY_ORIGINAL\"\n }\n }\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/rl/model-resources/estimate-cost")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"base_model\": \"Qwen/Qwen3.5-4B\",\n \"base_weights_ref\": \"together://ml_A1b2C3d4E5f6G7h8I9j0K\",\n \"compute_config\": {\n \"num_generator_replicas\": 2,\n \"gpu_type\": \"B200-SXM\"\n },\n \"lora_enabled\": true,\n \"optimizer_config\": {\n \"adam\": {},\n \"muon\": {\n \"scaling_strategy\": \"MUON_SCALING_STRATEGY_ORIGINAL\"\n }\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.together.ai/v1/rl/model-resources/estimate-cost")
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 \"base_model\": \"Qwen/Qwen3.5-4B\",\n \"base_weights_ref\": \"together://ml_A1b2C3d4E5f6G7h8I9j0K\",\n \"compute_config\": {\n \"num_generator_replicas\": 2,\n \"gpu_type\": \"B200-SXM\"\n },\n \"lora_enabled\": true,\n \"optimizer_config\": {\n \"adam\": {},\n \"muon\": {\n \"scaling_strategy\": \"MUON_SCALING_STRATEGY_ORIGINAL\"\n }\n }\n}"
response = http.request(request)
puts response.read_body{
"price_per_hour": 56,
"currency": "USD"
}{
"error": {
"message": "<string>",
"type": "<string>",
"param": null,
"code": null
}
}Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Body
application/json
Request to provision a standalone model resource
Base model to provision the resource for, selected from /rl/supported-models
Example:
"Qwen/Qwen3.5-4B"
Model in this project's model registry whose weights the resource trains in place of the base model's own. It must be a full-weight model.
Maximum string length:
256Pattern:
^together://ml_[A-Za-z0-9]+(@rv_[A-Za-z0-9]+)?$Example:
"together://ml_A1b2C3d4E5f6G7h8I9j0K"
Compute layout to provision.
Show child attributes
Show child attributes
Whether the resource hosts LoRA sessions or a single full-weight session
Example:
true
Optimizer configuration for this resource.
Show child attributes
Show child attributes
Was this page helpful?
⌘I