I'm not sure what you're asking, but if you're on Windows you can use
CGWatcher to launch cgminer and it will enable the API automatically. In CGWatcher's Tests tab you can access the API directly, or there are features throughout the program that provide an interface to the API.
https://bitcointalk.org/index.php?topic=185553.0http://www.cgwatcher.comIf you just want to enable the API to access it with your own software, add the following to your config file:
"api-listen" : true,
"api-allow" : "W:127.0.0.1"
You may need to add a comma to the end of the second line depending on where in the config file you put it (if there are more settings below it.) You can change the IP to the IP your software is running on, or add more IPs by separating with a comma:
"api-listen" : true,
"api-allow" : "W:127.0.0.1,W:192.168.1.10"