can I call it from the command line?
Yes. LM Studio acts like an OAi endpoint when you turn the server on.