What you’ll learn
FastAPI
Build modern Python APIs
Autoscaling
Publish with automatic scaling
Performance
Create high-performance endpoints
Documentation
Auto-generate API docs
Create your API
1
Fork the template
Sign in to Replit and fork the FastAPI template. Select + Use Template and follow the prompts to create your Replit App.
FastAPI automatically generates interactive API documentation at
/docs
.2
Set up publishing
- Select Publish in the workspace header
- Choose Autoscale deployment
- Configure your API:
- Machine: 1vCPU, 2 GiB RAM (default)
- Max machines: 3 (default)
- Run command:
uvicorn main:app --host 0.0.0.0
Autoscale deployments automatically adjust resources based on API traffic.
3
Launch
Select Publish to launch your API. It will be live in a few minutes!
Customization options
Endpoints
- Add new routes
- Implement validation
- Handle authentication
Documentation
- Customize API docs
- Add examples
- Define schemas
Next steps
Related guides
Want to learn more about API development? Check out our publishing documentation.