LLMContent
API reference
An ordered run of text and media content for a model to read, built outside any conversation.
Implements Node
id: ID!
A unique identifier for this LLMContent.
blocks: [LLMContentBlock!]!
The ordered text and media blocks.
withData(data: Bytes!, mimeType: String!): LLMContent!
Append image, audio, or PDF bytes as an inline media block. The media kind follows the MIME type.
Prefer withFile for anything but small payloads: the bytes become part of the content's identity, so they travel with every reference to it.
data: Bytes!The media bytes.
mimeType: String!The media MIME type, e.g. "image/png".
withFile(file: File!, mimeType: String = ""): LLMContent!
Append an image, audio, or PDF file as an inline media block. The media kind follows the MIME type.
file: File!The media file. Its contents become the block's inline bytes.
mimeType: String = ""The media MIME type, e.g. "image/png". Inferred from the file's contents when omitted.
withText(text: String!): LLMContent!
Append a block of text.
text: String!The text.