If I understand correctly, yes, you can create an API with FastAPI like:
from fastapi import FastAPI
app = FastAPI()
@app.get("/")
async def root():
# call you ML python code here
return {"message": "It's a cat!"}
Secondly, deploy it somewhere to be able to call your API internally in your company. Which mean that you should call your API like:
$ curl 'http://mlapi.internal.mycompany.com/'
{"message": "It's a cat!"}
And then, register your new API into gravitee like explain here and for example configure the rate limiting to manage your bill related to the resource needed by your ML API ;)
Note that if you also have an Access Management available, you can manage authentication without implementing it.
Hope it's help.