Ask a Question

POST https://app.resemble.ai/api/v2/detects/{uuid}/intelligence

Submit a natural-language question about a completed detection report. The API responds immediately with a question UUID while the answer is generated in the background.

Path Parameters

ParameterTypeRequiredDescription
uuidstringYesUUID of the completed detection report.

Request Body

FieldTypeRequiredDescription
querystringYesThe natural-language question to ask about the detection.

Example

curl --request POST 'https://app.resemble.ai/api/v2/detects/DETECTION_UUID/intelligence' \
-H 'Authorization: Bearer YOUR_API_TOKEN' \
-H 'Content-Type: application/json' \
--data '{"query": "Summarize the detection results in plain language."}'

Response (202 Accepted)

{
"success": true,
"item": {
"uuid": "QUESTION_UUID",
"detect_uuid": "DETECTION_UUID",
"query": "Summarize the detection results in plain language.",
"answer": null,
"status": "pending",
"error_message": null,
"created_at": "2024-01-15T10:35:00Z",
"updated_at": "2024-01-15T10:35:00Z"
}
}

Use the returned uuid to poll the Get Answer endpoint until the answer is ready.

Error Responses

StatusConditionExample
400Missing query{"success": false, "message": "query is required"}
404Detection not found{"success": false, "message": "Detect not found"}
422Detection not completed{"success": false, "message": "Detection must be completed before asking questions"}