# Video to 3D scene — complete guide for AI agents > A video in, a 3D scene out: a coloured point cloud of the place that was > filmed and the camera of every frame, which in order are the route the > camera took. The model is VGGT-Omega 1B, packed as a single GGUF file and run > locally with the `ggk` or `gguf-core` Python package. Both ship the same > diffusion engine, which runs the model > and, with `--serve`, puts it behind an OpenAI-style endpoint: > `POST /v1/images/edits`. The request carries the video; the response body is > the scene file. This file is the full, self-contained reference. Everything an agent needs to install the runtime, start the server and turn a video into a 3D scene is below. No JavaScript, login or API key is required to read it. ## Facts - Task: video to 3D (multi-view reconstruction). Input: one video of one place, or several pictures of it taken from different spots. Output: a point cloud with a colour per point, and one camera per frame (position, orientation, field of view), as `.glb` (default) or `.ply` (points only). There is no text prompt, no seed and no sampling: one feed-forward pass. - Model file (GGUF), one local file passed by path. It holds the whole model: image encoder, aggregator, camera head and depth head. Pick one: - `vggt-omega-1b-q8_0.gguf` — 8-bit weights, 1.36 GB. The default choice. - `vggt-omega-1b-nvfp4.gguf` — NVFP4 weights, 1.06 GB. The smallest. - `vggt-omega-1b-f16.gguf` — half precision, 2.29 GB. The reference. - Model files: https://huggingface.co/gguf-org/vggt-omega-gguf (the repository also holds two sample videos, `clip.mp4` and `car.mp4`). - Original model: https://github.com/facebookresearch/vggt-omega - Runtime: `ggk` (https://github.com/gguf-io/gk) or `gguf-core` (https://github.com/calcuis/gguf-core). Same engine, different command name: `ggk` vs `gguf`. Everything below works with either; swap the first word. The video-to-3D server is in `ggk` releases after 1.2.2 and `gguf-core` releases after 1.0.4. If `--serve` answers `--serve is not available for VGGT-Omega`, the runtime is too old: upgrade it, or use the one-shot command in section 5. - Default server address: `http://127.0.0.1:8888`. - Hardware: a 6 GB GPU reconstructs 15 frames in about 10 seconds. CPU only works: about 20 seconds for 3 frames at resolution 224, minutes for a clip. - One scene is reconstructed at a time; concurrent requests queue. - The response is sent when the scene is finished. Nothing is streamed and there is no progress endpoint: the client simply waits. ## 1. Install the runtime Python 3.8 or newer. The install compiles the engine (CPU by default, Metal on macOS). GPU backends are opt-in through an environment variable at install time. ```bash GGK_CUDA=1 pip install ggk # NVIDIA GGK_HIP=1 pip install ggk # AMD ROCm GGK_VULKAN=1 pip install ggk # Vulkan pip install ggk # CPU only ``` `gguf-core` installs the same way: `GGK_CUDA=1 pip install gguf-core`. On Windows cmd, set the variable first: `set GGK_CUDA=1` then `pip install ggk`. Videos are decoded by Media Foundation on Windows (anything the machine plays: H.264 or HEVC in MP4 / MOV, WMV, AVI). On Linux and macOS, and for what Media Foundation cannot read, the server calls an `ffmpeg` found on the PATH: install ffmpeg there, or send the frames as pictures (below), which needs no decoder at all. ## 2. Get the model file Download `vggt-omega-1b-q8_0.gguf` from https://huggingface.co/gguf-org/vggt-omega-gguf. The commands below assume it is in the current directory. ## 3. Start the server ```bash ggk -m vggt-omega-1b-q8_0.gguf --serve --port 8888 ``` With `gguf-core` the same line starts with `gguf -m`. The launcher form, `ggk server engine -- --model vggt-omega-1b-q8_0.gguf --port 8888`, starts the same server. Options (all optional). Everything except the first five is the default of each request and can be overridden per request: | option | meaning | | --- | --- | | `--serve` | serve over HTTP instead of writing one file (required for the server) | | `--host ` | listen address, default `127.0.0.1`; `0.0.0.0` for every interface | | `--port ` | default `8888` | | `--api-key ` | require `Authorization: Bearer ` (or `X-Api-Key: `) | | `--alias ` | model id reported by `/v1/models` (default: the file name) | | `--video-fps ` | frames taken per second of video (1) | | `--video-max-frames ` | the most frames given to the model, spread evenly over the video (32) | | `--mesh-pipeline ` | the resolution the frames are seen at: each is resized to about n x n pixels at its own aspect ratio (512, what the model is trained at; 112 to 1024) | | `--scene-conf

