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

# API Introduction

> Integrate nuwacom's AI capabilities and your knowledge base into your own applications

## Overview

The nuwacom API gives you programmatic access to your workspace: run AI completions with leading models, manage agents, and work with your knowledge base. Whether you are building custom applications, automating workflows, or enhancing existing systems, the API provides the building blocks you need.

## Available APIs

### Completion API

Run AI completions through an OpenAI-compatible interface. Use plain models, enable knowledge base search and web search, or chat with a configured agent.

* [OpenAI Chat Completion](/api-reference/completion-api/openai-chat-completion): OpenAI-compatible chat completions, including agent support via the `agentId` option

### Agents API

Create and manage agents programmatically, with specialized instructions, conversation starters, and model options.

* [Agents API Overview](/admin/api/agents-overview): Complete guide to working with agents
* [List agents](/api-reference/agents/list-agents), [Create](/api-reference/agents/create-an-agent), [Get](/api-reference/agents/get-an-agent), [Update](/api-reference/agents/update-an-agent), [Delete](/api-reference/agents/delete-an-agent)

### Assets API

Manage documents in your knowledge base for retrieval-augmented generation.

* [Add an asset via URL](/api-reference/assets/add-an-asset-via-url)
* [Upload an asset](/api-reference/assets/upload-an-asset)
* [Get](/api-reference/assets/get-an-asset), [Update](/api-reference/assets/update-an-asset), [Delete](/api-reference/assets/delete-an-asset)

### AI Models

Discover which models are available in your workspace and spaces. Use these model IDs in completion requests and agent options.

* [List all AI models](/api-reference/ai/list-all-ai-models)
* [List space AI models](/api-reference/ai/list-space-ai-models)

## Getting started

### Base URL

Every nuwacom instance runs on its own tenant domain. Use your workspace's tenant name for all API requests:

```
https://{customer-tenant}.nuwacom.ai
```

### Authentication

All API requests require authentication using a Bearer token:

```bash theme={null}
curl -H "Authorization: Bearer YOUR_API_KEY" \
  "https://{customer-tenant}.nuwacom.ai/api/ai/models"
```

Admins can create and manage API keys in the workspace settings under the **API Keys** section. If you are not an admin, please approach your nuwacom admin to request an API key.

<Info>
  Keep your API key in a secure backend environment. Never expose it in client-side code such as JavaScript running in a web page.
</Info>

### Spaces

Most resources (agents, assets, conversations) belong to a **space**. The corresponding requests take the space ID, either in the URL path (e.g. `/api/v1/spaces/{spaceId}/agents`) or as a `space_id` parameter, and the caller's role in that space determines what they are allowed to do.

## OpenAPI specification

A comprehensive OpenAPI specification for your instance is available at `https://{customer-tenant}.nuwacom.ai/api/openapi.json`

We provide two convenient interfaces to explore the OpenAPI documentation:

* Scalar: `https://{customer-tenant}.nuwacom.ai/api/scalar`
* Swagger UI: `https://{customer-tenant}.nuwacom.ai/api/swagger`


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