Repository Public
1---2title: Generated Files3url: https://platform.claude.com/docs/en/api/compliance/apps/chats/generated_files4---56# Generated Files78## Get Claude-generated file metadata910**GET** `/v1/compliance/apps/chats/generated-files/{claude_gen_file_id}`1112Returns metadata for a file the assistant created via tool use.1314Use the sibling `/content` endpoint to download the bytes.1516### Path parameters1718- `claude_gen_file_id: string`1920 The generated-file id (e.g., 'claude_gen_file_abc123') as returned in `chat_messages[].generated_files[].id` from GET /apps/chats/{claude_chat_id}/messages.2122### Headers2324- `"x-api-key": optional string`2526### Returns2728- `id: string`2930 Opaque generated-file id, e.g. 'claude_gen_file_abc123'.3132- `claude_chat_id: string`3334 The chat this generated file belongs to3536- `created_at: string or null`3738 File creation timestamp, when available3940 format: date-time4142- `filename: string`4344 Display name of the generated file4546- `md5: string or null`4748 Lowercase hex MD5 of the stored file. Null when no stored hash is available. The sibling `/content` endpoint also sets a `Content-MD5` header (base64 per RFC 1864) computed over the exact served bytes.4950- `mime_type: string or null`5152 MIME type of the stored file, when available5354- `size_bytes: number or null`5556 Size in bytes of the stored file, when available5758### Example5960```bash61curl https://api.anthropic.com/v1/compliance/apps/chats/generated-files/$CLAUDE_GEN_FILE_ID \62 -H 'anthropic-version: 2023-06-01' \63 -H "Authorization: Bearer $ANTHROPIC_COMPLIANCE_API_KEY"64```6566#### Response (200)6768```json69{70 "id": "id",71 "claude_chat_id": "claude_chat_id",72 "created_at": "2019-12-27T18:11:19.117Z",73 "filename": "filename",74 "md5": "md5",75 "mime_type": "mime_type",76 "size_bytes": 077}78```7980## Download a Claude-generated file8182**GET** `/v1/compliance/apps/chats/generated-files/{claude_gen_file_id}/content`8384Downloads the binary content of a file the assistant created via tool use.8586### Path parameters8788- `claude_gen_file_id: string`8990 The generated-file id (e.g., 'claude_gen_file_abc123') as returned in `chat_messages[].generated_files[].id` from GET /apps/chats/{claude_chat_id}/messages.9192### Headers9394- `"x-api-key": optional string`9596### Example9798```bash99curl https://api.anthropic.com/v1/compliance/apps/chats/generated-files/$CLAUDE_GEN_FILE_ID/content \100 -H 'anthropic-version: 2023-06-01' \101 -H "Authorization: Bearer $ANTHROPIC_COMPLIANCE_API_KEY"102```103104## Domain types105106### Generated File Retrieve Response107108- `GeneratedFileRetrieveResponse object`109110 Metadata for GET /v1/compliance/apps/chats/generated-files/{claude_gen_file_id}.111112 Returns metadata only. Use the sibling `/content` endpoint to download113 the bytes. The owning chat is included since the id is opaque; to find the114 specific message that produced the file, fetch115 `/v1/compliance/apps/chats/{claude_chat_id}/messages` and match on116 `generated_files[].id`.117118 - `id: string`119120 Opaque generated-file id, e.g. 'claude_gen_file_abc123'.121122 - `claude_chat_id: string`123124 The chat this generated file belongs to125126 - `created_at: string or null`127128 File creation timestamp, when available129130 format: date-time131132 - `filename: string`133134 Display name of the generated file135136 - `md5: string or null`137138 Lowercase hex MD5 of the stored file. Null when no stored hash is available. The sibling `/content` endpoint also sets a `Content-MD5` header (base64 per RFC 1864) computed over the exact served bytes.139140 - `mime_type: string or null`141142 MIME type of the stored file, when available143144 - `size_bytes: number or null`145146 Size in bytes of the stored file, when available147