How can I increase the JVM via API or CLI

Hello and welcome,

Opensearch is not supported here, you need to check on an AWS or Opensearch forum.

But, it is not possible to increase the heap using any API or CLI, you would need to edit the jvm.options file and restart your service, this is how it works with Elasticsearch.