Browse Docs
On This Page

Authentication

Network reference: For the full authentication guide covering all Tools.FAST sites, see tools.fast/api/docs/authentication.

API key header

Pass your API key in the X-Fast-Api-Key header:

X-Fast-Api-Key: fast_prod_...

All endpoints require a valid API key.

Server-side only

The API is designed for server-side integrations. Browser-based requests are restricted to first-party origins — call the API from your backend. Cross-origin requests from third-party domains will be blocked by CORS policy.

Getting your API key

  1. Create a free account -- 500 Pro credits, no card required.
  2. Navigate to API Keys.
  3. Create a new key -- it will start with fast_prod_.
  4. Store the key securely; it is shown only once.

Key management

You can create multiple API keys — for example, separate keys for staging and production, or per-application. Revoke any key individually from the API Keys page. Revoked keys stop working immediately.

IP allowlisting

Each API key can optionally be restricted to specific IP addresses. Enter a single address (e.g., 203.0.113.5) or a CIDR range (e.g., 203.0.113.0/24). When allowlisting is enabled, requests from non-listed IPs are rejected with 401.

We recommend allowlisting your server IPs in production — it limits the blast radius if a key is ever leaked.

Configure allowlisted IPs in the API Keys dashboard.

Example error

{
  "error": "api_key.invalid_or_ip_not_allowed",
  "detail": "X-Fast-Api-Key was provided but is invalid for this request (or IP not allowlisted)."
}

Example usage

cURL
# Compress a file
curl -sS -X POST "https://api.tools.fast/compress" \
  -H "X-Fast-Api-Key: fast_prod_your_key_here" \
  -F "file=@image.png"

# Discovery endpoint
curl -sS "https://api.tools.fast/compress/compressors" \
  -H "X-Fast-Api-Key: fast_prod_your_key_here"
PowerShell
# Compress a file
Invoke-RestMethod -Method Post "https://api.tools.fast/compress" `
  -Headers @{ "X-Fast-Api-Key" = "fast_prod_your_key_here" } `
  -Form @{ file = Get-Item "image.png" }

# Discovery endpoint
Invoke-RestMethod "https://api.tools.fast/compress/compressors" `
  -Headers @{ "X-Fast-Api-Key" = "fast_prod_your_key_here" }
Copied.