Locate text spans in the input
/span
Returns character offset ranges into state that answer the question.
value is an array of {start, end, text} objects, where text is the
quoted substring from the input.
/span always runs in fast mode. Sending mode: "deep" or think: true
is rejected (422).
Body Parameters
question: string
What to locate in the text.
domain: optional string
state: optional string
The text to search for spans in.
Returns
Locate text spans in the input
curl https://api.articul8.ai/bivia/span \
-H 'Content-Type: application/json' \
-H "Authorization: Bearer $A8_API_KEY" \
-d '{
"question": "Where is the auto-renewal clause?"
}'
{
"evidence": {
"spans": [
{
"end": 0,
"start": 0,
"text": "text"
}
]
},
"latency_ms": 0,
"mode": "fast",
"model": "dec-1",
"status": "answered",
"thought": true,
"type": "span",
"value": {},
"verification": {
"performed": true,
"result": "passed"
},
"abstain_reason": "low_confidence",
"billable_tokens": 0,
"document_notes": [
{
"document": "document",
"status": "included",
"chars": 0,
"reason": "reason",
"tokens": 0,
"truncated": true
}
],
"document_tokens": 0,
"grounded": true,
"image_tokens": 0,
"input_tokens": 0,
"think_allowed": true
}Returns Examples
{
"evidence": {
"spans": [
{
"end": 0,
"start": 0,
"text": "text"
}
]
},
"latency_ms": 0,
"mode": "fast",
"model": "dec-1",
"status": "answered",
"thought": true,
"type": "span",
"value": {},
"verification": {
"performed": true,
"result": "passed"
},
"abstain_reason": "low_confidence",
"billable_tokens": 0,
"document_notes": [
{
"document": "document",
"status": "included",
"chars": 0,
"reason": "reason",
"tokens": 0,
"truncated": true
}
],
"document_tokens": 0,
"grounded": true,
"image_tokens": 0,
"input_tokens": 0,
"think_allowed": true
}