Skip to main content

Documentation Index

Fetch the complete documentation index at: https://docs.getlilac.com/llms.txt

Use this file to discover all available pages before exploring further.

Lilac is available as a native provider in OpenCode, so OpenCode is the recommended way to use Lilac in your local coding environment. Lilac’s API is also fully OpenAI-compatible, so you can use it with other tools like Continue, Cursor, or any client that supports a custom OpenAI-compatible endpoint.

Prerequisites

Before you start, make sure you have:
Don’t have an API key yet? See the API keys page for instructions on creating and managing keys.

OpenCode

OpenCode ships with Lilac as a built-in provider — no custom JSON config required.
1

Open OpenCode

opencode
2

Connect to Lilac

Type /connect.
3

Choose "Lilac"

Select Lilac from the provider list.
4

Enter your Lilac API key

Paste your Lilac API key from the dashboard.
5

Choose a model

Recommended:
  • GLM 5.1
  • Kimi K2.6
  • MiniMax M2.7
  • Gemma 4 31B IT

Troubleshooting OpenCode

If Lilac does not show up in OpenCode, refresh the model list:
opencode models lilac --refresh
Then restart OpenCode and try /connect again.

Other tools

For tools that don’t have a native Lilac integration, use Lilac’s OpenAI-compatible endpoint with a custom API configuration.

What you need to configure

Every tool that supports a custom API will ask you for three things. Here are the exact values to use:
SettingValue
API endpoint / Base URLhttps://api.getlilac.com/v1
API keyYour Lilac API key (from the dashboard)
Model namemoonshotai/kimi-k2.6 (example — swap for the model you want to use)
Model name examples:
  • moonshotai/kimi-k2.6
  • zai-org/glm-5.1
  • minimaxai/minimax-m2.7
  • google/gemma-4-31b-it
moonshotai/kimi-k2.6 is used as an example throughout this section. Replace it with the full model ID of whichever model you want to use — see Supported Models for the complete list.
You must use the exact model ID, including any vendor prefix (e.g. moonshotai/, zai-org/, google/, minimaxai/). Shorthand names like kimi or k2.6 will not work.

Step-by-step setup

1

Find your tool's API settings

Open your coding tool and look for settings related to AI provider, API configuration, custom model, or OpenAI-compatible endpoint. This is usually in the tool’s settings or preferences menu.
2

Set the API endpoint

Enter the following as the base URL or API endpoint:
https://api.getlilac.com/v1
Make sure you include /v1 at the end. Omitting it will cause requests to fail.
3

Enter your API key

Paste your Lilac API key into the API key field. This is the key you copied when you created it in the dashboard.
Store your API key as an environment variable (e.g., LILAC_API_KEY) rather than pasting it directly into config files that might get committed to version control.
4

Set the model name

Enter the full model ID for the model you want to use. For example:
moonshotai/kimi-k2.6
moonshotai/kimi-k2.6 is just an example — replace it with the ID of whichever model you want to use (e.g. zai-org/glm-5.1, google/gemma-4-31b-it, minimaxai/minimax-m2.7). See Supported Models for the full list. Do not omit or change any part of the identifier, including the vendor prefix.
5

Test the connection

Send a test message to confirm everything is working. If you get a response, you’re all set.If you get an error, double-check:
  1. The base URL is exactly https://api.getlilac.com/v1 (with /v1)
  2. Your API key is correct and hasn’t been revoked
  3. The model name is the exact full identifier of a supported model (e.g. moonshotai/kimi-k2.6)
  4. Your account has a positive credit balance

Quick reference

If your tool uses a config file or environment variables, here’s what to set:
# Environment variables
export OPENAI_API_BASE=https://api.getlilac.com/v1
export OPENAI_API_KEY=your-lilac-api-key
{
  "apiBase": "https://api.getlilac.com/v1",
  "apiKey": "your-lilac-api-key",
  "model": "moonshotai/kimi-k2.6"
}
moonshotai/kimi-k2.6 is shown here as an example. Substitute the full ID of the model you want to use — see Supported Models.
Variable names differ by tool. The examples above use common conventions — check your tool’s documentation for the exact names.

Common issues

Run opencode models lilac --refresh, then restart OpenCode and try /connect again.
Your API key is missing, incorrect, or has been revoked. Generate a new key from the dashboard and try again.
The base URL is likely wrong. Make sure it is https://api.getlilac.com/v1 — including the /v1 path.
The model name must be the full identifier of a supported model — for example moonshotai/kimi-k2.6. Check for typos, extra spaces, or a missing vendor prefix.
Confirm your machine has internet access and that no firewall or proxy is blocking requests to api.getlilac.com.
Your account balance is zero. Add credits in the dashboard billing page before making requests.