Skip to content

Response Types

Here you can find some examples of the objects that the API can respond with that are not yet covered in the Reference.

These are the types that you can expect to see under PrimaryChatMessageViewModel.data.

"data": {
"input": "Create a summary for everything selected",
"companyIds": [
24937,
29096
],
"filingIds": [
"9c57166e-8fa2-43e4-9502-712f8bf39bd3",
"fe6e932b-0cc4-4965-8602-e640077fb506"
],
"transcriptIds": [
3458210,
3431662
],
"userDocumentIds": [
"0197a81e-3d3f-77e9-aca2-d691de99c84d",
"0197a81e-7492-7c14-99ba-78f3746bd563"
]
}

Note: IDs will be returned only if the user selected companies and/or documents with this message, which is optional.

"data": {
"tokenUsage": {
"inputTokens": 193,
"outputTokens": 145,
"cacheReadTokens": 4090,
"cacheWriteTokens": 0
},
"content": "I'll calculate that expression for you.",
"functionCalls": [
{
"id": "toolu_015yKLVpxxr7a497",
"name": "calculate",
"arguments": "{\"expressions\": [\"10*2 + 100 / 4 - 3\"]}"
}
],
"thinking": "The user is asking me to calculate a mathematical expression. Let me use the calculate function to get the exact result."
}

Note: content, functionCalls, and thinking are optional and their presence can depend on which model was used and what the task was.

"data": {
"functionCall": {
"id": "toolu_015yKLVpxxr7a497",
"name": "calculate",
"arguments": "{\"expressions\": [\"10*2 + 100 / 4 - 3\"]}"
},
"result": [
{
"expression": "10*2 + 100 / 4 - 3",
"result": 42
}
]
}

Or, if there was an error:

"data": {
"functionCall": {
"id": "toolu_015yKLVpxxr7a497",
"name": "calculate",
"arguments": "{\"expressions\": [\"round(3.14159)\"]}"
},
"errorMessage": "Function processing failed
One or more expressions are incorrect. Please provide valid expressions. Incorrect expressions: \n\"round(3.14159)\""
}

See the next section for possible functions and results.

These are the types that you can expect to see in Function Result messages, depending on which function was used.

"data": {
"functionCall": {
"id": "toolu_02AR9oYArNSAoBdH5ztwOCyx",
"name": "search_companies",
"arguments": "{\"query\": \"Apple\", \"limit\": 5}"
},
"result": [
{
"companyId": 24937,
"tickerSymbol": "AAPL",
"companyName": "Apple Inc.",
"latestFiscalYear": 2024
},
{
"companyId": 881669,
"tickerSymbol": "APF",
"companyName": "Apple Fields Ltd.",
"latestFiscalYear": 2009
},
... *2 more results removed from the example* ...
{
"companyId": 251114,
"tickerSymbol": "APPB",
"companyName": "Applebee's International, Inc."
}
]
}

Note: “latestFiscalYear” field is optional.

"data": {
"functionCall": {
"id": "toolu_5110vJaT1rKAUjESMZrbhSSR",
"name": "filter_documents",
"arguments": "{\"company_ids\": [24937], \"types\": [\"Filing\",\"Transcript\"], \"limit\": 50}"
},
"result": {
"offset": 0,
"limit": 50,
"total": 233,
"items": [
{
"id": "9c57166e-8fa2-43e4-9502-712f8bf39bd3",
"type": "filing",
"companyId": 24937,
"title": "Apple Inc. 8-K 05/05/2025",
"filingType": "8-K",
"date": "2025-05-12T16:30:00Z"
},
{
"id": "fe6e932b-0cc4-4965-8602-e640077fb506",
"type": "filing",
"companyId": 24937,
"title": "Apple Inc. 10-Q Q2 2025",
"filingType": "10-Q",
"date": "2025-05-02T06:01:00Z",
"fiscalPeriod": "Q2 2025"
},
... *46 more results removed from the example* ...
{
"id": "2666629",
"type": "transcript",
"companyId": 24937,
"title": "Apple Inc., Q4 2022 Earnings Call, Oct 27, 2022",
"date": "2022-10-27T21:00:00Z",
"fiscalPeriod": "Q4 2022"
},
{
"id": "15b3f5c4-4155-4151-812c-eca2e33eba08",
"type": "filing",
"companyId": 24937,
"title": "Apple Inc. 8-K Q1 2023 With Press Release",
"filingType": "8-K",
"date": "2022-10-27T16:30:00Z",
"fiscalPeriod": "Q1 2023"
}
]
}
}

