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

# Quickstart

> Get your first a21e response in under 2 minutes.

## Prerequisites

* An a21e account ([sign up](https://a21e.com))
* An API key (generate one in [Settings > API Keys](https://a21e.com/api-key))

## Option 1: cURL

```bash theme={null}
curl -X POST https://api.a21e.com/v1/rpc \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "method": "intent.submit",
    "params": {
      "input": "Explain the builder pattern in TypeScript with a practical example",
      "auto_execute": true
    }
  }'
```

## Option 2: OpenAI SDK (drop-in)

If you already use the OpenAI SDK, point it at a21e:

<CodeGroup>
  ```python Python theme={null}
  from openai import OpenAI

  client = OpenAI(
      api_key="YOUR_A21E_API_KEY",
      base_url="https://api.a21e.com/v1",
  )

  response = client.chat.completions.create(
      model="auto",
      messages=[
          {"role": "user", "content": "Write a retry decorator with exponential backoff"}
      ],
  )

  print(response.choices[0].message.content)
  ```

  ```typescript TypeScript theme={null}
  import OpenAI from "openai";

  const client = new OpenAI({
    apiKey: "YOUR_A21E_API_KEY",
    baseURL: "https://api.a21e.com/v1",
  });

  const response = await client.chat.completions.create({
    model: "auto",
    messages: [
      { role: "user", content: "Write a retry decorator with exponential backoff" },
    ],
  });

  console.log(response.choices[0].message.content);
  ```
</CodeGroup>

<Note>
  The `model` parameter is mapped to a21e's model tier system. Use `"auto"` to let a21e pick the best model, or specify `"economy"`, `"standard"`, or `"premium"`.
</Note>

## Option 3: Huddle (web interface)

1. Go to [a21e.com/huddle](https://a21e.com/huddle)
2. Type your request in the composer
3. Choose **Single** (fast, one model) or **Multi** (deliberation across models)
4. Get your response with full context and quality metadata in the sidebar

## What happens behind the scenes

When you submit an intent, a21e runs a pipeline:

```mermaid theme={null}
graph LR
    A[Your intent] --> B[Normalize & classify]
    B --> C[Select techniques]
    C --> D[Compile prompt]
    D --> E[Route to model]
    E --> F[Execute & score]
    F --> G[Return result]
```

Each step is observable — the API returns timing breakdowns, quality scores, and the techniques used.

## Next steps

<CardGroup cols={2}>
  <Card title="Intents guide" icon="bullseye" href="/guides/intents">
    Learn how intent submission works, including model tiers, constraints, and follow-ups.
  </Card>

  <Card title="API reference" icon="code" href="/api-reference/overview">
    Full API documentation with interactive playground.
  </Card>

  <Card title="Workspaces" icon="folder" href="/guides/workspaces">
    Set up workspaces with repo context, preferences, and personas.
  </Card>

  <Card title="BYOK setup" icon="key" href="/guides/byok">
    Bring your own LLM API keys to reduce credit usage.
  </Card>
</CardGroup>
