# API

JARVIS has an HTTP API. Anything a conversation can do — ask a question, run a search, read and
manage conversations, work with your task list — is available programmatically.

## Base URL

```text
https://jarvis.spacekeep.dev
```

Every endpoint below is relative to that host.

## Conventions

- Requests and responses are JSON.
- Endpoints marked **Key** or **Session** in the tables require authentication. See
  [Authentication](/jarvis/api/authentication/).
- Query and message bodies have length limits; exceeding one returns `400`.
- Errors return a non-2xx status and a JSON body with an `error` field.

## Endpoints at a glance

| Group | Endpoints | Auth |
| --- | --- | --- |
| [Health](/jarvis/api/health/) | `GET /api/health` | None |
| [Chat](/jarvis/api/reference/#chat) | `POST /api/jarvis/chat` | Key or Session |
| [Conversations](/jarvis/api/reference/#conversations) | `GET`, `POST` `/api/conversations` | Key or Session |
| | `GET`, `PATCH`, `DELETE` `/api/conversations/:id` | Key or Session |
| | `POST` `/api/conversations/:id/messages` | Key or Session |
| [Tasks](/jarvis/api/reference/#tasks) | `GET`, `POST` `/api/tasks` | Key or Session |
| | `PATCH`, `DELETE` `/api/tasks/:id` | Key or Session |
| [Memories](/jarvis/api/reference/#memories) | `GET /api/memories` | Session |
| | `PATCH`, `DELETE` `/api/memories/:id` | Session |
| [Web](/jarvis/api/reference/#web) | `GET`, `DELETE` `/api/web` | Session |
| [Keys](/jarvis/api/reference/#keys) | `GET`, `POST` `/api/keys` | Session |
| | `DELETE` `/api/keys/:id` | Session |
| [Account](/jarvis/api/reference/#account) | `GET /api/auth/session`, `POST /api/auth/logout` | — |
| | `POST /api/auth/register`, `POST /api/auth/login` | None |
| | `POST /api/auth/forgot`, `POST /api/auth/reset` | None |
| | `PATCH /api/auth/profile` | Session |

## Try it immediately

The health endpoint needs no credentials:

+++ cURL
```bash
curl -s https://jarvis.spacekeep.dev/api/health \
  -H "Accept: application/json"
```
+++ Node
```js
const res = await fetch("https://jarvis.spacekeep.dev/api/health", {
  headers: { Accept: "application/json" },
});
console.log(await res.json());
```
+++ Python
```python
import requests

res = requests.get("https://jarvis.spacekeep.dev/api/health", timeout=10)
res.raise_for_status()
print(res.json())
```
+++

## Ask JARVIS something

```bash
curl -s https://jarvis.spacekeep.dev/api/jarvis/chat \
  -H "Authorization: Bearer $JARVIS_KEY" \
  -H "Content-Type: application/json" \
  -d '{"message":"What did I ask you to remember?"}'
```

```json
{
  "reply": "You asked me to remember that you prefer TypeScript over JavaScript.",
  "conversationId": "0f3a…"
}
```

Pass `conversationId` to continue an existing thread and give JARVIS its context.

## Next

[!card layout="signal" icon="key" title="Authentication" text="Personal API keys, sessions, and what each endpoint accepts."](/jarvis/api/authentication/)
[!card layout="signal" icon="book" title="API Reference" text="Every endpoint with parameters, responses, and errors."](/jarvis/api/reference/)
[!card layout="signal" icon="pulse" title="Health" text="Service status, liveness, and readiness."](/jarvis/api/health/)

## Related

- [Developer page in the app](https://jarvis.spacekeep.dev/developer) — create and revoke keys
- [Sessions & API Keys](/jarvis/account/sessions/#api-keys) — key lifecycle and safety
- [SpaceKeep API](/developers/) — the SpaceKeep platform API, a separate service