Note: “filingType”, “date” and “fiscalPeriod” fields are optional.

"data": {
"functionCall": {
"id": "toolu_056zmQVsoHc1UQhb9a6QS3dr",
"name": "ask_documents",
"arguments": "{\"inputs\": [{\"document_id\":\"9c57166e-8fa2-43e4-9502-712f8bf39bd3\",\"document_type\":\"Filing\",\"question\":\"What are the key financial highlights and announcements from this 8-K filing? Please provide revenue, earnings, and any guidance mentioned.\"},{\"document_id\":\"3434465\",\"document_type\":\"Transcript\",\"question\":\"What are the key financial metrics discussed in this Q2 2025 earnings call? Please provide revenue, earnings per share, gross margin, and any forward-looking guidance or commentary from management.\"}]}"
},
"result": [
{
"answer": "Let me examine the chunks to identify the main content of this 8-K filing and look for financial highlights, revenue, ... *content removed from the example* ... or other financial performance disclosures [Filing:9c57166e-8fa2-43e4-9502-712f8bf39bd3:38118].",
"documentId": "9c57166e-8fa2-43e4-9502-712f8bf39bd3",
"documentType": "filing",
"startChunkId": 38115,
"endChunkId": 38123
},
{
"answer": "Let me identify the key financial metrics from Apple's Q2 2025 earnings call ... *content removed from the example* ... and **macroeconomic outlook doesn't worsen** [Transcript:3434465:425].",
"documentId": "3434465",
"documentType": "transcript",
"startChunkId": 406,
"endChunkId": 486
}
]
}

Note: Large documents may be split into multiple parts, so the response may contain multiple answers for a single document, each with its own start and end chunk IDs.

"data": {
"functionCall": {
"id": "toolu_27A7Sk42aHpCEn8GRbgS1Cm5",
"name": "get_estimates",
"arguments": "{\"company_ids\": [24937], \"estimate_types\": [\"Revenue\",\"EPS\",\"NetIncome\",\"EBITDA\",\"FreeCashFlow\",\"CapitalExpenditure\",\"DPS\"], \"period_type\": \"Annual\", \"year_start\": 2024, \"year_end\": 2026}"
},
"result": [
{
"fiscalYear": 2026,
"fiscalQuarter": 4,
"currency": "USD",
"estimateType": "EPS",
"scale": "Absolute",
"value": 7.848220000,
"note": "Includes Amortization of Intangible Assets and Stock Based Compensation Expense",
"periodType": "Annual",
"companyId": 24937,
"companyName": "Apple Inc."
},
{
"fiscalYear": 2024,
"fiscalQuarter": 4,
"currency": "USD",
"estimateType": "DPS",
"scale": "Absolute",
"value": 0.989400000,
"periodType": "Annual",
"companyId": 24937,
"companyName": "Apple Inc."
},
... *17 more results removed from the example* ...
{
"fiscalYear": 2026,
"fiscalQuarter": 4,
"currency": "USD",
"estimateType": "FreeCashFlow",
"scale": "Millions",
"value": 125839.097500000,
"note": "Represents After Working Capital Changes",
"periodType": "Annual",
"companyId": 24937,
"companyName": "Apple Inc."
}
]
}

Note: “currency” and “note” fields are optional.

"data": {
"functionCall": {
"id": "toolu_71X6cSC3y6Yhix8WiJAmlvsu",
"name": "search_web",
"arguments": "{\"input\": {\"input\":\"Apple latest news June 2025 earnings stock price artificial intelligence iPhone AI\"}}"
},
"result": {
"content": "Apple's latest news as of June 2025 highlights strong financial performance ... *content removed from the example* ... commitment to sustainability alongside growth[5].",
"citations": [
{
"id": "0197ac50-ea21-73e0-8049-fc0ba7000d92",
"url": "https://www.apple.com/newsroom/2025/05/apple-reports-second-quarter-results/",
"title": "Apple reports second quarter results",
"date": "2025-05-01"
},
{
"id": "0197ac50-ea21-79f1-a825-91859572d3b3",
"url": "https://investor.apple.com/investor-relations/default.aspx",
"title": "Investor Relations - Apple"
},
... *2 more citations removed from the example* ...
{
"id": "0197ac50-ea21-74d9-9c21-eb73114c3b94",
"url": "https://macdailynews.com/2025/05/01/apple-q225-earnings/",
"title": "Apple earnings beat Wall Street on top and bottom lines",
"date": "2025-05-01"
}
]
}
}

