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

# Quickstart

> Install the SDK and run your first query in under 2 minutes

## Install

<Tabs>
  <Tab title="pip">
    ```bash theme={null}
    pip install vrin
    ```
  </Tab>

  <Tab title="npm">
    ```bash theme={null}
    npm install -g @vrin/cli
    ```
  </Tab>
</Tabs>

Requires Python 3.9+.

## Get an API key

Sign up at [vrin.cloud](https://vrin.cloud) to get your API key, then set it:

```bash theme={null}
export VRIN_API_KEY=vrin_live_your_api_key
```

Or create one from the CLI:

```bash theme={null}
vrin auth login you@example.com
vrin auth create-key --name "my-project"
```

## Insert knowledge

<Tabs>
  <Tab title="CLI">
    ```bash theme={null}
    vrin insert "ACME Corp reported $50M revenue in Q4 2025, up 23% YoY. CEO Jane Smith attributed growth to enterprise." --title "ACME Q4"
    ```
  </Tab>

  <Tab title="Python">
    ```python theme={null}
    from vrin import VRINClient

    client = VRINClient(api_key="vrin_live_your_api_key")
    client.insert(
        "ACME Corp reported $50M revenue in Q4 2025, up 23% year-over-year. "
        "CEO Jane Smith attributed growth to the enterprise segment.",
        title="ACME Q4 2025 Earnings"
    )
    ```
  </Tab>

  <Tab title="curl">
    ```bash theme={null}
    curl -X POST https://api.vrin.cloud/insert \
      -H "Authorization: Bearer vrin_live_your_api_key" \
      -H "Content-Type: application/json" \
      -d '{"content": "ACME Corp reported $50M revenue in Q4 2025...", "title": "ACME Q4"}'
    ```
  </Tab>
</Tabs>

VRIN automatically chunks the text, extracts structured facts, and indexes everything in the knowledge graph.

## Query

<Tabs>
  <Tab title="CLI">
    ```bash theme={null}
    vrin query "What is ACME's revenue?"
    ```
  </Tab>

  <Tab title="Python">
    ```python theme={null}
    result = client.query("What is ACME's revenue?")
    print(result["summary"])
    ```
  </Tab>

  <Tab title="curl">
    ```bash theme={null}
    curl -X POST https://api.vrin.cloud/query \
      -H "Authorization: Bearer vrin_live_your_api_key" \
      -H "Content-Type: application/json" \
      -d '{"query": "What is ACME revenue?"}'
    ```
  </Tab>
</Tabs>

## Stream responses

```bash theme={null}
vrin query "Summarize ACME's Q4 performance" --stream
```

```python theme={null}
for token in client.query("Summarize ACME's Q4 performance", stream=True):
    print(token, end="", flush=True)
```

## Upload files

```bash theme={null}
vrin upload ./earnings_report.pdf
```

```python theme={null}
client.upload_file("earnings_report.pdf")
```

## Bulk insert

Insert many documents at once from a JSON file:

```bash theme={null}
vrin bulk-insert ./papers.json --tag research
```

## Multi-turn conversations

```bash theme={null}
vrin query "What was ACME's Q4 revenue?" --json
# Note the session_id in the response

vrin query "How does that compare to Q3?" --session-id "sess_abc123"
```

```python theme={null}
client.start_conversation()
r1 = client.continue_conversation("What was ACME's Q4 revenue?")
r2 = client.continue_conversation("How does that compare to Q3?")
client.end_conversation()
```

## For AI agents

VRIN is designed to be called by AI agents. When stdout is not a TTY (piped or called programmatically), output is automatically JSON. Use `vrin --describe` to get a machine-readable schema of all commands.

```bash theme={null}
# Auto-discovery for agents
vrin --describe

# Programmatic usage (always JSON)
vrin query "What is ACME's revenue?" --json
vrin facts "ACME" --json
```

## Next steps

* [CLI reference](/cli/overview) : full command documentation
* [Query options](/sdk/querying) : response modes, depth levels, model overrides
* [Knowledge management](/sdk/knowledge) : async jobs, knowledge graph, tags
