Adapt to run in API mode