Skip to main content
This guide runs RevRedox on one molecule given as a SMILES string, so you don’t need to upload a file. It takes a few minutes and uses a small number of credits.

1. Create an API key

  1. In the Revilico web app, open your account and click Developer in the sidebar.
  2. On the API keys tab, click Create API key.
  3. Name the key, keep Full access and pick an expiry.
  4. Copy the key. It starts with rvl_live_ and is shown only once.
Store the key in an environment variable rather than in your code:
See Authentication for scopes, rotation and revocation.

2. Check the key

GET /v1/me works with any key. It returns your account, the key’s scopes, the engines you can run and your organization’s credits.
If engines doesn’t include revredox, pick another engine from the list and read its parameters with GET /v1/engines/{engine}.

3. Start a run

Send the engine’s parameters to POST /v1/engines/{engine}/runs. Parameters you leave out take their defaults; here RevRedox computes both oxidation and reduction potentials against SCE.
The API answers 202 Accepted with the run:
Check parameters before you spend credits: POST /v1/engines/{engine}/validate returns them with defaults filled in, or a 422 that names each problem. It runs nothing.

4. Wait for the run to finish

Poll GET /v1/runs/{runId} until status is succeeded, failed or cancelled. Runs take minutes to hours depending on the engine and input, so poll every 10 to 30 seconds.
A failed run has the reason in error.message. Its logs are still listed by GET /v1/runs/{runId}/files.

5. Read the results

GET /v1/runs/{runId}/results returns the results as JSON rows, one per molecule, state or item, with run-level facts such as the level of theory beside them. Check quality first. A succeeded run can still be partial or all_failed when the engine failed on some or all of its molecules, and qualityReason says how many, such as “2 of 5 molecules failed.”
From there you can:
  • get everything for one row with GET /v1/runs/{runId}/results/{index}, passing the row’s own index field unchanged. Some engines count rows from 0 and others from 1; indexRange on the results page gives the first and last index
  • list every file the run wrote with GET /v1/runs/{runId}/files, and download one with GET /v1/runs/{runId}/files/read?path=…
  • download the engine’s named outputs with GET /v1/runs/{runId}/outputs/{outputId}
Download links are pre-signed and valid for 15 minutes.

Use an input file

Engines that take files, such as an SDF of ligands or a CSV of SMILES, need the file uploaded first. Uploading is two requests: create the upload, then PUT the bytes to the URL it returns.
Then pass the file id under the engine’s input key in inputs. GET /v1/engines/{engine} lists each engine’s input keys, formats and size limits. For example, RevOrbitals takes a CSV of SMILES as molecules:
Until the PUT has finished, GET /v1/files/{fileId} returns 404 and a run that uses the file is refused. A file in your RevDrive works too: pass its dfile_… or sdfile_… id instead of uploading it.

Inputs that take several files

Some inputs take a list of files. In GET /v1/engines/{engine}, such an input has maxFiles in inputFiles. Pass a list of file ids instead of one id. For example, RevMD-Aqua simulates up to 10 protein structures in one run:

Runs with children

RevMD-Aqua and RevMD-Bind simulate each input as its own job. You still get one run, but GET /v1/runs/{runId} also has children, with how many children are in each status:
  • The run’s progress stays at 0 until every child has finished, so follow the counts instead.
  • The run succeeds once every child has finished and at least one succeeded. It fails only when every child failed.
  • GET /v1/runs/{runId}/children lists the children in input order, numbered from 0, each with its status and error.
  • GET /v1/runs/{runId}/children/{childIndex}/results returns one child’s results as soon as that child has succeeded, even while others are still running.
  • A child’s files and outputs start with child_<index>/, such as child_0/.
  • Cancelling the run cancels every child.
In the MCP server, the matching tools are list_run_children and get_child_results.

Next steps

API reference

Every endpoint, with a playground.

Errors

Error codes, pagination and IDs.