Databricks Primer
Wire Meridian into a Databricks workspace in under fifteen minutes. This recipe walks you through workspace prep, model gateway routing, and a first-call sanity check against the Meridian LLM gateway so your notebooks can call any of the 250+ catalog models with a single client.
1. Provision the workspace
Spin up a Premium-tier workspace in the closest region to your users. Enable Unity Catalog so secrets land in a governed scope, and attach a single-node cluster with Databricks Runtime 14.3 LTS for the warmup calls.
- Premium tier or higher (token-based REST auth)
- Unity Catalog enabled for secret governance
- DBR 14.3 LTS, single-node, 16GB driver
2. Store the Meridian gateway key
Drop your Meridian key into a Databricks secret scope. Never paste it inline in a notebook cell — downstream cluster logs would capture it. Use the CLI:
databricks secrets create-scope meridian
databricks secrets put-secret \
--scope meridian \
--key gateway_api_key
# Read it back inside a notebook
import os
key = dbutils.secrets.get("meridian", "gateway_api_key")
os.environ["MERIDIAN_API_KEY"] = key3. First call from a notebook
With the secret loaded, point the OpenAI-compatible client at the Meridian base URL. Use the adaptive router so the gateway picks the best backend per prompt — you keep one model name across cells.
from openai import OpenAI
client = OpenAI(
base_url="https://llm.getnimbus.net/v1",
api_key=os.environ["MERIDIAN_API_KEY"],
)
resp = client.chat.completions.create(
model="meridian/model-router",
messages=[
{"role": "user", "content": "Summarize Delta Lake in 1 line."}
],
)
print(resp.choices[0].message.content)