Skip to main content
Lilac provides an OpenAI-compatible API. If you’re already using the OpenAI SDK, you only need to change the base URL and API key.

Migrating from OpenAI

from openai import OpenAI

# Before (OpenAI)
client = OpenAI(api_key="sk-...")

# After (Lilac) — just change base_url and api_key
client = OpenAI(
    base_url="https://api.getlilac.com/v1",
    api_key="your-lilac-api-key",
)

# Everything else stays the same
response = client.chat.completions.create(
    model="moonshotai/kimi-k2.5",
    messages=[{"role": "user", "content": "Hello!"}],
)

Supported Endpoints

EndpointStatus
POST /v1/chat/completionsSupported
POST /v1/completionsSupported (legacy)
POST /v1/responsesSupported
GET /v1/modelsSupported

Supported Features

FeatureStatus
Chat completionsSupported
StreamingSupported
System messagesSupported
Vision (image inputs)Supported
Tool / function callingSupported
Structured output (JSON mode)Supported
Reasoning (thinking on/off)Supported
Temperature, top_p, top_k, min_pSupported
Frequency & presence penaltiesSupported
Log probabilitiesSupported
Seed (deterministic sampling)Supported
Stop sequencesSupported
Multiple choices (n)Supported

Not Yet Supported

The following OpenAI features are not currently available:
  • Embeddings
  • Audio
  • Fine-tuning
  • Assistants API
  • Batch API
  • File uploads
We’re actively expanding API coverage. Let us know which features matter most to you.