code: public static UserLimits getLimitsByApiKey(HTTPServerConfig config, String username, String apiKey) {
      DatabaseAccess db = DatabaseAccess.getInstance();
      Long id = db.getUserId(username, apiKey);
      return new UserLimits(config.maxTextLengthWithApiKey, config.maxCheckTimeWithApiKeyMillis, id);
    }
docs: Get limits from the api key itself, database access is needed.