Skip to main content
Use CDN for directly served files. Use Storage for buckets, private objects, access keys, and S3-compatible tools. See Storage for limits and pricing.

Storage buckets

Create a bucket

string
required
Unique display name for the bucket.
private | public
default:"public"
Controls whether objects can be opened without authentication. Any value other than private is treated as public.
string
Preferred storage region when your account has a choice.
string
Optional cache behavior for public objects.
boolean
default:"false"
Retains supported object versions.
Returns

Bucket operations

Objects

Upload an object

string
required
Destination bucket ID.
file | bytes
required
Object contents.
string
required
Name stored for the object.
string
Optional folder inside the bucket.
private | public
default:"public"
Per-object visibility. The SDK sends public unless you pass private.
In Node.js, file is a Blob. Rust can upload into a bucket with upload_asset and bucket_id. The Go and Python upload methods have no bucket field, so use the raw request method or S3 there. Returns

Access keys

string
Label that identifies the integration using the key.
read | read_write
default:"read_write"
Allowed S3 operations. read allows only GET and HEAD.
Returns once
Pxxl returns secretAccessKey only when the key is created. Store it securely and never log it.

S3-compatible data access

Pxxl uses separate credentials for management and object data:
  • Use PXXL_API_KEY to create buckets, issue or revoke access keys, and read analytics or billing.
  • Use the bucket-scoped accessKeyId and one-time secretAccessKey for S3 object requests.
Never send PXXL_API_KEY to the S3 endpoint. A storage access key is restricted to one bucket and has either read or read_write permission.

Create a Node.js S3 client

createS3Client() creates a key and returns a PxxlS3 client built from it. It throws if Pxxl did not return the secret. The underlying AWS S3Client is available as s3.client. pxxl.storage.s3(credentials) builds a PxxlS3 from credentials you already have.

Use stored credentials without a Pxxl API key

pathStyle defaults to true. The environment variable names here are only an example. For Go, Python, and Rust, pass the returned endpoint, region, bucket, accessKeyId, secretAccessKey, and pathStyle fields to the standard AWS S3 client for that language. This works with AWS SDK for Go v2, boto3, and aws-sdk-s3.
Rotate keys by creating and deploying a replacement, verifying one object operation, and then revoking the old key.

Storage analytics

CDN assets

Upload an asset

Blob | reader | bytes
required
Asset contents. Node.js takes a Blob, Go an io.Reader, Python bytes, a file object, or file_path, and Rust bytes.
string
required
File name sent to Pxxl. Python uses the file’s own name when you pass file_path.
private | public
default:"public"
Public assets receive a publicUrl.
file | artifact
Classifies the uploaded asset.
string
Associates the asset with a project.
string
Associates the asset with a deployment.
The returned asset uses the same object shape shown above and includes publicUrl for public files.

CDN operations

pxxl.assets is the same object as pxxl.cdn.

Other languages

The PxxlS3 helper is in Node.js only.