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

# API reference

> Authentication, errors, retries, and beta access.

The beta uses JSON over HTTPS. Onboarding supplies your base URL, including `/v1`, and a
workspace-scoped bearer key. This reference defines the beta contract; endpoint availability
is confirmed during onboarding. [Download OpenAPI](/openapi.json).

```http theme={"dark"}
Authorization: Bearer YOUR_API_KEY
Content-Type: application/json
```

## Requests

Use an `Idempotency-Key` on every job-creating request. Retrying the same key and body within
24 hours returns the original job; a changed body returns `409`. Keys are scoped by workspace
and endpoint. Inference requests are stateless.

List endpoints accept `limit` (1–100, default 20) and an opaque `cursor`.
Continue using `next_cursor`; its absence marks the last page.
Every response includes `request_id`. Preserve it when reporting a problem.

## Errors

```json theme={"dark"}
{"error":{"code":"unknown_item","message":"Item is outside this model catalog."},"request_id":"req_demo"}
```

| Status        | Action                                                               |
| ------------- | -------------------------------------------------------------------- |
| `400` / `422` | Fix malformed JSON or invalid fields                                 |
| `401`         | Supply a valid key                                                   |
| `403`         | Request access to the capability or dataset                          |
| `404`         | Check the resource ID; inaccessible resources are not disclosed      |
| `409`         | Wait for readiness, or fix a version/idempotency conflict            |
| `413`         | Reduce the request size                                              |
| `429` / `503` | Retry after `Retry-After`, with backoff                              |
| `500`         | Retry a job with its original idempotency key; retain the request ID |

## Jobs

Dataset imports, exports, tokenizer fits, adaptation, and simulation return `202` with a job.
Poll [Get job](/api/get-job): `queued → running → succeeded | failed`.
A successful job includes a typed result; a failed job includes an error.
Poll every two seconds or follow `Retry-After`. Jobs expire after seven days; durable resources
remain addressable by ID. Download URLs have their own expiry.

## Versions and access

Model, tokenizer, and dataset IDs identify immutable versions. A mismatch returns `409`;
unknown fields and items return `422`. Requested capabilities must be enabled.
Beta retention, training scope, deployment location, and rate limits are agreed during onboarding.
Do not send production personal data before that scope is established.
