API Keys
Get your free API key and start building immediately.
Get Started →Developers
Access Fanalyx financial calculation engines through a deterministic, tested, edge-deployed API built for low-latency analysis workflows.
New during Agents Week
We now expose a first-class Cloudflare agent runtime in the app with persistent sessions and deterministic finance tools.
Open the agentGet your free API key and start building immediately.
Get Started →Free tier with 1,000 requests per month. Scale as your usage grows.
View Plans →Monitor usage, manage keys, and view analytics.
Open Dashboard →curl -X POST https://fanalyx.com/v1/api/analysis/amortization \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"principal": 300000,
"annualRate": 0.045,
"years": 30,
"startDate": "2025-01-01"
}' Test endpoints directly in your browser without an API key:
Open API PlaygroundView interactive documentation and try all endpoints:
View OpenAPI Documentation →Perfect for testing and small projects
For production applications
For large-scale deployments
Calculate loan amortization schedules with principal, interest, and balance breakdowns.
{
"principal": 300000,
"annualRate": 0.045,
"years": 30,
"startDate": "2025-01-01"
} Analyze lease vs buy decisions with NPV, IRR, and cashflow projections.
{
"assetCost": 50000,
"monthlyLease": 1200,
"leaseTerm": 36,
"residualValue": 20000,
"discountRate": 0.05
} Generate financial forecasts with revenue, expenses, and EBITDA projections.
Running on Cloudflare's global network for ultra-low latency from anywhere in the world.
All calculations are deterministic, unit tested, and validated against golden test cases.
Complete OpenAPI specification with interactive examples and TypeScript types.
Strict input validation with Zod schemas and detailed error messages.
All API requests require authentication using your API key in the Authorization header:
Authorization: Bearer YOUR_API_KEY Security Note: Never expose your API key in client-side code. Always make API requests from your backend server.
All requests include rate limit headers:
X-RateLimit-Limit: 1000
X-RateLimit-Remaining: 999
X-RateLimit-Reset: 1735689600 | Tier | Requests/Month | Requests/Second |
|---|---|---|
| Free | 1,000 | 1 |
| Pro | 50,000 | 10 |
| Enterprise | Unlimited | Custom |
All errors follow a consistent format with actionable error codes:
{ "error": "INVALID_INPUT", "message": "Principal must be a positive number",
"code": 400, "field": "principal", "docs": "https://fanalyx.com/docs/errors/INVALID_INPUT"
} Cause: Request body doesn't match schema (missing fields, wrong types, invalid values)
Solution: Check the `field` property and ensure your input matches the endpoint requirements
Cause: Missing or invalid API key
Solution: Include `Authorization: Bearer YOUR_API_KEY` header with valid key
Cause: Too many requests in time window
Solution: Check `X-RateLimit-Reset` header and retry after that timestamp
Cause: Unexpected server error
Solution: Retry with exponential backoff. If persists, contact support
Official SDKs provide type-safe wrappers and handle authentication automatically:
npm install @fanalyx/sdk import Fanalyx from '@fanalyx/sdk';
const client = new Fanalyx({
apiKey: process.env.FANALYX_API_KEY
});
const result = await client.amortization({
principal: 300000,
annualRate: 0.045,
years: 30
}); View on GitHub → pip install fanalyx from fanalyx import Fanalyx
client = Fanalyx(
api_key=os.environ['FANALYX_API_KEY']
)
result = client.amortization(
principal=300000,
annual_rate=0.045,
years=30
) View on GitHub → Generate your own: Download our OpenAPI spec and use OpenAPI Generator to create clients in Go, Ruby, PHP, and more.
Receive real-time notifications for events like calculations completing or quota warnings:
calculation.completed Fired when an async calculation finishes quota.warning Fired at 80% quota usage quota.exceeded Fired when quota limit is reached const crypto = require('crypto');
function verifyWebhook(payload, signature, secret) {
const hash = crypto
.createHmac('sha256', secret)
.update(payload)
.digest('hex');
return hash === signature;
}
// In your webhook handler
const isValid = verifyWebhook(
req.body,
req.headers['x-fanalyx-signature'],
process.env.WEBHOOK_SECRET
);
if (!isValid) {
return res.status(401).send('Invalid signature');
} All endpoints support HTTP/2 multiplexing. Make parallel requests over a single connection for better performance.
Calculation results are deterministic. Cache them by input hash to avoid redundant requests.
ETag: "abc123"
Cache-Control: public, max-age=31536000 For multiple calculations, use batch endpoints (coming soon) or make concurrent requests.
Include `Accept-Encoding: gzip` header to reduce response size by ~70%.
Create a full-featured mortgage calculator with amortization schedules, payment breakdowns, and affordability analysis.
Read tutorial →Build a comprehensive financial planning app with retirement projections, savings goals, and debt payoff strategies.
Read tutorial →Help users compare financing options with side-by-side loan analysis and total cost calculations.
Read tutorial →Use test API keys for development and CI/CD without consuming your quota:
test_sk_1234567890abcdef Test keys return mock data and don't count toward rate limits. Perfect for unit tests and CI/CD pipelines.
{
"test": true,
"payment": 1520.06,
"totalInterest": 247221.60,
"schedule": [/* mock data */]
} Estimate your monthly costs based on expected usage:
Recommended: Free Tier
We retain metadata (timestamps, request counts) for 90 days. Calculation inputs and results are not logged or stored.
Interactive OpenAPI documentation with live examples
Import into Postman, Insomnia, or generate clients
View source code, examples, and contribute
Get help from our team: support@fanalyx.com
Check API health and uptime at /status
Monitor your API usage, quotas, and analytics
Sign up for a free API key and start building today
Get Your Free API Key