Quick Start

Getting Started

Our API provides easy access to thousands of high-quality images organized by collections. Each collection contains multiple images that you can access programmatically.

Base URL
https://api.pulledtheirlife.support/api

Authentication

API Keys (required for random endpoints)

Access to /api/{collection}/random requires an API key. You can authenticate using either the x-api-key header or a ?key= query parameter. Direct image URLs remain public.

Generate an API key

  1. Click Login and authenticate with Discord.
  2. Open the user menu (top right) and choose Open Dashboard.
  3. Accept the API Rules - You must accept the API key rules before generating a key.
  4. Click Generate New Key. You can have only one key. Daily limit defaults to 1000.
Important: You must accept the API key rules before you can use any API endpoints. If you try to use an API key without accepting the rules, you'll receive a 403 Forbidden error.
Send API key via header
curl -H "x-api-key: YOUR_SECRET" https://api.pulledtheirlife.support/api/cats/random
Send API key via query
curl https://api.pulledtheirlife.support/api/cats/random?key=YOUR_SECRET

API Endpoints

GET /api/{collection}/random

Get a random image from a specific collection

Example Request
curl -H "x-api-key: YOUR_SECRET" https://api.pulledtheirlife.support/api/cats/random
Response
{
  "url": "https://api.pulledtheirlife.support/api/cats/images/cat_001.jpg"
}

Error Handling

HTTP Status Codes

200 Success
401 API key required or invalid
403 API rules not accepted
404 Collection or image not found
429 Rate limit exceeded
500 Internal server error

Error Response Format

{
  "error": "No images found in this folder"
}

Common Error Examples

403 Forbidden - API Rules Not Accepted
{
  "error": "You must accept the API key rules before using the API. Please visit the dashboard to accept the rules."
}
401 Unauthorized - Missing API Key
{
  "error": "API key required"
}
429 Too Many Requests - Rate Limit Exceeded
{
  "error": "Daily API quota exceeded"
}

Rate Limits

Default Limits

Each API key has a default daily limit of 1000 requests to /api/{collection}/random. Usage resets daily at 00:00 UTC. If you exceed your quota, requests return 429 Too Many Requests.

Code Examples

Fetch Random Image
fetch('https://api.pulledtheirlife.support/api/cats/random', {
  headers: { 'x-api-key': 'YOUR_SECRET' }
})
  .then(response => response.json())
  .then(data => {
    console.log(data.url);
  })
  .catch(error => console.error('Error:', error))
Response
{
  "url": "https://api.pulledtheirlife.support/api/cats/images/cat_001.jpg"
}
Fetch Random Image
import requests

# Get a random cat image (with API key)
response = requests.get(
    'https://api.pulledtheirlife.support/api/cats/random',
    headers={'x-api-key': 'YOUR_SECRET'}
)
data = response.json()

print(f"Random cat image URL: {data['url']}")
Response
{
  "url": "https://api.pulledtheirlife.support/api/cats/images/cat_001.jpg"
}
Fetch Random Image
# Get a random cat image (with API key)
curl -H "x-api-key: YOUR_SECRET" https://api.pulledtheirlife.support/api/cats/random
Response
{
  "url": "https://api.pulledtheirlife.support/api/cats/images/cat_001.jpg"
}