There are lots of common functionalities between API and AI gateways. It would be much easier for you to check out the examples in the docs:
For the AI gateway: https://octelium.com/docs/octelium/latest/management/guide/s...
As for the API gateway: https://octelium.com/docs/octelium/latest/management/guide/s...
I am also working on extending the process of modifying HTTP requests/body content beside what's been provided (see more https://octelium.com/docs/octelium/latest/management/core/se...). For now, Envoy's ext_proc support is coming, and I might also work on support for proxy-wasm if there is interest in it.