v1 chat
Unified Chat Completions
Unified generation endpoint that accepts the Universal Schema plus configuration objects for any outputs (Text, Image, Audio, or all at once).
This is the "Omni" endpoint for the Elicit Labs Modal System.
It acts as a thin orchestrator:
**Flow:**
1. Extracts text + multimodal content from the messages array
2. Classifies the desired output modality via LLM (text / image / audio / agent)
3. Delegates to the appropriate handler:
- text → POST /v1/text/generations
- image → POST /v1/images/generations
- audio → POST /v1/audio/generations
- agent → Agent tool-calling loop (multi-step orchestration)
4. Returns unified response with text + optional image/audio
All validation, memory retrieval, and generation logic lives in the
dedicated routers. This endpoint just classifies and dispatches.
**Authentication**: Requires valid API key or JWT token
post/v1/chat/completions
Request body
Example request
{
"summary": "Text-only chat",
"value": {
"messages": [
{
"content": "You are a helpful assistant.",
"role": "system"
},
{
"content": "Hello, how are you?",
"role": "user"
}
],
"modalities": [
"text"
],
"model": "gpt-4.1-mini",
"project_id": "proj_ABC",
"user_id": "user_123"
}
}Response
Successful Response
Example response
{
"assistant_output": {
"image_base64": "<base64_encoded_image>"
},
"messages": [
{
"content": "Create an image of a sunset over mountains",
"role": "user"
},
{
"content": [
{
"content": "<base64_encoded_image>",
"type": "image"
}
],
"role": "assistant"
}
],
"session_id": "550e8400-e29b-41d4-a716-446655440000"
}