# Input message

Represents a message input to the model with role-based instruction hierarchy.

## Properties

**`role`** string required

The role of the message input. One of `user`, `system`, or `assistant`.

**`content`** string | array required

The message content. Can be provided as:

- **String** — Simple text content (convenience format)
- **Array of content blocks** — Structured content with text and/or file references


details
summary
Show content block structure
Each content block:

**`type`** string required

Content type: `text` or `file`.

**`text`** string optional

Text content. Required when `type` is `text`.

**`file_id`** string optional

File ID reference (`file_` prefix). Required when `type` is `file`.

**`files`** array optional

Array of file references for context retrieval. Upload files first via the [Files API](/docs/api-reference/files/upload), then reference them here. The system retrieves relevant content from each file and injects it into the conversation context. Images are sent as visual input to vision-capable models. Maximum 10 files per message.

details
summary
Show structure
Each file reference:

**`file_id`** string required

ID of an uploaded file (e.g., `file_abc123def456...`).

**`id`** string optional

The unique ID of the input message. Populated when items are returned via API.

## Usage

This object is used in:

- [Create a model response](/docs/api-reference/responses/create) - `inputs` parameter


Simple text

```json
{
  "role": "user",
  "content": "What is the capital of France?"
}
```

With files

```json
{
  "role": "user",
  "content": "Analyze these documents and summarize the key findings.",
  "files": [
    { "file_id": "file_abc123def456abc123def456abc12345" },
    { "file_id": "file_789xyz012345789xyz012345789xyz01" }
  ]
}
```

With image

```json
{
  "role": "user",
  "content": "What do you see in this image?",
  "files": [
    { "file_id": "file_img123def456abc123def456abc12345" }
  ]
}
```

Content blocks

```json
{
  "role": "user",
  "content": [
    { "type": "text", "text": "Please review this document." },
    { "type": "file", "file_id": "file_abc123def456abc123def456abc12345" }
  ]
}
```