Skip to content

Quickstart

Three commands from zero to a dewarped image.

1. Create an account

curl -s https://page-dewarp-api.louismmx.workers.dev/api/auth/signup \
  -H "Content-Type: application/json" \
  -d '{"email": "you@example.com", "password": "your-password"}' | jq .

Response:

{
  "token": "eyJ...",
  "api_key": "pdw_...",
  "claim_url": "https://..."
}

Save your API key — it doesn't expire and works for all future requests. New accounts receive a claim_url — open it in a browser to claim your free welcome credits.

2. Buy credits

curl -s https://page-dewarp-api.louismmx.workers.dev/api/checkout \
  -H "Authorization: Bearer pdw_YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"pack": "25"}' | jq .

Open the returned checkout_url in your browser and complete the payment. Credits are added to your account immediately.

3. Dewarp an image

curl -s https://page-dewarp-api.louismmx.workers.dev/api/dewarp \
  -H "Authorization: Bearer pdw_YOUR_API_KEY" \
  -F "file=@photo-of-a-book-page.jpg" \
  --output dewarped.png

Open dewarped.png. Done.

What's next

  • Authentication — JWT vs API key vs Google sign-in
  • Parameters — control output format, focal length, margins, and more
  • Examples — Python code, batch processing, reading metadata