n4nAI

Topic

LlamaIndex LLM API Integration

12 posts on llamaindex llm api integration — part of api integration on the n4n AI blog.

API integrationHow-to

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.

3 min read
API integrationHow-to

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.

3 min read
API integrationHow-to

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.

4 min read
API integrationHow-to

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.

3 min read
API integrationHow-to

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.

3 min read
API integrationComparison

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.

5 min read
API integrationTutorial

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.

3 min read
API integrationComparison

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.

5 min read
API integrationHow-to

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.

4 min read
API integrationHow-to

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.

3 min read
API integrationTutorial

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.

3 min read
API integrationTutorial

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.

3 min read