LLM
Generate chat completion
Send messages to an LLM and receive a completion. Requires authenticated user with active organization. Usage is tracked for auditing and future quota enforcement.
Message Roles:
- system: Defines the AI's behavior and constraints (e.g., "You are a helpful coding assistant"). Place at the beginning of the conversation. Only one system message is supported (Gemini limitation).
- user: Represents the human's questions or requests. Can appear multiple times in the conversation.
- assistant: Represents the AI's previous responses. Used to maintain conversation history and context.
Example conversation flow:
{
"messages": [
{"role": "system", "content": "You are a helpful assistant that responds in French."},
{"role": "user", "content": "What is the capital of France?"},
{"role": "assistant", "content": "La capitale de la France est Paris."},
{"role": "user", "content": "What is its population?"}
]
}
The AI will remember the conversation context and respond about Paris's population.
post/v1/llm/chat/completions
Request
- Base URL: https://api.prod.keyban.io
- URL: https://api.prod.keyban.io/v1/llm/chat/completions
- Auth: one of:
- API key in header X-Api-Key
- bearer (a scheme the document does not define)
Request body
Response
Chat completion generated successfully
Changes
No recorded changes to this operation across all 1 revision of this API.