Start a multipart weights upload
Starts a multipart upload for one large file of the weight set, and returns one presigned
PUT URL per part. Upload each part, keep each response’s ETag, then complete the upload.
A file already stored at its size returns copied: true and needs no upload.
Files can be up to 5 TiB. Available when weight sets are enabled for your account. Requires
the account_admin or developer role and Serve access.
POST
/
projects
/
{proj_id}
/
weights
/
{set}
/
uploads
/
multipart
Start a multipart weights upload
curl --request POST \
--url https://api.reactor.inc/projects/{proj_id}/weights/{set}/uploads/multipart \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"name": "model.safetensors",
"size": 12884901888,
"sha256": "2c26b46b68ffc68ff99b453c1d30413413422d706483bfa0f98a5e886266e7ae"
}
'import requests
url = "https://api.reactor.inc/projects/{proj_id}/weights/{set}/uploads/multipart"
payload = {
"name": "model.safetensors",
"size": 12884901888,
"sha256": "2c26b46b68ffc68ff99b453c1d30413413422d706483bfa0f98a5e886266e7ae"
}
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({
name: 'model.safetensors',
size: 12884901888,
sha256: '2c26b46b68ffc68ff99b453c1d30413413422d706483bfa0f98a5e886266e7ae'
})
};
fetch('https://api.reactor.inc/projects/{proj_id}/weights/{set}/uploads/multipart', 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}/uploads/multipart",
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' => 'model.safetensors',
'size' => 12884901888,
'sha256' => '2c26b46b68ffc68ff99b453c1d30413413422d706483bfa0f98a5e886266e7ae'
]),
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}/uploads/multipart"
payload := strings.NewReader("{\n \"name\": \"model.safetensors\",\n \"size\": 12884901888,\n \"sha256\": \"2c26b46b68ffc68ff99b453c1d30413413422d706483bfa0f98a5e886266e7ae\"\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.reactor.inc/projects/{proj_id}/weights/{set}/uploads/multipart")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"name\": \"model.safetensors\",\n \"size\": 12884901888,\n \"sha256\": \"2c26b46b68ffc68ff99b453c1d30413413422d706483bfa0f98a5e886266e7ae\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.reactor.inc/projects/{proj_id}/weights/{set}/uploads/multipart")
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\": \"model.safetensors\",\n \"size\": 12884901888,\n \"sha256\": \"2c26b46b68ffc68ff99b453c1d30413413422d706483bfa0f98a5e886266e7ae\"\n}"
response = http.request(request)
puts response.read_body{
"upload_id": "2~nC3yQeXbVZ8a",
"key": "partners/7d2e4f6a-1b3c-4d5e-8f9a-0b1c2d3e4f5a/blobs/sha256/2c26b46b68ffc68ff99b453c1d30413413422d706483bfa0f98a5e886266e7ae",
"part_size": 536870912,
"parts": [
{
"part_number": 1,
"url": "https://storage.example.com/part?n=1&signature=...",
"content_length": 536870912
},
{
"part_number": 2,
"url": "https://storage.example.com/part?n=2&signature=...",
"content_length": 536870912
}
]
}{
"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>"
}{
"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 project's ID, a UUID. It is not the model's ID.
The full set digest, sha256:<64 hex> or the 64 hex characters. A tag or prefix is not accepted.
Body
application/json
⌘I
Start a multipart weights upload
curl --request POST \
--url https://api.reactor.inc/projects/{proj_id}/weights/{set}/uploads/multipart \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"name": "model.safetensors",
"size": 12884901888,
"sha256": "2c26b46b68ffc68ff99b453c1d30413413422d706483bfa0f98a5e886266e7ae"
}
'import requests
url = "https://api.reactor.inc/projects/{proj_id}/weights/{set}/uploads/multipart"
payload = {
"name": "model.safetensors",
"size": 12884901888,
"sha256": "2c26b46b68ffc68ff99b453c1d30413413422d706483bfa0f98a5e886266e7ae"
}
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({
name: 'model.safetensors',
size: 12884901888,
sha256: '2c26b46b68ffc68ff99b453c1d30413413422d706483bfa0f98a5e886266e7ae'
})
};
fetch('https://api.reactor.inc/projects/{proj_id}/weights/{set}/uploads/multipart', 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}/uploads/multipart",
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' => 'model.safetensors',
'size' => 12884901888,
'sha256' => '2c26b46b68ffc68ff99b453c1d30413413422d706483bfa0f98a5e886266e7ae'
]),
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}/uploads/multipart"
payload := strings.NewReader("{\n \"name\": \"model.safetensors\",\n \"size\": 12884901888,\n \"sha256\": \"2c26b46b68ffc68ff99b453c1d30413413422d706483bfa0f98a5e886266e7ae\"\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.reactor.inc/projects/{proj_id}/weights/{set}/uploads/multipart")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"name\": \"model.safetensors\",\n \"size\": 12884901888,\n \"sha256\": \"2c26b46b68ffc68ff99b453c1d30413413422d706483bfa0f98a5e886266e7ae\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.reactor.inc/projects/{proj_id}/weights/{set}/uploads/multipart")
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\": \"model.safetensors\",\n \"size\": 12884901888,\n \"sha256\": \"2c26b46b68ffc68ff99b453c1d30413413422d706483bfa0f98a5e886266e7ae\"\n}"
response = http.request(request)
puts response.read_body{
"upload_id": "2~nC3yQeXbVZ8a",
"key": "partners/7d2e4f6a-1b3c-4d5e-8f9a-0b1c2d3e4f5a/blobs/sha256/2c26b46b68ffc68ff99b453c1d30413413422d706483bfa0f98a5e886266e7ae",
"part_size": 536870912,
"parts": [
{
"part_number": 1,
"url": "https://storage.example.com/part?n=1&signature=...",
"content_length": 536870912
},
{
"part_number": 2,
"url": "https://storage.example.com/part?n=2&signature=...",
"content_length": 536870912
}
]
}{
"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>"
}{
"error": "<string>",
"message": "<string>",
"resource": "<string>",
"reason": "<string>"
}