# API Reference

Find the Spice Cloud Runtime APIs for SQL, search, and AI, and the Management API that manages projects and infrastructure.

The Spice Cloud Platform exposes two sets of APIs: **Runtime APIs** for querying data and AI, and the **Management API** for managing projects and infrastructure.

## Runtime APIs

Runtime APIs are served at `https://data.spiceai.io` and authenticated with [Project API keys](https://spice.ai/docs/cloud/portal/apps/api-keys).

> **Note**
>
> `data.spiceai.io` and `flight.spiceai.io` reach projects in `us-east-1` only. A project in another region, or on a dedicated cluster, has its own HTTP and Flight hosts. Find them in the project's **Settings** > **Endpoints**, under **Data-Plane**.

| API | Endpoint | Documentation |
| - | - | - |
| SQL Query (HTTP) | `POST /v1/sql` | [HTTP API](https://spice.ai/docs/cloud/api/sql-query/http-api) |
| SQL Query (Arrow Flight) | `grpc+tls://flight.spiceai.io` | [Arrow Flight API](https://spice.ai/docs/cloud/api/sql-query/apache-arrow-flight-api) |
| Models | `GET /v1/models` | [Models](https://spice.ai/docs/cloud/api/openai-api/models) |
| Chat completions | `POST /v1/chat/completions` | [Chat Completions](https://spice.ai/docs/cloud/api/openai-api/chat-completions) |
| Responses | `POST /v1/responses` | [Responses](https://spice.ai/docs/cloud/api/openai-api/responses) |
| Decisions | `POST /v1/decisions` | [Decisions](https://spice.ai/docs/cloud/api/openai-api/decisions) |
| Text-to-SQL | `POST /v1/nsql` | [Text-to-SQL API](https://spice.ai/docs/cloud/api/nsql) |
| Text-to-SQL context | `GET /v1/nsql/context` | [Text-to-SQL API](https://spice.ai/docs/cloud/api/nsql) |
| Search | `POST /v1/search` | [Search API](https://spice.ai/docs/cloud/api/search) |
| MCP | `POST /v1/mcp` | [MCP API](https://spice.ai/docs/cloud/api/mcp) |
| Health | `GET /health` | [Health API](https://spice.ai/docs/cloud/api/health) |
| Metrics | `GET /v1/metrics` | [Metrics API](https://spice.ai/docs/cloud/api/metrics) |

## Management API

The Management API is served at `https://api.spice.ai` and authenticated with [Personal Access Tokens](https://spice.ai/docs/cloud/portal/profile/personal-access-tokens) or OAuth client credentials.

| Endpoint | Documentation |
| - | - |
| Projects | [Projects API](https://spice.ai/docs/cloud/api/management/projects) |
| Deployments | [Deployments API](https://spice.ai/docs/cloud/api/management/deployments) |
| Secrets | [Secrets API](https://spice.ai/docs/cloud/api/management/secrets) |
| API Keys | [API Keys API](https://spice.ai/docs/cloud/api/management/api-keys) |
| Members | [Members API](https://spice.ai/docs/cloud/api/management/members) |
| Regions | [Regions API](https://spice.ai/docs/cloud/api/management/regions) |
| Container Images | Container Images API |
| Health | [Health API](https://spice.ai/docs/cloud/api/management/health) |

See the full [Management API reference](https://spice.ai/docs/cloud/api/management) for authentication, scopes, rate limits, and examples.

## OpenAPI Specification

The Spice.ai Platform API spec is available at:

```
https://api.spice.ai/v1/docs/openapi.json
```
