Skip to content

Latest commit

 

History

History
62 lines (52 loc) · 1.19 KB

File metadata and controls

62 lines (52 loc) · 1.19 KB

Cloud-Based Overkill API Documentation

Base URL

http://localhost:8080

Headers

  • X-Request-ID: Unique ID for request tracing (returned in response headers).

Endpoints

1. Health Check

Checks if the server is running.

  • URL: /health
  • Method: GET
  • Response:
{
  "status": "ok",
  "message": "System is operational (and expensive)"
}

2. Read Year

Extracts the year from an uploaded image.

  • URL: /read-year
  • Method: POST
  • Content-Type: multipart/form-data
  • Parameters:
    • image: The image file (PNG, JPEG, WEBP, GIF)
  • Response:
{
  "year": "2024",
  "cost": "$0.02",
  "message": "Successfully extracted year from image using AI (because why not?)"
}
  • Errors:
    • 400 Bad Request: Invalid file or missing key.
    • 429 Too Many Requests: Rate limit exceeded.
    • 500 Internal Server Error: AI failure or processing error.

3. Statistics

Shows total cost.

  • URL: /stats
  • Method: GET
  • Response:
{
  "total_requests": 5,
  "total_cost": "$0.10",
  "cost_raw": 0.1,
  "message": "Money successfully incinerated"
}

4. Explanation

  • URL: /why
  • Method: GET