Skip to content

Supercharge your AI agents with data from the web and beyond. Building the library for superintelligence. 🔥

feat(api): expose Exchange capacity management through authenticated proxy (#4738)

Developers Digestffa4fec91a3e
diff --git a/apps/api/src/routes/exchange.ts b/apps/api/src/routes/exchange.ts
index f342e625d..bc97c2a21 100644
--- a/apps/api/src/routes/exchange.ts
+++ b/apps/api/src/routes/exchange.ts
@@ -219,6 +219,18 @@ exchangeRouter.post(
wrap(exchangeProxy(ANALYTICS_TIMEOUT_MS, { requiresRetrieveFlag: false })),
);
+exchangeRouter.put(
+ "/platform/capacity/{*path}",
+ authMiddleware(RateLimiterMode.Labs),
+ wrap(exchangeProxy(ANALYTICS_TIMEOUT_MS, { requiresRetrieveFlag: true })),
+);
+
+exchangeRouter.delete(
+ "/platform/capacity/buckets/{*path}",
+ authMiddleware(RateLimiterMode.Labs),
+ wrap(exchangeProxy(ANALYTICS_TIMEOUT_MS, { requiresRetrieveFlag: true })),
+);
+
exchangeRouter.post(
"/rates/lookup",
authMiddleware(RateLimiterMode.Labs),