Could Blender be an API?

I am a new comer here. I’d like to know, is that possiable, to use Blender as an API? I’d like Blender works at the background and I give the conmmand from other programm. then Blender make the graphic change and give the result back. Is that possible?

:o :o

Why? And what kind of commands? What would you need blender to do?

is it posible to compile 3d object to stand alone EXE file. So we can use keyboeard to rotate and view the 3d model.

That’s not the way an api works.
That means calling a program from another program.
Since Blender supports command line rendering, that is possible, forking a new process and executing Blender in it (in C, for example).

but I don’t want to see the GUI of Blender, I need Blender works at backgroud for a certain task (change color of a 3D graphic), then send back the result and display it in my programm. Is that also possiable?

Change color of a graphic is best done in a 2d image program.
There are lots of thoose that can do that, even php can do that.

The python API is what comes closest to an API for blender. You can pass a python script using the -P option on the command line. More info:
http://www.blender.org/modules/documentation/236PythonDoc/index.html