---
title: "Preview File"
method: GET
path: "/api/files/{file_id}/preview"
tags: ["files", "files"]
---

# Preview File

`GET /api/files/{file_id}/preview`

## Request

- Base URL: `https://api.dialogbrain.com` (the document declares no server; this is the origin it was published from)
- URL: `https://api.dialogbrain.com/api/files/{file_id}/preview`
- Auth: none declared

Preview a file inline in the browser (for images, PDFs, etc.)

By default, redirects to a presigned URL for direct access from storage (fast).
Use ?direct=true to stream through the API gateway (slower).

For non-previewable file types, falls back to download behavior.

## Path parameters

- `file_id` integer, required

## Query parameters

- `direct` boolean: If true, download through gateway instead of redirect

## Response `200`

Successful Response

- unknown

## Other responses

- `422`: Validation Error

---

[API](https://skmtc.dev/dialogbrain/apis/dialogbrain-v2-api-gateway.md) · [All operations](https://skmtc.dev/dialogbrain/apis/dialogbrain-v2-api-gateway/llms.txt) · [OpenAPI document](https://skmtc.dev/dialogbrain/apis/dialogbrain-v2-api-gateway/revisions/d84e7dc9977d?raw)
