Beam SDK
Create and manage transfers from Python, TypeScript, Go, Rust, or the browser.
The Beam SDK creates transfers and drives their lifecycle from your own code. It prepares a transfer, signs the routes workers will use, distributes the work to the network, and reconciles the terminal status.
Provider credentials stay in your process. The SDK signs task-scoped routes locally, so your S3, R2, Hippius, or Hugging Face keys are never sent to Beam or to a participant.
If you are sending your first transfer, start with the Developer Quickstart. This page is the map of what is available in each language.
Packages
| Language | Install from | Package |
|---|---|---|
| Python | PyPI | beam-network-sdk |
| TypeScript / Node | npm | @beam-network/sdk |
| Go | Go modules | github.com/Beam-Network/beam-sdk-public/sdks/go |
| Rust | crates.io | beam-network-sdk |
| CLI | npm | @beam-network/cli |
| Browser | npm | @beam-network/web-sdk |
| Token broker | npm | @beam-network/web-sdk-server |
All of them reach the same network and spend the same organization credits, and every transfer they create appears together in the Console.
Install
python -m pip install beam-network-sdknpm install @beam-network/sdkgo get github.com/Beam-Network/beam-sdk-public/sdks/gobeam-network-sdk = "0.2"Command line
@beam-network/cli installs a beam-send binary for creating and monitoring
transfers without writing code:
npm install -g @beam-network/cli
beam-send --helpFor machine enrolment, Rooms and sharing, use the Beam CLI instead.
The two are separate: beam-send drives the transfer lifecycle, beam drives
your account and machine.
Authenticate
Every server-side client needs a Beam API key from the Console. Pass it from the environment rather than committing it:
export BEAM_API_KEY=b1m_...Clients default to production. Set BEAM_ENV to dev to use the development
network, and use a key from the matching environment — a development key against
production fails authentication rather than falling back.
API keys spend credits, so they belong server-side. To move data from a page, use the browser SDK, which never holds a key.
The lifecycle
Every language follows the same three steps:
- Create — describe sources and destinations. The SDK prepares the transfer and signs destination routes locally.
- Distribute — hand the transfer to the network. Orchestrators assign workers, which move bytes directly between your endpoints.
- Wait — block on a terminal status, or poll it yourself.
See How Transfers Work for what the network does during each step.
TypeScript
import { BeamClient } from "@beam-network/sdk";
const beam = new BeamClient({ apiKey: process.env.BEAM_API_KEY! });
const transfer = await beam.createTransfer({
sources: [{ type: "http", url: process.env.BEAM_SOURCE_URL! }],
destinations: [{ type: "http", url: process.env.BEAM_DESTINATION_URL! }],
total_size: Number(process.env.BEAM_TOTAL_SIZE),
name: "first-transfer",
});
await beam.distributeTransfer(transfer.transfer_id);
const status = await beam.waitForTransfer(transfer.transfer_id);
console.log(status.status);Go
client := beamnetworksdk.NewClient(
beamnetworksdk.WithAPIKey(os.Getenv("BEAM_API_KEY")),
)
defer client.Close()
transfer, err := client.CreateTransfer(ctx, beamnetworksdk.TransferCreateRequest{
Sources: []beamnetworksdk.SourceConfig{{"type": "http", "url": sourceURL}},
Destinations: []beamnetworksdk.DestConfig{{"type": "http", "url": destURL}},
TotalSize: totalSize,
Name: "first-transfer",
})The Python equivalent is in the Developer Quickstart.
Storage providers
The snippets above move data between plain HTTP endpoints. To move it between object storage, use the provider configs, which keep credentials in your process and mint task-scoped access for workers.
See Connectors for S3, Cloudflare R2, Google Cloud Storage, Hippius, and HTTP, including the fields each one needs.
Browser transfers
The browser SDK is a different shape from the server SDKs.
@beam-network/web-sdk runs in a page and never sees a credential.
@beam-network/web-sdk-server runs in your backend and mints short-lived,
scoped tokens for it.
Use this pairing for Rooms, broadcast, and transfers started from a web application.
The browser packages are not published to npm yet. Ask the Beam team for access if you need them before then.
Next steps
- Developer Quickstart — Send your first transfer.
- Connectors — Configure the storage you move data between.
- How Transfers Work — The lifecycle behind these calls.
- API Reference — The HTTP API underneath the SDKs.