Integration request from aimlapi.com - #535
Open
hugoaimlapi wants to merge 1 commit into
Open
hugoaimlapi wants to merge 1 commit into
hugoaimlapi wants to merge 1 commit into
Conversation
PageIndex already routes every non-OpenAI model through LiteLLM, so an aggregator works today with no code change — but nothing in the README says so, and the two roles pull in opposite directions: the index model wants to be cheap, the chat model wants to be the best available. Sourcing both from one OpenAI-compatible account removes a second key and a second billing relationship from that decision. Documents the aiml/ prefix, the AIML_API_KEY name LiteLLM actually reads (not AIMLAPI_API_KEY), and the per-lane backend= escape for callers who keep keys out of the environment.
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Hi! I'm Hugo from aimlapi.com — an AI aggregator that gives access to 1000+ models in one API, trusted by 400k+ users.
We'd love to be available as a verified provider option inside PageIndex — so we went ahead and did all the technical work on our side, in our fork: https://github.com/aimlapi/PageIndex-aimlapi
To build our partnership, we offer a 50/50 revenue share on all traffic from this integration.
My contacts: hugo@aimlapi.com (email / Slack), Telegram: @hug0the
Why
PageIndex passes
provider/modelnames to LiteLLM, so any LiteLLM provider already works forindex=andchat=. The README doesn't say so, or which env var each provider reads. The two roles also want different models (a basic one for indexing, the best you can afford for chat), and with a gateway both come from one key.What changed
README only, +20 lines: a "Model Providers" subsection under "Model Recommendations".
provider/modelgoes to that LiteLLM provider, which reads its own key from the environment.aiml/prefix:AIML_API_KEYin the environment,index="aiml/openai/gpt-4o-mini",chat="aiml/anthropic/claude-sonnet-4.5".GET https://api.aimlapi.com/v1/models),AIML_API_BASEto override the endpoint, and how to keep the key out of the environment:index_model=/chat_model=withindex_backend={"api_key": ...}andchat_backend={"api_key": ...}.No code changes, nothing added to requests.
How to test
Indexing and the answer should both complete with only
AIML_API_KEYset.Notes
aimlprovider (AIML_API_KEY,AIML_API_BASE, defaulthttps://api.aimlapi.com/v1) is in the pinned litellm 1.97.0, so no dependency change.