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

# OMP HTTP API overview and authentication

> Base URL, content type, authentication, request body limits, error envelope format, versioning, and a full route reference for the OMP HTTP API.

The OMP HTTP API exposes every standard memory verb — add, search, list, context, audit, and more — as plain JSON-over-HTTP endpoints. Any language or framework can use it without the Python SDK. This page covers the conventions that apply to every endpoint.

## Base URL

```
http://<your-omp-server-host>:<port>
```

The default port when running `omp-server` is **8080**. All examples on this site use `http://localhost:8080`.

## Content type

All requests and responses use `application/json`. Set `Content-Type: application/json` on every request that includes a body.

## Authentication

The server is designed for trusted-network deployment. Authentication is deferred to a future release. When your provider configuration requires an API key, pass it in the `Authorization` header:

```bash theme={null}
Authorization: Bearer <your-api-key>
```

<Note>
  If your provider does not require authentication, you can omit the `Authorization` header entirely. The `/capabilities` and `/healthz` endpoints are always unauthenticated.
</Note>

## Request limits

The default request body limit is **1 MiB**. Requests that exceed this limit receive a `413 Payload Too Large` response. If you need to store large content, split it across multiple memory records.

## Standard response format

Successful responses return the resource object directly at the top level. There is no wrapper envelope on success — a `POST /memories` response is a `Memory` object, a `GET /memories` response is a `MemoryPage` object, and so on.

## Error response format

All errors use a consistent envelope regardless of which provider raised them:

```json theme={null}
{
  "error": {
    "code": "not_found",
    "message": "Memory mem_abc123 not found",
    "type": "not_found",
    "provider": "postgres",
    "request_id": "req_xyz"
  }
}
```

See [Error codes and HTTP status mapping](/api/error-model) for the full reference.

## Versioning

OMP follows SemVer. The current version is **0.1**. Each provider declares the OMP spec version it implements in the `omp_version` field returned by `GET /capabilities`. A v0.2 client must be able to talk to a v0.1 server by degrading gracefully; a v0.1 client talking to a v0.2 server must ignore unknown fields.

<Info>
  While OMP is below v1.0, breaking changes between minor versions are possible. They are announced at least 60 days in advance via the spec repository and accompanied by SDK migration helpers.
</Info>

## Quick route reference

| Method   | Path               | Description                      |
| -------- | ------------------ | -------------------------------- |
| `POST`   | `/memories`        | Add a memory                     |
| `GET`    | `/memories`        | List memories                    |
| `GET`    | `/memories/{id}`   | Get a memory by ID               |
| `PATCH`  | `/memories/{id}`   | Update a memory                  |
| `DELETE` | `/memories/{id}`   | Delete a memory                  |
| `GET`    | `/memories/search` | Semantic and keyword search      |
| `POST`   | `/context`         | Get a prompt-ready context block |
| `GET`    | `/audit`           | Retrieve the audit log           |
| `GET`    | `/capabilities`    | Query provider feature support   |
| `GET`    | `/healthz`         | Health check                     |
