Put a weight set
Records a weight set from its version-2 manifest, after its files are uploaded. set must
be the full set digest, and it must equal the set digest of the manifest’s files. No release
is registered. Repeating the request is safe.
The set digest is sha256: plus the SHA-256 of the manifest’s file lines, sorted, joined
by newlines; each line is the file’s hex SHA-256, two spaces, and its path. Each file must
already be uploaded at its size, or every file must be an hf:// source pinned to a
commit. Paths are relative, with no . or .. segment and no backslash.
Returns 201 when the project did not have the set and 200 when it did. Available when
weight sets are enabled for your account. Requires the account_admin or developer role
and Serve access.
curl --request PUT \
--url https://api.reactor.inc/projects/{proj_id}/weights/{set} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"manifest": {
"version": 2,
"files": [
{
"path": "model.safetensors",
"size": 4831821824,
"sha256": "2c26b46b68ffc68ff99b453c1d30413413422d706483bfa0f98a5e886266e7ae"
},
{
"path": "config.json",
"size": 16384,
"sha256": "fcde2b2edba56bf408601fb721fe9b5c338d10ee429ea04fae5511b68fbf8fb9"
}
]
}
}
'import requests
url = "https://api.reactor.inc/projects/{proj_id}/weights/{set}"
payload = { "manifest": {
"version": 2,
"files": [
{
"path": "model.safetensors",
"size": 4831821824,
"sha256": "2c26b46b68ffc68ff99b453c1d30413413422d706483bfa0f98a5e886266e7ae"
},
{
"path": "config.json",
"size": 16384,
"sha256": "fcde2b2edba56bf408601fb721fe9b5c338d10ee429ea04fae5511b68fbf8fb9"
}
]
} }
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.put(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PUT',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
manifest: {
version: 2,
files: [
{
path: 'model.safetensors',
size: 4831821824,
sha256: '2c26b46b68ffc68ff99b453c1d30413413422d706483bfa0f98a5e886266e7ae'
},
{
path: 'config.json',
size: 16384,
sha256: 'fcde2b2edba56bf408601fb721fe9b5c338d10ee429ea04fae5511b68fbf8fb9'
}
]
}
})
};
fetch('https://api.reactor.inc/projects/{proj_id}/weights/{set}', 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.reactor.inc/projects/{proj_id}/weights/{set}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PUT",
CURLOPT_POSTFIELDS => json_encode([
'manifest' => [
'version' => 2,
'files' => [
[
'path' => 'model.safetensors',
'size' => 4831821824,
'sha256' => '2c26b46b68ffc68ff99b453c1d30413413422d706483bfa0f98a5e886266e7ae'
],
[
'path' => 'config.json',
'size' => 16384,
'sha256' => 'fcde2b2edba56bf408601fb721fe9b5c338d10ee429ea04fae5511b68fbf8fb9'
]
]
]
]),
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.reactor.inc/projects/{proj_id}/weights/{set}"
payload := strings.NewReader("{\n \"manifest\": {\n \"version\": 2,\n \"files\": [\n {\n \"path\": \"model.safetensors\",\n \"size\": 4831821824,\n \"sha256\": \"2c26b46b68ffc68ff99b453c1d30413413422d706483bfa0f98a5e886266e7ae\"\n },\n {\n \"path\": \"config.json\",\n \"size\": 16384,\n \"sha256\": \"fcde2b2edba56bf408601fb721fe9b5c338d10ee429ea04fae5511b68fbf8fb9\"\n }\n ]\n }\n}")
req, _ := http.NewRequest("PUT", 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.put("https://api.reactor.inc/projects/{proj_id}/weights/{set}")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"manifest\": {\n \"version\": 2,\n \"files\": [\n {\n \"path\": \"model.safetensors\",\n \"size\": 4831821824,\n \"sha256\": \"2c26b46b68ffc68ff99b453c1d30413413422d706483bfa0f98a5e886266e7ae\"\n },\n {\n \"path\": \"config.json\",\n \"size\": 16384,\n \"sha256\": \"fcde2b2edba56bf408601fb721fe9b5c338d10ee429ea04fae5511b68fbf8fb9\"\n }\n ]\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.reactor.inc/projects/{proj_id}/weights/{set}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Put.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"manifest\": {\n \"version\": 2,\n \"files\": [\n {\n \"path\": \"model.safetensors\",\n \"size\": 4831821824,\n \"sha256\": \"2c26b46b68ffc68ff99b453c1d30413413422d706483bfa0f98a5e886266e7ae\"\n },\n {\n \"path\": \"config.json\",\n \"size\": 16384,\n \"sha256\": \"fcde2b2edba56bf408601fb721fe9b5c338d10ee429ea04fae5511b68fbf8fb9\"\n }\n ]\n }\n}"
response = http.request(request)
puts response.read_body{
"set_digest": "<string>",
"file_count": 123,
"total_size": 123,
"tags": [
"<string>"
],
"created_at": "2023-11-07T05:31:56Z",
"files": [
{
"path": "<string>",
"size": 123,
"sha256": "<string>",
"source": "<string>"
}
]
}{
"set_digest": "sha256:5f2c8e1a9b7d3c4e6f0a1b2c3d4e5f6a7b8c9d0e1f2a3b4c5d6e7f8a9b0c1d2e",
"file_count": 2,
"total_size": 4831838208,
"tags": [],
"created_at": "2026-10-10T09:40:00Z",
"files": [
{
"path": "model.safetensors",
"size": 4831821824,
"sha256": "2c26b46b68ffc68ff99b453c1d30413413422d706483bfa0f98a5e886266e7ae"
},
{
"path": "config.json",
"size": 16384,
"sha256": "fcde2b2edba56bf408601fb721fe9b5c338d10ee429ea04fae5511b68fbf8fb9"
}
]
}{
"error": "<string>",
"message": "<string>",
"resource": "<string>",
"reason": "<string>"
}{
"error": "<string>",
"message": "<string>",
"resource": "<string>",
"reason": "<string>"
}{
"error": "<string>",
"message": "<string>",
"resource": "<string>",
"reason": "<string>"
}{
"error": "failed_precondition",
"reason": "weights_file_missing",
"message": "file \"model.safetensors\" is not uploaded at its size; upload it, then create the weight set again"
}{
"error": "<string>",
"message": "<string>",
"resource": "<string>",
"reason": "<string>"
}{
"error": "<string>",
"message": "<string>",
"resource": "<string>",
"reason": "<string>"
}{
"error": "<string>",
"message": "<string>",
"resource": "<string>",
"reason": "<string>"
}{
"error": "<string>",
"message": "<string>",
"resource": "<string>",
"reason": "<string>"
}Authorizations
A Reactor API key (rk_...), sent as Authorization: Bearer rk_.... Keep it on a server.
Path Parameters
The full set digest, sha256:<64 hex> or the 64 hex characters. A tag or prefix is not accepted.
The project's ID, a UUID. It is not the model's ID.
Body
A version-2 weights manifest.
Show child attributes
Show child attributes
Response
The project already had the set.
sha256:<64 hex>.
Bytes.
The tags that name this set, then the releases whose bundle is the set, in semver order.
Detail and put responses only.
Show child attributes
Show child attributes
curl --request PUT \
--url https://api.reactor.inc/projects/{proj_id}/weights/{set} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"manifest": {
"version": 2,
"files": [
{
"path": "model.safetensors",
"size": 4831821824,
"sha256": "2c26b46b68ffc68ff99b453c1d30413413422d706483bfa0f98a5e886266e7ae"
},
{
"path": "config.json",
"size": 16384,
"sha256": "fcde2b2edba56bf408601fb721fe9b5c338d10ee429ea04fae5511b68fbf8fb9"
}
]
}
}
'import requests
url = "https://api.reactor.inc/projects/{proj_id}/weights/{set}"
payload = { "manifest": {
"version": 2,
"files": [
{
"path": "model.safetensors",
"size": 4831821824,
"sha256": "2c26b46b68ffc68ff99b453c1d30413413422d706483bfa0f98a5e886266e7ae"
},
{
"path": "config.json",
"size": 16384,
"sha256": "fcde2b2edba56bf408601fb721fe9b5c338d10ee429ea04fae5511b68fbf8fb9"
}
]
} }
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.put(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PUT',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
manifest: {
version: 2,
files: [
{
path: 'model.safetensors',
size: 4831821824,
sha256: '2c26b46b68ffc68ff99b453c1d30413413422d706483bfa0f98a5e886266e7ae'
},
{
path: 'config.json',
size: 16384,
sha256: 'fcde2b2edba56bf408601fb721fe9b5c338d10ee429ea04fae5511b68fbf8fb9'
}
]
}
})
};
fetch('https://api.reactor.inc/projects/{proj_id}/weights/{set}', 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.reactor.inc/projects/{proj_id}/weights/{set}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PUT",
CURLOPT_POSTFIELDS => json_encode([
'manifest' => [
'version' => 2,
'files' => [
[
'path' => 'model.safetensors',
'size' => 4831821824,
'sha256' => '2c26b46b68ffc68ff99b453c1d30413413422d706483bfa0f98a5e886266e7ae'
],
[
'path' => 'config.json',
'size' => 16384,
'sha256' => 'fcde2b2edba56bf408601fb721fe9b5c338d10ee429ea04fae5511b68fbf8fb9'
]
]
]
]),
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.reactor.inc/projects/{proj_id}/weights/{set}"
payload := strings.NewReader("{\n \"manifest\": {\n \"version\": 2,\n \"files\": [\n {\n \"path\": \"model.safetensors\",\n \"size\": 4831821824,\n \"sha256\": \"2c26b46b68ffc68ff99b453c1d30413413422d706483bfa0f98a5e886266e7ae\"\n },\n {\n \"path\": \"config.json\",\n \"size\": 16384,\n \"sha256\": \"fcde2b2edba56bf408601fb721fe9b5c338d10ee429ea04fae5511b68fbf8fb9\"\n }\n ]\n }\n}")
req, _ := http.NewRequest("PUT", 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.put("https://api.reactor.inc/projects/{proj_id}/weights/{set}")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"manifest\": {\n \"version\": 2,\n \"files\": [\n {\n \"path\": \"model.safetensors\",\n \"size\": 4831821824,\n \"sha256\": \"2c26b46b68ffc68ff99b453c1d30413413422d706483bfa0f98a5e886266e7ae\"\n },\n {\n \"path\": \"config.json\",\n \"size\": 16384,\n \"sha256\": \"fcde2b2edba56bf408601fb721fe9b5c338d10ee429ea04fae5511b68fbf8fb9\"\n }\n ]\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.reactor.inc/projects/{proj_id}/weights/{set}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Put.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"manifest\": {\n \"version\": 2,\n \"files\": [\n {\n \"path\": \"model.safetensors\",\n \"size\": 4831821824,\n \"sha256\": \"2c26b46b68ffc68ff99b453c1d30413413422d706483bfa0f98a5e886266e7ae\"\n },\n {\n \"path\": \"config.json\",\n \"size\": 16384,\n \"sha256\": \"fcde2b2edba56bf408601fb721fe9b5c338d10ee429ea04fae5511b68fbf8fb9\"\n }\n ]\n }\n}"
response = http.request(request)
puts response.read_body{
"set_digest": "<string>",
"file_count": 123,
"total_size": 123,
"tags": [
"<string>"
],
"created_at": "2023-11-07T05:31:56Z",
"files": [
{
"path": "<string>",
"size": 123,
"sha256": "<string>",
"source": "<string>"
}
]
}{
"set_digest": "sha256:5f2c8e1a9b7d3c4e6f0a1b2c3d4e5f6a7b8c9d0e1f2a3b4c5d6e7f8a9b0c1d2e",
"file_count": 2,
"total_size": 4831838208,
"tags": [],
"created_at": "2026-10-10T09:40:00Z",
"files": [
{
"path": "model.safetensors",
"size": 4831821824,
"sha256": "2c26b46b68ffc68ff99b453c1d30413413422d706483bfa0f98a5e886266e7ae"
},
{
"path": "config.json",
"size": 16384,
"sha256": "fcde2b2edba56bf408601fb721fe9b5c338d10ee429ea04fae5511b68fbf8fb9"
}
]
}{
"error": "<string>",
"message": "<string>",
"resource": "<string>",
"reason": "<string>"
}{
"error": "<string>",
"message": "<string>",
"resource": "<string>",
"reason": "<string>"
}{
"error": "<string>",
"message": "<string>",
"resource": "<string>",
"reason": "<string>"
}{
"error": "failed_precondition",
"reason": "weights_file_missing",
"message": "file \"model.safetensors\" is not uploaded at its size; upload it, then create the weight set again"
}{
"error": "<string>",
"message": "<string>",
"resource": "<string>",
"reason": "<string>"
}{
"error": "<string>",
"message": "<string>",
"resource": "<string>",
"reason": "<string>"
}{
"error": "<string>",
"message": "<string>",
"resource": "<string>",
"reason": "<string>"
}{
"error": "<string>",
"message": "<string>",
"resource": "<string>",
"reason": "<string>"
}