Score transient documents
curl --request POST \
--url https://embed.breadbowl.ai/v1/score \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"query": "What is the refund window?",
"documents": [
{
"doc_id": "a",
"text": "Refund requests are accepted within 30 days.",
"metadata": {
"source": "policy"
}
},
{
"doc_id": "b",
"text": "Orders usually ship in two business days.",
"metadata": {
"source": "shipping"
}
}
],
"return_components": false
}
'import requests
url = "https://embed.breadbowl.ai/v1/score"
payload = {
"query": "What is the refund window?",
"documents": [
{
"doc_id": "a",
"text": "Refund requests are accepted within 30 days.",
"metadata": { "source": "policy" }
},
{
"doc_id": "b",
"text": "Orders usually ship in two business days.",
"metadata": { "source": "shipping" }
}
],
"return_components": False
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
query: 'What is the refund window?',
documents: [
{
doc_id: 'a',
text: 'Refund requests are accepted within 30 days.',
metadata: {source: 'policy'}
},
{
doc_id: 'b',
text: 'Orders usually ship in two business days.',
metadata: {source: 'shipping'}
}
],
return_components: false
})
};
fetch('https://embed.breadbowl.ai/v1/score', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://embed.breadbowl.ai/v1/score",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'query' => 'What is the refund window?',
'documents' => [
[
'doc_id' => 'a',
'text' => 'Refund requests are accepted within 30 days.',
'metadata' => [
'source' => 'policy'
]
],
[
'doc_id' => 'b',
'text' => 'Orders usually ship in two business days.',
'metadata' => [
'source' => 'shipping'
]
]
],
'return_components' => false
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://embed.breadbowl.ai/v1/score"
payload := strings.NewReader("{\n \"query\": \"What is the refund window?\",\n \"documents\": [\n {\n \"doc_id\": \"a\",\n \"text\": \"Refund requests are accepted within 30 days.\",\n \"metadata\": {\n \"source\": \"policy\"\n }\n },\n {\n \"doc_id\": \"b\",\n \"text\": \"Orders usually ship in two business days.\",\n \"metadata\": {\n \"source\": \"shipping\"\n }\n }\n ],\n \"return_components\": false\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://embed.breadbowl.ai/v1/score")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"query\": \"What is the refund window?\",\n \"documents\": [\n {\n \"doc_id\": \"a\",\n \"text\": \"Refund requests are accepted within 30 days.\",\n \"metadata\": {\n \"source\": \"policy\"\n }\n },\n {\n \"doc_id\": \"b\",\n \"text\": \"Orders usually ship in two business days.\",\n \"metadata\": {\n \"source\": \"shipping\"\n }\n }\n ],\n \"return_components\": false\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://embed.breadbowl.ai/v1/score")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"query\": \"What is the refund window?\",\n \"documents\": [\n {\n \"doc_id\": \"a\",\n \"text\": \"Refund requests are accepted within 30 days.\",\n \"metadata\": {\n \"source\": \"policy\"\n }\n },\n {\n \"doc_id\": \"b\",\n \"text\": \"Orders usually ship in two business days.\",\n \"metadata\": {\n \"source\": \"shipping\"\n }\n }\n ],\n \"return_components\": false\n}"
response = http.request(request)
puts response.read_body{
"results": [
{
"doc_id": "a",
"chunk_id": "transient_0",
"chunk_index": 0,
"score": 0.88,
"metadata": {
"source": "policy"
}
},
{
"doc_id": "b",
"chunk_id": "transient_1",
"chunk_index": 1,
"score": 0.21,
"metadata": {
"source": "shipping"
}
}
],
"usage": {
"input_tokens": 27,
"document_count": 2,
"chunk_count": 0,
"candidate_count": 2,
"latency_ms": 74
}
}Score transient documents
Ranks one to 50 request-local documents for one query without adding them to an index. An aggregate usage event is recorded, but the submitted query, documents, chunks, and derived representations are not persisted as indexed content.
POST
/
v1
/
score
Score transient documents
curl --request POST \
--url https://embed.breadbowl.ai/v1/score \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"query": "What is the refund window?",
"documents": [
{
"doc_id": "a",
"text": "Refund requests are accepted within 30 days.",
"metadata": {
"source": "policy"
}
},
{
"doc_id": "b",
"text": "Orders usually ship in two business days.",
"metadata": {
"source": "shipping"
}
}
],
"return_components": false
}
'import requests
url = "https://embed.breadbowl.ai/v1/score"
payload = {
"query": "What is the refund window?",
"documents": [
{
"doc_id": "a",
"text": "Refund requests are accepted within 30 days.",
"metadata": { "source": "policy" }
},
{
"doc_id": "b",
"text": "Orders usually ship in two business days.",
"metadata": { "source": "shipping" }
}
],
"return_components": False
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
query: 'What is the refund window?',
documents: [
{
doc_id: 'a',
text: 'Refund requests are accepted within 30 days.',
metadata: {source: 'policy'}
},
{
doc_id: 'b',
text: 'Orders usually ship in two business days.',
metadata: {source: 'shipping'}
}
],
return_components: false
})
};
fetch('https://embed.breadbowl.ai/v1/score', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://embed.breadbowl.ai/v1/score",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'query' => 'What is the refund window?',
'documents' => [
[
'doc_id' => 'a',
'text' => 'Refund requests are accepted within 30 days.',
'metadata' => [
'source' => 'policy'
]
],
[
'doc_id' => 'b',
'text' => 'Orders usually ship in two business days.',
'metadata' => [
'source' => 'shipping'
]
]
],
'return_components' => false
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://embed.breadbowl.ai/v1/score"
payload := strings.NewReader("{\n \"query\": \"What is the refund window?\",\n \"documents\": [\n {\n \"doc_id\": \"a\",\n \"text\": \"Refund requests are accepted within 30 days.\",\n \"metadata\": {\n \"source\": \"policy\"\n }\n },\n {\n \"doc_id\": \"b\",\n \"text\": \"Orders usually ship in two business days.\",\n \"metadata\": {\n \"source\": \"shipping\"\n }\n }\n ],\n \"return_components\": false\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://embed.breadbowl.ai/v1/score")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"query\": \"What is the refund window?\",\n \"documents\": [\n {\n \"doc_id\": \"a\",\n \"text\": \"Refund requests are accepted within 30 days.\",\n \"metadata\": {\n \"source\": \"policy\"\n }\n },\n {\n \"doc_id\": \"b\",\n \"text\": \"Orders usually ship in two business days.\",\n \"metadata\": {\n \"source\": \"shipping\"\n }\n }\n ],\n \"return_components\": false\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://embed.breadbowl.ai/v1/score")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"query\": \"What is the refund window?\",\n \"documents\": [\n {\n \"doc_id\": \"a\",\n \"text\": \"Refund requests are accepted within 30 days.\",\n \"metadata\": {\n \"source\": \"policy\"\n }\n },\n {\n \"doc_id\": \"b\",\n \"text\": \"Orders usually ship in two business days.\",\n \"metadata\": {\n \"source\": \"shipping\"\n }\n }\n ],\n \"return_components\": false\n}"
response = http.request(request)
puts response.read_body{
"results": [
{
"doc_id": "a",
"chunk_id": "transient_0",
"chunk_index": 0,
"score": 0.88,
"metadata": {
"source": "policy"
}
},
{
"doc_id": "b",
"chunk_id": "transient_1",
"chunk_index": 1,
"score": 0.21,
"metadata": {
"source": "shipping"
}
}
],
"usage": {
"input_tokens": 27,
"document_count": 2,
"chunk_count": 0,
"candidate_count": 2,
"latency_ms": 74
}
}Authorizations
Tenant-scoped API key beginning with qkv_live_.
Body
application/json
Non-empty query, at most 8 KiB encoded as UTF-8.
Minimum string length:
1Transient documents to rank; IDs must be unique within the request.
Required array length:
1 - 50 elementsShow child attributes
Show child attributes
Include optional diagnostic component scores when available.
⌘I