> ## Documentation Index
> Fetch the complete documentation index at: https://docs.veridox.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# Get Asset URL

> Generate a fresh signed URL for a specific asset on a case file.

Generate a fresh signed URL for a specific asset attached to a case file. Use this endpoint when you need a short-lived URL for a single asset without fetching the full analysis response.

## Supported Assets

| Asset type      | Description                        |
| --------------- | ---------------------------------- |
| `file_download` | The original uploaded file         |
| `thumbnail`     | A preview image of the file        |
| `pdf_report`    | The PDF analysis report            |
| `log_output`    | Raw analysis log output            |
| `ela_overlay`   | Error Level Analysis overlay image |

## URL Expiration

Signed URLs expire **30 minutes** after generation. Do not store them — call this endpoint again to get a fresh URL when needed.

## Best Practices

1. **Request on demand**: Fetch a signed URL immediately before you need to use it. Storing URLs risks serving expired links to your users.
2. **Check asset availability**: A `404` with code `request.cases.case-file.asset-not-found` means the asset has not been generated yet or doesn't exist for the file. Wait for the file's `analysis_status` to reach `settled` before requesting report or overlay assets.
3. **Security**: Never expose signed URLs in client-side code or public environments.


## OpenAPI

````yaml GET /files/asset-url
openapi: 3.1.0
info:
  title: Veridox Core API
  description: Veridox Core Platform API
  version: 0.0.1
  contact: {}
servers:
  - url: https://api.uk.veridox.ai
    description: Live (UK)
  - url: https://api.ca.veridox.ai
    description: Live (CA)
security: []
tags:
  - name: Status
    description: System status and health check endpoints
  - name: Cases
    description: Case and case file management
  - name: Organisations
    description: Organisation management
  - name: Document Requests
    description: Document request management
  - name: Search
    description: Search functionality
  - name: Admin
    description: Administrative endpoints
paths:
  /files/asset-url:
    get:
      tags:
        - Case Files
      summary: Get a signed URL for a file asset
      description: >-
        Generates a fresh 30-minute signed URL for a specific asset on a case
        file. The caller must have an active session and access to the file.
        Supported asset types: file_download, thumbnail, pdf_report, log_output,
        ela_overlay. Returns 404 if the file is not accessible or the asset has
        not been generated yet.
      operationId: CaseFilesController_getAssetUrl
      parameters:
        - name: file_id
          required: true
          in: query
          x-nestjs_zod-parent-additional-properties: false
          schema:
            type: string
            format: uuid
            pattern: >-
              ^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$
        - name: asset
          required: true
          in: query
          x-nestjs_zod-parent-additional-properties: false
          schema:
            type: string
            enum:
              - file_download
              - thumbnail
              - pdf_report
              - log_output
              - ela_overlay
      responses:
        '200':
          description: Signed URL generated
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/AssetUrlResponseDto'
        '400':
          description: Invalid file_id (not a UUID) or unknown asset type
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorDto'
        '401':
          description: Unauthorized (invalid or missing authentication token)
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorDto'
        '404':
          description: >-
            File not found or caller lacks access
            (request.cases.file.not-found), or asset not generated
            (request.cases.case-file.asset-not-found)
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorDto'
        '429':
          description: Too many requests (rate limit exceeded)
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorDto'
      security:
        - api-key: []
components:
  schemas:
    AssetUrlResponseDto:
      type: object
      properties:
        url:
          type: string
          format: uri
        expires_at:
          type: string
          format: date-time
          pattern: >-
            ^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d(?::[0-5]\d(?:\.\d+)?)?(?:Z))$
      required:
        - url
        - expires_at
    ErrorDto:
      type: object
      properties:
        error_code:
          type: string
          description: Machine-readable error code for programmatic handling
          examples:
            - request.cases.file.missing-risk-score
            - request.authentication.invalid-token
            - request.forbidden
            - request.cases.case.not-found
            - request.cases.case.already-locked
        error_message:
          type: string
          description: Human-readable error message explaining what went wrong
          example: >-
            User tried to perform an invalid operation on a file without a risk
            score.
        error_details:
          type: object
          example:
            field: email_address
      required:
        - error_code
        - error_message
  securitySchemes:
    api-key:
      type: apiKey
      in: header
      name: x-api-key

````