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

# API FAQ

> Technical questions and answers about Unsiloed AI's API integration

# API FAQ

Technical questions and answers for developers integrating with Unsiloed AI's APIs for ingesting multimodal unstructured data and converting it into structured Markdown and JSON.

## Getting Started with the API

### How do I get API access?

1. **Sign up** - [Sign up on Unsiloed AI](https://cal.com/aman-mishra-p0ry57/15min) to get access
2. **Get your API keys** - We'll provide you with API credentials to get started
3. **Start making requests** using our endpoints
4. **Monitor usage** and track your API activity
5. **Scale up** as your needs grow

### What is the base URL for the API?

The base URL for all API endpoints is:

```
https://prod.visionapi.unsiloed.ai
```

### How do I authenticate API requests?

We use API key authentication. Include your API key in the request headers:

```bash theme={null}
curl -H "api-key: YOUR_API_KEY" \
     -H "Content-Type: application/json" \
     https://prod.visionapi.unsiloed.ai/endpoint
```

Or for some endpoints that use Bearer tokens:

```bash theme={null}
curl -H "Authorization: Bearer YOUR_API_KEY" \
     -H "Content-Type: application/json" \
     https://prod.visionapi.unsiloed.ai/endpoint
```

<Warning>
  Keep your API keys secure and never expose them in client-side code or public repositories.
</Warning>

## API Endpoints and Usage

### What are the main API endpoints?

Our core endpoints for converting unstructured data to structured formats:

* **Extraction**: `POST /v2/extract` - Extract structured data using JSON schemas, returns job\_id
* **Extraction Status**: `GET /extract/{job_id}` - Get extraction results with confidence scores
* **Parsing**: `POST /parse` - Parse documents into structured chunks with metadata
* **Parsing Status**: `GET /parse/{job_id}` - Get parsed content with element types
* **Classification**: `POST /classify` - Classify documents into categories
* **Classification Status**: `GET /classify/{job_id}` - Get classification with confidence
* **Splitting**: `POST /splitter` - Split multi-document PDFs by category
* **Splitting Status**: `GET /splitter/{job_id}` - Get split results

### What HTTP methods are supported?

Most endpoints use **POST** requests for document processing:

* `POST` - Submit documents for processing
* `GET` - Retrieve job status and results (for async operations)
* `DELETE` - Cancel processing jobs

### How do I handle file uploads?

Use `multipart/form-data` for file uploads:

```python theme={null}
import requests

files = {"file": ("document.pdf", open("document.pdf", "rb"), "application/pdf")}
response = requests.post(
    "https://prod.visionapi.unsiloed.ai/extraction",
    files=files,
    headers={"Authorization": "Bearer YOUR_API_KEY"}
)
```

## Rate Limits and Quotas

### What are the API rate limits?

Rate limits are measured in requests per second, per organization, and depend on your plan and the endpoint. The [Rate Limits](/docs/api-reference/limits/rate-limits) reference has the full table. If you don't have access to it, contact your account team.

### How do I handle rate limiting?

When you exceed rate limits, you'll receive a `429 Too Many Requests` response. When the platform is busy, you'll receive a `503 Service Unavailable`. Retry both, waiting for the number of seconds in the `Retry-After` header:

```python theme={null}
import time
import requests

def make_request_with_retry(url, max_retries=3, **kwargs):
    for attempt in range(max_retries + 1):
        response = requests.post(url, **kwargs)
        if response.status_code not in (429, 503) or attempt == max_retries:
            return response

        retry_after = response.headers.get("Retry-After", "")
        wait_time = int(retry_after) if retry_after.isdigit() else 2 ** attempt
        time.sleep(wait_time)
```

See [Capacity and Backpressure](/docs/api-reference/limits/capacity-and-backpressure) for what a `503` means and how to retry it.

### What happens if I exceed my quota?

* **Free tier**: Processing stops until next billing cycle
* **Paid plans**: Overage charges apply
* **Enterprise**: Custom arrangements available

## Error Handling

### What HTTP status codes should I expect?

Common status codes:

* `200` - Success
* `400` - Bad Request (invalid parameters)
* `401` - Unauthorized (invalid API key)
* `402` - Payment Required (usage quota or credits exhausted)
* `413` - Payload Too Large (file size exceeded)
* `429` - Too Many Requests (rate limited)
* `500` - Internal Server Error
* `503` - Service Unavailable (platform busy; retry after `Retry-After` seconds)

### How should I handle errors?

Always check the response status and handle errors appropriately:

```python theme={null}
response = requests.post(url, files=files, headers=headers)

if response.status_code == 200:
    result = response.json()
    # Process successful response
elif response.status_code == 400:
    error = response.json()
    print(f"Bad request: {error['error']['message']}")
elif response.status_code == 401:
    print("Invalid API key")
elif response.status_code == 413:
    print("File too large")
else:
    print(f"Unexpected error: {response.status_code}")
```

### What error information is provided?

Error responses use this format. `code` is a machine-readable error code such as `rate_limited` or `quota_exceeded`, and `details` is included only for some errors:

```json theme={null}
{
  "error": {
    "code": "bad_request",
    "message": "Descriptive error message",
    "details": {}
  }
}
```

## Document Processing

### What file formats are supported via API?

Supported formats:

* **PDF**: Including scanned PDFs
* **Images**: PNG, JPEG, TIFF, WebP
* **Documents**: DOCX, TXT

### What's the maximum file size?

* **Standard**: 100MB per file
* **Enterprise**: Custom limits available

### How do I process multiple files?

Use the batch processing endpoint:

```python theme={null}
files = [
    ("files", ("doc1.pdf", open("doc1.pdf", "rb"), "application/pdf")),
    ("files", ("doc2.pdf", open("doc2.pdf", "rb"), "application/pdf"))
]

response = requests.post(
    "https://prod.visionapi.unsiloed.ai/batch",
    files=files,
    headers={"Authorization": "Bearer YOUR_API_KEY"}
)
```

## Response Formats

### What format do API responses use?

All responses are in JSON format:

```json theme={null}
{
  "status": "success",
  "data": {
    "extracted_text": "Document content...",
    "confidence": 0.95,
    "metadata": {
      "pages": 5,
      "processing_time": 2.3
    }
  }
}
```

### How do I handle binary responses?

Some endpoints (like document splitting) return ZIP files:

```python theme={null}
response = requests.post(url, files=files, headers=headers)

if response.headers.get('content-type') == 'application/zip':
    with open('result.zip', 'wb') as f:
        f.write(response.content)
```

## Webhooks and Async Processing

### Do you support webhooks?

Yes! Configure webhooks in your dashboard to receive notifications when processing completes:

```json theme={null}
{
  "job_id": "12345",
  "status": "completed",
  "result_url": "https://api.unsiloed.ai/results/12345",
  "timestamp": "2024-01-01T12:00:00Z"
}
```

### How do I handle long-running processes?

For large documents, use async processing:

1. **Submit job**: Receive a `job_id`
2. **Poll status**: Check `/jobs/{job_id}/status`
3. **Retrieve results**: Get results when status is `completed`

```python theme={null}
# Submit job
response = requests.post(url, files=files, headers=headers)
job_id = response.json()['job_id']

# Poll status
while True:
    status_response = requests.get(f"{base_url}/jobs/{job_id}/status", headers=headers)
    status = status_response.json()['status']
    
    if status == 'completed':
        results = requests.get(f"{base_url}/jobs/{job_id}/results", headers=headers)
        break
    elif status == 'failed':
        print("Job failed")
        break
    
    time.sleep(5)  # Wait 5 seconds before checking again
```

## SDK and Libraries

### Do you provide SDKs?

We provide official SDKs for:

* **Python**: `pip install unsiloed-ai`
* **JavaScript/Node.js**: `npm install unsiloed-ai`
* **More languages**: Coming soon

### How do I use the Python SDK?

```python theme={null}
from unsiloed_ai import UnsiloedAI

client = UnsiloedAI(api_key="your-api-key")

# Extract text from document
result = client.extract_text("document.pdf")
print(result.text)

# Parse structured data
parsed = client.parse_document("financial_report.pdf")
print(parsed.tables)
```

***

<CardGroup cols={2}>
  <Card title="API Reference" icon="code" href="/docs/api-reference/extraction">
    Complete API documentation with examples
  </Card>

  <Card title="Try the Playground" icon="play" href="https://www.unsiloed.ai/demo">
    Test API endpoints interactively
  </Card>
</CardGroup>


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.