Read the documentation:
Every command usable from the cli is also available through the HTTP API. For example:
ipfs swarm peers
So for the command:
USAGE ipfs add ... - Add a file to ipfs.
ARGUMENTS
< path >... - The path to a file to be added to IPFS.
https://ipfs.io/docs/commands/#ipfs-add
the equivalent API call would be:
curl -F "image=@/home/bar.jpg" 127.0.0.1:5001/api/v0/add