# Getting started

From an early-access request to a cited answer in your own app.

Lornos is in private beta. This is the whole path, from access to the first cited answer in your own code.

## 1. Get a workspace

Request early access with your work email on the [homepage](https://lornos.dev/index.md). When we approve the request we create a workspace for you and write to you once with your sign-in details. Sign in, then set your own password under **Settings**.

## 2. Upload your documents

Open **Sources** and drop up to 10 files at a time: Markdown, plain text, HTML, PDF or Word, up to 25 MB each. See [Sources](https://lornos.dev/docs/sources.md).

## 3. Wait for them to index

Each file is read, split into passages and indexed for your workspace only. **Jobs** shows each one's progress, and a file is ready when it says **Searchable**. See [Jobs](https://lornos.dev/docs/jobs.md).

## 4. Ask in the playground

Ask a question your documents can answer. The playground shows the answer, the passages it used and how long each step took. See [Playground](https://lornos.dev/docs/playground.md).

## 5. Create an API key

An owner or admin creates a key under **API keys** and picks its scopes: `chat` to ask questions, `sources` to manage documents. The key is shown once. See [API keys](https://lornos.dev/docs/api-keys.md).

## 6. Ask from your code

Set `LORNOS_URL` to the address of your console without the path, and `LORNOS_KEY` to your key:

```bash
curl -N "$LORNOS_URL/api/chat" \
  -H "Authorization: Bearer $LORNOS_KEY" \
  -H "Content-Type: application/json" \
  -d '{"messages":[{"id":"q1","role":"user","parts":[{"type":"text","text":"How do I record a sale?"}]}]}'
```

The answer streams back and cites passages by ID, for example `[record-a-sale.md#1.0]`. The [API reference](https://lornos.dev/docs/api.md) covers the stream format, uploads and errors.
