# ClaimExtractor API

Source: https://orbitals.principled.app/docs/hosted-api/claim-extractor/

Your [API key](https://orbitals.principled.app/docs/hosted-api/quickstart/#api-key) goes in `X-API-Key`. The base URL is in the [Overview](https://orbitals.principled.app/docs/hosted-api/overview/), error codes in [Errors](https://orbitals.principled.app/docs/hosted-api/errors/). The only model is `claim-extractor-pro-2605`.

[See examples in the Playground](https://orbitals.principled.app/docs/playground/?orbital=claim-extractor).

## Endpoints

### extract

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

POST `/orbitals/claim-extractor/extract`

**POST** `https://api.orbitals.principled.app/orbitals/claim-extractor/extract`

* `X-API-Key: $PRINCIPLED_API_KEY`
* `Content-Type: application/json`

```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
}
```

**200** OK

```json
{
  "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

[`conversation`](https://orbitals.principled.app/docs/hosted-api/claim-extractor/#extract-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.

[`conversation[].role`](https://orbitals.principled.app/docs/hosted-api/claim-extractor/#extract-body--conversation.role) "user" | "assistant" required

No other role is accepted.

[`conversation[].content`](https://orbitals.principled.app/docs/hosted-api/claim-extractor/#extract-body--conversation.content) string required

The message text. Messages take no other keys.

[`ai_service_description`](https://orbitals.principled.app/docs/hosted-api/claim-extractor/#extract-body--ai_service_description) string | object | null

Optional, context only: plain text or a Structured object (with `principles`). A Structured V2 object is a 422.

[`ai_service_description.identity_role`](https://orbitals.principled.app/docs/hosted-api/claim-extractor/#extract-body--ai_service_description.identity_role) string required

Identity, role and objectives of the AI service.

[`ai_service_description.context`](https://orbitals.principled.app/docs/hosted-api/claim-extractor/#extract-body--ai_service_description.context) string required

Where the AI service operates: company, sector, users, location.

[`ai_service_description.knowledge_scope`](https://orbitals.principled.app/docs/hosted-api/claim-extractor/#extract-body--ai_service_description.knowledge_scope) string | null

What the AI service is expected to know.

[`ai_service_description.functionalities`](https://orbitals.principled.app/docs/hosted-api/claim-extractor/#extract-body--ai_service_description.functionalities) string | string\[] | null

What the AI service does.

[`ai_service_description.principles`](https://orbitals.principled.app/docs/hosted-api/claim-extractor/#extract-body--ai_service_description.principles) string | (string | object)\[] | null

Rules the AI service follows with users.

[`ai_service_description.principles[].title`](https://orbitals.principled.app/docs/hosted-api/claim-extractor/#extract-body--ai_service_description.principles.title) string required

Title of the principle.

[`ai_service_description.principles[].description`](https://orbitals.principled.app/docs/hosted-api/claim-extractor/#extract-body--ai_service_description.principles.description) string required

What the principle says.

[`ai_service_description.principles[].supporting_materials`](https://orbitals.principled.app/docs/hosted-api/claim-extractor/#extract-body--ai_service_description.principles.supporting_materials) object\[] | null required

Send `null`.

[`ai_service_description.website_url`](https://orbitals.principled.app/docs/hosted-api/claim-extractor/#extract-body--ai_service_description.website_url) string | null

The website of the AI service.

[`model`](https://orbitals.principled.app/docs/hosted-api/claim-extractor/#extract-body--model) string | null Default `claim-extractor-pro-2605`

Any other value is a 404.

[`skip_evidences`](https://orbitals.principled.app/docs/hosted-api/claim-extractor/#extract-body--skip_evidences) boolean | null Default `true`

Whether to skip `evidences`.

[`intents_only`](https://orbitals.principled.app/docs/hosted-api/claim-extractor/#extract-body--intents_only) boolean | null Default `false`

When true, only intents are extracted and `claims` comes back empty.

#### Response

[`extractions.intents`](https://orbitals.principled.app/docs/hosted-api/claim-extractor/#extract-response--extractions.intents) object\[]

What the user asks for, at most 100. Empty when the extracted message is from the assistant.

[`extractions.intents[].content`](https://orbitals.principled.app/docs/hosted-api/claim-extractor/#extract-response--extractions.intents.content) string

The request, decontextualised.

[`extractions.intents[].evidences`](https://orbitals.principled.app/docs/hosted-api/claim-extractor/#extract-response--extractions.intents.evidences) string\[]

Verbatim excerpts supporting the intent: at most 5, each at most 500 characters.

[`extractions.claims`](https://orbitals.principled.app/docs/hosted-api/claim-extractor/#extract-response--extractions.claims) object\[]

At most 200. Empty with `intents_only`.

[`extractions.claims[].subtype`](https://orbitals.principled.app/docs/hosted-api/claim-extractor/#extract-response--extractions.claims.subtype) string

Factoid, Capability, User Assertion or Unverifiable. See [Claim subtypes](https://orbitals.principled.app/docs/guide/orbitals/claim-extractor/#claim-subtypes).

[`extractions.claims[].content`](https://orbitals.principled.app/docs/hosted-api/claim-extractor/#extract-response--extractions.claims.content) string

The statement, decontextualised.

[`extractions.claims[].evidences`](https://orbitals.principled.app/docs/hosted-api/claim-extractor/#extract-response--extractions.claims.evidences) string\[]

Verbatim excerpts supporting the claim: at most 5, each at most 500 characters.

[`model`](https://orbitals.principled.app/docs/hosted-api/claim-extractor/#extract-response--model) string

The model that served the request.

[`usage`](https://orbitals.principled.app/docs/hosted-api/claim-extractor/#extract-response--usage) object

Token counts. The orbital's system prompt is not counted.

[`usage.prompt_tokens`](https://orbitals.principled.app/docs/hosted-api/claim-extractor/#extract-response--usage.prompt_tokens) integer

Tokens read by the model.

[`usage.completion_tokens`](https://orbitals.principled.app/docs/hosted-api/claim-extractor/#extract-response--usage.completion_tokens) integer

Tokens generated by the model.

[`usage.total_tokens`](https://orbitals.principled.app/docs/hosted-api/claim-extractor/#extract-response--usage.total_tokens) integer

`prompt_tokens` plus `completion_tokens`.

[`time_taken`](https://orbitals.principled.app/docs/hosted-api/claim-extractor/#extract-response--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`

**POST** `https://api.orbitals.principled.app/orbitals/claim-extractor/batch-extract`

* `X-API-Key: $PRINCIPLED_API_KEY`
* `Content-Type: application/json`

```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
}
```

**200** OK

```json
[
  {
    "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

[`conversations`](https://orbitals.principled.app/docs/hosted-api/claim-extractor/#batch-extract-body--conversations) (string | object | object\[])\[] required

Each item takes any shape `conversation` accepts.

[`ai_service_descriptions`](https://orbitals.principled.app/docs/hosted-api/claim-extractor/#batch-extract-body--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`](https://orbitals.principled.app/docs/hosted-api/claim-extractor/#extract): [`ai_service_description`](https://orbitals.principled.app/docs/hosted-api/claim-extractor/#extract-body--ai_service_description), [`model`](https://orbitals.principled.app/docs/hosted-api/claim-extractor/#extract-body--model), [`skip_evidences`](https://orbitals.principled.app/docs/hosted-api/claim-extractor/#extract-body--skip_evidences), [`intents_only`](https://orbitals.principled.app/docs/hosted-api/claim-extractor/#extract-body--intents_only).

#### Response

[`[].usage`](https://orbitals.principled.app/docs/hosted-api/claim-extractor/#batch-extract-response--usage) object

Token counts for this conversation. The orbital's system prompt is not counted.

[`[].usage.prompt_tokens`](https://orbitals.principled.app/docs/hosted-api/claim-extractor/#batch-extract-response--usage.prompt_tokens) integer

Tokens read by the model.

[`[].usage.completion_tokens`](https://orbitals.principled.app/docs/hosted-api/claim-extractor/#batch-extract-response--usage.completion_tokens) integer

Tokens generated by the model.

[`[].usage.total_tokens`](https://orbitals.principled.app/docs/hosted-api/claim-extractor/#batch-extract-response--usage.total_tokens) integer

`prompt_tokens` plus `completion_tokens`.

[`[].time_taken`](https://orbitals.principled.app/docs/hosted-api/claim-extractor/#batch-extract-response--time_taken) number

Seconds for the whole batch, server side, repeated on every item.

Also, as in [`extract`](https://orbitals.principled.app/docs/hosted-api/claim-extractor/#extract): [`extractions.intents`](https://orbitals.principled.app/docs/hosted-api/claim-extractor/#extract-response--extractions.intents), [`extractions.claims`](https://orbitals.principled.app/docs/hosted-api/claim-extractor/#extract-response--extractions.claims), [`model`](https://orbitals.principled.app/docs/hosted-api/claim-extractor/#extract-response--model).

### extract-conversation

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

POST `/orbitals/claim-extractor/extract-conversation`

**POST** `https://api.orbitals.principled.app/orbitals/claim-extractor/extract-conversation`

* `X-API-Key: $PRINCIPLED_API_KEY`
* `Content-Type: application/json`

```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
}
```

**200** OK

```json
{
  "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

[`conversation`](https://orbitals.principled.app/docs/hosted-api/claim-extractor/#extract-conversation-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.

[`conversation[].role`](https://orbitals.principled.app/docs/hosted-api/claim-extractor/#extract-conversation-body--conversation.role) "user" | "assistant" required

No other role is accepted.

[`conversation[].content`](https://orbitals.principled.app/docs/hosted-api/claim-extractor/#extract-conversation-body--conversation.content) string required

The message text. Messages take no other keys.

[`ai_service_description`](https://orbitals.principled.app/docs/hosted-api/claim-extractor/#extract-conversation-body--ai_service_description) string | object | null

Optional, context only: plain text or a Structured object (with `principles`). A Structured V2 object is a 422.

[`ai_service_description.identity_role`](https://orbitals.principled.app/docs/hosted-api/claim-extractor/#extract-conversation-body--ai_service_description.identity_role) string required

Identity, role and objectives of the AI service.

[`ai_service_description.context`](https://orbitals.principled.app/docs/hosted-api/claim-extractor/#extract-conversation-body--ai_service_description.context) string required

Where the AI service operates: company, sector, users, location.

[`ai_service_description.knowledge_scope`](https://orbitals.principled.app/docs/hosted-api/claim-extractor/#extract-conversation-body--ai_service_description.knowledge_scope) string | null

What the AI service is expected to know.

[`ai_service_description.functionalities`](https://orbitals.principled.app/docs/hosted-api/claim-extractor/#extract-conversation-body--ai_service_description.functionalities) string | string\[] | null

What the AI service does.

[`ai_service_description.principles`](https://orbitals.principled.app/docs/hosted-api/claim-extractor/#extract-conversation-body--ai_service_description.principles) string | (string | object)\[] | null

Rules the AI service follows with users.

[`ai_service_description.principles[].title`](https://orbitals.principled.app/docs/hosted-api/claim-extractor/#extract-conversation-body--ai_service_description.principles.title) string required

Title of the principle.

[`ai_service_description.principles[].description`](https://orbitals.principled.app/docs/hosted-api/claim-extractor/#extract-conversation-body--ai_service_description.principles.description) string required

What the principle says.

[`ai_service_description.principles[].supporting_materials`](https://orbitals.principled.app/docs/hosted-api/claim-extractor/#extract-conversation-body--ai_service_description.principles.supporting_materials) object\[] | null required

Send `null`.

[`ai_service_description.website_url`](https://orbitals.principled.app/docs/hosted-api/claim-extractor/#extract-conversation-body--ai_service_description.website_url) string | null

The website of the AI service.

[`model`](https://orbitals.principled.app/docs/hosted-api/claim-extractor/#extract-conversation-body--model) string | null Default `claim-extractor-pro-2605`

Any other value is a 404.

[`skip_evidences`](https://orbitals.principled.app/docs/hosted-api/claim-extractor/#extract-conversation-body--skip_evidences) boolean | null Default `true`

Whether to skip `evidences`.

[`intents_only`](https://orbitals.principled.app/docs/hosted-api/claim-extractor/#extract-conversation-body--intents_only) boolean | null Default `false`

When true, only intents are extracted and `claims` comes back empty.

#### Response

[`extractions`](https://orbitals.principled.app/docs/hosted-api/claim-extractor/#extract-conversation-response--extractions) object\[]

One entry per message, in message order.

[`extractions[].intents`](https://orbitals.principled.app/docs/hosted-api/claim-extractor/#extract-conversation-response--extractions.intents) object\[]

What the user asks for, at most 100. Empty when the extracted message is from the assistant.

[`extractions[].intents[].content`](https://orbitals.principled.app/docs/hosted-api/claim-extractor/#extract-conversation-response--extractions.intents.content) string

The request, decontextualised.

[`extractions[].intents[].evidences`](https://orbitals.principled.app/docs/hosted-api/claim-extractor/#extract-conversation-response--extractions.intents.evidences) string\[]

Verbatim excerpts supporting the intent: at most 5, each at most 500 characters.

[`extractions[].claims`](https://orbitals.principled.app/docs/hosted-api/claim-extractor/#extract-conversation-response--extractions.claims) object\[]

At most 200. Empty with `intents_only`.

[`extractions[].claims[].subtype`](https://orbitals.principled.app/docs/hosted-api/claim-extractor/#extract-conversation-response--extractions.claims.subtype) string

Factoid, Capability, User Assertion or Unverifiable. See [Claim subtypes](https://orbitals.principled.app/docs/guide/orbitals/claim-extractor/#claim-subtypes).

[`extractions[].claims[].content`](https://orbitals.principled.app/docs/hosted-api/claim-extractor/#extract-conversation-response--extractions.claims.content) string

The statement, decontextualised.

[`extractions[].claims[].evidences`](https://orbitals.principled.app/docs/hosted-api/claim-extractor/#extract-conversation-response--extractions.claims.evidences) string\[]

Verbatim excerpts supporting the claim: at most 5, each at most 500 characters.

[`model`](https://orbitals.principled.app/docs/hosted-api/claim-extractor/#extract-conversation-response--model) string

The model that served the request.

[`usage`](https://orbitals.principled.app/docs/hosted-api/claim-extractor/#extract-conversation-response--usage) object

Summed over all the messages. The orbital's system prompt is not counted.

[`usage.prompt_tokens`](https://orbitals.principled.app/docs/hosted-api/claim-extractor/#extract-conversation-response--usage.prompt_tokens) integer

Tokens read by the model.

[`usage.completion_tokens`](https://orbitals.principled.app/docs/hosted-api/claim-extractor/#extract-conversation-response--usage.completion_tokens) integer

Tokens generated by the model.

[`usage.total_tokens`](https://orbitals.principled.app/docs/hosted-api/claim-extractor/#extract-conversation-response--usage.total_tokens) integer

`prompt_tokens` plus `completion_tokens`.

[`time_taken`](https://orbitals.principled.app/docs/hosted-api/claim-extractor/#extract-conversation-response--time_taken) number

Seconds for the whole conversation, server side.
