Call a chat model (OpenAI Chat Completions).
Calls a model of type chat in the OpenAI Chat Completions format, whatever company makes or
runs the model: GPT, Claude, Gemini, Mistral and Nova models alike. The official OpenAI SDK works
unchanged with the base URL https://api.galilea.ai/v1/llm and the Galilea API key as its API
key; it sends the key as Authorization: Bearer.
client = OpenAI(base_url="https://api.galilea.ai/v1/llm", api_key=GALILEA_API_KEY)stream: true answers as server-sent events. Token usage is metered per customer.
apiKeyX-API-Key<token>API key issued in the Galilea settings.
application/json- body
A call in the OpenAI format of the operation (Chat Completions, Responses, Completions,
Embeddings, Image Generation). The body is passed to the model's provider; this
specification does not restate the OpenAI formats, see the OpenAI API reference for all
properties. Galilea reads model and checks it against the models the key can invoke
(GET /llm/models) before any provider is called.
model*stringThe key of a model of the operation's type, as listed by GET /llm/models.
stream?booleanWhere the OpenAI format has it, true answers as server-sent events (text/event-stream).
[key: string]?anyThe completion in the OpenAI Chat Completions format.
- response
curl -X POST "https://example.com/llm/chat/completions" \ -H "Content-Type: application/json" \ -d '{ "model": "gpt-6-luna", "messages": [ { "role": "user", "content": "Summarize the attached meeting notes in three sentences." } ] }'{ "id": "chatcmpl-9f3b1c", "object": "chat.completion", "model": "gpt-6-luna", "choices": [ { "index": 0, "message": { "role": "assistant", "content": "The meeting covered three topics ..." }, "finish_reason": "stop" } ], "usage": { "prompt_tokens": 150, "completion_tokens": 80, "total_tokens": 230 }}