---
title: "ChatAssistantMessage"
---

Assistant message for requests and responses


## Fields

| Field                                                                                                                                                                                | Type                                                                                                                                                                                 | Required                                                                                                                                                                             | Description                                                                                                                                                                          | Example                                                                                                                                                                              |
| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
| `audio`                                                                                                                                                                              | [Optional[components.ChatAudioOutput]](../components/chataudiooutput.mdx)                                                                                                             | :heavy_minus_sign:                                                                                                                                                                   | Audio output data or reference                                                                                                                                                       | \{<br/>"data": "UklGRnoGAABXQVZFZm10IBAAAAABAAEAQB8AAEAfAAABAAgAZGF0YQoGAACBhYqFbF1f",<br/>"expires_at": 1677652400,<br/>"id": "audio_abc123",<br/>"transcript": "Hello! How can I help you today?"<br/>} |
| `content`                                                                                                                                                                            | [OptionalNullable[components.ChatAssistantMessageContent]](../components/chatassistantmessagecontent.mdx)                                                                             | :heavy_minus_sign:                                                                                                                                                                   | Assistant message content                                                                                                                                                            |                                                                                                                                                                                      |
| `images`                                                                                                                                                                             | List[[components.ChatAssistantImages](../components/chatassistantimages.mdx)]                                                                                                         | :heavy_minus_sign:                                                                                                                                                                   | Generated images from image generation models                                                                                                                                        | [<br/>\{<br/>"image_url": \{<br/>"url": "data:image/png;base64,iVBORw0KGgo..."<br/>}<br/>}<br/>]                                                                                       |
| `name`                                                                                                                                                                               | *Optional[str]*                                                                                                                                                                      | :heavy_minus_sign:                                                                                                                                                                   | Optional name for the assistant                                                                                                                                                      |                                                                                                                                                                                      |
| `reasoning`                                                                                                                                                                          | *OptionalNullable[str]*                                                                                                                                                              | :heavy_minus_sign:                                                                                                                                                                   | Reasoning output                                                                                                                                                                     |                                                                                                                                                                                      |
| `reasoning_details`                                                                                                                                                                  | List[[components.ReasoningDetailUnion](../components/reasoningdetailunion.mdx)]                                                                                                       | :heavy_minus_sign:                                                                                                                                                                   | Reasoning details for extended thinking models                                                                                                                                       | [<br/>\{<br/>"thinking": "Let me work through this step by step...",<br/>"type": "thinking"<br/>}<br/>]                                                                               |
| `refusal`                                                                                                                                                                            | *OptionalNullable[str]*                                                                                                                                                              | :heavy_minus_sign:                                                                                                                                                                   | Refusal message if content was refused                                                                                                                                               |                                                                                                                                                                                      |
| `role`                                                                                                                                                                               | [components.ChatAssistantMessageRole](../components/chatassistantmessagerole.mdx)                                                                                                     | :heavy_check_mark:                                                                                                                                                                   | N/A                                                                                                                                                                                  |                                                                                                                                                                                      |
| `tool_calls`                                                                                                                                                                         | List[[components.ChatToolCall](../components/chattoolcall.mdx)]                                                                                                                       | :heavy_minus_sign:                                                                                                                                                                   | Tool calls made by the assistant                                                                                                                                                     |                                                                                                                                                                                      |