/projects/{project_id}/branches/{branch_id}/buckets/{bucket_name}/objects/{object_key}/downloadDownload an object's bytesStreams the raw bytes of the named object from the bucket on the specified branch, including objects inherited from ancestor branches. Served by the user's session (no customer S3 credentials required).
The body is returned as application/octet-stream so a browser treats it as a download; the Content-Length and ETag response headers echo the stored object metadata.
BINARY-STREAM EXCEPTION TO THE BUILD-GENERATED-TYPES RULE (#7029): the successful 200 body is the raw object stream, proxied verbatim from the platform object storage admin endpoint. It is modeled as an application/octet-stream binary body (not a JSON response schema) and is streamed without buffering the whole object in memory. Error responses still use the generated GeneralError shape.
Note: This endpoint is currently in Beta.
Parameters
project_idstringpathrequiredThe Neon project ID
branch_idstringpathrequiredThe Neon branch ID
bucket_namestringpathrequiredThe bucket name
object_keystringpathrequiredThe object key. Keys may contain `/`; the `/` characters of nested keys must be percent-encoded (`%2F`) in the path segment.
Responses
Headers
Content-DispositionAlways `attachment`. Forces a download rather than inline rendering, neutralizing stored-XSS via the object body.
Content-LengthThe object size in bytes.
ETagThe object's entity tag (content hash).
X-Content-Type-OptionsAlways `nosniff`. Stops the browser from MIME-sniffing the caller-controlled bytes into an executable type.
"binary"codestringrequiredmessagestringrequiredError message
request_idstringUnique identifier for the request, useful for debugging. You can set this value manually by including an `X-Request-ID` header in the request. If not provided, the value will be generated automatically.
{
"code": "",
"message": "string",
"request_id": "string"
}codestringrequiredmessagestringrequiredError message
request_idstringUnique identifier for the request, useful for debugging. You can set this value manually by including an `X-Request-ID` header in the request. If not provided, the value will be generated automatically.
{
"code": "",
"message": "string",
"request_id": "string"
}