Note: “date” field is optional.

"data": {
"functionCall": {
"id": "toolu_05A1iTAgiSZqmh5yKSXKsfsX",
"name": "calculate",
"arguments": "{\"expressions\": [\"5 + 3 * 2\",\"(10 - 4) / 2\"]}"
},
"result": [
{
"expression": "5 + 3 * 2",
"result": 11
},
{
"expression": "(10 - 4) / 2",
"result": 3
}
]
}

These are the types that you can expect to see in the responses of documents/{id}/content endpoint.

"data": {
"fileType": "txt",
"textContent": {
"content": "Some plain text example content",
"type": "TextContent"
},
"title": "PlainText example.txt",
"sizeBytes": 31,
"type": "TxtDocument"
}
"data": {
"fileType": "docx",
"title": "Word Example.docx",
"sizeBytes": 11970,
"pages": [
{
"pageNumber": 1,
"content": {
"content": "Example content for this Word document",
"type": "TextContent"
}
}
],
"type": "WordDocument"
}
"data": {
"pages": [
{
"pageNumber": 1,
"content": {
"content": "Example content for the first page of this Pdf document",
"type": "TextContent"
}
},
{
"pageNumber": 2,
"content": {
"content": "Example content for the second page of this Pdf document",
"type": "TextContent"
}
}
],
"title": "Pdf Example.pdf",
"sizeBytes": 40729,
"type": "PdfDocument",
"fileType": "pdf"
}

These are event objects that you can get from chats/{chatId}/events endpoint.

data: {
"chatId": "0197acc7-fa3d-7691-b6d9-a5a5066ce325",
"date": "2025-03-15T12:51:15.8771258+00:00",
"type": "chatStarted"
}
data: {
"chatId": "0197acc7-fa3d-7691-b6d9-a5a5066ce325",
"date": "2025-03-15T12:51:15.8771258+00:00",
"type": "chatFinished"
}
data: {
"messageId": "0197accb-f00d-76ba-8135-c2c43d94a9c2",
"chatId": "0197acc7-fa3d-7691-b6d9-a5a5066ce325",
"date": "2025-03-15T12:51:15.8771258+00:00",
"type": "chatMessageStarted"
}
data: {
"contentUpdate": "Hi!",
"messageId": "0197accb-f00d-76ba-8135-c2c43d94a9c2",
"chatId": "0197acc7-fa3d-7691-b6d9-a5a5066ce325",
"date": "2025-03-15T12:51:15.8771258+00:00",
"type": "chatMessageContentUpdated"
}
data: {
"messageId": "0197accb-f00d-76ba-8135-c2c43d94a9c2",
"chatId": "0197acc7-fa3d-7691-b6d9-a5a5066ce325",
"date": "2025-03-15T12:51:15.8771258+00:00",
"type": "chatMessageCompleted"
}
data: {
"messageId": "0197acec-2fa6-795b-82ad-027bc37adb4b",
"chatId": "0197acc8-2d14-7344-8c2b-ffc4562dc53b",
"date": "2025-03-15T12:51:15.8771258+00:00",
"type": "chatMessageContentRevoked"
}
data: {
"messageId": "0197acec-2fa6-795b-82ad-027bc37adb4b",
"chatId": "0197acc8-2d14-7344-8c2b-ffc4562dc53b",
"date": "2025-03-15T12:51:15.8771258+00:00",
"type": "chatMessageCancelled"
}
data: {
"messageId": "0197acec-2fa6-795b-82ad-027bc37adb4b",
"chatId": "0197acc8-2d14-7344-8c2b-ffc4562dc53b",
"date": "2025-03-15T12:51:15.8771258+00:00",
"type": "chatMessageFailed"
}