Publish Mastra Agent as OpenAI API endpoints?

Is there anything inherently wrong in idea of sharing Mastra's Agent functionality as OpenAI endpoints? It's super simple. I wanted just plugin frontend part from another library or use one of these agentów chat solutions an tiger workflows and utilize these awesome Mastra features. How you would approach that? Does anyone did that already and have solution to share?
1 Reply
_roamin_
_roamin_17h ago
Hey @Michał Świtoń ! You could definitely do that by creating custom api routes that would be compatible with the OpenAI API implementation https://mastra.ai/en/docs/server-db/custom-api-routes I don't think I've seen anyone doing it, but I don't see why you shouldn't do it 😉
Custom API Routes
Expose additional HTTP endpoints from your Mastra server.

Did you find this page helpful?