> For clean Markdown of any page, append .md to the page URL.
> For a complete documentation index, see https://docs.runautomat.com/llms.txt.
> For AI client integration (Claude Code, Cursor, etc.), connect to the MCP server at https://docs.runautomat.com/_mcp/server.

# Quickstart

## Prerequisites

Before you begin, you'll need:

* An Automat account ([sign up here](https://studio.runautomat.com/signup))
* An API key ([see Authentication](/guides/getting-started/authentication))
* An extractor configured in your dashboard

## Step 1: Create an Extractor

#### Go to Extractors

Navigate to your project in the [Automat Dashboard](https://studio.runautomat.com) and click **Create Extractor**

#### Define Your Schema

Use the visual editor to define what fields you want to extract. For example, for an invoice:

```json
{
  "invoice_number": "string",
  "date": "string",
  "total_amount": "number",
  "vendor_name": "string",
  "line_items": [{
    "description": "string",
    "quantity": "number",
    "unit_price": "number"
  }]
}
```

#### Test in Playground

Upload a sample document to test your extractor before using the API

#### Copy Extractor ID

Once satisfied, copy the extractor ID (e.g., `ext_abc123`) for API use

## Step 2: Make Your First API Request

> **File Size Limits**
>
> **Binary, Base64, and Data URL inputs are limited to 4.5 MB** on the Pay As You Go plan. For larger files up to **35
> MB**, use the [URL option](#extract-from-url) instead. Need higher limits? [Contact our sales team](https://runautomat.com/contact) to discuss enterprise options.

### Using cURL

```bash
curl -X POST https://studio.runautomat.com/api/extract \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -F "extractorId=YOUR_EXTRACTOR_ID" \
  -F "file=@path/to/your/document.pdf"
```

### Using fetch (TypeScript)

```typescript
const formData = new FormData();
formData.append('extractorId', 'ext_abc123');
formData.append('file', fs.createReadStream('invoice.pdf'));

const response = await fetch('https://studio.runautomat.com/api/extract', {
  method: 'POST',
  headers: {
    Authorization: `Bearer ${process.env.AUTOMAT_API_KEY}`,
  },
  body: formData,
});

const result = await response.json();
console.log('Extracted data:', result.data);
```

### Using requests (Python)

```python
import requests
import os

with open("invoice.pdf", "rb") as f:
    response = requests.post(
        "https://studio.runautomat.com/api/extract",
        headers={"Authorization": f"Bearer {os.environ['AUTOMAT_API_KEY']}"},
        files={"file": f},
        data={"extractorId": "ext_abc123"},
    )

result = response.json()
print("Extracted data:", result["data"])
```

## Step 3: Handle the Response

A successful response looks like:

```json
{
  "data": {
    "invoice_number": "INV-2024-001",
    "date": "2024-01-15",
    "total_amount": 1250.0,
    "vendor_name": "Acme Corp",
    "line_items": [
      {
        "description": "Widget A",
        "quantity": 10,
        "unit_price": 100.0
      },
      {
        "description": "Widget B",
        "quantity": 5,
        "unit_price": 50.0
      }
    ]
  }
}
```

The `data` field contains the extracted information matching your extractor's schema.

## Alternative Input Methods

### Extract from URL

> **Info**
>
> **URL is the only method that supports files up to 35 MB** — ideal for larger documents that exceed the 4.5 MB limit
> of binary, Base64, and Data URL uploads.

If your document is publicly accessible, you can pass a URL instead of uploading:

```bash
curl -X POST https://studio.runautomat.com/api/extract \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -F "extractorId=ext_abc123" \
  -F "file=https://example.com/invoice.pdf" \
  -F "mimeType=application/pdf"
```

> **Note**
>
> When using a URL, you must also provide the `mimeType` field.

### Extract from Base64

For base64-encoded documents:

```bash
curl -X POST https://studio.runautomat.com/api/extract \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -F "extractorId=ext_abc123" \
  -F "file=<base64-encoded-content>" \
  -F "mimeType=application/pdf"
```

## Error Handling

Always handle potential errors in your integration:

```typescript
const response = await fetch('https://studio.runautomat.com/api/extract', {
  method: 'POST',
  headers: { Authorization: `Bearer ${apiKey}` },
  body: formData,
});

if (!response.ok) {
  const error = await response.json();
  console.error(`Error (${response.status}):`, error.message);
} else {
  const result = await response.json();
  processData(result.data);
}
```

## Next Steps

#### [Extractors](/guides/concepts/extractors)

Learn more about creating and managing extractors

#### [Schemas](/guides/concepts/schemas)

Advanced schema configuration options

#### [API Reference](/api-reference)

Complete API documentation