Brave AI Grounding API
Response Objects
# AIGroundingResponse
Response model for AI Grounding API request when stream is true.
| Field | Type | Required | Description |
|---|---|---|---|
| model | string | true | The model to use for the chat completion. The value can be (default) or |
| created | int | true | The Unix timestamp (in seconds) of when the chat completion was created. |
| id | string | true | A unique identifier for the chat completion. Each chunk has the same ID. |
| object | string | true | The object type, which is always chat.completion. |
| choices | list [ ChoiceBlocking ] | true | A list of chat completion choices. Can contain more than one elements if n is greater than 1. Can also be empty for the last chunk if you set stream_options: {“include_usage”: true}. |
| usage | Usage | false | The usage information for the request. |
# ChoiceBlocking
A choice in the response.
| Field | Type | Required | Description |
|---|---|---|---|
| index | int | true | The index of the choice. Always 0 as there is only single choice. |
| message | ChoiceMessage | true | The message for the choice. |
| finish_reason | string | false | The reason the choice was finished. Either |
# ChoiceMessage
The message for the choice.
| Field | Type | Required | Description |
|---|---|---|---|
| role | string | true | The role of the message. Always |
| content | string | false | The content of the message. Can be empty for the last chunk if you set stream_options: {“include_usage”: true}. |
# Usage
The usage information for the request.
| Field | Type | Required | Description |
|---|---|---|---|
| prompt_tokens | int | true | The number of input tokens. |
| completion_tokens | int | true | The number of output tokens. |
| total_tokens | int | true | The total number of tokens. |
| completion_tokens_details | CompletionTokensDetails | false | The details of the completion tokens. |
# CompletionTokensDetails
The details of the completion tokens.
| Field | Type | Required | Description |
|---|---|---|---|
| reason_tokens | int | false | The number of reasoning tokens. |