> This page is for version latest (default).
> For other versions, use one of these documentation indexes:
> - latest (default): https://docs.nvidia.com/alchemi/vasp/latest/llms.txt

> For clean Markdown of any page, append .md to the page URL.
> For a complete documentation index, see https://docs.nvidia.com/alchemi/vasp/llms.txt.

# API Overview

> How to talk to the ALCHEMI VASP REST API.

A REST API drives the entire ALCHEMI VASP microservice. When the service
is running, it also serves an interactive Swagger UI at `/docs` and the raw
OpenAPI document at `/openapi.json`.

The endpoints fall into four groups:

| Group        | Purpose                                                              |
| ------------ | -------------------------------------------------------------------- |
| Health       | Report service and instance status and health probes.                |
| Inputs       | Upload and manage input files referenced by calculation requests.    |
| Calculations | Submit calculations and retrieve their status and results.           |
| Files        | Retrieve and manage output files produced by completed calculations. |

> **Note**
>
> This reference documents the **VASP** backend. The request and reply schemas for
> `/infer`, `/submit`, and `/result` depend on the backend you started the service
> with (`ALCHEMI_BACKEND`).

## Typical Workflow

1. Optionally upload large input files with `POST /input/upload` and reference
   the returned `file_id` in your request.
2. Submit a calculation with `POST /infer` (blocking) or `POST /submit`
   (returns a request ID immediately).
3. For asynchronous submissions, poll `GET /status/{request_id}` and then fetch
   the result with `GET /result/{request_id}`.
4. If you enable output retention, download the output archive with
   `GET /files/{request_id}/download`.

Refer to the endpoints below for full request and response schemas.