A high-quality, extensible FastAPI service for Procedural Content Generation (PCG) of 3D assets. Currently supports Infinigen with a modular architecture designed for easy integration of additional PCG modules.
- 🚀 RESTful API - Clean, well-documented REST endpoints
- 🔌 Modular Architecture - Easy to extend with new PCG modules
- 📦 Infinigen Integration - Generate diverse 3D assets using Infinigen
- 🔄 Async Support - Both synchronous and asynchronous generation endpoints
- 📝 Auto-generated Documentation - Interactive API docs with Swagger UI
- ⚙️ Configurable - Environment-based configuration management
- 🛡️ Type Safety - Full Pydantic validation for requests and responses
- Ubuntu (Tested on Ubuntu24.04)
- Conda (Anaconda3/Miniconda3)
- Clone the repository
git clone https://github.com/3DSceneAgent/PCGIntegrator3D.git
cd PCGIntegrator3D- Run the install script
./install.shYou may need to enter your password for sudo.
Development mode (with auto-reload):
uvicorn app.main:app --reload --host 0.0.0.0 --port 8000Production mode:
uvicorn app.main:app --host 0.0.0.0 --port 8000 --workers 4The API will be available at http://localhost:8000
Once the server is running, access the interactive API documentation:
- Swagger UI: http://localhost:8000/docs
- ReDoc: http://localhost:8000/redoc
- OpenAPI JSON: http://localhost:8000/openapi.json
Configuration is managed through environment variables. See .env.example for all available options.
Key configuration options:
| Variable | Description | Default |
|---|---|---|
PROJECT_NAME |
Service name | PCGIntegrator3D |
API_VERSION |
API version | 1.0.0 |
ENVIRONMENT |
Environment (development/production) | development |
HOST |
Server host | 0.0.0.0 |
PORT |
Server port | 8000 |
OUTPUT_BASE_DIR |
Base directory for outputs | outputs |
INFINIGEN_DEFAULT_NUM_ASSETS |
Default number of assets | 1 |
The architecture is designed for easy extension. To add a new PCG module:
- Create utility functions in
utils/your_module_generate.py - Define Pydantic models in
app/models/your_module.py - Create router in
app/routers/your_module.py - Register router in
app/main.py:
from app.routers import your_module
app.include_router(
your_module.router,
prefix="/api/v1/your_module",
tags=["YourModule"]
)See LICENSE file for details.
Contributions are welcome! Please follow these guidelines:
- Fork the repository
- Create a feature branch
- Follow the existing code style
- Add tests for new features
- Submit a pull request
For issues and questions:
- Open an issue on GitHub
- Check existing documentation
- Review API docs at
/docsendpoint
Built with FastAPI - Modern, fast, and production-ready Python web framework.