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.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.
Prerequisites
Before you start, make sure you have:- A Lilac account with credits loaded — sign up here
- A Lilac API key — create one in the dashboard
- OpenCode or another local coding tool
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.Enter your Lilac API key
Paste your Lilac API key from the dashboard.
Troubleshooting OpenCode
If Lilac does not show up in OpenCode, refresh the model list:/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:| Setting | Value |
|---|---|
| API endpoint / Base URL | https://api.getlilac.com/v1 |
| API key | Your Lilac API key (from the dashboard) |
| Model name | moonshotai/kimi-k2.6 (example — swap for the model you want to use) |
moonshotai/kimi-k2.6zai-org/glm-5.1minimaxai/minimax-m2.7google/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.Step-by-step setup
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.
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.
Set the model name
Enter the full model ID for the model you want to use. For example:
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.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:
- The base URL is exactly
https://api.getlilac.com/v1(with/v1) - Your API key is correct and hasn’t been revoked
- The model name is the exact full identifier of a supported model (e.g.
moonshotai/kimi-k2.6) - Your account has a positive credit balance
Quick reference
If your tool uses a config file or environment variables, here’s what to set: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
Lilac does not appear in OpenCode
Lilac does not appear in OpenCode
Run
opencode models lilac --refresh, then restart OpenCode and try /connect again.401 Unauthorized
401 Unauthorized
404 Not Found
404 Not Found
The base URL is likely wrong. Make sure it is
https://api.getlilac.com/v1 — including the /v1 path.Model not found
Model not found
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.Connection timeout or refused
Connection timeout or refused
Confirm your machine has internet access and that no firewall or proxy is blocking requests to
api.getlilac.com.Insufficient credits
Insufficient credits
Your account balance is zero. Add credits in the dashboard billing page before making requests.

