Skip to content

Quickstart

This walks through the whole loop once: create a key, extract a small document synchronously, then queue a larger one and read it back. Everything here runs on a free test key.

  1. Sign up

    Create an account at app.deskew.dev with email and password, or with GitHub or Google. Verify your email address from the message we send; the dashboard stays locked until you do (see Email verification). Signing up creates an organization with one project and a test key.

  2. Create a test key

    Open API keys in the dashboard. A test key named first-test-key was created at sign-up but its plaintext was shown only once; create a new one with Create key and mode Test. Test keys start with deskew_test_sk_ and come with the default scopes extract:write, jobs:read and webhooks. Keep it in an environment variable:

    Terminal window
    export DESKEW_API_KEY="deskew_test_sk_..."

    The plaintext key is shown once. If you lose it, roll or revoke it and create a new one.

  3. Make your first request

    Send any PDF, Office file, image or email as multipart form data. output=json returns Markdown, text, blocks and tables together.

    Terminal window
    curl https://api.deskew.dev/v1/extract \
    -H "Authorization: Bearer $DESKEW_API_KEY" \
    -F "file=@invoice.pdf" \
    -F "output=json" \
    -F "tables=true"

    You can also send a URL instead of a file, as JSON:

    Terminal window
    curl https://api.deskew.dev/v1/extract \
    -H "Authorization: Bearer $DESKEW_API_KEY" \
    -H "Content-Type: application/json" \
    -d '{"url": "https://example.com/report.pdf", "output": "markdown"}'
  4. Read the result

    A short document comes back as 200 with the full result object. The fields you will use most:

    Field What it is
    markdown The whole document as Markdown, pages separated by ---, tables as pipe tables
    text Plain text, no formatting (output=text or output=json)
    blocks[] Typed blocks (heading, paragraph, table, …) with page number and confidence; bbox when bbox=true
    tables[] Every table as rows, csv and markdown
    page_results[] Per page: kind, engine, confidence, quality_score, credits, low_confidence
    usage Pages and credits consumed, and which engines ran
    warnings[] Anything you should know, such as a retried page or a table joined across pages

    Check page_results[].low_confidence before trusting a scanned page; Deskew flags doubtful pages rather than silently returning junk.

  5. Run a background job

    Anything with more than 12 work units (a digital page counts 1, a scanned page 4) or over 20 MB is queued instead of processed inline. The response is 202 with a job:

    {
    "id": "job_01JE4KB0X8Y2Z3A4B5C6D7E8F9",
    "object": "job",
    "status": "queued",
    "mode": "async",
    "pages": { "total": 48, "done": 0 },
    "poll_url": "https://api.deskew.dev/v1/jobs/job_01JE4KB0X8Y2Z3A4B5C6D7E8F9",
    "created_at": "2026-12-02T09:14:07.512Z"
    }

    Force the queue with mode=async on any request, and pass webhook_url to be notified instead of polling. Poll until status is completed, then fetch the result:

    Terminal window
    JOB=job_01JE4KB0X8Y2Z3A4B5C6D7E8F9
    curl -s https://api.deskew.dev/v1/jobs/$JOB -H "Authorization: Bearer $DESKEW_API_KEY"
    curl -s https://api.deskew.dev/v1/jobs/$JOB/result -H "Authorization: Bearer $DESKEW_API_KEY" -o result.json

    Results are kept for 24 hours. See Background jobs for eta_seconds, cancellation and retention.

  6. Verify it

    Every request you have made so far is a job, including the synchronous ones. Confirm the first one exists and see what it cost:

    Terminal window
    curl -s https://api.deskew.dev/v1/jobs?limit=5 \
    -H "Authorization: Bearer $DESKEW_API_KEY"

    Then look at one job by id and check status, credits.used and engines:

    Terminal window
    curl -s https://api.deskew.dev/v1/jobs/$JOB -H "Authorization: Bearer $DESKEW_API_KEY"

    The same jobs appear under Jobs in the dashboard, and the raw requests under Request logs.