Cloudflare Edge Caching + Google Drive Storage

High-Performance Image Hosting
& Public API Service

Upload images seamlessly, get instant permanent direct links backed by Google Drive storage, and accelerate delivery through Cloudflare's worldwide CDN edge cache.

⚡ Max 5MB / file 🖼️ WebP, PNG, JPG, GIF 🌐 7-Day Global CDN Cache 🔑 50 Free Uploads / Day
Interactive • Multi-File Batch

Live Image Uploader

Drag & drop single or multiple images to upload directly to Google Drive.

⚡ Auto-WebP
Click to choose image(s) or drag & drop here
Supports Multiple JPEG, PNG, WEBP, GIF (Max 5 MB / file)
Instant Provisioning

Get Free API Key

Generate a developer API key instantly to integrate image uploads into your apps.

Included with Every Key:

  • ✓ 50 uploads per day with automatic midnight UTC reset
  • ✓ Permanent storage backed by Google Drive v3
  • ✓ Ultra-fast Cloudflare edge streaming & caching
Infrastructure

Resilient Architecture

Zero maintenance, global edge distribution, and robust fail-safes.

01

Smart OAuth2 KV Token Caching

Access tokens are securely cached in Cloudflare KV for 3300 seconds, eliminating Google OAuth2 roundtrips and preventing rate limits.

02

Cloudflare Edge Cache Layer

Direct links (/i/:fileId) cache image streams directly at 300+ Cloudflare edge data centers for 7 days with immutable headers.

03

Magic Byte & Payload Verification

Raw file buffers are inspected for true JPEG, PNG, GIF, and WEBP signatures before hitting Google Drive, rejecting malicious extensions.

Quickstart

cURL in 5 Seconds

Direct upload from terminal or any programming language.

curl -X POST "https://your-domain.pages.dev/api/upload" \
  -H "x-api-key: YOUR_API_KEY" \
  -F "[email protected]"
// Response (200 OK)
{
  "status": "success",
  "code": 200,
  "data": {
    "id": "1abcXYZ...gdrive_id",
    "filename": "photo_1729340000.png",
    "direct_url": "https://your-domain.pages.dev/i/1abcXYZ...gdrive_id",
    "quota": { "remaining_today": 49 }
  }
}
API Reference

Developer Documentation Portal

Comprehensive code examples, request schemas, and HTTP response specifications.

POST /api/register

Create a free API key for your application with default 50 upload daily quota.

POST /api/upload

Upload image file with x-api-key auth header and multipart form.

GET /i/:fileId

Direct link proxy with Cloudflare Edge Cache and immutable headers.

const formData = new FormData();
formData.append('file', fileInput.files[0]);

const response = await fetch('https://your-domain.pages.dev/api/upload', {
  method: 'POST',
  headers: {
    'x-api-key': 'img_YOUR_API_KEY_HERE'
  },
  body: formData
});

const result = await response.json();
console.log('Direct URL:', result.data.direct_url);

HTTP Status Code Reference

Status Code Error Business Code Description & Solution
200 OK / 201 SUCCESS Image uploaded successfully or key registered. Returns direct image URL and quota.
400 Bad Request VALIDATION_ERROR / INVALID_IMAGE_TYPE Missing file parameter or image failed magic bytes validation. Supported formats: JPEG, PNG, WEBP, GIF.
401 Unauthorized UNAUTHORIZED Missing or invalid API Key. Provide valid key in header x-api-key.
403 Forbidden FORBIDDEN The specified API key has been suspended or banned by the administrator.
413 Payload Too Large PAYLOAD_TOO_LARGE File size exceeds maximum allowed size of 5 MB. Compress the image before uploading.
429 Too Many Requests RATE_LIMIT_EXCEEDED Daily upload quota reached (default 50/day). Limit resets automatically at 00:00 UTC.