What is the planned AI gateway module designed to do?
Calling an AI provider straight from a mobile app exposes the key and leaves usage uncontrolled. The AI gateway is planned as the backend path for those requests. Planned capabilities include secure requests to AI providers, streaming responses, AI usage quotas, token metering, subscription-based AI access, per-user rate limits, background AI operations, secure management of provider credentials, and simulated AI responses during development.
The initial model favors customers bringing their own provider credentials. Edict would hold and use them on the backend so that they never ship in the app.
How does the AI gateway module connect to other modules?
The AI gateway is where several modules combine into one feature.
- AI gateway + Authentication + Subscriptions. This is subscription-gated AI. Each request is designed to pass the same checks in the same order: who is calling, what their plan allows, and how much of the quota is left. Only then would the request reach the provider.
- AI gateway + Payments and credits. An app that sells packs instead of plans is designed to reserve credits per request and release them when a call fails.
- AI gateway + Background jobs. Long operations, such as generating an image or a study plan, can run in the background and report back, with retries.
- AI gateway + Database. Conversation history and generated results are designed to be stored as user-owned records.
- AI gateway + Files. Inputs and outputs, such as photos, can be uploaded and returned through secure URLs.
The intended result for a coaching app is that the premium rule, the quota, and the failure handling come from configuration rather than from code you write and maintain.
What would you configure in the AI gateway module?
You define each AI feature, the plan or credit rule that gates it, its quota and rate limit, and whether responses stream. You also set provider credentials and choose whether development runs against simulated responses.
The configuration on this page is illustrative. The syntax is not final.
What stays your own code with the AI gateway module?
Prompts, product behavior, and the user interface stay yours. You also decide which provider and model suit your app, and you are responsible for provider terms, content policy, and how you handle sensitive user input. Edict is designed to control access and count usage. It does not judge the quality of AI output.
Is the AI gateway module available yet?
Planned. Edict is in development, and this module is not available. Provider support, performance, and security properties are not claimed until they are built and substantiated.
Join the beta waitlist to follow progress.