Every fileAI API request carries an API key in the x-api-key header and goes to the host of the instance your workspace lives on. The API is REST over HTTPS, with the same paths, methods and bodies on every instance.

Before you start

You need:
  • A fileAI account. Sign up or sign in. Self-serve and enterprise accounts both work.
  • An API key. Only workspace admins can create one (see below).
  • An approved AI Schema (Verify in the app) if you want structured values back. fileAI suggests schemas as files arrive; confirm or edit them in the app. See AI Schemas and Concepts.

Create an API key

1

Open API Keys

Sign in to the fileAI app as a workspace admin and open API Keys.
2

Create the key

Click Create API Key. Give it a name, an expiration date and a permission level, then click Generate API Key.
3

Copy it now

The key is shown once. Click Copy & Close and store it in a secret manager or environment variable.
Treat the key like a password. Never commit it to source control or ship it in client-side code. Anyone holding it can act on your workspace.

Key types

There are two kinds of key. Both work on one instance only. Personal keys cannot call PATCH /v1/project/setting, which needs a project admin. See Concepts for how workspaces, projects and folders relate.

What a key can do

Authenticate a request

Send the key in the x-api-key header:
Response

Try requests in the docs

Every endpoint page in the API reference tab has a playground. Enter your key, pick your region from the server dropdown, and send the request. The code samples update to match, so you can copy a snippet that already points at the right host.

Regions

fileAI runs separate instances. Each serves exactly the same API and differs only in the hostname. Use the default unless you have been told otherwise. Every example in these docs uses it. Not sure which instance your workspace is on? Ask your account manager or support@file.ai.
A workspace belongs to exactly one instance, and a key only authenticates on the host that issued it. A request to another instance fails authentication even though the endpoint exists there. Switch the base URL and the key together.

Switching between instances

Only the hostname changes, so switching never means rewriting a request. Keep the host in one variable and build every path from it:
Every guide sets FILEAI_BASE_URL to …/prod/v1 and appends the endpoint path, for example $FILEAI_BASE_URL/files/upload. In Python and Node the guides use BASE = "https://api.orion.file.ai/prod/v1" the same way. In a one-off cURL command, replace the host and leave the path, query string, headers and body as they are:

Request conventions

API quickstart

Upload a file and read its values in about 5 minutes.

Errors

Status codes, problem documents and error codes.

Idempotency

Retry writes without applying them twice.

Workspace setup

Invite your team and manage roles.