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

# Quickstart

> Get up and running with Orchata in under 5 minutes

This guide walks you through creating your first space, uploading a document, and querying your knowledge base.

## Prerequisites

<Info>
  You'll need an Orchata account. Sign up at [app.orchata.ai](https://app.orchata.ai) if you haven't already.
</Info>

<Note>
  New accounts start on the **Sandbox** tier, which includes 1 space, 50 documents per space, 100 daily API calls, and 7-day data retention. This is perfect for testing and evaluation. [View all plans](/getting-started/plans) to see tier limits and upgrade options.
</Note>

## Step 1: Get Your API Key

<Steps>
  <Step title="Navigate to API Keys">
    Go to **API Keys** in the Orchata dashboard.
  </Step>

  <Step title="Create a New Key">
    Click **Create API Key**, give it a name, and copy the key.

    <Warning>
      Store your API key securely. You won't be able to see it again after closing the dialog.
    </Warning>
  </Step>
</Steps>

## Step 2: Create a Space

Spaces are containers for related documents. Let's create one for product documentation.

<Tabs>
  <Tab title="cURL">
    ```bash theme={null}
    curl -X POST https://api.orchata.ai/spaces \
      -H "Oai-Api-Key: your-api-key" \
      -H "Content-Type: application/json" \
      -d '{
        "name": "Product Documentation",
        "description": "Technical docs for our product"
      }'
    ```
  </Tab>

  <Tab title="Dashboard">
    1. Click **+ Create Space** in the sidebar
    2. Enter a name and description
    3. Click **Create**
  </Tab>
</Tabs>

<ResponseExample>
  ```json Response theme={null}
  {
    "id": "spc_abc123",
    "name": "Product Documentation",
    "description": "Technical docs for our product",
    "slug": "product-documentation",
    "createdAt": "2024-01-15T10:30:00Z"
  }
  ```
</ResponseExample>

Save the `id` value - you'll need it for the next steps.

## Step 3: Upload a Document

Add your first document to the space. Orchata automatically handles chunking and embedding.

<Tabs>
  <Tab title="cURL">
    ```bash theme={null}
    curl -X POST https://api.orchata.ai/spaces/spc_abc123/documents \
      -H "Oai-Api-Key: your-api-key" \
      -H "Content-Type: application/json" \
      -d '{
        "content": "# Getting Started\n\nWelcome to our product! This guide will help you get up and running quickly.\n\n## Installation\n\nRun `npm install our-product` to install.\n\n## Configuration\n\nCreate a config file at `~/.config/our-product.json`.",
        "filename": "getting-started.md"
      }'
    ```
  </Tab>

  <Tab title="Dashboard">
    1. Open your space
    2. Click **Upload Document**
    3. Select the file you want to upload
    4. Click **Upload**
  </Tab>
</Tabs>

<ResponseExample>
  ```json Response theme={null}
  {
    "id": "doc_xyz789",
    "spaceId": "spc_abc123",
    "filename": "getting-started.md",
    "status": "processing",
    "createdAt": "2024-01-15T10:35:00Z"
  }
  ```
</ResponseExample>

<Note>
  Documents start with `status: "processing"`. Wait a few seconds for embedding to complete before querying.
</Note>

## Step 4: Query Your Knowledge

Now search your knowledge base using natural language.

<Tabs>
  <Tab title="cURL">
    ```bash theme={null}
    curl -X POST https://api.orchata.ai/query \
      -H "Oai-Api-Key: your-api-key" \
      -H "Content-Type: application/json" \
      -d '{
        "query": "How do I install the product?",
        "spaceIds": ["spc_abc123"],
        "limit": 5
      }'
    ```
  </Tab>

  <Tab title="Dashboard">
    1. Click **Query** in the sidebar
    2. Select your space
    3. Enter your question
    4. View the results
  </Tab>
</Tabs>

<ResponseExample>
  ```json Response theme={null}
  {
    "results": [
      {
        "content": "## Installation\n\nRun `npm install our-product` to install.",
        "score": 0.92,
        "documentId": "doc_xyz789",
        "metadata": {}
      }
    ],
    "query": "How do I install the product?"
  }
  ```
</ResponseExample>

## Next Steps

<CardGroup cols={2}>
  <Card title="Core Concepts" icon="lightbulb" href="/getting-started/concepts">
    Deep dive into Spaces, Documents, and Queries.
  </Card>

  <Card title="Authentication" icon="key" href="/getting-started/authentication">
    Learn about API keys and permissions.
  </Card>

  <Card title="MCP Setup" icon="plug" href="/mcp/overview">
    Connect AI assistants to your knowledge base.
  </Card>

  <Card title="API Reference" icon="code" href="/api-reference/introduction">
    Explore all available endpoints.
  </Card>
</CardGroup>
