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

# API Introduction

> Integrate Plumi into your applications

## Overview

The Plumi API allows you to programmatically:

* Execute queries on connected databases
* Manage database connections
* Access query results
* Integrate AI-powered data analysis

## Base URL

All API requests should be made to your workspace URL:

```
https://your-workspace.plumi.ai/api
```

## Authentication

All API endpoints require authentication using API keys.

```bash theme={null}
curl -X GET "https://your-workspace.plumi.ai/api/connections" \
  -H "Authorization: Bearer YOUR_API_KEY"
```

See [Authentication](/api-reference/authentication) for details on obtaining and using API keys.

## Response Format

All responses are returned as JSON:

```json theme={null}
{
  "success": true,
  "data": {
    // Response data
  }
}
```

Error responses include an error message:

```json theme={null}
{
  "success": false,
  "error": "Error message"
}
```

## Rate Limits

API requests are rate limited based on your plan:

| Plan         | Requests/minute |
| ------------ | --------------- |
| Free         | 60              |
| Professional | 300             |
| Enterprise   | Unlimited       |

## Available Endpoints

### Connections

* `GET /api/connections` - List all database connections
* `POST /api/connections/test` - Test a database connection

### Queries

* `POST /api/query` - Execute a SQL query
* `GET /api/query/history` - Get query history

### AI

* `POST /api/ai/generate` - Generate SQL from natural language
