Skip to content

Ask a question

POST
/api/v2/chat/ask/
curl --request POST \
--url https://api.full-fill.ai/api/v2/chat/ask/ \
--header 'Content-Type: application/json' \
--header 'X-API-Key: <X-API-Key>' \
--data '{ "question": "example", "session_id": 1, "file_id": 1, "offering_ids": [ 1 ] }'

Ask a single grounded question. Stateless by default; pass a session_id (create one with POST /chat/sessions/) to continue a persistent conversation.

Request body for the ask endpoint (stateless, or continue a persistent session).

object
question
required
string
<= 4000 characters
session_id

Continue a persistent conversation. Create one with POST /chat/sessions/. Omit for a stateless single question.

integer
file_id

Restrict grounding to a single file.

integer
offering_ids

Restrict grounding to offerings.

Array<integer>
Examplegenerated
{
"question": "example",
"session_id": 1,
"file_id": 1,
"offering_ids": [
1
]
}
Media typeapplication/json
object
answer
required
string
sources
required
Array
session_id
required

Null for a stateless answer; the persistent session id otherwise.

integer
nullable
Examplegenerated
{
"answer": "example",
"sources": [
"example"
],
"session_id": 1
}