> For clean Markdown of any page, append .md to the page URL.
> For a complete documentation index, see https://docs.aegi.run/llms.txt.
> For AI client integration (Claude Code, Cursor, etc.), connect to the MCP server at https://docs.aegi.run/_mcp/server.

# Quickstart

## 1. Create an API key

Keys live in a **project** on [aegi.run](https://aegi.run), and a project
belongs to you or your Discord server. Create a project, then create a key
inside it.

A key is shown in full exactly once and starts with `aegis.`:

```bash
aegis.3f9a1c8e5b7d2049af31c6e8d5b90742a3f1c6e8d5b90742a3f1c6e8d5b90742
```

Keep it somewhere safe — Aegis only stores a hash of it, so a lost key cannot
be recovered and has to be replaced.

## 2. Make a request

Every request goes to `https://api.aegi.run` and carries the key as a bearer
token. The one exception is `GET /v1/status`, which needs no key at all.

```bash
curl "https://api.aegi.run/v1/translation/translate?text=hello&to=es" \
  --header "Authorization: Bearer $AEGIS_API_KEY"
```

```json
{
  "success": true,
  "data": {
    "originalText": "hello",
    "translatedText": "hola",
    "sourceLanguage": "en",
    "targetLanguage": "es"
  },
  "requestId": "8f14e45f-ea5c-4b1d-9c3a-2b7e6d1a0c94"
}
```

## 3. Try it from code

The [JavaScript SDK](/sdk) wraps every endpoint with types generated from this
API, so the response above comes back already unwrapped:

```ts
import { Aegis } from 'aegis-api'

const aegis = new Aegis({ apiKey: process.env.AEGIS_API_KEY })

const { translatedText } = await aegis.translation.translate({
  text: 'hello',
  to: 'es',
})

console.log(translatedText) // hola
```

## 4. Do something longer-running

Images and screenshots do not answer on the spot. They queue a job and return
an id:

```ts
const shot = await aegis.tools.screenshot({ url: 'https://aegi.run' })
const { result } = await aegis.jobs.wait(shot.jobId, { timeout: 60 })
```

The [jobs guide](/jobs) covers polling, long-polling, and how long results live.

## Where to go next

* [Authentication](/authentication) — key formats, scopes, and the one public endpoint
* [Rate limits](/rate-limits) — what your plan allows and which headers report it
* [Errors](/errors) — the error envelope, and the full list of error codes
* [Music](/music) — the largest part of the API, and the one with a different shape