# How to use custom LLM API in Playground

**URL:** <https://forum.langchain.com/t/how-to-use-custom-llm-api-in-playground/3164>\
**Category:** LangSmith Product Help\
**Created:** [March 14, 2026, 6:18am UTC](https://forum.langchain.com/t/how-to-use-custom-llm-api-in-playground/3164 "2026-03-14T06:18:52Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![kun1s2](https://yyz1.discourse-cdn.com/flex007/user_avatar/forum.langchain.com/kun1s2/32/2455_2.png) [@kun1s2](https://forum.langchain.com/u/kun1s2)\
**Post date:** [March 14, 2026, 6:18am UTC](https://forum.langchain.com/t/how-to-use-custom-llm-api-in-playground/3164/1 "2026-03-14T06:18:52Z")

</div>

![image](https://canada1.discourse-cdn.com/flex007/uploads/langchain/original/2X/a/a5909c5859f5ef25eba40c30616aff1dc92a2ce3.png)

---

<div class="post-metadata">

**Author:** ![kun1s2](https://yyz1.discourse-cdn.com/flex007/user_avatar/forum.langchain.com/kun1s2/32/2455_2.png) [@kun1s2](https://forum.langchain.com/u/kun1s2)\
**Post date:** [March 14, 2026, 6:21am UTC](https://forum.langchain.com/t/how-to-use-custom-llm-api-in-playground/3164/2 "2026-03-14T06:21:21Z")

</div>

I have set up a custom LLM API, but it still prompts me to enter the Open AI key

 ![image](https://canada1.discourse-cdn.com/flex007/uploads/langchain/original/2X/7/7feb5ae12df79459bc1d2cc631b072a194a19c74.png)

---

<div class="post-metadata">

**Author:** ![keenborder786](https://yyz1.discourse-cdn.com/flex007/user_avatar/forum.langchain.com/keenborder786/32/1757_2.png) [@keenborder786](https://forum.langchain.com/u/keenborder786)\
**Post date:** [March 14, 2026, 9:55pm UTC](https://forum.langchain.com/t/how-to-use-custom-llm-api-in-playground/3164/3 "2026-03-14T21:55:33Z")

</div>

Hello @kun1s2  
**Yes, you can use a custom LLM in the LangSmith Playground by adding a workspace model configuration that points to your provider (or an OpenAI/Anthropic-compatible endpoint).**

You do this by adding a workspace secret for the provider API key, then creating a Model Configuration in Settings and making it available for the Playground. If your model’s API is wire-compatible with OpenAI or Anthropic, you can simply set the provider to `OpenAI`/`Anthropic` and point **`base_url`** to your endpoint; otherwise use any supported provider integration. `Playground` uses the workspace model configurations to populate the model dropdown and run calls.

```auto
// Quick steps (UI)
1. In LangSmith: Settings → Secrets → Add secret
   - Key: e.g. `OPENAI_API_KEY` (or the env var name your provider expects)
   - Value: your API key

2. Settings → Model Configurations → + Create
   - Provider: select the provider (e.g., OpenAI / Anthropic / other)
   - Model: enter the model identifier (e.g., `my-llm-v1` or provider/model)
   - API Key Name: the secret name you added (`OPENAI_API_KEY`)
   - Provider config / Extra Parameters: set `base_url` or other params if needed
   - Save & enable the configuration for the Playground feature

3. Open Playground → Prompt Settings → choose the saved configuration from the Model dropdown

```

 ![Screenshot 2026-03-15 at 2.53.30 AM](https://canada1.discourse-cdn.com/flex007/uploads/langchain/original/2X/2/29e3d07dd5d6c521f347e3ac4117114adb308583.png)

 ![Screenshot 2026-03-15 at 2.53.50 AM](https://canada1.discourse-cdn.com/flex007/uploads/langchain/original/2X/4/49efb16c13fcdbd614bdbefe1b0958e934fba35b.png)

**Relevant docs:**

- [Manage model configurations](https://docs.langchain.com/langsmith/model-configurations)
- [Prompt engineering concepts (Playground)](https://docs.langchain.com/langsmith/prompt-engineering-concepts)
- [Use tools in a prompt](https://docs.langchain.com/langsmith/use-tools)
