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

# API Reference Introduction

> Complete guide to the Outerport API

## Overview

The Outerport API is a RESTful API that enables document processing, AI-powered question answering, and advanced document management capabilities. All endpoints return JSON responses and use standard HTTP status codes.

<Card title="OpenAPI Specification" icon="code" href="./openapi.json">
  View the complete OpenAPI specification file
</Card>

## Base URL

All API requests should be made to:

```
https://api.outerport.com
```

## Authentication

All API endpoints require authentication using Bearer tokens. Include your API key in the `Authorization` header:

```bash
Authorization: Bearer YOUR_API_KEY
```

Contact your administrator to obtain an API key.

## Rate Limits

API requests are subject to rate limiting. Check response headers for current limits:

* `X-RateLimit-Limit`: Maximum requests per time window
* `X-RateLimit-Remaining`: Remaining requests in current window
* `X-RateLimit-Reset`: Time when the rate limit resets

## API Structure

The Outerport API is organized into the following main resource groups:

<CardGroup cols={2}>
  <Card title="Documents" icon="file-text" href="/api-reference/documents/upload-document">
    Upload, manage, and process documents with OCR and layout detection
  </Card>

  <Card title="Questions" icon="question" href="/api-reference/questions/ask-question">
    Ask AI-powered questions about document content and get contextual answers
  </Card>

  <Card title="Job Status" icon="clock" href="/api-reference/job-status/get-job-status">
    Monitor the status of asynchronous operations like document processing
  </Card>

  <Card title="Threads" icon="messages" href="/api-reference/threads/create-thread">
    Organize conversations and maintain context across multiple questions
  </Card>
</CardGroup>

## Response Format

All API responses follow a consistent JSON format:

```json
{
  "id": 123,
  "status": "success",
  "data": { },
  "created_at": "2023-12-01T10:00:00Z"
}
```

## Error Handling

The API uses standard HTTP status codes and returns detailed error messages:

```json
{
  "error": {
    "code": "VALIDATION_ERROR",
    "message": "The request contains invalid parameters",
    "details": {
      "field": "document_id",
      "issue": "Document not found"
    }
  }
}
```

Common status codes:

* `200` - Success
* `400` - Bad Request
* `401` - Unauthorized
* `404` - Not Found
* `422` - Validation Error
* `500` - Internal Server Error
