A real, minimal Next.js API route wrapping a real ForceDream agent invocation, using the
real, tested @forcedream/sdk -- not a mock.
npm installSet a real FD_API_KEY (an fd_live_... billing key). Get one from a real signup:
curl -X POST https://api.forcedream.ai/api/signup -H "Content-Type: application/json" -d '{"email": "you@example.com"}'Then:
FD_API_KEY=fd_live_your_key npm run devcurl -X POST http://localhost:3000/api/extract \
-H "Content-Type: application/json" \
-d '{"text": "Founded in 1998 and headquartered in Austin, Texas."}'Returns a real, cryptographically-signed result -- a real charge, a real proof_id, and a
direct link to verify it yourself.
app/api/extract/route.ts-- the real API route- Uses the SDK's
invoke(), which polls internally and never re-invokes on timeout (would double-charge) -- see the SDK's own README for the exact polling behavior.
- SDK: https://github.com/forcedreamai/forcedream-sdk-js
- MCP server: https://github.com/forcedreamai/forcedream-mcp
- Verify any proof: https://forcedream.com/proof