Ask a question about a project
curl --request POST \
--url https://api.bedrock.cv/projects/{project_id}/ask \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"question": "<string>"
}
'import requests
url = "https://api.bedrock.cv/projects/{project_id}/ask"
payload = { "question": "<string>" }
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({question: '<string>'})
};
fetch('https://api.bedrock.cv/projects/{project_id}/ask', 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://api.bedrock.cv/projects/{project_id}/ask",
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([
'question' => '<string>'
]),
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://api.bedrock.cv/projects/{project_id}/ask"
payload := strings.NewReader("{\n \"question\": \"<string>\"\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://api.bedrock.cv/projects/{project_id}/ask")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"question\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.bedrock.cv/projects/{project_id}/ask")
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 \"question\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"answer": "<string>",
"sources": [
{
"source_type": "block",
"source_id": "<string>",
"label": "<string>",
"score": 123
}
]
}{
"type": "https://docs.bedrock.cv/errors/bad-request",
"title": "Bad Request",
"status": 400,
"detail": "One or more request fields are invalid.",
"code": "VALIDATION_ERROR",
"request_id": "req_01JABCD123",
"errors": {
"project_id": [
"Required field"
]
}
}{
"type": "https://docs.bedrock.cv/errors/authentication",
"title": "Unauthorized",
"status": 401,
"detail": "Invalid or missing API key.",
"code": "UNAUTHORIZED",
"request_id": "req_01JABCD123"
}{
"type": "https://docs.bedrock.cv/errors/rate-limit",
"title": "Rate limited",
"status": 429,
"detail": "Rate limit exceeded. Try again in 60 seconds.",
"code": "RATE_LIMITED",
"request_id": "req_01JABCD123"
}Vision API
Ask
Ask a natural language question about a project and get an AI-generated answer with source citations.
POST
/
projects
/
{project_id}
/
ask
Ask a question about a project
curl --request POST \
--url https://api.bedrock.cv/projects/{project_id}/ask \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"question": "<string>"
}
'import requests
url = "https://api.bedrock.cv/projects/{project_id}/ask"
payload = { "question": "<string>" }
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({question: '<string>'})
};
fetch('https://api.bedrock.cv/projects/{project_id}/ask', 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://api.bedrock.cv/projects/{project_id}/ask",
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([
'question' => '<string>'
]),
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://api.bedrock.cv/projects/{project_id}/ask"
payload := strings.NewReader("{\n \"question\": \"<string>\"\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://api.bedrock.cv/projects/{project_id}/ask")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"question\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.bedrock.cv/projects/{project_id}/ask")
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 \"question\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"answer": "<string>",
"sources": [
{
"source_type": "block",
"source_id": "<string>",
"label": "<string>",
"score": 123
}
]
}{
"type": "https://docs.bedrock.cv/errors/bad-request",
"title": "Bad Request",
"status": 400,
"detail": "One or more request fields are invalid.",
"code": "VALIDATION_ERROR",
"request_id": "req_01JABCD123",
"errors": {
"project_id": [
"Required field"
]
}
}{
"type": "https://docs.bedrock.cv/errors/authentication",
"title": "Unauthorized",
"status": 401,
"detail": "Invalid or missing API key.",
"code": "UNAUTHORIZED",
"request_id": "req_01JABCD123"
}{
"type": "https://docs.bedrock.cv/errors/rate-limit",
"title": "Rate limited",
"status": 429,
"detail": "Rate limit exceeded. Try again in 60 seconds.",
"code": "RATE_LIMITED",
"request_id": "req_01JABCD123"
}Ask answers “what does this project say about X?” by searching across all project content (blocks, features, files), then generating a concise answer grounded in the retrieved context.
Ask is synchronous and returns results immediately (not an async job).
How It Works
- Your question is used to run a hybrid search (semantic + keyword) across the project
- The top results are assembled into a context window
- An LLM generates a 2-4 sentence answer citing the source material
- Up to 5 source references are returned with relevance scores
Example Questions
| Question | What it finds |
|---|---|
| ”What fire rating is required for the stairwell doors?” | Spec blocks, general notes referencing fire ratings |
| ”How many parking spaces are shown?” | Site plan blocks with parking counts |
| ”What concrete mix is specified for the foundation?” | Specification sheets, structural notes |
Sources
Each source in the response includes:| Field | Description |
|---|---|
source_type | Type of content matched (block, feature, or file) |
source_id | ID of the matched entity |
label | Human-readable label (e.g. sheet number, file name) |
score | Relevance score (higher is better) |
Authorizations
BearerAuthApiKeyAuth
API key prefixed with sk_. Example: Authorization: Bearer sk_xxx
Headers
API version
Path Parameters
Project ID
Body
application/json
⌘I