AI gateway

Planned secure AI provider access with metering, quotas, rate limits, and streaming.

PlannedAI module. Not available yet. Edict is in development.

Illustrative subscription-gated AI feature

AgentEdit edict.yaml+12illustrative
Illustrative subscription-gated AI feature. Line number, change, code. Lines under modules are added.
1modules:
2+Added ai:
3+Added provider: bring_your_own
4+Added development:
5+Added simulate: true
6+Added ai_coach:
7+Added model: general_chat
8+Added requires_plan: premium
9+Added stream: true
10+Added quota:
11+Added per: billing_period
12+Added limit: 200
13+Added rate_limit: 10/min

The syntax is not final. Your coding agent would edit this file.

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.

What does the AI gateway module work with?

AI gateway is designed to connect to 5 other modules. The lit arcs on the map show which.

Composition mapplanned, illustrative

Common questions about the AI gateway module

Short answers about this planned module.

Whose provider credentials are used?
The initial model favors customers bringing their own provider credentials. They are meant to be stored on the backend and not shipped inside your app.
Can I develop without calling a real provider?
Simulated AI responses during development are planned, so you can build and test the flow without spending provider quota.
Which AI providers are supported?
Specific providers are not committed yet. Providers will be listed only once they are built and tested.

Get an invitation when the beta opens.

Joining gets you email updates while Edict is built, and an invitation to the hosted beta when it opens.

Building now. No launch date yet.