Skip to main content

LibreChat is joining ClickHouse. Learn more

LibreChat

Query Parameters

Open LibreChat with the endpoint, model, agent, prompt, and settings already chosen by adding query parameters to a chat URL.

You can add query parameters to a chat URL to pick the endpoint and model, load an agent or model spec, fill in the prompt, or change model settings before the chat starts. This is how you build a bookmark, a launcher shortcut (Raycast, Alfred, a browser keyword), or a link from another app that drops someone straight into the right setup.

https://chat.example.com/c/new?endpoint=anthropic&model=claude-sonnet-4-5&prompt=Summarize%20this%20article

Parameters work on a new chat (/c/new) and on an existing one (/c/<conversation-id>). After LibreChat reads them, it clears them from the address bar, so reloading the page doesn't apply them again.

Pick the endpoint and model

endpoint and model together are the most predictable combination.

  • endpoint alone switches to that endpoint and uses the model you last picked there, or the first model in its list.
  • model alone switches the model within the current endpoint, if that endpoint has it.

Built-in endpoint values are openAI, azureOpenAI, google, anthropic, bedrock, agents, assistants, and azureAssistants. For a custom endpoint, use the name from your config; the match is case-insensitive, so endpoint=openrouter finds an endpoint named OpenRouter.

Load an agent, assistant, or model spec

/c/new?agent_id=agent_abc123
/c/new?assistant_id=asst_abc123
/c/new?spec=meeting-notes

agent_id and assistant_id set the endpoint for you. spec loads a model spec by its name. Any other settings in the same URL are applied on top of the spec's preset. If your admin enforces model specs, include spec in every link, and expect the spec's own values to win over the URL.

Fill in or send the prompt

prompt (or the shorter q) puts text in the message box. If both are present, prompt wins.

Add submit=true to send it as soon as the chat is ready:

/c/new?endpoint=openAI&model=gpt-4o&prompt=Explain%20quantum%20computing&submit=true

If the requested settings can't be applied within a few seconds, the prompt is left in the message box instead of being sent. Your admin can also turn auto-send off, in which case submit=true only fills in the prompt and you press send yourself.

Values must be URL-encoded. In JavaScript, encodeURIComponent() does it:

const url = `/c/new?prompt=${encodeURIComponent('Write a function: def hello()')}`;
// /c/new?prompt=Write%20a%20function%3A%20def%20hello()

Change model settings

Any of these can be added to the URL. Each one only takes effect on endpoints that support it, and values are checked before they're applied; anything invalid is dropped without an error.

EndpointParameters
AnymaxContextTokens, resendFiles, promptPrefix (custom instructions)
OpenAI, Azure OpenAI, customtemperature, top_p, presence_penalty, frequency_penalty, stop, max_tokens, reasoning_effort, reasoning_summary, verbosity, useResponsesApi, disableStreaming, imageDetail (low, auto, high)
OpenAI Responses APIreasoning_mode (standard, pro), reasoning_context (auto, current_turn, all_turns)
OpenAI, Anthropic, Googleweb_search (true/false), fileTokenLimit (token cap for file content)
Anthropic, Googletemperature, topP, topK, maxOutputTokens, thinking, thinkingBudget, thinkingLevel
Anthropiceffort (low, medium, high, xhigh, max), thinkingDisplay (auto, summarized, omitted, or updates for only the progress notes between tool calls)
Anthropic, Bedrock (Anthropic models), OpenRouterpromptCache (true/false), promptCacheTtl (5m or 1h)
Googleurl_context=true lets Gemini read URLs in your message
Bedrockregion, maxTokens, temperature, topP, reasoning_effort
Assistantsinstructions (replaces the assistant's instructions for this run), append_current_datetime=true

The meaning and allowed values of each field are listed under model spec preset fields. Passing a value the provider rejects (a max_tokens above the model's limit, say) gives you an API error on send; start a New chat to clear it.

Set the color mode

If your admin enables it, theme=light, theme=dark, or theme=system on a link sets your color mode, so an app that links into LibreChat can hand over its own. It's saved as your preference until you change it in settings.

Setup

Query parameters work without setup. Admins can stop submit=true from sending automatically with interface.autoSubmitFromUrl, and enable the theme parameter with interface.colorModeFromUrl.

How is this guide?