# Use Hanzo AI with LlamaIndex — Hanzo AI > Use LlamaIndex with Hanzo AI to build powerful RAG applications, data agents, and query pipelines. Drop in Hanzo as your LLM provider with zero friction. [Integrations](https://hanzo.ai/integrations)/LlamaIndex 🦙Frameworks # Use Hanzo AI with LlamaIndex Use LlamaIndex with Hanzo AI to build powerful RAG applications, data agents, and query pipelines. Drop in Hanzo as your LLM provider with zero friction. Base URL: `https://api.hanzo.ai/v1` API Key: Get yours at [hanzo.ai/signup](https://hanzo.ai/signup) · Fully OpenAI-compatible · 500+ models available 🦙 Created by [LlamaIndex](https://llamaindex.ai) License: MIT · [View source on GitHub →](https://github.com/run-llama/llama_index) Hanzo AI is OpenAI-compatible, so existing LlamaIndex code works with zero refactoring. We deeply appreciate the LlamaIndex team for building and maintaining this open-source project. ## Basic setup python ``` pip install llama-index llama-index-llms-openai from llama_index.llms.openai import OpenAI from llama_index.core import Settings Settings.llm = OpenAI( model="zen4-pro", api_key="your-hanzo-api-key", api_base="https://api.hanzo.ai/v1", ) ``` ## RAG pipeline python ``` from llama_index.core import VectorStoreIndex, SimpleDirectoryReader from llama_index.llms.openai import OpenAI from llama_index.embeddings.openai import OpenAIEmbedding Settings.llm = OpenAI( model="zen4-pro", api_key="your-hanzo-api-key", api_base="https://api.hanzo.ai/v1", ) Settings.embed_model = OpenAIEmbedding( api_key="your-hanzo-api-key", api_base="https://api.hanzo.ai/v1", ) documents = SimpleDirectoryReader("./data").load_data() index = VectorStoreIndex.from_documents(documents) query_engine = index.as_query_engine() response = query_engine.query("What is in these docs?") ``` ## Chat engine python ``` chat_engine = index.as_chat_engine( chat_mode="condense_plus_context", verbose=True, ) response = chat_engine.chat("Tell me more about this topic") ``` ## Streaming query python ``` streaming_response = query_engine.query( "Summarize the key points", streaming=True, ) streaming_response.print_response_stream() ``` ## Ready to get started? Create a free account and get your API key. 100K API calls/month free forever. [Get API Key — Free](https://hanzo.ai/signup)[Browse Models](https://hanzo.ai/models) ## More integrations [OpenAI Python SDK](https://hanzo.ai/integrations/openai-sdk)[Anthropic SDK](https://hanzo.ai/integrations/anthropic-sdk)[LangChain](https://hanzo.ai/integrations/langchain)[Vercel AI SDK](https://hanzo.ai/integrations/vercel-ai-sdk)[Hugging Face](https://hanzo.ai/integrations/huggingface)[AutoGen](https://hanzo.ai/integrations/autogen)[CrewAI](https://hanzo.ai/integrations/crewai)[DSPy](https://hanzo.ai/integrations/dspy)[Haystack](https://hanzo.ai/integrations/haystack)[Cursor](https://hanzo.ai/integrations/cursor)[Continue.dev](https://hanzo.ai/integrations/continue-dev)[GitHub Copilot](https://hanzo.ai/integrations/github-copilot)[Docker](https://hanzo.ai/integrations/docker)[Kubernetes](https://hanzo.ai/integrations/kubernetes)[Python](https://hanzo.ai/integrations/python)[TypeScript](https://hanzo.ai/integrations/typescript)[Go](https://hanzo.ai/integrations/go)[Rust](https://hanzo.ai/integrations/rust)