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

# Generate Presigned URL

> Generate a time-limited presigned S3 URL from an S3 object key. The returned URL expires after **1 hour** and can be used directly for download without an auth header.

Use this endpoint when another API returns a raw S3 key. If your client cannot access S3 directly, pass the returned URL to `GET /api/v1/proxy/file` as the `presigned_url` query param.



## OpenAPI

````yaml /api-reference/openapi-v1.json post /generate-presigned-url
openapi: 3.0.0
info:
  title: Artos API
  description: API for document generation, template management, and document organization
  version: 1.0.0
  contact:
    name: Artos Support
    email: internal@artosai.com
servers:
  - url: https://api.artosai.com
    description: Production server
  - url: http://localhost:8000
    description: Local development server
security:
  - bearerAuth: []
paths:
  /generate-presigned-url:
    post:
      tags:
        - Files
      summary: Generate Presigned URL
      description: >-
        Generate a time-limited presigned S3 URL from an S3 object key. The
        returned URL expires after **1 hour** and can be used directly for
        download without an auth header.


        Use this endpoint when another API returns a raw S3 key. If your client
        cannot access S3 directly, pass the returned URL to `GET
        /api/v1/proxy/file` as the `presigned_url` query param.
      operationId: generatePresignedUrl
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/GeneratePresignedUrlRequest'
            example:
              key: org-id/documents/protocol.pdf
      responses:
        '200':
          description: Presigned URL generated successfully
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/GeneratePresignedUrlResponse'
              example:
                url: >-
                  https://bucket.s3.amazonaws.com/org-id/documents/protocol.pdf?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Expires=3600&...
        '400':
          description: Authentication failed
        '500':
          description: Failed to generate presigned URL
components:
  schemas:
    GeneratePresignedUrlRequest:
      type: object
      properties:
        key:
          type: string
          description: S3 object key for the file (e.g., org-id/documents/protocol.pdf)
      required:
        - key
    GeneratePresignedUrlResponse:
      type: object
      properties:
        url:
          type: string
          description: >-
            Presigned HTTPS URL for direct file download. Expires after 1 hour
            and requires no additional authentication.
      required:
        - url
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      bearerFormat: JWT
      description: Bearer token authentication. Token provides organization-scoped access.

````