Composio powers 1000+ toolkits, tool search, context management, authentication, and a sandboxed workbench to help you build AI agents that turn intent into action.
Mirrored from https://github.com/Camo67/composio.git
Synced Nov 21, 04:45 UTC
| 1 | import { fetchInstantToolkitSlugs } from '@/lib/instant-toolkit-api'; |
| 2 | |
| 3 | export async function GET() { |
| 4 | const apiKey = process.env.COMPOSIO_API_KEY; |
| 5 | if (!apiKey) return Response.json({ error: 'Instant toolkit availability is temporarily unavailable.' }, { status: 503 }); |
| 6 | try { |
| 7 | const slugs = await fetchInstantToolkitSlugs(apiKey); |
| 8 | return Response.json({ slugs }, { headers: { 'Cache-Control': 'public, s-maxage=300, stale-while-revalidate=600' } }); |
| 9 | } catch { |
| 10 | return Response.json({ error: 'Instant toolkit availability is temporarily unavailable.' }, { status: 503 }); |
| 11 | } |
| 12 | } |