everyapi
Integration · Python LLM frameworkOpenAI-compatible · one key · live model catalog
LlamaIndex

Run the EveryAPI gateway inside LlamaIndex

LlamaIndex can use an OpenAI-compatible LLM instance for RAG and agent applications. Configure its OpenAI integration with the EveryAPI base URL, key, and a model ID from your account catalog, then test the LlamaIndex features your application uses.

01Setup code

One base URL line points LlamaIndex at EveryAPI

Default global Base URL / China-first Base URL: https://api.everyapi.ai/v1 / https://api-cn.everyapi.ai/v1

app.py
from llama_index.llms.openai import OpenAI
 
llm = OpenAI(
model="claude-sonnet-5", # use an ID available in your account
api_base="https://api.everyapi.ai/v1",
api_key="sk-everyapi-...",
)
 
response = llm.complete("Explain RAG in three sentences")
print(response)
02Steps

From zero to your first call

  1. Install LlamaIndex

    Install LlamaIndex and its OpenAI LLM integration: pip install llama-index llama-index-llms-openai.

  2. Set the LLM instance's api_base + api_key

    Use OpenAI(api_base="https://api.everyapi.ai/v1", api_key="sk-everyapi-...", model="...") in place of the default OpenAI() instance.

  3. Want a global default? Set Settings.llm

    After Settings.llm = everyapi_llm, every query engine / chat engine / agent uses it automatically — no need to pass the llm parameter each time.

03FAQ

LlamaIndex × EveryAPI

Why not use llama-index-llms-anthropic / llama-index-llms-gemini?

You can, but every upstream provider you add is another dependency. Going uniformly through llama-index-llms-openai + the EveryAPI base URL means one key, one dependency.