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

# API Overview & Authentication

> Learn how to authenticate and integrate with Omnifact's Public API and Published Space endpoints

export const Glossary = ({children, term}) => {
  const glossaryDefinitions = {
    'ai': 'Artificial Intelligence - computer systems that can perform tasks typically requiring human intelligence',
    'artificial-intelligence-ai': 'Computer systems that can perform tasks typically requiring human intelligence',
    'ai-assistant': 'An AI system designed to help users with tasks through conversation',
    'space': 'A dedicated environment with a specialized AI assistant and optional Uploaded Files',
    'spaces': 'Dedicated environments with specialized AI assistants and optional Uploaded Files',
    'knowledge': 'The sub-menu in Space settings where you manage Uploaded Files and Connected Sources',
    'uploaded-files': 'Documents manually uploaded to a Space under the Knowledge tab',
    'prompt': 'Instructions or questions you give to an AI assistant',
    'response': 'The AI assistant\'s answer to your prompt or question',
    'query': 'A question or request for information',
    'context': 'Background information that helps the AI understand your request',
    'llm': 'Large Language Model - an AI system trained on vast amounts of text data to understand and generate human language',
    'large-language-model-llm': 'An AI system trained on vast amounts of text data to understand and generate human language',
    'privacy-filter': 'A system that automatically detects and masks sensitive information before it reaches AI models, and restricts images from being sent to non-EU hosted models for compliance',
    'chat-instructions': 'Custom guidelines that define how an AI assistant behaves and responds in a Space',
    'pattern-matching': 'The process by which AI recognizes and uses patterns in data to provide responses',
    'patterns': 'Recognizable structures or trends in data that AI systems can identify and use',
    'training-data': 'The text and information used to teach an AI system how to understand and respond to requests',
    'natural-language': 'Everyday human language that people use to communicate, as opposed to computer code or formal syntax',
    'hallucination': 'When an AI generates information that sounds plausible but is actually incorrect or fabricated',
    'filtering': 'The process of automatically detecting and temporarily replacing sensitive information to protect it during AI processing',
    'masking': 'Temporarily replacing sensitive information with generic labels to protect it from being seen by external AI models',
    're-insertion': 'The automatic process of putting original sensitive information back into AI responses after they\'ve been generated with filtered data',
    'retrieval': 'The process of finding and accessing relevant documents from Uploaded Files to answer questions',
    'hosting': 'Where an AI model is deployed and made available for use - either by third-party providers, on your organization\'s own servers, or in private cloud environments',
    'cite': 'To reference or mention the source of information, helping you know where an AI\'s answer came from',
    'sidebar': 'A panel that appears on the side of the screen showing additional information and options',
    'toggle': 'A button or control that switches something on or off, like opening and closing a sidebar',
    'navigation': 'The system of menus and buttons that help you move between different parts of Omnifact',
    'favoriting': 'Marking a Space as a favorite to pin it to the main navigation for quick access',
    'pinning': 'Attaching a Space to the main navigation bar so it\'s always visible and easily accessible'
  };
  const definition = glossaryDefinitions[term];
  return <Tooltip tip={definition}>{children}</Tooltip>;
};

The Omnifact Public API enables developers and teams to integrate Omnifact's AI capabilities into external applications, custom portals, and automated workflows. You can manage documents in Space Uploaded Files, query system status, and communicate directly with published <Glossary term="space">Spaces</Glossary>.

<Card title="Interactive OpenAPI Documentation" icon="code" href="https://connect.omnifact.ai/docs" target="_blank" horizontal>
  Access the interactive Swagger / OpenAPI specification for live endpoint testing and complete schema definitions at connect.omnifact.ai/docs.
</Card>

## Authentication

All requests to the Omnifact Public API require authentication using an API key passed in the `X-API-Key` HTTP header.

```http theme={null}
X-API-Key: your_omnifact_api_key_here
```

<Note>
  Keep your API key secure. Do not expose your API key in client-side code, public repositories, or frontend web applications.
</Note>

### Managing API Keys

Team administrators can generate and manage organization API keys directly from the Omnifact application:

1. Navigate to **Team Settings** in the main navigation bar.
2. Click **Developer Tools** (requires administrator privileges).
3. Enable **API Access** if it is not already active.
4. Click **Generate API Key** to create a key for your team.

For step-by-step instructions on enabling developer access, see [Developer Tools](/en/platform/team-administration/developer-tools).

## Base URL

All Public API requests should be sent to the base URL:

```http theme={null}
https://connect.omnifact.ai
```

## Available API Resources

The Public API is organized into two primary functional areas:

<CardGroup cols={2}>
  <Card title="Documents API" icon="folder-tree" href="/en/api-reference/documents">
    Programmatically list, upload, inspect, rename, and delete documents in Space Uploaded Files.
  </Card>

  <Card title="Published Spaces Chat API" icon="comments" href="/en/api-reference/published-space-chat">
    Send messages to published Space endpoints with support for JSON and real-time SSE streaming.
  </Card>
</CardGroup>

## Error Handling

The API uses standard HTTP status codes to indicate request outcomes:

| Status Code             | Meaning      | Description                                              |
| :---------------------- | :----------- | :------------------------------------------------------- |
| `200 OK`                | Success      | Request succeeded.                                       |
| `201 Created`           | Created      | Resource successfully created (e.g., document upload).   |
| `400 Bad Request`       | Bad Request  | Missing or invalid parameters.                           |
| `401 Unauthorized`      | Unauthorized | Missing or invalid `X-API-Key` header.                   |
| `404 Not Found`         | Not Found    | Requested document or endpoint ID does not exist.        |
| `429 Too Many Requests` | Rate Limited | Quota or rate limit exceeded.                            |
| `500 Internal Error`    | Server Error | An internal error occurred while processing the request. |

All error responses return a JSON object with error details:

```json theme={null}
{
  "error": {
    "code": "INVALID_API_KEY",
    "message": "The provided X-API-Key header is invalid or expired."
  }
}
```

## Next Steps

* Explore the [Documents API](/en/api-reference/documents) for document management
* Learn how to stream chat responses with the [Published Spaces Chat API](/en/api-reference/published-space-chat)
* Configure API settings in [Developer Tools](/en/platform/team-administration/developer-tools)
