Topic
LlamaIndex LLM API Integration
12 posts on llamaindex llm api integration — part of api integration on the n4n AI blog.
Switching LlamaIndex between GPT-4o and Llama 3.1 via routing
Learn how to implement llamaindex gpt-4o llama 3.1 routing with OpenAI-compatible endpoints, dynamic model selection, and verification steps for production.
LlamaIndex token counting and cost tracking across providers
A practical guide to implementing llamaindex token counting cost tracking across multiple LLM providers, with runnable code and verification steps.
LlamaIndex streaming responses with OpenAI-compatible APIs
Step-by-step guide to implementing LlamaIndex streaming with OpenAI-compatible APIs, including config, query engines, and FastAPI integration.
LlamaIndex retry logic for provider fallback and rate limits
Implement robust LlamaIndex retry logic for provider fallback and rate limits with custom handlers, exponential backoff, and multi-model failover.
LlamaIndex query engines with custom base_url configuration
Step-by-step guide to llamaindex query engine base_url config for custom OpenAI-compatible endpoints, including code samples and verification steps.
LlamaIndex embeddings vs chat completions: separate endpoints
A head-to-head comparison of LlamaIndex embeddings and chat completions as separate endpoints across cost, latency, ergonomics, and limits.
LlamaIndex agent tool calling with OpenAI-compatible models
Hands-on tutorial for building LlamaIndex agents with tool calling against OpenAI-compatible APIs, including setup, code, and production routing tips.
LlamaIndex vs LangChain for gateway-routed LLM integration
A head-to-head comparison of LlamaIndex and LangChain for routing LLM calls through an inference gateway, covering ergonomics, cost, latency, and limits.
LlamaIndex OpenAILike class for custom LLM endpoints
Configure LlamaIndex's OpenAILike class to route to any OpenAI-compatible LLM endpoint, with runnable code for auth, base URL, and fallback handling.
Configuring LlamaIndex to use an OpenAI-compatible LLM gateway
Step-by-step guide to point LlamaIndex at an OpenAI-compatible LLM gateway, including env setup, code, and verification for reliable inference.
Building a RAG pipeline in LlamaIndex with n4n.ai
Hands-on tutorial for building a LlamaIndex RAG pipeline with n4n.ai as an OpenAI-compatible LLM gateway, covering setup, indexing, and queries.
Building a chat engine in LlamaIndex with n4n.ai's API
Hands-on tutorial for building a LlamaIndex chat engine on n4n.ai's OpenAI-compatible API, with step-by-step runnable code for simple and context-aware chat.
More topics in api integration
- Function Calling Fundamentals27
- Structured Outputs & JSON Mode19
- cURL LLM API Cookbook15
- Integrating GPT-5, Claude Opus 4.8, Gemini 3, Llama 4 & More via One API15
- Next.js AI Chat Integration (App Router + Vercel AI SDK)15
- FastAPI LLM Backend Integration14
- Go net/http LLM API Client14
- LangChain + OpenAI-Compatible Gateway Integration14
- Node.js OpenAI-Compatible SDK Integration14
- Python + OpenAI-Compatible SDK Integration14
- Rate Limits, Retries & Backoff Strategies14
- React Streaming Chat UI Patterns14