How to make api's

there isn’t really any full blown tutorials on how to make your own library/classes in roblox lua.
I would recommend looking at some of these concepts.

EDIT: if your new to scripting then you’ll probably want to start on something more basic, and I think you mean your wanting to USE the roblox API not make an API for roblox.
you can use roblox API as an interface to influence certain events.

–community made

–roblox reference