DownloadGeneratedFile
Downloads the raw content of a file generated by the Claude assistant.
Stored Procedure-Specific Information
Required input: ClaudeGenFileId. If neither FileName nor FileStream is specified, the driver returns the generated-file bytes in Base64-encoded FileData. Set FileName to save the file locally, or supply FileStream from your application to receive the bytes through an output stream. FileName takes precedence over FileStream.
To execute this procedure, enter:
EXEC DownloadGeneratedFile ClaudeGenFileId = 'claude_gen_file_123';
EXEC DownloadGeneratedFile ClaudeGenFileId = 'claude_gen_file_123', FileName = 'C:\\Downloads\\generated-file.json';
Input
| Name | Type | Required | Description |
| ClaudeGenFileId | String | True | The generated file Id to download. Required: Obtain it from GetChatMessageGeneratedFiles.Id or ChatMessages.GeneratedFiles (for example, claude_gen_file_abc123). |
| FileName | String | False | Optional absolute local path where the downloaded file is saved. Takes precedence over FileStream. |
Result Set Columns
| Name | Type | Description |
| FileData | String | The downloaded file bytes encoded as Base64 when FileName and FileStream are not set. |
| Success | Boolean | Indicates whether the download completed successfully. |