REST API for Microsoft TRELLIS text-to-3D generation.
docker compose up --buildAPI available at http://localhost:8000 with interactive docs at /docs.
Test with: python test_api.py
- application starting up may take some time, as well as downloading model weight in the first run - the weights will be cached for future use under
./cacheby volume-mounting the container.
Alternatively, run the docker container manually with docker run -it --gpus all -v $(pwd)/cache:/root/.cache -p 8000:8000 --name trellis trellis and run python text_to_3d_api.py --host 0.0.0.0 --port 8000.
# Generate 3D model
curl -X POST "http://localhost:8000/generate" \
-H "Content-Type: application/json" \
-d '{"prompt": "A red sports car", "formats": ["mesh", "gaussian"]}'
# Download files from response URLs
curl -O "http://localhost:8000/files/{job_id}/model.glb"The Dockerfile also provides a way to use an updated torch+cuda environment to original TRELLIS repo.
- REST API for text-to-3D generation
- Multiple formats: GLB, PLY, MP4 preview videos
- Docker deployment with GPU support
- File management with automatic cleanup
- Health monitoring and error handling
See API_README.md for detailed documentation.