Modal Labs Quickstart: Serverless Python GPUs in Code (2026)
BeginnerEstimated setup time: 2 minutes•Updated for 2026 infrastructure
KYC Policy
GitHub Account
Payment Methods
Credit / Debit Card
Min. Deposit
$0 ($30/month free tier included)
Billing Model
Exact per-second billing from cold boot to shutdown
Trial Credits
$30 free compute credits every single month
Terminal Access
Interactive `modal shell` in your local terminal
What You Need Before Starting
✓Python 3.9+
✓GitHub account
Step-by-Step Setup Walkthrough
2 Steps to First Run1
Install Modal CLI & Authenticate
Step 1 of 2Sign up via GitHub and run `modal setup` in your local terminal.
- •Install the modal python package and run authentication.
Install & Setup Modal
bash
pip install modal modal setup
2
Run Your First GPU Function
Step 2 of 2Define your container environment directly in Python with zero Dockerfiles.
- •Modal spins up an A100 or H100 in under 3 seconds, runs your code, and shuts down instantly.
Run A10G GPU in Python
python
import modal
app = modal.App("quickstart")
@app.function(gpu="A10G")
def square(x):
import torch
print(f"CUDA available: {torch.cuda.is_available()}")
return x ** 2
@app.local_entrypoint()
def main():
print(square.remote(42))Insider Cost-Saving & Anti-Waste Tactics
#1: Modal shuts down the instant your Python function returns, ensuring 0% idle compute waste.
Frequently Asked Questions (Modal Labs Onboarding)
Q:What is the $30/month free tier on Modal?
Every Modal account receives $30 in free compute credits every month, enough to run dozens of hours of T4/A10G inference or batch fine-tuning without paying a cent.
Official Developer Onboarding Channel
Ready to Launch on Modal Labs?
Followed the guide? Jump directly to the official console using our verified partner route with guaranteed zero markup and active referral tracking.