API Documentation
Build with FLAMES
Integrate the classic FLAMES relationship calculator into your applications with our simple RESTful API. Fast, fun, and nostalgic!
Avg Latency
<50ms
Lightning fast calculations
Rate Limit
20/min
Per IP address
Uptime
99.9%
Reliable service
Request format
- Content-Type
- application/json
- Body format
- JSON with name1 and name2
- Max length
- 50 characters per name
- Characters
- Letters, spaces, hyphens, apostrophes
- Rate limit
- 20 req / 60 sec
Response format
- • F (Friends)
- • L (Love)
- • A (Affection)
- • M (Marriage)
- • E (Enemy)
- • S (Sibling)
Request lifecycle
- 1. Send two names
POST a JSON body with name1 and name2 fields. Names are validated and sanitized before processing.
- 2. Algorithm calculation
The classic FLAMES algorithm removes common letters, counts remaining, and cycles through F-L-A-M-E-S.
- 3. Receive the result
Get back the relationship type (Friends, Love, Affection, Marriage, Enemy, or Sibling) with a fun tagline.
Guaranteed safeguards
Consistent results
Same names always produce the same FLAMES result.
Input validation
Names are validated for length, characters, and similarity.
Rate limit headers
Each response includes X-RateLimit-* headers for tracking usage.
Select a programming language to see implementation examples, then test the API directly.
Code Example
Sample Names
Try It Live
Click "Try It!" to test the API
The request will send sample names to the API and show the real response
Request Details
- Content-Type:
- application/json
- Body format:
- JSON with name1 and name2
- Max length:
- 50 characters per name
- Characters:
- Letters, spaces, hyphens, apostrophes
- Rate limit:
- 20 req / 60 sec
Response Format
- Format:
- JSON
- Results:
- F, L, A, M, E, or S
- Meaning:
- Full word (Friends, Love, etc.)
- Tagline:
- Fun message with emoji
- Timestamp:
- ISO 8601 format
API Limits
Response headers
X-RateLimit-Limit
Total allowed requests (20)
X-RateLimit-Remaining
Requests left in window
X-RateLimit-Reset
Seconds until reset
0–15 requests
Safe zone
All requests processed normally without any delays.
16–19 requests
Warning
Approaching limit—consider slowing down your requests.
20+ requests
Cooldown
Subsequent calls receive HTTP 429 until the 60s window resets.
Rate limit best practices
Respect the X-RateLimit-Reset header before retrying to avoid cascading failures.
- • Check X-RateLimit-Remaining before making requests
- • Implement exponential backoff for 429 responses
- • Cache results for repeated name combinations
- • Handle rate limits gracefully in your UI
Bad Request
Invalid or missing parameters
Common causes
- • Missing name1 or name2
- • Invalid characters in name
- • Names are identical
- • Name too long
How to handle
- • Ensure both name1 and name2 are provided
- • Only use letters, spaces, hyphens, and apostrophes
- • Keep names under 50 characters
- • Make sure names are different
Response example
Error Handling Tips
Build resilient clients by treating every non-200 response explicitly.
- • Always check the success field in the response
- • Parse error messages for detailed information
- • Implement retry logic with exponential backoff for 429/500 errors
- • Validate names client-side before sending
- • Monitor rate limit headers to prevent 429 errors