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

# About the fileAI API

> Explore the core capabilities of the fileAI API

Our fileAI API is organized around REST and uses standard HTTP methods (POST, GET, PATCH) to interact with resource objects. It uses JSON as the primary data format, and all requests should have a Content-Type of application/json.

## Key Features

These API endpoints are the building blocks for all your file ingestion needs. They can be used individually or in conjunction to create powerful end-to-end workflows.

<CardGroup cols={2}>
  <Card title="File Upload & Management" icon="cloud-arrow-up" iconType="solid" href="/docs-api/upload">
    Upload, retrieve and manage files in various formats in fileAI (includes sources, citations, location data and more)
  </Card>

  <Card title="Smart File Processing" icon="wand-magic-sparkles" iconType="solid">
    Proprietary AI OCR with cross-file extraction and custom AI schemas
  </Card>

  <Card title="Dynamic AI Schemas" icon="diagram-project" iconType="solid" href="/docs-user-guide/core/ai-schemas">
    Auto-generated data structures that adapt to your files, fetch cross-file data (coming soon) and online data all in one workflow
  </Card>

  <Card title="Enterprise Ready" icon="shield-check" iconType="solid">
    Secure, scalable, and built for production workloads (SOCII, ISO27001)
  </Card>

  <Card title="Easy Integration" icon="code" iconType="solid">
    RESTful API with callback URLs for real-time updates
  </Card>
</CardGroup>

Our fileAI API is organized around REST and uses standard HTTP methods (POST, GET, PATCH) to interact with resource objects. It uses JSON as the primary data format, and all requests should have a Content-Type of application/json.

## Base URL and instances

The default base URL is:

```
https://api.orion.file.ai/prod/v1
```

Unless you have been told otherwise, this is the base URL to use, and it is the
one every example in these docs is written against.

fileAI also runs instance-specific hosts. An instance serves exactly the same
API — identical paths, methods, parameters, request bodies and response schemas
— and differs **only in the hostname**:

| Instance | Region    | Base URL                               |
| -------- | --------- | -------------------------------------- |
| Default  | —         | `https://api.orion.file.ai/prod/v1`    |
| `au`     | Australia | `https://api.orion.au.file.ai/prod/v1` |
| `sg`     | Singapore | `https://api.orion.sg.file.ai/prod/v1` |
| `jp`     | Japan     | `https://api.orion.jp.file.ai/prod/v1` |

So every endpoint in this reference is reached at:

```
https://api.orion.file.ai/prod/v1/<endpoint-path>          ← default
https://api.orion.<instance>.file.ai/prod/v1/<endpoint-path>
```

<Info>
  Not sure whether your workspace is on an instance, or which one? Ask your
  account manager or contact
  [support@file.ai](mailto:support@file.ai).
</Info>

## Switching between instances

Because only the hostname changes, switching instances never means rewriting a
request. Swap the host and everything else stays byte-for-byte identical.

<Tabs>
  <Tab title="In your code">
    Keep the base URL in one constant or environment variable and build every
    request path from it. Switching instances is then a one-line config change,
    not a search-and-replace.

    ```bash theme={null}
    # Default
    export FILEAI_BASE_URL="https://api.orion.file.ai/prod/v1"

    # Singapore instance
    export FILEAI_BASE_URL="https://api.orion.sg.file.ai/prod/v1"
    ```

    ```bash theme={null}
    curl -X GET "$FILEAI_BASE_URL/files" \
      -H "x-api-key: YOUR_API_KEY"
    ```
  </Tab>

  <Tab title="In a curl command">
    Replace the host, leave the path, query string, headers and body untouched.

    ```bash theme={null}
    # Default
    curl -X GET "https://api.orion.file.ai/prod/v1/files" \
      -H "x-api-key: YOUR_API_KEY"

    # Same call, Japan instance
    curl -X GET "https://api.orion.jp.file.ai/prod/v1/files" \
      -H "x-api-key: YOUR_API_KEY"
    ```
  </Tab>

  <Tab title="In the API playground">
    Every endpoint page in this reference has an interactive playground. Use the
    **server** dropdown above the request to switch from the default host to
    `https://api.orion.{instance}.file.ai`, then pick `au`, `sg` or `jp` from
    the **instance** field. The sample request updates to match, so you can copy
    a snippet that already points at the right host.
  </Tab>
</Tabs>

<Warning>
  A workspace belongs to exactly one instance, and an API key only authenticates
  against the host that issued it. Sending a request to a different instance
  fails authentication even though the endpoint exists there — so switch the
  base URL and the API key together.
</Warning>

## Prerequisites for using the fileAI API

Before using our API, please ensure you complete the following prerequisites:

<CardGroup cols={2}>
  <Card title="You must have a fileAI account" icon="user-plus" iconType="solid">
    To use our API endpoints, you need to sign up or login [here](https://orion.file.ai/en/sign-up). Both self-serve and enterprise accounts are supported.
  </Card>

  <Card title="You must have an API Key" icon="key" iconType="solid">
    After creating your fileAI account, you can generate your API Key.
  </Card>
</CardGroup>

<Card title="You must verify an AI Schema" icon="shield-check">
  fileAI suggests extraction and data fetch schemas. Confirm or edit these in the UI to call them directly via MCP.
</Card>

### **How to get an API token**

1. Go to **API Keys**
2. Click **Create API Key**
3. Name the token, set expiration and permission
4. Click **Generate API Key**
5. Token will be shown, click **Copy & Close**

<Note>
  Note: Only admins can create API keys.
</Note>

***

### **How to authorize an API token**

1. Once you have your API key, go to the API documentation page:

<Note>
  `https://api.orion.file.ai/prod/v1/docs/swagger-ui`

  On an instance-specific host, swap the hostname — for example
  `https://api.orion.sg.file.ai/prod/v1/docs/swagger-ui`. See [Base URL and
  instances](#base-url-and-instances).
</Note>

2. Click the Authorize button on the right of this page (the green Authorize button with lock icon)
3. Enter your API Key under <u>Value</u>
4. Click <u>Authorize</u> to start making authenticated requests directly from the documentation

<Note>
  If you need any further assistance, please reach out to our team at [support@file.ai](mailto:support@file.ai)
</Note>
