API Reference
Endpoints Schema
The following HTTP endpoints are available for Alpamayo1.5 NIM:
/v1/infer/v1/chat/completions/v1/vqa/v1/health/ready/v1/health/live/v1/license/v1/metrics/v1/metadata/v1/manifest/v1/models/v1/version
The NIM also exposes a binary gRPC API on port 50051 for trajectory generation. VQA is served through HTTP.
API Examples
Use the examples in this section to get started with the API.
Choose an HTTP Request Envelope
The three inference endpoints use two different request envelopes:
POST /v1/inferuses the native Alpamayo schema. Setmodetotrajectory,answer, orboth.images,question,egomotion, and all trajectory controls are top-level fields. Do not wrap them innvext.answermode does not require ego-motion;trajectoryandbothmodes require it.POST /v1/chat/completionsuses the OpenAI-compatible message schema. Images areimage_urlparts undermessages[].content. Alpamayo-specific trajectory fields such asegomotion,num_traj_samples,nav_text,camera_order, andnum_frames_per_cameraare nested undernvext. OpenAI-style controls such asmax_tokens,temperature, andtop_premain top-level.seedandtop_kcan be top-level or undernvext; values undernvexttake precedence.POST /v1/vqauses the same OpenAI-compatible message schema. Put the question in a text content part ornvext.question. A top-levelquestionorimagesfield is not accepted by this endpoint.
The following abbreviated payloads show where the endpoint-specific fields belong. Replace the placeholders with the full image and ego-motion values shown later on this page.
/v1/infer trajectory generation:
/v1/infer visual question answering:
/v1/infer combined trajectory generation and visual question answering:
Native /v1/infer responses contain answer for answer mode, trajectory fields for trajectory mode, and both sets of fields for both mode.
/v1/chat/completions:
/v1/vqa:
Check Health
Use the following command to check server readiness.
cURL Request
Response
The object field reflects the underlying backend readiness check and is not a fixed string. Automation should treat the service as ready based on the HTTP 200 status code and status being "ready", rather than matching on object or message.
Inspect Service Information
The following read-only endpoints help clients identify the running release and selected model profile. The examples use jq only to keep large responses compact; omit the filter to retrieve each complete response.
-
GET /v1/metadataReturns deployment metadata, including the NIM version, model resource, and profile selected for the visible GPU. This is the quickest way to confirm which profile an automatically configured container loaded.
-
GET /v1/manifestReturns the embedded model manifest as YAML in the
manifest_fileJSON field. The manifest lists available profiles, selection tags, and required model artifacts. To inspect its header: -
GET /v1/versionReturns the NIM release identifier and the version of the common NIM HTTP API layer. Use it for compatibility checks and support reports.
Generate Trajectory
Use trajectory inference to generate sampled future ego trajectories from compressed camera images, ego-motion history, and optional navigation text.
The default input layout is 16 images, ordered as four timesteps for each camera:
t0 is the oldest frame, approximately t-0.3s. t3 is the current frame.
Trajectory requests can use fewer images than the default layout. When the image count is not 16, include camera_order and num_frames_per_camera. Images must be ordered camera-major according to those fields. For example, a request with camera_order=["front_wide"] and num_frames_per_camera=4 contains four front-wide frames. A request with four camera names and num_frames_per_camera=1 contains one image per camera. If the image count is not 16 and no explicit layout is supplied, request-model validation returns HTTP 422.
Camera names can be full Alpamayo camera names, such as camera_front_wide_120fov, or OSS short names, such as front_wide.
Every trajectory request requires exactly 16 ego-motion history entries, regardless of the number of images. ego_history_xyz must have shape [16, 3]. ego_history_rot must contain 16 quaternions with shape [16, 4] (each row [w, x, y, z]) or 16 rotation matrices with shape [16, 3, 3]. Reduced and single-image layouts do not reduce the ego-motion history length. Requests with another history length are rejected before CUDA inference.
The runnable HTTP examples in this section use a payload builder and sample scene shipped in the NIM. Copy both from a running container after you start it:
For trajectory endpoints, the builder uses all 16 real sample images in the default four-camera, four-frame layout and all 16 ego-motion history entries. It emits JSON containing real image data URLs; no base64 substitution is required. The optional --layout reduced mode uses only front_wide_t0 and is intended for quick validation tests, not as the primary usage example. VQA uses the single front_wide_t0 image because it does not require a trajectory camera layout.
For a consolidated description of every helper flag, refer to Payload Builder Options.
gRPC
/v1/chat/completions
/v1/infer
The gRPC route is recommended for warm trajectory serving because it avoids the HTTP base64 and JSON adapter path. The service is nvidia.alpamayo.v1.Alpamayo and the method is Predict.
The request accepts num_traj_samples, temperature, top_p, top_k, max_tokens, seed, nav_text, and egomotion_json. Send compressed image frames through compressed_images. For non-default trajectory layouts, set camera_order and num_frames_per_camera. Prefer JPEG payloads for the fastest request path.
local_paths is also available for controlled deployments where the client and NIM have access to the same container-local files. Its paths are resolved inside the NIM container; they are not client-host paths or network URLs. Use compressed_images for normal remote clients.
In LocalPathInput, scene_dir is the base directory used for relative paths in image_paths. If image_paths is empty, the NIM discovers images from scene_dir using the requested camera layout.
The response includes flattened pred_trajectories with pred_trajectories_shape and flattened pred_rotations with pred_rotations_shape, plus reasoning_text and raw_json. pred_rotations contains rotation matrices with shape [K, num_points, 3, 3], matching the OSS pred_rot output after squeezing batch and trajectory-set dimensions. raw_json contains the same nested Alpamayo payload returned through HTTP, including trajectory metrics.
In proto3, an unset non-optional integer is observed as 0. For the default 16-image layout, leave camera_order empty and leave num_frames_per_camera unset; the service applies four frames per camera. For every reduced layout, set both fields explicitly and use a positive num_frames_per_camera value.
Trajectory Metrics
Trajectory responses include a metrics object for trajectory-only kinematic metrics. The same object is returned by /v1/infer and embedded in the gRPC raw_json payload.
Trajectory responses also include pred_rotations as rotation matrices with shape [K, num_points, 3, 3]. These rotations are the public API equivalent of the OSS pred_rot output.
The primary comfort metrics are scalar pass rates in [0, 1] across the generated trajectory samples:
Every metrics object also includes:
All values are derived from generated trajectories and rotations. They are not ground-truth accuracy or map-compliance metrics. When the diagnostic NIM_ALPAMAYO_INCLUDE_EVALUATION_ONLY_METRICS setting is enabled, a debug_evaluation_only_metrics object explains which evaluation inputs are not available during normal inference.
Visual Question Answering
Use POST /v1/infer with mode="answer" for the native Alpamayo VQA schema, or use POST /v1/vqa for the OpenAI-compatible message schema. Both routes accept one or more compressed images and do not require ego-motion. The images are processed in the order they appear in the request.
For native /v1/infer, send images and question as top-level fields. For /v1/vqa, send the question as nvext.question or as text content in the user message.
/v1/vqa uses the OpenAI-compatible message envelope; a standalone top-level question field is not part of its request schema. The bundled payload builder places the question in both a text content part and nvext.question.
The literal request shape appears in the following example. Replace <BASE64_JPEG> with the base64-encoded JPEG bytes. Keep the same question in the text content and nvext.question so the request is clear to both OpenAI-compatible clients and the Alpamayo adapter.
The following builder command substitutes a real image from the bundled sample scene and produces a directly runnable request file.
cURL Request
Response
Trajectory Parameters
The trajectory APIs accept the following controls:
For repeatable K=1 trajectory inference in the same deployment, use num_traj_samples=1 with a fixed seed, top_k=1, and top_p=1. The seed controls diffusion sampling, while top-1 decoding removes VLM sampling variability. This is preferable to relying on temperature=0 because zero-temperature handling can differ across client protocols and backends.
Error Handling
The HTTP API returns standard status codes to indicate success or failure:
- 200 OK: Request successful
- 400 Bad Request: A request passed schema validation but was rejected by the application, such as an unsupported K value or image bytes that cannot be decoded from the supplied base64/data URL
- 422 Unprocessable Entity: JSON parsing or request-model validation failed. Examples include malformed JSON, a missing required field, an out-of-range value, the wrong ego-motion shape, or a camera layout whose declared camera count and frame count do not match the supplied images
- 500 Internal Server Error: Server-side error
The HTTP serving path can buffer or serialize concurrent requests and does not define a queue-full status at a fixed client concurrency. Clients that require an explicit backend backpressure signal should use the direct gRPC API.
The gRPC API uses standard gRPC status codes:
INVALID_ARGUMENT: Invalid input parameters or malformed payloadRESOURCE_EXHAUSTED: Backend request queue is fullUNAVAILABLE: Model backend is not loadedINTERNAL: Server-side error
Reference
The HTTP OpenAPI specification is available in the API Reference tab. The same schema is packaged inside the container at /opt/nim/api_spec.yaml.