` | percent of the points dropped as the least confident (20) | | `--scene-points ` | the most points returned (1000000; `-1` = all) | | `--scene-no-cameras` | leave the cameras out of the `.glb` | | `--backend cpu` | run on the CPU only | The server is ready as soon as it logs `scene server: endpoint: POST /v1/images/edits`, and `GET /health` answers `{"status":"ok"}`. Nothing is loaded at start: the model loads for each request and gives its memory back. ## 4. Turn a video into a scene ```bash curl -f http://127.0.0.1:8888/v1/images/edits \ -F image=@clip.mp4 \ --output scene.glb ``` With an API key: add `-H "Authorization: Bearer sk-my-secret-key"`. The response body is the scene file itself (not JSON). Save the bytes. Keep the `-f`: without it a failed request writes the JSON error message into `scene.glb`. The field is called `image` because the endpoint is OpenAI's image edit; `video` and `file` are read as well. Pictures instead of a video (photographs of one place, or frames you extracted yourself). Repeat the part; the order sent is the order of the frames: ```bash curl -f http://127.0.0.1:8888/v1/images/edits \ -F image=@a.jpg -F image=@b.jpg -F image=@c.jpg \ --output scene.glb ``` The same request as JSON, with the video as base64. Build the body in a file, because base64 is too long for a command line: ```bash python -c "import base64, json; json.dump({'video': base64.b64encode(open('clip.mp4','rb').read()).decode(), 'fps': 2}, open('request.json','w'))" curl -f http://127.0.0.1:8888/v1/images/edits \ -H "Content-Type: application/json" -d @request.json --output scene.glb ``` Python, standard library only, asking for JSON so the cameras come back as numbers next to the file: ```python import base64, json, urllib.request video = base64.b64encode(open("clip.mp4", "rb").read()).decode() req = urllib.request.Request( "http://127.0.0.1:8888/v1/images/edits", data=json.dumps({"video": video, "response_format": "b64_json"}).encode(), headers={"Content-Type": "application/json"}, ) with urllib.request.urlopen(req, timeout=1800) as res: out = json.load(res) open("scene.glb", "wb").write(base64.b64decode(out["data"][0]["b64_json"])) for cam in out["scene"]["cameras"]: # the motion route print(cam["frame"], cam["position"]) ``` OpenAI SDK (the endpoint has the shape of OpenAI's image edit). Ask for `b64_json`, since the SDK expects a JSON answer: ```python import base64 from openai import OpenAI client = OpenAI(base_url="http://127.0.0.1:8888/v1", api_key="not-needed", timeout=1800) result = client.images.edit(model="vggt-omega", image=open("clip.mp4", "rb"), prompt="", response_format="b64_json") open("scene.glb", "wb").write(base64.b64decode(result.data[0].b64_json)) ``` ### Request fields — `POST /v1/images/edits` The body is a `multipart/form-data` form with the video as a file part, or JSON (`Content-Type: application/json`) with it as base64. The field names are the same in both. The whole request may be up to 1 GB. | field | type | meaning | | --- | --- | --- | | `image` | file / string, required | the video: one file part named `image`, `video` or `file`. Or the frames as pictures: several parts named `image` (or `image[]`, `frames`), PNG, JPEG, WebP or BMP, 64 megapixels each at most, in frame order. In JSON: base64, with or without a `data:` URI prefix, as one string (`"video"` or `"image"`) or an array of strings (`"image"` / `"images"` / `"frames"`). URLs are NOT fetched: send the bytes. One video or pictures, not both | | `fps` | number | frames taken per second of video, 0.01 to 60; default 1. Ignored for pictures | | `max_frames` | integer | the most frames given to the model, 1 to 256; default 32. A longer video (or more pictures) is thinned evenly to this many | | `pipeline` | integer | the resolution the frames are seen at, 112 to 1024; default 512. `resolution` is the same field. Lower is faster and coarser | | `confidence` | number | percent of the points dropped as the least confident, 0 to 100; default 20. Raise it to 30 - 50 for scenes with sky, water or glass | | `max_points` | integer | the most points returned; default 1000000, `-1` = every confident pixel of every frame | | `cameras` | boolean | `false` leaves the cameras out of the `.glb` | | `output_format` | string | `glb` (default) or `ply` | | `response_format` | string | leave it out to get the scene file as the response body. `b64_json` returns JSON instead (below). `glb` / `ply` here is a shorthand for `output_format` | | `model`, `prompt`, `seed`, `steps`, `size` | | accepted and ignored | | `n` | integer | must be 1 if present | Response, `200`: - By default the scene file: `Content-Type: model/gltf-binary` (.glb) or `application/octet-stream` (.ply), with the headers `X-Scene-Points`, `X-Scene-Cameras` (the number of frames used), `X-Scene-Frame-Size` (`WIDTHxHEIGHT` the frames were seen at) and `X-Scene-Extent` (the scene's size in its own unit). - With `"response_format": "b64_json"`, JSON in the shape of OpenAI's images response, plus the scene as numbers: ```json { "created": 1795678660, "data": [{"b64_json": ""}], "output_format": "glb", "scene": { "points": 1000000, "frames": 15, "frame_width": 688, "frame_height": 384, "extent": 2.37, "cameras": [ {"frame": 0, "position": [0, 0, 0], "yfov": 0.61, "xfov": 1.12, "matrix": [1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1]} ] } } ``` `matrix` is camera-to-world, 16 numbers row by row; the camera looks down its own -z with y up. `position` is its last column. `yfov` / `xfov` are the vertical and horizontal field of view in radians. Errors are JSON: `{"error": {"code": 400, "message": "...", "type": "invalid_request_error"}}`. `400` = bad request (the message says what, for example a video that could not be decoded), `401` = wrong or missing API key, `413` = the request is over 1 GB, `500` = reconstruction failed (the message says why), `501` = an LLM or speech endpoint was called on this server. ### Other endpoints | endpoint | meaning | | --- | --- | | `GET /health` | `{"status":"ok"}` as soon as the port is open. No API key needed | | `GET /v1/models` | the model, with `meta.type = "video-to-3d"`, `meta.family = "vggt-omega"`, `meta.defaults` (fps, max_frames, pipeline, confidence, max_points, cameras), `meta.limits` and `meta.output_formats`. No API key needed | ## The scene - `.glb` — binary glTF 2.0. - Node `points`: one mesh with a `POINTS` primitive, attributes `POSITION` (float) and `COLOR_0` (linear, 16 bit, RGBA). One point per confident pixel of a frame, carried into space by its depth and its camera. - Nodes `frame_000`, `frame_001`, ...: one per frame, in the order of the video, each with a glTF perspective `camera` (its `yfov` and `aspectRatio`) and a `matrix` (camera-to-world). Their translations, in order, are the motion route: the path the camera took. - Node `cameras`: one mesh that draws those cameras as small pyramids, red for the first frame, running through the rainbow to violet for the last, so any viewer shows the route. Skip it when you only want the points. - Blender, three.js and most glTF viewers open the file; some viewers do not draw point primitives, in which case use `.ply`. - `.ply` — binary little-endian: `x y z` floats and `red green blue` bytes per point. No cameras. MeshLab, CloudCompare and Open3D read it. - Axes and unit: the first frame's camera sits at the origin looking down -z with y up (glTF's convention), and every other camera and point is given relative to it. The unit is the model's own: it does not know the true size of the scene, so distances are right only relative to each other. - Size: a million points by default, about 20 MB as GLB and 15 MB as PLY. Reading the cameras out of a `.glb` without a 3D library (Python): ```python import json, struct data = open("scene.glb", "rb").read() json_len = struct.unpack_from("