how to invoke wordpress API from other existing PHP system

You can add the following snippet at the start of your PHP file to load WordPress in it.

define( 'WP_USE_THEMES', false );
require('wp-blog-header.php'); // chage the path to match your WP directory
//the rest of your code here

EDIT:
Alternatively, you could use wp-load.php instead of wp-blog-header.php.

define( 'WP_USE_THEMES', false );
require('wp-load.php'); // chage the path to match your WP directory
//the rest of your code here

This answer explains that:

It loads all of WordPress, but doesn’t call wp() or invoke the
template loader (used by themes). Method 2 will be a little
lighter-weight, but should give you the same functionality.

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)