Skip to main content

ClaimExtractor API

Your API key goes in X-API-Key. The base URL is in the Overview, error codes in Errors. The only model is claim-extractor-pro-2605.

See examples in the Playground.

Endpoints​

extract​

Extracts the claims and intents of the last message of one conversation.

POST/orbitals/claim-extractor/extract

Request body

conversation string | object | object[] required
The last message is the one extracted, whatever its role; the earlier ones are context. A bare string is one assistant message.
Show 2 fields of each itemHide 2 fields of each item
role "user" | "assistant" required
No other role is accepted.
content string required
The message text. Messages take no other keys.
Show 4 optional fieldsHide 4 optional fields
ai_service_description string | object | null
Optional, context only: plain text or a Structured object (with principles). A Structured V2 object is a 422.
Show 6 fieldsHide 6 fields
identity_role string required
Identity, role and objectives of the AI service.
context string required
Where the AI service operates: company, sector, users, location.
knowledge_scope string | null
What the AI service is expected to know.
functionalities string | string[] | null
What the AI service does.
principles string | (string | object)[] | null
Rules the AI service follows with users.
Show 3 fields of each itemHide 3 fields of each item
title string required
Title of the principle.
description string required
What the principle says.
supporting_materials object[] | null required
Send null.
website_url string | null
The website of the AI service.
model string | null Default claim-extractor-pro-2605
Any other value is a 404.
skip_evidences boolean | null Default true
Whether to skip evidences.
intents_only boolean | null Default false
When true, only intents are extracted and claims comes back empty.

Response

On 200.
Show the 5 response fieldsHide the 5 response fields
extractions.intents object[]
What the user asks for, at most 100. Empty when the extracted message is from the assistant.
Show 2 fields of each itemHide 2 fields of each item
content string
The request, decontextualised.
evidences string[]
Verbatim excerpts supporting the intent: at most 5, each at most 500 characters.
extractions.claims object[]
At most 200. Empty with intents_only.
Show 3 fields of each itemHide 3 fields of each item
subtype string
Factoid, Capability, User Assertion or Unverifiable. See Claim subtypes.
content string
The statement, decontextualised.
evidences string[]
Verbatim excerpts supporting the claim: at most 5, each at most 500 characters.
model string
The model that served the request.
usage object
Token counts. The orbital's system prompt is not counted.
Show 3 fieldsHide 3 fields
prompt_tokens integer
Tokens read by the model.
completion_tokens integer
Tokens generated by the model.
total_tokens integer
prompt_tokens plus completion_tokens.
time_taken number
Seconds, server side.

batch-extract​

extract over a list of conversations, run concurrently. The AI service description is optional: send none, one for every conversation (ai_service_description) or one per conversation (ai_service_descriptions). One failing item fails the whole request.

POST/orbitals/claim-extractor/batch-extract

Request body

conversations (string | object | object[])[] required
Each item takes any shape conversation accepts.
Show 1 optional fieldHide 1 optional field
ai_service_descriptions string[] | object[] | null
One per conversation, all strings or all Structured objects. A length mismatch is a 400, and so is sending it with ai_service_description.

Also, as in extract: ai_service_description, model, skip_evidences, intents_only.

Response

A list, one item per conversation, in input order. On 200.
Show the 2 response fieldsHide the 2 response fields
usage object
Token counts for this conversation. The orbital's system prompt is not counted.
Show 3 fieldsHide 3 fields
prompt_tokens integer
Tokens read by the model.
completion_tokens integer
Tokens generated by the model.
total_tokens integer
prompt_tokens plus completion_tokens.
time_taken number
Seconds for the whole batch, server side, repeated on every item.

Also, as in extract: extractions.intents, extractions.claims, model.

extract-conversation​

Extracts every message of one conversation, each with the messages before it as context.

POST/orbitals/claim-extractor/extract-conversation

Request body

conversation string | object | object[] required
Every message is extracted, each with the ones before it as context. A bare string is one assistant message; an empty list is a 400.
Show 2 fields of each itemHide 2 fields of each item
role "user" | "assistant" required
No other role is accepted.
content string required
The message text. Messages take no other keys.
Show 4 optional fieldsHide 4 optional fields
ai_service_description string | object | null
Optional, context only: plain text or a Structured object (with principles). A Structured V2 object is a 422.
Show 6 fieldsHide 6 fields
identity_role string required
Identity, role and objectives of the AI service.
context string required
Where the AI service operates: company, sector, users, location.
knowledge_scope string | null
What the AI service is expected to know.
functionalities string | string[] | null
What the AI service does.
principles string | (string | object)[] | null
Rules the AI service follows with users.
Show 3 fields of each itemHide 3 fields of each item
title string required
Title of the principle.
description string required
What the principle says.
supporting_materials object[] | null required
Send null.
website_url string | null
The website of the AI service.
model string | null Default claim-extractor-pro-2605
Any other value is a 404.
skip_evidences boolean | null Default true
Whether to skip evidences.
intents_only boolean | null Default false
When true, only intents are extracted and claims comes back empty.

Response

On 200.
Show the 4 response fieldsHide the 4 response fields
extractions object[]
One entry per message, in message order.
Show 2 fields of each itemHide 2 fields of each item
intents object[]
What the user asks for, at most 100. Empty when the extracted message is from the assistant.
Show 2 fields of each itemHide 2 fields of each item
content string
The request, decontextualised.
evidences string[]
Verbatim excerpts supporting the intent: at most 5, each at most 500 characters.
claims object[]
At most 200. Empty with intents_only.
Show 3 fields of each itemHide 3 fields of each item
subtype string
Factoid, Capability, User Assertion or Unverifiable. See Claim subtypes.
content string
The statement, decontextualised.
evidences string[]
Verbatim excerpts supporting the claim: at most 5, each at most 500 characters.
model string
The model that served the request.
usage object
Summed over all the messages. The orbital's system prompt is not counted.
Show 3 fieldsHide 3 fields
prompt_tokens integer
Tokens read by the model.
completion_tokens integer
Tokens generated by the model.
total_tokens integer
prompt_tokens plus completion_tokens.
time_taken number
Seconds for the whole conversation, server side.