> ## Documentation Index
> Fetch the complete documentation index at: https://docs.contractag.dev/llms.txt
> Use this file to discover all available pages before exploring further.

# Quickstart

Follow these steps to make your first API call.

<Tip>
  In a hurry? Open the API Playground from the `Fields: All` endpoint page,
  click **Set token**, and send the same request directly in the browser.
</Tip>

## 1. Request an API Key

Email `support@contractag.dev` with:

* Company name and contact
* Expected volume (PDFs per day)
* Intended use case (e.g., tagging contracts for CRM ingest)

You will receive an API key and rate limits tailored to your workflow.

***

## 2. Prepare Your Contract

* Accepts PDF files up to 25 MB.
* Multi-page documents supported; fields return with page indices.
* For image-only scans, ensure text is legible (DPI ≥ 200 recommended).

***

## 3. Call the Fields API

```bash theme={null}
curl -X POST https://api.contractag.dev/fields \
  -H "x-api-key: YOUR_API_KEY" \
  -F file=@/path/to/contract.pdf
```

The Playground surfaces the same payload builder with tabs for cURL, Python, and JavaScript.

Successful responses return a `documentId`, page count, and field list with bounding boxes.

If processing is asynchronous for large files, poll the `GET /fields/{document_id}` endpoint.

***

## 4. Overlay Results

Each field contains `{ x, y, w, h }` coordinates in PDF points with the origin at the bottom-left of the page.

```js theme={null}
const scale = canvasWidth / pageWidth; // example scaling
fields
  .filter((field) => field.page === targetPage)
  .forEach((field) => drawBox(field.bbox, scale));
```

Bring the raw data into your UI, CRM, or workflow engine to finish the automation loop.

> The API omits text values for privacy. Read content directly from the PDF beneath each bounding box if you need to display it.

***

Need help? Reply to the onboarding email or ping support for implementation guidance.
