Skip to main content
POST
/
api
/
chat
/
ask
Submit chat query
curl --request POST \
  --url https://api.example.com/api/chat/ask \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "query": "<string>",
  "llm": "<string>",
  "chat_id": "<string>",
  "entry_id": "<string>",
  "locale": "bg",
  "is_initial_message": true,
  "user_timezone": "<string>"
}
'
{
  "detail": [
    {
      "loc": [
        "<string>"
      ],
      "msg": "<string>",
      "type": "<string>",
      "input": "<unknown>",
      "ctx": {}
    }
  ]
}

Documentation Index

Fetch the complete documentation index at: https://docs.genow.ai/llms.txt

Use this file to discover all available pages before exploring further.

Authorizations

Authorization
string
header
required

Bearer token authentication. Format: 'Bearer '

Body

application/json
query
string
required

The user's message to the assistant. Server-side normalization may adjust curly braces in the text. For document chat, images already linked to the chat are appended to the prompt automatically.

llm
string
required

Chat model identifier (matched case-insensitively; stored lowercase). Must be enabled for your deployment—use the Genow models API to list valid chat_model_name values (e.g. Gemini Pro is often exposed as gemini-2.5-pro via LiteLLM; exact ids depend on your tenant configuration).

chat_id
string
required

Identifier of the conversation. The server creates the chat on first use if it does not exist yet. Document context is whatever is attached to this chat in Genow (uploaded files).

entry_id
string
required

Client-generated unique id for this question/answer turn. It is persisted with the stored chat entry and should be unique within the chat.

locale
enum<string> | null

Optional locale (ISO 639-1 code) for system prompt and templating, e.g. en or de. Omit to use server defaults.

Available options:
bg,
cs,
da,
de,
el,
en,
es,
et,
fi,
fr,
hr,
hu,
is,
it,
ja,
ko,
lt,
lv,
nb,
nl,
pl,
pt,
ro,
ru,
sk,
sl,
sr,
sv,
tr,
zh
is_initial_message
boolean | null

Optional hint that this is the first user message in a new chat (used by Genow clients for titling and analytics). Document chat retrieval does not depend on this flag.

user_timezone
string | null

Optional IANA timezone name (e.g. Europe/Berlin, America/New_York) used to inject the current local date/time into the system prompt.

Response

Successful Response