Developer Quickstart
Create an API key and send your first transfer with the Beam Python SDK.
Follow the Console's Get started checklist: add credits, create an API key, and send your first transfer. Use the SDK for transfers and the API Reference to explore the HTTP endpoints.
1. Prepare your account
Open the Console for the environment you want to use:
| Environment | Console | SDK environment |
|---|---|---|
| Development | console.dev.b1m.ai | dev |
| Production | console.b1m.ai | prod |
Select your organization, add credits in Settings → Billing, then create a key in API Keys. Use a key from the same environment as your transfer. Ask an organization administrator if you cannot manage billing or create keys.
2. Install the SDK
Use Python 3.10 or newer:
python -m pip install beam-network-sdkSet BEAM_API_KEY in your shell to the key you created. Keep it out of source
code. Set BEAM_ENV to dev or prod to match your Console.
3. Send your first transfer
The example below transfers a file between HTTP endpoints. Set these environment variables before running it:
BEAM_SOURCE_URL: a reachable HTTPS download URL for your file.BEAM_DESTINATION_URL: an HTTPS upload endpoint configured to accept the transfer.BEAM_TOTAL_SIZE: the exact file size in bytes.
Both endpoints must be reachable by the workers. See the HTTP Connector for endpoint requirements. For S3, R2, or other storage providers, use the corresponding connector to prepare signed access.
Save this as first_transfer.py:
import asyncio
import os
from beam_network_sdk import BeamSDK
from beam_network_sdk.models import DestConfig, SourceConfig
async def main() -> None:
async with BeamSDK(
api_key=os.environ["BEAM_API_KEY"],
environment=os.environ["BEAM_ENV"],
) as beam:
transfer = await beam.transfers.create(
sources=[SourceConfig(type="http", url=os.environ["BEAM_SOURCE_URL"])],
destinations=[DestConfig(type="http", url=os.environ["BEAM_DESTINATION_URL"])],
total_size=int(os.environ["BEAM_TOTAL_SIZE"]),
name="my-first-transfer",
progressive_mode=True,
)
print("Transfer:", transfer.transfer_id)
await beam.transfers.distribute(transfer.transfer_id)
status = await beam.transfers.wait_complete(transfer.transfer_id)
print("Status:", status.status)
asyncio.run(main())python first_transfer.py4. Check the result
Find the printed transfer ID under Transfers in the same Console environment. Confirm that the transfer completed and that the destination contains your file. If it fails, check your key, organization credits, and source and destination access.
Next steps
- API Reference — Browse HTTP endpoints and authentication.
- Connectors — Configure your storage provider.
- How Transfers Work — Understand the transfer lifecycle.
- Billing & Payments — Manage the credits used by transfers.