FLAMES API

API Documentation

Build with FLAMES

Integrate the classic FLAMES relationship calculator into your applications with our simple RESTful API. Fast, fun, and nostalgic!

JSON responses6 relationship typesRate limitedInput validation
View API info

Avg Latency

<50ms

Lightning fast calculations

Rate Limit

20/min

Per IP address

Uptime

99.9%

Reliable service

Uptime 99.9%Last deploy recentlyPOST /api/flames
POST
/api/flames
● 99.9% uptime
FLAMES Calculation Endpoint
Calculate the relationship between two names. Send a simple JSON request with two names and receive the FLAMES relationship result with meanings and fun taglines.

Request format

example.sh
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

response.json
  • • F (Friends)
  • • L (Love)
  • • A (Affection)
  • • M (Marriage)
  • • E (Enemy)
  • • S (Sibling)

Request lifecycle

  1. 1. Send two names

    POST a JSON body with name1 and name2 fields. Names are validated and sanitized before processing.

  2. 2. Algorithm calculation

    The classic FLAMES algorithm removes common letters, counts remaining, and cycles through F-L-A-M-E-S.

  3. 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.

API Reference & Live Testing
POST
/api/flames

Select a programming language to see implementation examples, then test the API directly.

Code Example

example.js
Sample Names
AliceName 1
BobName 2

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
Rate Limits & Usage
API usage limits and response headers

API Limits

Requests / window
20
Time window
60 seconds
Max name length
50 chars
Algorithm
Sliding window
Illustrative usage10/20 requests

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
Error Codes
Common responses, failure modes, and mitigation strategies

Bad Request

HTTP 400

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

400_response.json
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