Okay, just to be clear here:
OBS doesn't need the computer it's running on to have a monitor connected, or for that monitor to be on.
It DOES need a GPU, though, so it won't run as intended through a remote desktop session, in a virtual machine without hardware GPU passthrough, or in a purely command line environment.
That first line, "program output passed to OBS' API"-- I don't think that's a thing. Input to OBS is a window or display capture, or input from a video capture device or camera. Plugin authors have devised methods of getting content in and out of OBS, but those methods still are methods of transferring audio and video streams (NDI, video class devices, etc) and I'm not sure any apply the way you mean. If your program displayed a clock in a GUI window, the method would be to capture that window. I don't think there's a shortcut where you can just say "output should be these numbers, in this font, at this size, updated this often" that's simpler than having a window render and capturing the window.