Spaces:
Build error
Build error
File size: 837 Bytes
2dd47f7 2b3c4a6 2dd47f7 2b3c4a6 2dd47f7 2b3c4a6 |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 |
---
title: vcad Render API
emoji: 🔧
colorFrom: green
colorTo: blue
sdk: docker
app_port: 7860
pinned: false
---
# vcad Render API
HTTP API that renders [Compact IR](https://campedersen.com/cad0) to PNG images using the vcad kernel.
## Endpoints
### POST /render
Renders Compact IR to a PNG image.
**Request:**
```json
{
"ir": "C 50 30 10\nY 5 20\nT 1 25 15 0\nD 0 2"
}
```
**Response:** PNG image (image/png)
### GET /health
Health check endpoint.
**Response:**
```json
{"status": "ok"}
```
## Compact IR Syntax
- `C w h d` - Box (cuboid)
- `Y r h` - Cylinder
- `S r` - Sphere
- `T idx x y z` - Translate node at index
- `U a b` - Union of nodes a and b
- `D a b` - Difference (a minus b)
## Related
- [cad0 model](https://huggingface.co/campedersen/cad0) - Text to Compact IR
- [vcad](https://vcad.io) - Full CAD app
|