SDKs need a base URL. Raw HTTP clients need the complete endpoint path.
Base URL
https://api.locai.com.au/v1
Model
LocAI-GoBase URL
https://api.locai.com.au/anthropic
Model
LocAI-GoAuthorization: Bearer
LC_PandaMoney_<your_key>Only the public routes implemented by the LocAI Gateway are listed here.
Replace the placeholder with a key created in your LocAI dashboard.
from openai import OpenAI
client = OpenAI(
api_key="LC_PandaMoney_<your_key>",
base_url="https://api.locai.com.au/v1",
)
response = client.chat.completions.create(
model="LocAI-Go",
messages=[{"role": "user", "content": "Hello, LocAI!"}],
)
print(response.choices[0].message.content)import OpenAI from "openai";
const client = new OpenAI({
apiKey: process.env.LOCAI_API_KEY,
baseURL: "https://api.locai.com.au/v1",
});
const response = await client.chat.completions.create({
model: "LocAI-Go",
messages: [{ role: "user", content: "Hello, LocAI!" }],
});
console.log(response.choices[0].message.content);curl -X POST "https://api.locai.com.au/v1/chat/completions" \
-H "Authorization: Bearer LC_PandaMoney_<your_key>" \
-H "Content-Type: application/json" \
-d '{
"model": "LocAI-Go",
"messages": [{"role": "user", "content": "Hello, LocAI!"}]
}'from anthropic import Anthropic
client = Anthropic(
api_key="LC_PandaMoney_<your_key>",
base_url="https://api.locai.com.au/anthropic",
)
message = client.messages.create(
model="LocAI-Go",
max_tokens=512,
messages=[{"role": "user", "content": "Hello, LocAI!"}],
)
print(message.content[0].text)Enable bounded Gateway-managed search for requests that need current or verifiable information.
X-LocAI-Agent: managed
X-LocAI-Web-Search: autooff disables managed search.auto searches when needed.required attempts one bounded search.
Start with LocAI-Go and the exact connection settings above.
Read the Docs