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

# Get Workflow Run File URL

> Get a temporary download URL for a workflow output file.

Use the `id` of a `fileRef` returned by the workflow's final output as the `file_id` query parameter. The response contains a signed download URL valid for ten minutes. Follow redirects when fetching the URL, and treat the URL as a temporary credential.

## Authentication and scope

Requires `workflow-runs-output-read` for files in the final output of a completed run, or `workflows-read` for general runtime file access. The token owner must be a workspace administrator, and any workspace restriction on the token must match. The permission does not restrict access to runs created by that particular token.

Temporary output ZIPs, PDFs and other `fileRef` values do not need to be persisted as workspace documents. Persisted `documentRef` values use the separate workspace document API and its permissions.

## Availability

For output-only access, an unfinished run or a file not present in the final output returns `404`. Files from another run require a validated internal alias; including an arbitrary file reference in JSON does not grant access.

An expired signed link returns `401`. Request a new URL through this endpoint while the stored file remains available. The download can return `404` if the file has been removed; issuing a link does not extend file retention.


## OpenAPI

````yaml get /workspaces/{workspaceId}/workflows/{workflowId}/runs/{runId}/file
openapi: 3.0.1
info:
  title: Raydocs API
  description: REST API for document extraction with AI-powered data parsing
  version: 1.0.0
servers:
  - url: https://api.raydocs.com
security:
  - bearerAuth: []
tags:
  - name: Workspaces
    description: Create and manage workspaces.
  - name: Workspace Users
    description: Manage users within a workspace.
  - name: Extraction Templates
    description: Define extraction schemas and settings.
  - name: Extraction Sessions
    description: Manage extraction jobs and documents.
  - name: Batch Operations
    description: Bulk operations on sessions.
  - name: Documents
    description: Upload and manage source documents.
  - name: Workflows
    description: Discover workflow runs and read their public outputs.
  - name: Results
    description: Access extraction results.
paths:
  /workspaces/{workspaceId}/workflows/{workflowId}/runs/{runId}/file:
    get:
      tags:
        - Workflows
      summary: Get Workflow Run File URL
      description: >-
        Return a signed download URL valid for ten minutes. Requires
        `workflow-runs-output-read` for files referenced in the final output of
        a completed run, or `workflows-read` for general runtime files. The
        token owner must be a workspace administrator. Workspace scope and run
        file access checks apply. Follow redirects when downloading.
      operationId: getWorkflowRunFileUrl
      parameters:
        - name: workspaceId
          in: path
          required: true
          schema:
            type: integer
        - name: workflowId
          in: path
          required: true
          schema:
            type: string
            format: uuid
        - name: runId
          in: path
          required: true
          schema:
            type: string
            format: uuid
        - name: file_id
          in: query
          required: true
          description: ID of the temporary fileRef to download.
          schema:
            type: string
      responses:
        '200':
          description: >-
            Temporary download URL. File availability is checked when
            downloading.
          content:
            application/json:
              schema:
                type: object
                required:
                  - url
                properties:
                  url:
                    type: string
                    format: uri
        '401':
          description: Authentication required
        '403':
          description: Insufficient permission or workspace access
        '404':
          description: >-
            Invalid resource hierarchy or inaccessible file. With output-only
            permission, also returned for non-completed runs and files absent
            from the final output.
components:
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      description: >
        Personal Access Token created from the Raydocs dashboard.

        Include in the Authorization header: `Bearer <your_token>`

        See [API Keys](/api-reference/api-keys) for token creation and
        management.

````