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

# Quickstart

> Make your first request to Aesoteric in a few minutes.

Aesoteric serves models through APIs that OpenAI and Anthropic clients already speak. Point your client at Aesoteric, use your Aesoteric key, and choose a model.

## 1. Get an API key

Sign in at [app.aesoteric.ai](https://app.aesoteric.ai) and create a key on the [API keys](https://app.aesoteric.ai/keys) page. The key is shown once, so save it somewhere safe.

To pay for requests, add a card or stake AIKEK. See [Billing](https://docs.aesoteric.ai/billing.md).

```bash theme={null}
export AESOTERIC_API_KEY=sk-...
```

## 2. Choose a model

The [Models](https://app.aesoteric.ai/models) page lists every model with its prices and limits. Use a model's id as `model` in your requests. You can also list ids with the API:

```bash theme={null}
curl https://api.aesoteric.ai/v1/models \
  -H "Authorization: Bearer $AESOTERIC_API_KEY"
```

In the examples below, replace `<model-id>` with the id you chose.

## 3. Send a request

| Client | Base URL |
| - | - |
| OpenAI SDKs and OpenAI-compatible tools | `https://api.aesoteric.ai/v1` |
| Anthropic SDKs and Claude Code | `https://api.aesoteric.ai` |

Anthropic clients add `/v1/messages` to the base URL themselves, so their base URL has no `/v1`.

```bash curl theme={null}
curl https://api.aesoteric.ai/v1/chat/completions \
  -H "Authorization: Bearer $AESOTERIC_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "<model-id>",
    "messages": [{"role": "user", "content": "Say hello."}]
  }'
```

```python OpenAI Python theme={null}
import os
from openai import OpenAI

client = OpenAI(
    base_url="https://api.aesoteric.ai/v1",
    api_key=os.environ["AESOTERIC_API_KEY"],
)

completion = client.chat.completions.create(
    model="<model-id>",
    messages=[{"role": "user", "content": "Say hello."}],
)
print(completion.choices[0].message.content)
```

```javascript OpenAI JavaScript theme={null}
import OpenAI from "openai";

const client = new OpenAI({
  baseURL: "https://api.aesoteric.ai/v1",
  apiKey: process.env.AESOTERIC_API_KEY,
});

const completion = await client.chat.completions.create({
  model: "<model-id>",
  messages: [{ role: "user", content: "Say hello." }],
});
console.log(completion.choices[0].message.content);
```

```python Anthropic Python theme={null}
import os
from anthropic import Anthropic

client = Anthropic(
    base_url="https://api.aesoteric.ai",
    api_key=os.environ["AESOTERIC_API_KEY"],
)

message = client.messages.create(
    model="<model-id>",
    max_tokens=1024,
    messages=[{"role": "user", "content": "Say hello."}],
)
print(next(block.text for block in message.content if block.type == "text"))
```

Send your key as `Authorization: Bearer <key>`. Requests in the Anthropic format can also send it as `x-api-key`.

Every completed answer reports what it cost, in USD, as `usage.cost`. See [Billing](https://docs.aesoteric.ai/billing.md).

## Next steps

> [card] [API formats](https://docs.aesoteric.ai/api-formats.md)
>
> Chat Completions, Messages and Responses: what each supports.

> [card] [Coding tools](https://docs.aesoteric.ai/coding-tools.md)
>
> Set up Claude Code, Codex, Pi, OpenCode or Cursor.

> [card] [Prompt caching](https://docs.aesoteric.ai/prompt-caching.md)
>
> How repeated prompts get cheaper, and how to turn caching off.

> [card] [Errors and limits](https://docs.aesoteric.ai/errors.md)
>
> Status codes, rate limits and what to do about each.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.