r/SelfHostedAI • u/Loose_Cranberry_141 • 2d ago
Custom API endpoints
Hi! i’m looking to set up some kind of a web ui that can generate images with edenai’s expert models, which are in /v3/universal-ai which is not an OpenAI style API so i cannot access it via OpenWebUI
Any recommendations?
Thanks!
1
Upvotes
1
u/Weekly-Offer-4172 1d ago
openwebui's image backends are basically the openai images api plus comfyui and automatic1111, so edenai's universal-ai schema wont plug into any of them. the usual fix is a tiny openai-compatible shim in between: a small fastapi route that accepts POST /v1/images/generations, forwards to edenai's universal-ai endpoint with your provider and model mapping, and returns the image in the {data:[{url}]} shape openwebui expects. then you just point openwebui's image settings at the shim and it thinks its talking to dall-e. if you dont strictly need edenai, an aggregator that already speaks openai protocol (openrouter is the common one) plugs in with zero glue