The code for the REST server is actually provided in Prodigy, so you can edit it directly in your installation if you want: see the
prodigy/_api folder. By default we use Hug, as we still support Python 3.5 in Prodigy v1.8. We're transitioning to FastAPI though, and there's also an experimental FastAPI implementation distributed with Prodigy, which you can enable by setting the
PRODIGY_FASTAPI=1 environment variable.
I haven't tested this, but I expect you could also just define additional REST endpoints in your recipe. If you're using FastAPI, you would do
from prodigy._api.fastapi_app import routes, and then you can use the
routes.post etc decorators to add your endpoints.
You might need to do some unexpected hacking on the Controller object to support the feature you want, and make it work how you like. It's "unsupported", and your changes might break in future. I'm not saying you shouldn't do it; just, obviously, use at your own risk etc