DOC-API-MODEL-schema-1hqi9r2bhh#overview
ContentPart
Content parts composing a message, using a flattened structure for JSON compatibility. The type identifies how the content is represented; only defined content types are accepted.
Type-reference view: API Schema 9frhv4euve, API Schema 9ftjkkjhfa. Request and response views describe this type; they do not declare an endpoint.
Meaning and usage
Section ID: DOC-API-MODEL-schema-1hqi9r2bhh#meaning
See the definition above.
Usage profiles
Section ID: DOC-API-MODEL-schema-1hqi9r2bhh#fields
| Usage | Fields and validation |
|---|---|
| In requests | View fields |
| In responses | View fields |
In requests
Section ID: DOC-API-MODEL-schema-1hqi9r2bhh#request
API JSON uses JSON field names (camelCase).
| Field | Type | Presence | Meaning |
|---|---|---|---|
Section ID: DOC-API-MODEL-schema-1hqi9r2bhh#request-field-typetype | string (CONTENT_PART_TYPE_TEXT, CONTENT_PART_TYPE_IMAGE_URL, CONTENT_PART_TYPE_IMAGE_BASE64, CONTENT_PART_TYPE_FILE_ID, CONTENT_PART_TYPE_FILE_PATH, CONTENT_PART_TYPE_FILE_URL, CONTENT_PART_TYPE_FILE_DATA_URL, CONTENT_PART_TYPE_AUDIO_BASE64, CONTENT_PART_TYPE_REASONING) or integer (int32) (0, 1, 2, 3, 4, 5, 6, 7, 8) | Optional; explicit presence | Kind of content carried by this message part. |
Section ID: DOC-API-MODEL-schema-1hqi9r2bhh#request-field-contentcontent | string | Optional | Text content, image URL, file ID, or base64-encoded data. |
Section ID: DOC-API-MODEL-schema-1hqi9r2bhh#request-field-metadatametadata | Map from string to string | Optional | Additional type-specific metadata (dimensions, mime_type, etc.). |
Section ID: DOC-API-MODEL-schema-1hqi9r2bhh#request-field-cachepreferredcachePreferred | boolean | Optional | Hint that this part is eligible for provider prompt caching. |
Section ID: DOC-API-MODEL-schema-1hqi9r2bhh#request-field-structuredmessagestructuredMessage | StructuredMessage | Optional | Populated on TEXT parts for structured output responses. |
Values of type
Section ID: DOC-API-MODEL-schema-1hqi9r2bhh#request-values-type
Discriminator identifying which content representation a message part carries.
| Value | No. | Form | Meaning |
|---|---|---|---|
CONTENT_PART_TYPE_TEXT | 0 | Canonical | See meaning below. |
CONTENT_PART_TYPE_IMAGE_URL | 1 | Canonical | See meaning below. |
CONTENT_PART_TYPE_IMAGE_BASE64 | 2 | Canonical | See meaning below. |
CONTENT_PART_TYPE_FILE_ID | 3 | Canonical | See meaning below. |
CONTENT_PART_TYPE_FILE_PATH | 4 | Canonical | See meaning below. |
CONTENT_PART_TYPE_FILE_URL | 5 | Canonical | See meaning below. |
CONTENT_PART_TYPE_FILE_DATA_URL | 6 | Canonical | See meaning below. |
CONTENT_PART_TYPE_AUDIO_BASE64 | 7 | Canonical | See meaning below. |
CONTENT_PART_TYPE_REASONING | 8 | Canonical | See meaning below. |
CONTENT_PART_TYPE_TEXT
Plain text carried by the content part.
Plain text content
CONTENT_PART_TYPE_IMAGE_URL
An image supplied through a remote URL.
Remote image URL
CONTENT_PART_TYPE_IMAGE_BASE64
An image supplied as base64-encoded bytes.
Base64-encoded image data
CONTENT_PART_TYPE_FILE_ID
A provider file identifier or internal storage identifier resolved before generation.
File ID — a provider file ID (e.g., OpenAI) OR an internal storage file ID; resolved to a signed FILE_URL just-in-time before the model-provider request
CONTENT_PART_TYPE_FILE_PATH
A reference to a local file path.
Local file path reference
CONTENT_PART_TYPE_FILE_URL
A file supplied through a public or signed URL.
Public or signed file URL (e.g., PDF URL or data: URL)
CONTENT_PART_TYPE_FILE_DATA_URL
A file embedded in a data URL, including its media type and encoded data.
data:application/pdf;base64,... or similar
CONTENT_PART_TYPE_AUDIO_BASE64
Base64-encoded audio; the part metadata identifies its audio format.
Base64-encoded audio (metadata.format required, e.g., wav/mp3)
CONTENT_PART_TYPE_REASONING
A reasoning segment returned by a model provider, when available.
Reasoning/thinking content from chain-of-thought models
Request validation
Section ID: DOC-API-MODEL-schema-1hqi9r2bhh#request-validation
These rules apply when this value is supplied in a request. Request validation does not guarantee that response fields are present or satisfy the same rules.
| Applies to | Rule | Requirement |
|---|---|---|
type | Defined enum value | true |
In responses
Section ID: DOC-API-MODEL-schema-1hqi9r2bhh#response
API JSON uses JSON field names (camelCase).
| Field | Type | Presence | Meaning |
|---|---|---|---|
Section ID: DOC-API-MODEL-schema-1hqi9r2bhh#field-typeSection ID: DOC-API-MODEL-schema-1hqi9r2bhh#response-field-typetype | string (CONTENT_PART_TYPE_TEXT, CONTENT_PART_TYPE_IMAGE_URL, CONTENT_PART_TYPE_IMAGE_BASE64, CONTENT_PART_TYPE_FILE_ID, CONTENT_PART_TYPE_FILE_PATH, CONTENT_PART_TYPE_FILE_URL, CONTENT_PART_TYPE_FILE_DATA_URL, CONTENT_PART_TYPE_AUDIO_BASE64, CONTENT_PART_TYPE_REASONING) or integer (int32) | Optional; explicit presence | Kind of content carried by this message part. |
Section ID: DOC-API-MODEL-schema-1hqi9r2bhh#field-contentSection ID: DOC-API-MODEL-schema-1hqi9r2bhh#response-field-contentcontent | string | Optional | Text content, image URL, file ID, or base64-encoded data. |
Section ID: DOC-API-MODEL-schema-1hqi9r2bhh#field-metadataSection ID: DOC-API-MODEL-schema-1hqi9r2bhh#response-field-metadatametadata | Map from string to string | Optional | Additional type-specific metadata (dimensions, mime_type, etc.). |
Section ID: DOC-API-MODEL-schema-1hqi9r2bhh#field-cachepreferredSection ID: DOC-API-MODEL-schema-1hqi9r2bhh#response-field-cachepreferredcachePreferred | boolean | Optional | Hint that this part is eligible for provider prompt caching. |
Section ID: DOC-API-MODEL-schema-1hqi9r2bhh#field-structuredmessageSection ID: DOC-API-MODEL-schema-1hqi9r2bhh#response-field-structuredmessagestructuredMessage | StructuredMessage | Optional | Populated on TEXT parts for structured output responses. |
Values of type
Section ID: DOC-API-MODEL-schema-1hqi9r2bhh#response-values-type
Discriminator identifying which content representation a message part carries.
| Value | No. | Form | Meaning |
|---|---|---|---|
CONTENT_PART_TYPE_TEXT | 0 | Canonical | See meaning below. |
CONTENT_PART_TYPE_IMAGE_URL | 1 | Canonical | See meaning below. |
CONTENT_PART_TYPE_IMAGE_BASE64 | 2 | Canonical | See meaning below. |
CONTENT_PART_TYPE_FILE_ID | 3 | Canonical | See meaning below. |
CONTENT_PART_TYPE_FILE_PATH | 4 | Canonical | See meaning below. |
CONTENT_PART_TYPE_FILE_URL | 5 | Canonical | See meaning below. |
CONTENT_PART_TYPE_FILE_DATA_URL | 6 | Canonical | See meaning below. |
CONTENT_PART_TYPE_AUDIO_BASE64 | 7 | Canonical | See meaning below. |
CONTENT_PART_TYPE_REASONING | 8 | Canonical | See meaning below. |
CONTENT_PART_TYPE_TEXT
Plain text carried by the content part.
Plain text content
CONTENT_PART_TYPE_IMAGE_URL
An image supplied through a remote URL.
Remote image URL
CONTENT_PART_TYPE_IMAGE_BASE64
An image supplied as base64-encoded bytes.
Base64-encoded image data
CONTENT_PART_TYPE_FILE_ID
A provider file identifier or internal storage identifier resolved before generation.
File ID — a provider file ID (e.g., OpenAI) OR an internal storage file ID; resolved to a signed FILE_URL just-in-time before the model-provider request
CONTENT_PART_TYPE_FILE_PATH
A reference to a local file path.
Local file path reference
CONTENT_PART_TYPE_FILE_URL
A file supplied through a public or signed URL.
Public or signed file URL (e.g., PDF URL or data: URL)
CONTENT_PART_TYPE_FILE_DATA_URL
A file embedded in a data URL, including its media type and encoded data.
data:application/pdf;base64,... or similar
CONTENT_PART_TYPE_AUDIO_BASE64
Base64-encoded audio; the part metadata identifies its audio format.
Base64-encoded audio (metadata.format required, e.g., wav/mp3)
CONTENT_PART_TYPE_REASONING
A reasoning segment returned by a model provider, when available.
Reasoning/thinking content from chain-of-thought models
DOC-API-MODEL-schema-1hqi9r2bhh#validation
Request validation
Section ID: DOC-API-MODEL-schema-1hqi9r2bhh#response-validation
These rules apply when this value is supplied in a request. Request validation does not guarantee that response fields are present or satisfy the same rules.
| Applies to | Rule | Requirement |
|---|---|---|
type | Defined enum value | true |
Where used
Section ID: DOC-API-MODEL-schema-1hqi9r2bhh#where-used
| Reference | Relationship |
|---|---|
| Withdraw your rating on a message | POST /api/v1/llm/delete-message-rating |
| Get full conversation state | POST /api/v1/llm/conversation-state |
| List MCP resources | POST /api/v1/llm/mcp-list-resources |
| Read an MCP resource | POST /api/v1/llm/mcp-read-resource |
| Rate an assistant message | POST /api/v1/llm/rate-message |
| Send a message and wait for the result | POST /api/v1/llm/send-message-sync |
| Submit client-side tool results and wait for the next segment | POST /api/v1/llm/submit-client-tool-results-sync |
| Append a message without generating | POST /api/v1/llm/append-message |
| Send a message to a conversation | POST /api/v1/llm/send-message |
| ReceiveMessageRequest | API JSON uses JSON field names (camelCase). |
| ClientToolDispatch | API JSON uses JSON field names (camelCase). |
Models containing this value
| Model | Relationship |
|---|---|
| Message | Nested in model |
| Message | Nested in model |
| PdfAnnotation | Nested in model |
| PdfAnnotation | Nested in model |
| Resource | Nested in model |
Download the public reference contract.
Document ID: DOC-API-MODEL-schema-1hqi9r2bhh