API Reference

waypoints API Documentation

Everything you need to integrate waypoints into your app. Five modules, one API key, one credit balance.

Modules

Quick Start

1. Install the SDK

npm install @waypoints/sdk

2. Create a client

import waypoints from "@waypoints/sdk";

const wp = new waypoints({
  apiKey: process.env.WAYPOINTS_API_KEY, // wp_live_...
});

3. Make your first call

// Screenshot any URL
const result = await wp.render.screenshot({
  url: "https://example.com",
  width: 1280,
  format: "png",
});

console.log(result.url); // presigned MinIO URL (24h TTL)
console.log(result.credits_used); // 2

Authentication

All API requests must include your API key in the header. You can create and manage API keys from the .

curl -X POST https://api.waypoints.tech/v1/render/screenshot \
  -H "x-api-key: wp_live_your_key_here" \
  -H "Content-Type: application/json" \
  -d '{ "url": "https://example.com" }'
Key prefixEnvironmentCredits deducted
ProductionYes
wp_test_...SandboxNo — free to call

Security note

API keys are shown only once at creation time. waypoints stores only the sha256 hash — the raw key cannot be retrieved. Store your key in an environment variable and never commit it to version control.

Error Format

All errors follow a consistent JSON envelope with a machine-readable code, human-readable message, and a link to the relevant documentation.

{
  "error": {
    "code": "INSUFFICIENT_CREDITS",
    "message": "You have 3 credits remaining. This call costs 5.",
    "docs": "https://waypoints.sh/docs/errors#insufficient-credits"
  }
}
CodeHTTPDescription
401No x-api-key header provided
401Key not found or has been revoked
402Not enough credits for this call
422Missing or malformed request fields
500Puppeteer / headless Chrome error
500LibreOffice or FFmpeg error
500Claude API error during extraction
500Postal SMTP delivery error
429Too many requests per minute