Loading
Loading
The API accepts requests in the OpenAI API format. Any client that supports OpenAI(base_url=…) works without code changes.
The base URL is https://llmproxy.org/v1; send the key in the Authorization: Bearer sk-max-… header.
export OPENAI_BASE_URL="https://llmproxy.org/v1"export OPENAI_API_KEY="sk-max-..."
The official OpenAI SDKs read OPENAI_BASE_URL and OPENAI_API_KEY. Set them, and you may not need to change any code at all.
from openai import OpenAIimport os client = OpenAI( base_url="https://llmproxy.org/v1", api_key=os.environ["LLMPROXY_API_KEY"],)
from langchain_openai import ChatOpenAIimport os llm = ChatOpenAI( model="mistralai/mistral-nemo", base_url="https://llmproxy.org/v1", api_key=os.environ["LLMPROXY_API_KEY"],)print(llm.invoke("Hello!").content)
import { createOpenAI } from "@ai-sdk/openai";import { generateText } from "ai"; const llmproxy = createOpenAI({ baseURL: "https://llmproxy.org/v1", apiKey: process.env.LLMPROXY_API_KEY,}); const { text } = await generateText({ // chat(...) — Chat Completions, not the Responses API model: llmproxy.chat("mistralai/mistral-nemo"), prompt: "Hello!",});
Any other client with an “OpenAI-compatible base URL” setting connects the same way: the address https://llmproxy.org/v1 and an sk-max-… key.
| Method | Path | Purpose |
|---|---|---|
| GET | /v1/models | Models with prices |
| GET | /v1/models/{id} | A single model |
| POST | /v1/chat/completions | Chat, streaming, tools |
| POST | /v1/embeddings | Embeddings |
| POST | /v1/images/generations | Image generation |
| GET | /v1/billing/balance | Balance (our method, not OpenAI) |
| GET | /v1/billing/usage | Usage by request (our method) |
| GET | /v1/billing/transactions | Balance transactions (our method) |
Other OpenAI paths (for example, /v1/responses) aren’t served: the API returns a JSON 404 unknown_endpoint error that SDKs can parse.
model takes an id from the catalog. In responses and stream chunks, model is also the catalog id, not the provider’s name. .n greater than 1 isn’t supported in chat (HTTP 400).x-maxai-charged-cents and x-maxai-charged-usd headers. .error.message, error.type, error.code, error.param); Anthropic and Google errors are mapped to it with the status preserved. .