Skip to main content
IMP exposes a direct pass-through to the internal LiteLLM proxy at /litellm/{project}/v1/.... Use it to call models by their LiteLLM model_list names from any tool that speaks the OpenAI protocol — without exposing the LiteLLM master key. This is the right path when you want to call a specific model directly (for batch jobs, embeddings, or custom integrations). For agent conversations, use the agent run endpoint or MCP instead.

Base URL

{project} is required: Requests without a valid {project} return 404 "Project not found or you do not have access to it.".

Authentication

Pass your IMP API key or session JWT — not the LiteLLM master key. The gateway strips your Authorization header and injects the master key upstream, so the master key never leaves the server. API key (recommended for non-interactive use) — pass it in the x-api-key (or exulu-api-key) header. API keys are not accepted in the Authorization header, which is reserved for session JWTs:
API keys have the format sk_<secret>/<keyname>. Session JWT: pass in Authorization: Bearer <token> as usual. Unauthenticated requests return 401.

Exposed surface

Only paths under /v1/ are proxied. Requests to any other path (LiteLLM admin paths like /model/new, /key/generate, /user/*) return 403 "Path ... is not exposed through the Exulu LiteLLM proxy." — admin paths fail closed by design. The /v1/ surface is LiteLLM’s OpenAI-compatible API:

Model names

Use the model_name values from your config.litellm.yaml model_list. These are not IMP agent names. See LiteLLM service for how to define models in the config.

Cost attribution

Every request is tagged with the authenticated user’s identity, role, team, and project. These tags flow through LiteLLM’s spend logging. Requests count against any budgets configured for the user, role, team, or project. Per-user default budgets are provisioned lazily on first request.

Streaming

Pass "stream": true in the request body. The response is a standard OpenAI SSE stream (text/event-stream). The gateway pipes the upstream response through transparently.

Worked example — openai npm client

IMP reads API keys from the x-api-key header. Pass your IMP API key via defaultHeaders and set apiKey to any non-empty string (the SDK requires it, but IMP ignores it when x-api-key is present):
For streaming:

Error reference

Errors from LiteLLM itself (model errors, quota exceeded, etc.) are passed through with their original status codes.

LiteLLM service

Configure models in config.litellm.yaml and manage the proxy.

MCP endpoint

Expose agents as MCP servers for Claude Desktop and other clients.

Agent run endpoint

Run an IMP agent with its full instruction set and knowledge.

API keys

Create and manage API keys for gateway authentication.