Dashboard

Authentication

All Scrayle API requests require authentication via an API key. This page explains how to create, manage, and use your keys.

API Keys

API keys are created from the Scrayle Dashboard under the API Keys section.

Each key is tied to your team and grants full access to all API endpoints. You can create multiple keys for different environments (development, staging, production).

Creating a Key

  1. Open the Dashboard and navigate to API Keys
  2. Click Create API Key
  3. Enter a descriptive name (e.g., "Production Server")
  4. Copy the generated key immediately - it will not be shown again
⚠️Security

Never expose your API key in client-side code, public repositories, or browser requests. Always use it server-side only.

Revoking a Key

You can revoke any API key at any time from the dashboard. Revoked keys immediately stop working for all requests.

Using Your API Key

HTTP Header

Pass your API key in the x-api-key header:

curl -X POST https://api.scrayle.com/api/v1/scraper/scrape \
  -H "Content-Type: application/json" \
  -H "x-api-key: YOUR_API_KEY" \
  -d '{"url": "https://example.com", "formats": ["markdown"]}'

SDK Configuration

The SDK reads SCRAYLE_API_KEY from your environment automatically:

# .env
SCRAYLE_API_KEY=your_api_key_here
import { ScrayleClient } from '@scrayle/sdk';

// Reads SCRAYLE_API_KEY from environment
const client = new ScrayleClient();

// Or pass explicitly
const client = new ScrayleClient({
  apiKey: 'your_api_key_here',
});

Rate Limiting

API requests are rate-limited per API key. If you exceed your rate limit, you will receive a 429 Too Many Requests response. The response includes a Retry-After header indicating how long to wait.

Credit System

Most API operations consume credits from your account balance. See Credits & Billing for the full pricing table.