Skip to main content
Section ID: 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

UsageFields and validation
In requestsView fields
In responsesView fields

In requests​

Section ID: DOC-API-MODEL-schema-1hqi9r2bhh#request

API JSON uses JSON field names (camelCase).

FieldTypePresenceMeaning
Section ID: DOC-API-MODEL-schema-1hqi9r2bhh#request-field-typetypestring (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 presenceKind of content carried by this message part.
Section ID: DOC-API-MODEL-schema-1hqi9r2bhh#request-field-contentcontentstringOptionalText content, image URL, file ID, or base64-encoded data.
Section ID: DOC-API-MODEL-schema-1hqi9r2bhh#request-field-metadatametadataMap from string to stringOptionalAdditional type-specific metadata (dimensions, mime_type, etc.).
Section ID: DOC-API-MODEL-schema-1hqi9r2bhh#request-field-cachepreferredcachePreferredbooleanOptionalHint that this part is eligible for provider prompt caching.
Section ID: DOC-API-MODEL-schema-1hqi9r2bhh#request-field-structuredmessagestructuredMessageStructuredMessageOptionalPopulated 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.

ValueNo.FormMeaning
CONTENT_PART_TYPE_TEXT0CanonicalSee meaning below.
CONTENT_PART_TYPE_IMAGE_URL1CanonicalSee meaning below.
CONTENT_PART_TYPE_IMAGE_BASE642CanonicalSee meaning below.
CONTENT_PART_TYPE_FILE_ID3CanonicalSee meaning below.
CONTENT_PART_TYPE_FILE_PATH4CanonicalSee meaning below.
CONTENT_PART_TYPE_FILE_URL5CanonicalSee meaning below.
CONTENT_PART_TYPE_FILE_DATA_URL6CanonicalSee meaning below.
CONTENT_PART_TYPE_AUDIO_BASE647CanonicalSee meaning below.
CONTENT_PART_TYPE_REASONING8CanonicalSee 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 toRuleRequirement
typeDefined enum valuetrue

In responses​

Section ID: DOC-API-MODEL-schema-1hqi9r2bhh#response

API JSON uses JSON field names (camelCase).

FieldTypePresenceMeaning
Section ID: DOC-API-MODEL-schema-1hqi9r2bhh#field-typeSection ID: DOC-API-MODEL-schema-1hqi9r2bhh#response-field-typetypestring (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 presenceKind of content carried by this message part.
Section ID: DOC-API-MODEL-schema-1hqi9r2bhh#field-contentSection ID: DOC-API-MODEL-schema-1hqi9r2bhh#response-field-contentcontentstringOptionalText 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-metadatametadataMap from string to stringOptionalAdditional type-specific metadata (dimensions, mime_type, etc.).
Section ID: DOC-API-MODEL-schema-1hqi9r2bhh#field-cachepreferredSection ID: DOC-API-MODEL-schema-1hqi9r2bhh#response-field-cachepreferredcachePreferredbooleanOptionalHint 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-structuredmessagestructuredMessageStructuredMessageOptionalPopulated 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.

ValueNo.FormMeaning
CONTENT_PART_TYPE_TEXT0CanonicalSee meaning below.
CONTENT_PART_TYPE_IMAGE_URL1CanonicalSee meaning below.
CONTENT_PART_TYPE_IMAGE_BASE642CanonicalSee meaning below.
CONTENT_PART_TYPE_FILE_ID3CanonicalSee meaning below.
CONTENT_PART_TYPE_FILE_PATH4CanonicalSee meaning below.
CONTENT_PART_TYPE_FILE_URL5CanonicalSee meaning below.
CONTENT_PART_TYPE_FILE_DATA_URL6CanonicalSee meaning below.
CONTENT_PART_TYPE_AUDIO_BASE647CanonicalSee meaning below.
CONTENT_PART_TYPE_REASONING8CanonicalSee 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

Section ID: 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 toRuleRequirement
typeDefined enum valuetrue

Where used​

Section ID: DOC-API-MODEL-schema-1hqi9r2bhh#where-used

ReferenceRelationship
Withdraw your rating on a messagePOST /api/v1/llm/delete-message-rating
Get full conversation statePOST /api/v1/llm/conversation-state
List MCP resourcesPOST /api/v1/llm/mcp-list-resources
Read an MCP resourcePOST /api/v1/llm/mcp-read-resource
Rate an assistant messagePOST /api/v1/llm/rate-message
Send a message and wait for the resultPOST /api/v1/llm/send-message-sync
Submit client-side tool results and wait for the next segmentPOST /api/v1/llm/submit-client-tool-results-sync
Append a message without generatingPOST /api/v1/llm/append-message
Send a message to a conversationPOST /api/v1/llm/send-message
ReceiveMessageRequestAPI JSON uses JSON field names (camelCase).
ClientToolDispatchAPI JSON uses JSON field names (camelCase).
Models containing this value
ModelRelationship
MessageNested in model
MessageNested in model
PdfAnnotationNested in model
PdfAnnotationNested in model
ResourceNested in model

Download the public reference contract.

Document ID: DOC-API-MODEL-schema-1hqi9r2bhh