diff --git a/server.py b/server.py index 2808921..9169be1 100644 --- a/server.py +++ b/server.py @@ -110,9 +110,9 @@ def cache_file(source: Path) -> str: return content_hash -@app.get("/") -async def root(): - """Server info.""" +@app.get("/api") +async def api_info(): + """Server info (JSON).""" return { "name": "Art DAG L1 Server", "version": "0.1.0", @@ -121,6 +121,102 @@ async def root(): } +HOME_HTML = """ + + +
+L1 rendering server for the Art DAG system. Manages distributed rendering jobs via Celery workers.
+ +| Method | Path | Description |
|---|---|---|
| GET | /ui | Web UI for viewing runs |
| POST | /runs | Start a rendering run |
| GET | /runs | List all runs |
| GET | /runs/{run_id} | Get run status |
| GET | /cache | List cached content hashes |
| GET | /cache/{hash} | Download cached content |
| POST | /cache/upload | Upload file to cache |
| GET | /assets | List known assets |
curl -X POST /runs \\
+ -H "Content-Type: application/json" \\
+ -d '{"recipe": "dog", "inputs": ["33268b6e..."]}'
+
+ Every render produces a provenance record linking inputs, effects, and infrastructure:
+{
+ "output": {"content_hash": "..."},
+ "inputs": [...],
+ "effects": [...],
+ "infrastructure": {...}
+}
+