API Reference
FilePart
Defined in: types/content-part.ts:90
A file content part (e.g. a PDF): either inline base64 data, or a reference to a file already uploaded to the provider.
Remarks
Supply file_data (+ usually filename) for an inline document, OR file_id
to point at a previously-uploaded file — not both. The wire shape leaves all
three optional; which combination a given endpoint accepts is the provider's
concern.
Properties
| Property | Type | Description | Defined in |
|---|---|---|---|
file | { file_data?: string; file_id?: string; filename?: string; } | The inline file payload or an uploaded-file reference. | types/content-part.ts:94 |
file.file_data? | string | Inline file contents, base64-encoded (often a data: URI). | types/content-part.ts:96 |
file.file_id? | string | Id of a file previously uploaded to the provider. | types/content-part.ts:100 |
file.filename? | string | Display name for the file, e.g. "report.pdf". | types/content-part.ts:98 |
type | "file" | Discriminant. | types/content-part.ts:92 |