LlamaIndex with every AI model.

A Python framework for retrieval and agent apps over your own data. With a Nerdly key it reaches 503 models on one balance, paid per prompt.

Set it up

You need a Nerdly key (it starts with sk-nerd-): sign in on the API page to get one, and add credit in Billing.

  1. Install the core package and the OpenAI-like LLM integration.
    shell
    1pip install llama-index-core llama-index-llms-openai-like
  2. Put the key in an environment variable.
    shell
    1export NERDLY_API_KEY="sk-nerd-…"
  3. Build the LLM with OpenAILike; set context_window to the model’s figure on /models (32768 is an example value).
    python
    1import os
    2from llama_index.llms.openai_like import OpenAILike
    3
    4llm = OpenAILike(
    5 model="deepseek-v4-flash-0731",
    6 api_base="https://api.nerdly.us/v1",
    7 api_key=os.environ["NERDLY_API_KEY"],
    8 is_chat_model=True, # without it LlamaIndex posts to /completions
    9 is_function_calling_model=True,
    10 context_window=32768,
    11)
    12
    13print(llm.complete("Write a Python function that checks if a string is a palindrome."))

The examples use deepseek-v4-flash-0731, the most used coding model on Nerdly today; put any id from the models page in its place.

Which model to pick

  • Qwen4 35B A3B Uncensored (qwen4-35b-a3b-uncensored): $0.48 in, $2.40 out per million tokens, 1M context, about 1.4¢ an agent step.
  • Ergo Uncensored (ergo-uncensored): $4.40 in, $13.32 out per million tokens, 1M context, about $0.11 an agent step.
  • GLM-5.3 Abliterated (glm-5.3-abliterated): $2.33 in, $4.66 out per million tokens, 131K context, about 5.6¢ an agent step.
  • DeepSeek V4 Flash 0731 (deepseek-v4-flash-0731): $0.08 in, $0.12 out per million tokens, 1M context, about 0.19¢ an agent step.
  • DeepSeek V4.1 Flash 1017 (deepseek-v4.1-flash-1017): $0.25 in, $1.20 out per million tokens, 1M context, about 0.74¢ an agent step.
  • Claude Opus 5.5 (claude-opus-5-5): $2.80 in, $10 out per million tokens, 1M context, about 7.6¢ an agent step.

What a session costs

50 chat turns (about 2,000 tokens in and 500 out each) on DeepSeek V4 Flash 0731 cost about 1.1¢, paid from your balance. Every request LlamaIndex sends is priced by its tokens at the model’s rate; a cheaper model costs less, a larger one more.

Things that trip people up

  • Use OpenAILike, not OpenAI: the OpenAI class checks the model name against OpenAI’s own list and fails with Unknown model before any request.
  • is_chat_model defaults to False, which sends the legacy completions body; set it True.
  • context_window decides how much retrieved text goes into each prompt; copy it from the model’s row on /models.
  • Set is_function_calling_model=True only on a model that takes tool calls; otherwise agents never call a tool.
  • api_base missing its /v1 gives a 404.

LlamaIndex’s own documentation: docs.llamaindex.ai.

More guides

Questions.

Something else? Email hello@nerdly.us

Yes. LlamaIndex speaks the OpenAI format, which Nerdly serves for every model in its catalog. Set the base URL and your Nerdly key as above and pick any model id.

Any model in the catalog; the table above lists good starting points with live prices. You can switch models at any time by changing the id.

LlamaIndex itself is not billed by us; each request it sends is paid from your Nerdly balance at the model’s price per million tokens. As a guide, 50 chat turns (about 2,000 tokens in and 500 out each) on DeepSeek V4 Flash 0731 cost about 1.1¢. Top up from $10; nothing renews.

The key is missing, mistyped or revoked. Keys start with sk-nerd-; check there is no space or quote around it, and that LlamaIndex is sending it to https://api.nerdly.us and not to another provider.

Use the exact model id from the models page (for example claude-sonnet-5-5, not "Claude Sonnet"). GET https://api.nerdly.us/v1/models lists every id without a key.

Your balance does not cover the request. Add funds in Billing; plans include their models only in Nerdly’s own Chat and Code.

Run LlamaIndex on any model.

Get a key, add credit from $10, and point the tool at Nerdly.

Get a key
Join on TelegramHelp