Fixing api.c (part 1.01)

Very partial.
I still need a compiler.