HTTPCat

Development API · Status code cat photos · Fun error pages · No auth

TL;DR

HTTPCat is the original "status code animals" service — each HTTP status code is paired with a cat photo that fits the code's personality. A 200 response shows a content cat, 404 shows a confused cat, 418 shows a cat as a teapot, and 500 shows a distressed cat. It's beloved by developers worldwide for adding personality to error pages.

Quick start: https://http.cat/{status-code} — replace with any HTTP status code

No API key needed — just make a request!

How to Use This API

1. Status Code Cat Images

https://http.cat/200
https://http.cat/201
https://http.cat/301
https://http.cat/404
https://http.cat/418
https://http.cat/429
https://http.cat/500
https://http.cat/503

Simply append any HTTP status code to get an expressive cat image. No file extension needed — the response is a JPEG image.

2. Custom Image Sizes

https://http.cat/404.jpg?width=400&height=300

Optional width and height query parameters for responsive layouts.

3. HTML — Error Page Embed

<!DOCTYPE html>
<html>
<head>
  <title>Page Not Found</title>
  <style>
    .error-container { text-align: center; padding: 2rem; }
    .error-container img { max-width: 500px; border-radius: 12px; }
  </style>
</head>
<body>
  <div class="error-container">
    <h1>404 — Page Not Found</h1>
    <img src="https://http.cat/404" alt="HTTP 404 cat">
    <p>Sorry, we couldn't find that page.</p>
  </div>
</body>
</html>

4. JavaScript — Dynamic Error Cat

function showErrorCat(errorContainerId, statusCode) {
  const container = document.getElementById(errorContainerId);
  if (!container) return;
  
  container.innerHTML = `
    <div style="text-align:center">
      <h2>HTTP ${statusCode}</h2>
      <img src="https://http.cat/${statusCode}"
           alt="HTTP ${statusCode} cat"
           style="max-width:400px;border-radius:8px">
    </div>
  `;
}

// Use on 404
showErrorCat('main', 404);
// Or catch all errors
fetch('/api/data')
  .then(r => r.ok ? r : Promise.reject(r.status))
  .catch(status => showErrorCat('main', status));
5. Python — Cat for Every Error
import requests

def httpcat_url(status_code):
    return f'https://http.cat/{status_code}'

def download_cat_for_error(status_code, filename=None):
    if not filename:
        filename = f'http-{status_code}.jpg'
    resp = requests.get(httpcat_url(status_code), stream=True)
    with open(filename, 'wb') as f:
        for chunk in resp.iter_content(chunk_size=8192):
            f.write(chunk)
    print(f'Saved cat for HTTP {status_code} as {filename}')

download_cat_for_error(418, 'teapot-cat.jpg')
Try a 418 cat (I'm a Teapot): https://http.cat/418

Frequently Asked Questions

What status codes have cat images?
Most standard HTTP codes: 100, 101, 200, 201, 202, 204, 206, 207, 300, 301, 302, 303, 304, 305, 307, 400, 401, 402, 403, 404, 405, 406, 407, 408, 409, 410, 411, 412, 413, 414, 415, 416, 417, 418, 420, 421, 422, 423, 424, 425, 426, 429, 431, 444, 450, 451, 500, 502, 503, 504, 506, 507, 508, 509, 511, 599.
Can I use this commercially?
Yes, HTTPCat images are freely available for any use. The service is a developer community resource.
Is there a JSON version?
No direct JSON endpoint — but the URL pattern is simple: just use https://http.cat/{code} and you get the JPEG directly.
What if I request a code without a cat?
You'll get a generic cat image rather than an error. Most common codes from 100-599 are covered.
Are there usage limits?
No documented limits, but as a free service, use it responsibly. For production apps at scale, consider caching images.

API Details

API URL
https://http.cat
Documentation
http.cat
Category
Development
Authentication
Not Required
Geographic Coverage
Global

What You Can Build