Context Check API

An API for checking the context of inputs and managing those contextChecks

This API endpoint evaluates the context of a claim, determining its accuracy, relevance, and trustworthiness. It leverages advanced AI to analyze the claim in relation to publicly available data, sources, and narratives to identify potential misinformation or disinformation.

You can try these out in your browser with the OpenAPI Spec. Be sure to hit "Authorize 🔓" and enter your credentials first.

Download OpenAPI description
Languages
Servers
Mock server
https://docs.blackbird.ai/_mock/context/
https://api.blackbird.ai/compass/

Create a new context check

Request

Creates a new contextCheck. The resource isn't fully created immediately and you'll want to poll the /contextChecks/{id} GET for the result.

Headers
cache-controlstring

Whether to bypass the cached response. Requires permission to bypass the cache.

Value"no-cache"
Bodyapplication/jsonrequired
inputstringrequired

The input to generate context for

Example: "Are US troops fighting in Ukraine?"
modelVersionstring

The version of the model to use to generate the context. Defaults to "1.0"

Enum"1.0""2.0"
curl -i -X POST \
  https://docs.blackbird.ai/_mock/context/contextChecks \
  -H 'Authorization: Bearer <YOUR_TOKEN_HERE>' \
  -H 'Content-Type: application/json' \
  -H 'cache-control: no-cache' \
  -d '{
    "input": "Are US troops fighting in Ukraine?"
  }'

Responses

ContextCheck accepted for processing

Bodyapplication/json
idstringrequired

The ID of the contextCheck

Example: "8115"
created_atstring(date-time)required

The datetime the contextCheck was created

Example: "2024-10-10T15:20:33.307Z"
updated_atstring(date-time)required

The datetime the contextCheck was last updated. Will just be the created date or completed date

Example: "2024-10-10T15:20:33.307Z"
inputstringrequired

The contextCheck to generate context for

Example: "Who is older, Biden or Trump?"
statusstringrequired

The status of the contextCheck context generation

Value"processing"
Example: "processing"
Response
application/json
{ "id": "8115", "created_at": "2024-10-10T15:20:33.307Z", "updated_at": "2024-10-10T15:20:33.307Z", "input": "Who is older, Biden or Trump?", "status": "processing" }

Gets all the contextChecks the caller has submitted

Request

Query
startstring(date-time)

Filter contextChecks created after this date (inclusive with ascending sort order, exlusive with descending sort order)

endstring(date-time)

Filter contextChecks created before this date (exclusive with ascending sort order, inclusive with descending sort order)

limitnumber<= 1000

The number of contextChecks to return.

Default 25
sortstring

The direction to sort contextChecks by created_at

Default "desc"
Enum"asc""desc"
curl -i -X GET \
  'https://docs.blackbird.ai/_mock/context/contextChecks?end=2019-08-24T14%3A15%3A22Z&limit=25&sort=asc&start=2019-08-24T14%3A15%3A22Z' \
  -H 'Authorization: Bearer <YOUR_TOKEN_HERE>'

Responses

ContextChecks found

Bodyapplication/json
dataArray of any(ContextCheck)required
data[].​idstringrequired

The ID of the contextCheck

Example: "8115"
data[].​created_atstring(date-time)required

The datetime the contextCheck was created

Example: "2024-10-10T15:20:33.307Z"
data[].​updated_atstring(date-time)required

The datetime the contextCheck was last updated. Will just be the created date or completed date

Example: "2024-10-10T15:20:33.307Z"
data[].​inputstringrequired

The contextCheck to generate context for

Example: "Who is older, Biden or Trump?"
data[].​statusstringrequired

The status of the contextCheck context generation

Value"processing"
Example: "processing"
Discriminator
Response
application/json
{ "data": [ { … } ] }

Get input and context

Request

Retrieves the contextCheck with the input and the generated context around it

Path
idstringrequired

The ID of the contextCheck to retrieve.

curl -i -X GET \
  'https://docs.blackbird.ai/_mock/context/contextChecks/{id}' \
  -H 'Authorization: Bearer <YOUR_TOKEN_HERE>'

Responses

ContextCheck found

Bodyapplication/json
idstringrequired

The ID of the contextCheck

Example: "8115"
created_atstring(date-time)required

The datetime the contextCheck was created

Example: "2024-10-10T15:20:33.307Z"
updated_atstring(date-time)required

The datetime the contextCheck was last updated. Will just be the created date or completed date

Example: "2024-10-10T15:20:33.307Z"
inputstringrequired

The contextCheck to generate context for

Example: "Who is older, Biden or Trump?"
statusstringrequired

The status of the contextCheck context generation

Value"processing"
Example: "processing"
Discriminator
Response
application/json
{ "id": "8115", "created_at": "2024-10-10T15:20:33.307Z", "updated_at": "2024-10-10T15:20:33.307Z", "input": "Who is older, Biden or Trump?", "status": "processing" }