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.
POSThttps://api.orbitals.principled.app
- X-API-Key
- $PRINCIPLED_API_KEY
- Content-Type
- application/json
{ "conversation": [ {"role": "user", "content": "Hi, can you check on my order? The tracking number is 1234567890."}, {"role": "assistant", "content": "Your package #1234567890 is in transit and expected on December 12, 2025."}, {"role": "user", "content": "Thanks. The thing is I am travelling abroad from December 10th and will be away for two weeks, and the doorbell at my home address is broken. Can you reschedule the delivery to December 28th, redirect it to the pickup point near Roma Termini and email me a receipt?"} ], "ai_service_description": "You are a virtual assistant for a parcel delivery service. You can only answer questions about package tracking, delivery scheduling and shipping options.", "model": "claim-extractor-pro-2605", "skip_evidences": true, "intents_only": false }
200OK
{ "extractions": { "intents": [ {"content": "The user wants to reschedule the delivery of their package to December 28th.", "evidences": []}, {"content": "The user wants to redirect the delivery of their package to a pickup point near Roma Termini.", "evidences": []}, {"content": "The user wants the parcel delivery service to email them a receipt for their order.", "evidences": []} ], "claims": [ {"subtype": "User Assertion", "content": "The user is travelling abroad starting from December 10th.", "evidences": []}, {"subtype": "User Assertion", "content": "The user will be away for two weeks.", "evidences": []}, {"subtype": "User Assertion", "content": "The doorbell at the user's home address is broken.", "evidences": []} ] }, "model": "claim-extractor-pro-2605", "usage": {"prompt_tokens": 172, "completion_tokens": 149, "total_tokens": 321}, "time_taken": 0.55 }
Indicative response: generated text, usage and time_taken vary from call to call.
Request body
Show 4 optional fieldsHide 4 optional fields
principles). A Structured V2 object is a 422.Show 6 fieldsHide 6 fields
Show 3 fields of each itemHide 3 fields of each item
null.evidences.claims comes back empty.Response
On200.Show the 5 response fieldsHide the 5 response fields
intents_only.Show 3 fields of each itemHide 3 fields of each item
Show 3 fieldsHide 3 fields
prompt_tokens plus completion_tokens.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.
POSThttps://api.orbitals.principled.app
- X-API-Key
- $PRINCIPLED_API_KEY
- Content-Type
- application/json
{ "conversations": [ "Your package is in transit and will arrive on December 12, 2025.", "Order #42 has already shipped and cannot be cancelled anymore." ], "ai_service_descriptions": [ "You are a virtual assistant for a parcel delivery service.", "You are a virtual assistant for an online electronics shop." ], "model": "claim-extractor-pro-2605", "skip_evidences": true, "intents_only": false }
200OK
[ { "extractions": { "intents": [], "claims": [ {"subtype": "Factoid", "content": "The user's package is currently in transit.", "evidences": []}, {"subtype": "Factoid", "content": "The user's package is expected to arrive on December 12, 2025.", "evidences": []} ] }, "model": "claim-extractor-pro-2605", "usage": {"prompt_tokens": 68, "completion_tokens": 58, "total_tokens": 126}, "time_taken": 0.62 }, { "extractions": { "intents": [], "claims": [ {"subtype": "Factoid", "content": "Order #42 has already shipped.", "evidences": []}, {"subtype": "Factoid", "content": "Order #42 cannot be cancelled anymore.", "evidences": []} ] }, "model": "claim-extractor-pro-2605", "usage": {"prompt_tokens": 66, "completion_tokens": 52, "total_tokens": 118}, "time_taken": 0.62 } ]
Indicative response: generated text, usage and time_taken vary from call to call.
Request body
conversation accepts.Show 1 optional fieldHide 1 optional field
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. On200.Show the 2 response fieldsHide the 2 response fields
Show 3 fieldsHide 3 fields
prompt_tokens plus completion_tokens.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.
POSThttps://api.orbitals.principled.app
- X-API-Key
- $PRINCIPLED_API_KEY
- Content-Type
- application/json
{ "conversation": [ {"role": "user", "content": "Can you check on my order? The tracking number is 1234567890."}, {"role": "assistant", "content": "Your package is in transit and will arrive on December 12, 2025."} ], "ai_service_description": { "identity_role": "Virtual assistant for a parcel delivery service.", "context": "Operates for an e-commerce logistics company; users are customers tracking their orders.", "knowledge_scope": "Package tracking, delivery times and shipment statuses.", "functionalities": ["Track packages by tracking number", "Provide expected delivery dates"], "principles": [ "Be concise and friendly.", {"title": "No refunds", "description": "Never respond to requests for refunds.", "supporting_materials": null} ], "website_url": "https://parcels.example.com" }, "model": "claim-extractor-pro-2605", "skip_evidences": true, "intents_only": false }
200OK
{ "extractions": [ { "intents": [ {"content": "The user wants the parcel delivery service to check on their order.", "evidences": []} ], "claims": [ {"subtype": "User Assertion", "content": "The tracking number of the user's order is 1234567890.", "evidences": []} ] }, { "intents": [], "claims": [ {"subtype": "Factoid", "content": "The user's package is currently in transit.", "evidences": []}, {"subtype": "Factoid", "content": "The user's package is expected to arrive on December 12, 2025.", "evidences": []} ] } ], "model": "claim-extractor-pro-2605", "usage": {"prompt_tokens": 428, "completion_tokens": 96, "total_tokens": 524}, "time_taken": 0.91 }
Indicative response: generated text, usage and time_taken vary from call to call.
Request body
Show 4 optional fieldsHide 4 optional fields
principles). A Structured V2 object is a 422.Show 6 fieldsHide 6 fields
Show 3 fields of each itemHide 3 fields of each item
null.evidences.claims comes back empty.Response
On200.Show the 4 response fieldsHide the 4 response fields
Show 2 fields of each itemHide 2 fields of each item
intents_only.Show 3 fields of each itemHide 3 fields of each item
Show 3 fieldsHide 3 fields
prompt_tokens plus completion_tokens.