Lyrebird AI GatewayFor non-sensitive work, including coding assistants
NON-SENSITIVE
NON-SENSITIVE

What Lyrebird is

Lyrebird AI Gateway is the department's single endpoint for AI models. It speaks the OpenAI API (and the Anthropic Messages API), so most SDKs and tools work by changing two settings: the base URL and the API key. Each key has its own usage limits and spend tracking, and can be revoked on its own.

Why "Lyrebird"? The superb lyrebird is famous for mimicking almost any sound it hears. This gateway does something similar: one endpoint speaks the OpenAI and Anthropic APIs in front of many different models.

Base URLhttps://<gateway host> (OpenAI clients add /v1)
AuthAuthorization: Bearer sk-… with your Lyrebird key
Prompt storagePrompts and responses are stored in the gateway database and can be read by gateway administrators.

Getting a key

Ask the platform engineering team for a Lyrebird API key. Keys are personal: don't share them or commit them to a repository. Keep them in environment variables named for this gateway, LYREBIRD_API_KEY and LYREBIRD_BASE_URL, so a Lyrebird key never gets picked up by another tool's config by accident.

Quick start

export LYREBIRD_BASE_URL="https://<gateway host>"
export LYREBIRD_API_KEY="sk-..."   # your personal key

List the models your key can use

curl -s "${LYREBIRD_BASE_URL}/v1/models" \
  -H "Authorization: Bearer ${LYREBIRD_API_KEY}"

Chat completion with curl

curl -s "${LYREBIRD_BASE_URL}/v1/chat/completions" \
  -H "Authorization: Bearer ${LYREBIRD_API_KEY}" \
  -H "Content-Type: application/json" \
  -d '{"model": "<model>", "messages": [{"role": "user", "content": "Hello!"}]}'

Python, OpenAI SDK

# pip install openai
import os
from openai import OpenAI

client = OpenAI(
    api_key=os.environ["LYREBIRD_API_KEY"],
    base_url=os.environ["LYREBIRD_BASE_URL"] + "/v1",
)
resp = client.chat.completions.create(
    model="<model>",
    messages=[{"role": "user", "content": "Summarise the water cycle in two sentences."}],
)
print(resp.choices[0].message.content)

Python, Anthropic SDK

# pip install anthropic
import os
from anthropic import Anthropic

client = Anthropic(
    api_key=os.environ["LYREBIRD_API_KEY"],
    base_url=os.environ["LYREBIRD_BASE_URL"],
)
msg = client.messages.create(
    model="<model>",
    max_tokens=512,
    messages=[{"role": "user", "content": "Summarise the water cycle in two sentences."}],
)
print(msg.content[0].text)

Coding assistants

Tools that let you set an OpenAI-compatible endpoint (Cline, Roo Code, Continue, GitHub Copilot's OpenAI-compatible provider and others) take the base URL with /v1 and your Lyrebird key. For Claude Code:

export ANTHROPIC_BASE_URL="${LYREBIRD_BASE_URL}"
export ANTHROPIC_AUTH_TOKEN="${LYREBIRD_API_KEY}"
claude

Coding agents send whole files and tool output to the model, so only use them on code and data that isn't sensitive.

Help

  • API reference (interactive Swagger) and ReDoc.
  • Gateway health: /health/liveness.
  • 401: the key is missing, mistyped, expired or revoked. 429: you've hit a rate limit or budget; wait, or ask for a higher limit.
  • Questions, new models or higher limits: the platform engineering team.
Lyrebird AI Gateway · NSW Department of Education · Powered by LiteLLM