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

# Download file

> Get a signed download URL for a file.

Returns a signed download URL for a file.

## Query parameters

<ParamField query="id" type="string" required>
  File ID.
</ParamField>

## Response

<ResponseField name="url" type="string">
  Signed download URL (expires in 1 hour).
</ResponseField>

## Example

<CodeGroup>
  ```bash cURL theme={null}
  curl "https://www.orgo.ai/api/files/download?id=f47ac10b-58cc-4372-a567-0e02b2c3d479" \
    -H "Authorization: Bearer $ORGO_API_KEY"
  ```

  ```python Python theme={null}
  import requests

  response = requests.get(
      "https://www.orgo.ai/api/files/download",
      headers={"Authorization": f"Bearer {api_key}"},
      params={"id": file_id}
  )

  url = response.json()["url"]

  # Download the file
  file_response = requests.get(url)
  with open("downloaded.txt", "wb") as f:
      f.write(file_response.content)
  ```

  ```javascript JavaScript theme={null}
  const response = await fetch(`https://www.orgo.ai/api/files/download?id=${fileId}`, {
    headers: { 'Authorization': `Bearer ${apiKey}` }
  });

  const { url } = await response.json();

  // Download the file
  const fileResponse = await fetch(url);
  const blob = await fileResponse.blob();
  ```
</CodeGroup>

### Response

```json theme={null}
{
  "url": "https://storage.example.com/files/..."
}
```

<Info>
  The returned URL is pre-signed and can be used directly in a browser or with any HTTP client. URLs expire after 1 hour.
</Info>


## OpenAPI

````yaml GET /files/download
openapi: 3.1.0
info:
  title: Orgo API
  description: >-
    Launch cloud computers that AI agents can control and interact with. Create
    workspaces, provision computers, and control them programmatically.
  version: 2.0.0
  contact:
    name: Orgo Support
    email: spencer@orgo.ai
    url: https://orgo.ai
servers:
  - url: https://www.orgo.ai/api
    description: Production
security:
  - bearerAuth: []
tags:
  - name: Workspaces
    description: Organize computers into named workspaces
  - name: Computers
    description: Provision and manage virtual computers
  - name: Computer Lifecycle
    description: Start, stop, and restart computers
  - name: Computer Actions
    description: Control mouse, keyboard, and execute commands
  - name: Streaming
    description: Stream computer display via RTMP
  - name: Files
    description: Upload and download files
  - name: Templates
    description: Author, build, and launch reproducible computers from templates
paths:
  /files/download:
    get:
      tags:
        - Files
      summary: Download file
      description: Returns a signed download URL for a file. URLs expire in 1 hour.
      operationId: downloadFile
      parameters:
        - name: id
          in: query
          required: true
          description: File ID
          schema:
            type: string
      responses:
        '200':
          description: Download URL
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/FileDownloadResponse'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '404':
          $ref: '#/components/responses/NotFound'
components:
  schemas:
    FileDownloadResponse:
      type: object
      properties:
        url:
          type: string
          description: Signed download URL (expires in 1 hour)
    Error:
      type: object
      properties:
        error:
          type: string
          description: Error message
  responses:
    Unauthorized:
      description: Invalid or missing API key
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
          example:
            error: Invalid API key
    NotFound:
      description: Resource not found
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
          example:
            error: Resource not found
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      description: API key authentication. Get your key at orgo.ai/workspaces

````