REDEYE / API

API Documentation

Six metered endpoints served from Cloudflare's edge. Authenticate with your API key in the x-api-key header. Free tier includes 500 calls/day.

Endpoints

Reverse DNS + Geo
GET /v1/ip/:ip
IP → reverse DNS, city, ASN, ISP. Cached 24h. Reserved/private ranges rejected.
$0.003 / call
Domain Intelligence
GET /v1/domain/:domain
RDAP registration data + live DNS record set. Cached.
$0.015 / call
Email Validate
POST /v1/email/validate
RFC-compliant syntax, MX record, disposable-domain check.
$0.008 / call
Weather / Real-Time
GET /v1/weather?lat=&lon=
Current conditions + 3-day forecast by coordinate. Cached.
$0.003 / call
PDF Merge
POST /v1/pdf/merge
Combine 2–20 PDFs server-side. Base64 JSON in/out.
$0.02 / call
PDF Watermark
POST /v1/pdf/watermark
Stamp diagonal text watermark across every page.
$0.02 / call

Call Reference

Base URL: https://redeye-api-suite.piratecove.workers.dev. All requests require the x-api-key header. Get a key at /signup.

GET/v1/ip/{ip}$0.003

Reverse DNS and geo/ASN lookup for any public IPv4 or IPv6 address.

Request
curl -H "x-api-key: rdye_your_key" \
  https://redeye-api-suite.piratecove.workers.dev/v1/ip/8.8.8.8
Response 200
{
  "ip": "8.8.8.8",
  "reverse_dns": "dns.google",
  "city": "Mountain View",
  "region": "California",
  "country": "United States",
  "country_code": "US",
  "postal": "94043",
  "lat": 37.42,
  "asn": "AS15169",
  "isp": "Google LLC",
  "cached": false
}
GET/v1/domain/{domain}$0.015

Registration (RDAP) data plus the live DNS record set for a domain.

Request
curl -H "x-api-key: rdye_your_key" \
  https://redeye-api-suite.piratecove.workers.dev/v1/domain/example.com
Response 200
{
  "domain": "example.com",
  "registrar": "RESERVED-Internet Assigned Numbers Authority",
  "created": "1995-08-14T04:00:00Z",
  "updated": "...",
  "expires": "...",
  "status": ["client delete prohibited"],
  "nameservers": ["a.iana-servers.net", "b.iana-servers.net"],
  "dns_records": { "A": ["93.184.216.34"], "MX": ["..."], "TXT": ["..."] },
  "cached": false
}
POST/v1/email/validate$0.008

JSON body only. Checks syntax (RFC 5321 length limits enforced), MX records, and disposable-domain lists. Invalid syntax returns HTTP 200 with valid:false.

Request
curl -X POST \
  -H "x-api-key: rdye_your_key" \
  -H "Content-Type: application/json" \
  -d '{"email":"user@example.com"}' \
  https://redeye-api-suite.piratecove.workers.dev/v1/email/validate
Response 200
{
  "email": "user@example.com",
  "valid": true,
  "reason": "ok",
  "mx_found": true,
  "disposable": false
}
GET/v1/weather$0.003

Query parameters lat and lon are required numbers.

Request
curl -H "x-api-key: rdye_your_key" \
  "https://redeye-api-suite.piratecove.workers.dev/v1/weather?lat=51.5&lon=-0.12"
Response 200
{
  "lat": 51.5,
  "lon": -0.12,
  "timezone": "Europe/London",
  "current": { "temperature_2m": 15.3, "wind_speed_10m": 11.2, "...": "..." },
  "forecast_3day": { "time": ["...", "...", "..."], "temperature_2m_max": [...] },
  "cached": false
}
POST/v1/pdf/merge$0.02

JSON body only (not multipart): { "files_base64": [ ... ] }. Accepts 2–20 base64-encoded PDFs. Returns the merged document as base64.

Request
curl -X POST \
  -H "x-api-key: rdye_your_key" \
  -H "Content-Type: application/json" \
  -d '{"files_base64":["JVBERi0xLjQK...","JVBERi0xLjQK..."]}' \
  https://redeye-api-suite.piratecove.workers.dev/v1/pdf/merge
Response 200
{
  "file_base64": "JVBERi0xLjcK...",
  "pages": 2
}
POST/v1/pdf/watermark$0.02

JSON body only: { "file_base64": "...", "text": "..." }. Stamps the given text diagonally across every page.

Request
curl -X POST \
  -H "x-api-key: rdye_your_key" \
  -H "Content-Type: application/json" \
  -d '{"file_base64":"JVBERi0xLjQK...","text":"CONFIDENTIAL"}' \
  https://redeye-api-suite.piratecove.workers.dev/v1/pdf/watermark
Response 200
{
  "file_base64": "JVBERi0xLjcK...",
  "pages": 1
}

Error Codes

StatuserrorMeaning
400invalid_bodyMalformed or non-JSON request body
400invalid_ip / invalid_domain / invalid_coordsParameter failed validation
400reserved_ipPrivate/reserved address ranges are not lookup-able
401missing x-api-key / Key not recognizedMissing or unknown API key
402free_tier_exhausted / insufficient_creditDaily 500 free calls used, or prepaid balance empty — top up to continue
422merge_failed / watermark_failedInput could not be parsed as PDF
502upstream_failed / lookup_failedUpstream data source unavailable

Pricing

PlanCostNotes
Free$0500 calls/day across all endpoints, no card required
Pay-as-you-goper-call rates abovePrepaid credit balance, draws down per call