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

# Generate Download URL for Object.

> Generate a presigned download URL for an Object. The URL will be valid for the specified duration.



## OpenAPI

````yaml /openapi-specs/stainless-processed-openapi.json get /v1/objects/{id}/download
openapi: 3.1.0
info:
  title: RunLoop API
  version: '0.1'
  description: >-
    The RunLoop API spec that allows you to host lambda functions and Devboxes
    to enable scaled long running ai workflows.
  contact:
    name: Runloop AI Support
    url: https://runloop.ai
    email: support@runloop.ai
servers:
  - url: https://api.runloop.ai
    description: Runloop API
    variables: {}
security:
  - bearerAuth: []
tags:
  - name: Benchmark
  - name: Blueprint
  - name: Blueprint-Lifecycle
  - name: Blueprint-ObservabilityTools
  - name: Devbox
  - name: Devbox-FileTools
  - name: Devbox-Lifecycle
  - name: Devbox-NetworkTools
  - name: Devbox-ObservabilityTools
  - name: Devbox-PersistenceTools
  - name: Devbox-ShellTools
  - name: Scenario
  - name: ScenarioScorer
  - name: accounts
  - name: agents
  - name: apikeys
  - name: axons
  - name: executions
  - name: gateway-configs
  - name: mcp-configs
  - name: network-policies
  - name: objects
  - name: restricted_keys
  - name: secrets
  - name: streaming
paths:
  /v1/objects/{id}/download:
    get:
      tags:
        - objects
      summary: Generate Download URL for Object.
      description: >-
        Generate a presigned download URL for an Object. The URL will be valid
        for the specified duration.
      operationId: generateDownloadUrl
      parameters:
        - name: id
          in: path
          description: The unique identifier of the Object to generate download URL for.
          required: true
          schema:
            type: string
        - name: duration_seconds
          in: query
          description: 'Duration in seconds for the presigned URL validity (default: 3600).'
          allowEmptyValue: true
          schema:
            type: integer
            format: int64
      responses:
        '200':
          description: Download URL generated successfully.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ObjectDownloadUrlView'
        '400':
          description: Bad request. Object is in deleted state or invalid parameters.
        '401':
          description: Unauthorized. Invalid or missing authentication.
        '403':
          description: Forbidden. Account does not have devbox capability.
        '404':
          description: Object not found.
        '500':
          description: Internal server error.
      x-codeSamples:
        - lang: JavaScript
          source: |-
            import Runloop from '@runloop/api-client';

            const client = new Runloop({
              bearerToken: process.env['RUNLOOP_API_KEY'], // This is the default and can be omitted
            });

            const objectDownloadURLView = await client.objects.download('id');

            console.log(objectDownloadURLView.download_url);
        - lang: Python
          source: |-
            import os
            from runloop_api_client import Runloop

            client = Runloop(
                bearer_token=os.environ.get("RUNLOOP_API_KEY"),  # This is the default and can be omitted
            )
            object_download_url_view = client.objects.download(
                id="id",
            )
            print(object_download_url_view.download_url)
components:
  schemas:
    ObjectDownloadUrlView:
      type: object
      description: A response containing a presigned download URL for an Object.
      properties:
        download_url:
          type: string
          description: The presigned download URL for the Object.
      required:
        - download_url
  securitySchemes:
    bearerAuth:
      scheme: bearer
      type: http

````