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

# LlamaIndex TS

> Using Requesty with LlamaIndex TS

<CardGroup>
  <Card title="GitHub" icon="github" href="https://github.com/requestyai/llamaindex-ts">
    View adapter source code
  </Card>

  <Card title="npm" icon="npm" href="https://www.npmjs.com/package/@requesty/llamaindex">
    View adapter NPM package
  </Card>
</CardGroup>

The Requesty adapter for LlamaIndex TypeScript provides a seamless integration to access over 300 large language models through the Requesty platform within your LlamaIndex applications.

## Setup

```bash theme={"dark"}
# For pnpm
pnpm add @requesty/llamaindex

# For npm
npm install @requesty/llamaindex

# For yarn
yarn add @requesty/llamaindex
```

## API Key Setup

For security, you should set your API key as an environment variable named exactly `REQUESTY_API_KEY`:

```bash theme={"dark"}
# Linux/Mac
export REQUESTY_API_KEY=your_api_key_here

# Windows Command Prompt
set REQUESTY_API_KEY=your_api_key_here

# Windows PowerShell
$env:REQUESTY_API_KEY="your_api_key_here"
```

## Basic Usage

The adapter provides a simple interface to use Requesty models within your LlamaIndex TypeScript applications:

```typescript theme={"dark"}
import { requesty } from "llamaindex-requesty";

const llm = requesty({
  model: "openai/gpt-4o-mini",
  apiKey: process.env.REQUESTY_API_KEY,
  baseURL: "https://your-requesty-endpoint.com/v1"
});

const response = await llm.chat({
  messages: [{ role: "user", content: "Hello!" }]
});
```

## Supported Models

You can use any model available through Requesty.
Find the complete list of available models at [app.requesty.ai/models](https://app.requesty.ai/models).

## Features

<CardGroup cols={2}>
  <Card title="300+ Models" icon="brain">
    Access models from OpenAI, Anthropic, Google, Mistral, and many other providers
  </Card>

  <Card title="Streaming Support" icon="bars-staggered">
    Full support for streaming responses for real-time applications
  </Card>

  <Card title="Structured Output" icon="code">
    Support for structured output using Zod schemas
  </Card>

  <Card title="Tool Calling" icon="screwdriver-wrench">
    Utilize function/tool calling capabilities with supported models
  </Card>

  <Card title="Multi-Agent Workflows" icon="users">
    Support for complex multi-agent workflow configurations
  </Card>

  <Card title="Analytics & Telemetry" icon="chart-line">
    Powerful telemetry and analytics capabilities built-in
  </Card>
</CardGroup>

## Getting Started

For detailed usage examples, configuration options, and advanced features, please refer to the [GitHub repository](https://github.com/requestyai/llamaindex-ts) which contains comprehensive documentation and examples to help you get started with the integration.

The adapter is designed to work seamlessly with existing LlamaIndex TypeScript applications while providing access to Requesty's powerful model routing and analytics capabilities.
