Skip to content

Presigned R2 PUTs for N xorbs

POST
/v1/datasets/upload/prepare-batch
curl --request POST \
--url https://example.com/v1/datasets/upload/prepare-batch \
--header 'Content-Type: application/json' \
--data '{ "blobs": [ { "blob_id": "example", "content_length": 1 } ], "ttl_seconds": 300 }'

Content-addressed batch presign — one round-trip for a whole file’s xorbs (collapses the per-xorb presign cost that otherwise dominates dedup uploads).

x-api-key
string | null
Media type application/json
PrepareUploadBatchBody
object
blobs
required
Array<object>
>= 1 items <= 128 items
PrepareUploadObjectBody
object
blob_id
required
string
/^[0-9a-f]{64}$/
content_length
required
integer
>= 1 <= 33554432
ttl_seconds
integer
default: 300

Successful Response

Media type application/json
Example generated
example

Validation Error

Media type application/json
HTTPValidationError
object
detail
Array<object>
ValidationError
object
loc
required
Location
Array<string | integer>
msg
required
Message
string
type
required
Error Type
string
input
ctx
Context
object
Example generated
{
"detail": [
{
"loc": [
"example"
],
"msg": "example",
"type": "example",
"input": "example",
"ctx": {}
}
]
}