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

# Retrieve a download url

> Get a short-lived download url for a stored object.



## OpenAPI

````yaml get /storage/presigned-url
openapi: 3.0.3
info:
  contact:
    email: support@openlayer.com
    name: Openlayer
    url: https://openlayer.com/
  description: API for interacting with the Openlayer server.
  title: Openlayer API
  version: '1.0'
  x-logo:
    url: https://logo.clearbit.com/openlayer.com
servers:
  - url: https://api.openlayer.com/v1
    description: Our prod backend
security:
  - bearerAuth: []
paths:
  /storage/presigned-url:
    get:
      tags:
        - Storage
      summary: Retrieve a download url
      description: Get a short-lived download url for a stored object.
      operationId: getPresignedUrlForDownload
      parameters:
        - name: storageUri
          in: query
          required: true
          description: >-
            The object's storage uri, for example `outputs.storageUri` from a
            framework export's background task.
          schema:
            type: string
      responses:
        '200':
          description: Response OK.
          content:
            application/json:
              schema:
                type: object
                required:
                  - url
                properties:
                  url:
                    description: The presigned url. Short-lived -- download promptly.
                    type: string
                    format: url
        '404':
          description: No such object, or it isn't owned by the workspace of your API key.
        default:
          $ref: '#/components/responses/UnexpectedError'
      x-codeSamples:
        - lang: python
          source: |
            from openlayer import Openlayer

            client = Openlayer()

            presigned_url = client.storage.presigned_url.retrieve(
                storage_uri="s3://openlayer-bucket/evidence/policy.pdf",
            )
            print(presigned_url.url)
        - lang: typescript
          source: |
            import Openlayer from 'openlayer';

            const client = new Openlayer();

            const presignedURL = await client.storage.presignedURL.retrieve({
              storageUri: 's3://openlayer-bucket/evidence/report.pdf',
            });

            console.log(presignedURL.url);
        - lang: go
          source: "package main\n\nimport (\n\t\"context\"\n\t\"fmt\"\n\n\t\"github.com/openlayer-ai/openlayer-go\"\n)\n\nclient := openlayer.NewClient()\npresigned, err := client.Storage.PresignedURL.Get(context.TODO(), openlayer.StoragePresignedURLGetParams{\n\tStorageUri: openlayer.F(\"s3://openlayer-bucket/uploads/my-project/commit.tar.gz\"),\n})\nif err != nil {\n\tpanic(err.Error())\n}\nfmt.Printf(\"%+v\\n\", presigned.URL)\n"
        - lang: java
          source: >
            import com.openlayer.api.client.OpenlayerClient;

            import com.openlayer.api.client.okhttp.OpenlayerOkHttpClient;

            import
            com.openlayer.api.models.storage.presignedurl.PresignedUrlRetrieveParams;

            import
            com.openlayer.api.models.storage.presignedurl.PresignedUrlRetrieveResponse;


            OpenlayerClient client = OpenlayerOkHttpClient.fromEnv();


            PresignedUrlRetrieveParams params =
            PresignedUrlRetrieveParams.builder()
                .storageUri("s3://openlayer-uploads/model_package.tar.gz")
                .build();
            PresignedUrlRetrieveResponse presignedUrl =
            client.storage().presignedUrl().retrieve(params);
        - lang: ruby
          source: |
            require "openlayer"

            openlayer = Openlayer::Client.new(api_key: ENV["OPENLAYER_API_KEY"])

            presigned_url = openlayer.storage.presigned_url.retrieve(
              storage_uri: "s3://my-bucket/commits/bundle.tar.gz"
            )

            puts(presigned_url.url)
        - lang: curl
          source: |
            curl --request GET \
              --url 'https://api.openlayer.com/v1/storage/presigned-url?storageUri=s3%3A%2F%2Fopenlayer-storage%2Fexports%2Fsoc2-2026-09-15.zip' \
              --header 'Authorization: Bearer <token>'
components:
  responses:
    UnexpectedError:
      description: Unexpected error.
      content:
        application/json:
          schema:
            type: object
            required:
              - code
              - error
            properties:
              code:
                type: integer
                format: int32
              error:
                type: string
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      description: >
        Bearer authentication header of the form `Bearer <token>`, where
        `<token>` is your workspace API key. See [Find your API
        key](https://www.openlayer.com/docs/workspace-and-projects/find-your-api-key)
        for more information.

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.