.env
UPSTASH_BLOB_TOKEN by default and also takes a token directly, for a token under another variable or a platform without environment variables, such as Cloudflare Workers.
The token is a bearer secret. Anything holding it can read and write the whole bucket. Keep it server side, never in NEXT_PUBLIC_, VITE_, or any other variable your bundler inlines into client code.
Options
Constructing a client per request is fine. Credentials are cached per token, so two clients built from the same token share one.
Public or private
Whether the bucket is public or private is a console setting, not an option: the SDK learns it from the backend on the first request. See Private buckets.Retries
put that goes up as one PUT with a streamed body is sent once, since a stream cannot be read twice. In TypeScript every body is streamed; in Python a body held in memory is retried: bytes, a str, or one buffered under max_size. In Go a body that can be read again is retried: a *bytes.Reader, a *strings.Reader, a regular file, or one buffered under MaxSize; see Bodies. The POSTs that create and complete a multipart upload and a batch delete are sent once. When the credential service asks the SDK to wait, it waits up to 10 seconds and asks again, three times.
Clients built from the same token share one credential cache, so a credential fetch already in progress keeps the retry setting of the client that started it. An expired temporary credential is not a failure: the SDK fetches a new one and sends the request once more, even with retries off, unless its body was a stream. Browser uploads retry on their own budget; see Retries.
Telemetry
The SDK sends its version, runtime and platform as headers on credential and signing requests to Upstash. Turn it off withUPSTASH_DISABLE_TELEMETRY in the environment, set to anything but an empty string, false, 0, no or off, or with the telemetry option on the client.
Using an S3 client
s3() returns a config for an S3 client, for anything the SDK does not wrap: byte ranges, conditional GETs, delimiters and common prefixes, object tagging. The credentials in it are short-lived; see Minting temporary credentials.
Wiring it into an S3 client: TypeScript, Python, Go.
Next steps
Writing
put, metadata, conditional writes and multipart from the server.Reading
get, info, exists, list and signed read URLs.