Gary & Goober API Documentation

A RESTful API serving random themed images, quotes, jokes, and service metadata with structured JSON responses

API Information

Base URL: https://api.garythe.cat

Current routes include themed image URL endpoints, direct binary image responses, quote/joke endpoints, health and runtime info endpoints, and static directory endpoints for /Gary, /Goober, /Gully, and /Garfield. Images include extracted numeric identifiers from filenames. The themed URL endpoints also accept optional count/n query parameters or the X-Image-Count header, with a default of 1 and a ceiling of 750.

GET /gary

Retrieves a random Gary image URL with its extracted numeric identifier from the filename. Supports an optional count or n query parameter, or the X-Image-Count header, to return multiple image URLs in a single response.

{
  "url": "https://api.garythe.cat/Gary/Gary76.jpg",
  "number": 76
}
{
  "images": [
    { "url": "https://api.garythe.cat/Gary/Gary76.jpg", "number": 76 },
    { "url": "https://api.garythe.cat/Gary/Gary12.jpg", "number": 12 },
    { "url": "https://api.garythe.cat/Gary/Gary44.jpg", "number": 44 }
  ],
  "count": 3
}

GET /gary/image

Returns a random Gary image directly as binary JPEG data for immediate display or download.

GET /goober

Retrieves a random Goober image URL with its extracted numeric identifier from the filename. Supports an optional count or n query parameter, or the X-Image-Count header, to return multiple image URLs in a single response.

{
  "url": "https://api.garythe.cat/Goober/goober8.jpg",
  "number": 8
}
{
  "images": [
    { "url": "https://api.garythe.cat/Goober/goober8.jpg", "number": 8 },
    { "url": "https://api.garythe.cat/Goober/goober2.jpg", "number": 2 },
    { "url": "https://api.garythe.cat/Goober/goober21.jpg", "number": 21 }
  ],
  "count": 3
}

GET /goober/image

Returns a random Goober image directly as binary JPEG data for immediate display or download.

GET /garfield

Retrieves a random Garfield image URL with its extracted numeric identifier from the filename. Supports an optional count or n query parameter, or the X-Image-Count header, to return multiple image URLs in a single response.

{
  "url": "https://api.garythe.cat/Garfield/Garfield1.jpg",
  "number": 1
}
{
  "images": [
    { "url": "https://api.garythe.cat/Garfield/Garfield1.jpg", "number": 1 },
    { "url": "https://api.garythe.cat/Garfield/Garfield5.jpg", "number": 5 },
    { "url": "https://api.garythe.cat/Garfield/Garfield9.jpg", "number": 9 }
  ],
  "count": 3
}

GET /garfield/image

Returns a random Garfield image directly as binary JPEG data for immediate display or download.

GET /quote

Retrieves a random inspirational quote from the configured quote collection.

{
  "quote": "Be yourself; everyone else is already taken."
}

GET /gully

Retrieves a random Gully image URL with its extracted numeric identifier from the filename. Supports an optional count or n query parameter, or the X-Image-Count header, to return multiple image URLs in a single response.

{
    "url": "https://api.garythe.cat/Gully/gully1.jpg",
    "number": 1
  }
{
  "images": [
    { "url": "https://api.garythe.cat/Gully/gully1.jpg", "number": 1 },
    { "url": "https://api.garythe.cat/Gully/gully2.jpg", "number": 2 },
    { "url": "https://api.garythe.cat/Gully/gully3.jpg", "number": 3 }
  ],
  "count": 3
}

GET /gully/image

Returns a random Gully image directly as binary JPEG data for immediate display or download.

GET /gary/count, /goober/count, /gully/count, /garfield/count

Returns the current number of images available for each collection. Useful for monitoring or UI counters.

{ "count": 42 }
{ "count": 8 }
{ "count": 10 }
{ "count": 5 }

GET /joke

Retrieves a random joke from the collection for entertainment purposes.

{
  "joke": "Why don't scientists trust atoms? Because they make up everything!"
}

GET /health

Returns a simple liveness response indicating the service is available.

{
  "status": "ok"
}

GET /info

Returns server startup metadata and runtime diagnostics, including startup timestamp, uptime, Go version, and thread/cpu information.

{
  "now": "2026-08-04T12:34:56.789Z",
  "start_time": "2026-08-04T12:34:00.123Z",
  "uptime_ms": 5632,
  "go_version": "go1.24.0",
  "num_goroutine": 6,
  "num_cpu": 8,
  "gomaxprocs": 8,
  "latency_ms": 2
}