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

# Generate Pre-signed URL (API Tester)

> Run Generate Pre-signed URL live from your browser — send a real request and see the response and credit usage, no code required. PDF.co API Tester.

> [!NOTE]
>
> **Save both links from GET before uploading:** use `presignedUrl` as the destination for the PUT request. Keep the separate `url` to open, download, or process the uploaded file after PUT succeeds. PUT normally returns only HTTP 200 with an empty body; it does not return another file URL.

> [!NOTE]
>
> **Full reference:** [Generate Pre-signed URL](https://developer.pdf.co/api/file-upload/generate-presigned-url.md).

## Upload in two requests

1. Generate links with this GET request. For the PUT Tester, use `contenttype=application/octet-stream` and enter your file name. GET does not upload any file bytes.
2. Copy the complete `presignedUrl`, including its query string. Open [Upload File via Pre-signed URL (PUT)](https://developer.pdf.co/api-tester/file-upload/upload-presigned-url-put.md), paste it into the single URL field, select your local file, and send the request. Keep the returned access `url` for later.

The PUT sends raw bytes to storage with `Content-Type: application/octet-stream` and no PDF.co API key. A successful storage PUT normally returns HTTP 200 with an empty body. Then use the original access `url` in another PDF.co API request. The two requests do not advance or share response values automatically.

Postman and cURL can also send the PUT to the complete signed URL. See the [upload reference](https://developer.pdf.co/api/file-upload/upload-presigned-url-put.md).


## OpenAPI

````yaml /openapi.json get /v1/file/upload/get-presigned-url
openapi: 3.0.1
info:
  title: PDF.co API
  description: ''
  version: '1.0'
servers:
  - url: https://api.pdf.co
security:
  - ApiKeyAuth: []
tags:
  - name: Extraction
  - name: Editing
  - name: PDF Conversion
  - name: Excel Conversion
  - name: PDF Merging & Splitting
  - name: Forms
  - name: Find & Search
  - name: Document, File & System
  - name: Pages
  - name: Barcodes
paths:
  /v1/file/upload/get-presigned-url:
    get:
      tags:
        - Document, File & System
      summary: Generate Pre-signed URL
      description: >-
        This method generates links to upload your local file to. Use this
        presignedUrl from the response to upload your file. Once you upload your
        file to this presignedUrl using PUT, you can use the url link to access
        the uploaded file.
      operationId: get_v1_file_upload_get_presigned_url
      parameters:
        - name: name
          in: query
          description: >-
            File name for the generated output, the input must be in string
            format.
          schema:
            example: sample.pdf
            type: string
        - name: contenttype
          in: query
          description: The content type of the uploaded file
          schema:
            example: application/octet-stream
            type: string
            format: mime type
        - name: timeout
          in: query
          description: Timeout for output links in seconds.
          schema:
            type: string
      responses:
        '200':
          $ref: '#/components/responses/PresignedUrlSuccess'
        '400':
          $ref: '#/components/responses/BadRequest'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '402':
          $ref: '#/components/responses/NotEnoughCredits'
        '403':
          $ref: '#/components/responses/Forbidden'
        '404':
          $ref: '#/components/responses/NotFound'
        '408':
          $ref: '#/components/responses/Timeout'
        '429':
          $ref: '#/components/responses/TooManyRequests'
        '441':
          $ref: '#/components/responses/InvalidPassword'
        '442':
          $ref: '#/components/responses/DamagedDocument'
        '443':
          $ref: '#/components/responses/PermissionsError'
        '444':
          $ref: '#/components/responses/ProfilesParsingError'
        '445':
          $ref: '#/components/responses/TimeoutError'
        '446':
          $ref: '#/components/responses/MissingFiles'
        '447':
          $ref: '#/components/responses/InvalidTemplate'
        '448':
          $ref: '#/components/responses/InvalidUrlOrHtml'
        '449':
          $ref: '#/components/responses/InvalidIndexRange'
        '450':
          $ref: '#/components/responses/InvalidPageRange'
        '452':
          $ref: '#/components/responses/InvalidUrl'
        '454':
          $ref: '#/components/responses/InvalidParameters'
        '500':
          $ref: '#/components/responses/InternalServerError'
components:
  responses:
    PresignedUrlSuccess:
      description: >-
        Upload and access URLs generated. The file is available only after a
        successful PUT. Example URLs omit signing credentials; use the complete
        URLs from your actual response.
      content:
        application/json:
          schema:
            type: object
            properties:
              presignedUrl:
                type: string
                format: uri
                description: >-
                  Complete signed URL for uploading raw file bytes with PUT.
                  Keep its query string intact.
              url:
                type: string
                format: uri
                description: >-
                  URL to use as input to conversion endpoints after the upload
                  succeeds.
              error:
                type: boolean
                description: False when the request succeeds.
              status:
                type: integer
                description: API status code, such as 200 for success.
              name:
                type: string
                description: Uploaded filename.
              outputLinkValidTill:
                type: string
                format: date-time
                description: Expiration timestamp for the temporary file URL.
              credits:
                type: integer
                description: Credits used by this request.
              remainingCredits:
                type: integer
                description: Credits remaining in the account.
              duration:
                type: integer
                description: Request duration in milliseconds.
          example:
            presignedUrl: >-
              https://pdf-temp-files.s3.us-west-2.amazonaws.com/example/sample.pdf
            url: >-
              https://pdf-temp-files.s3.us-west-2.amazonaws.com/example/sample.pdf
            error: false
            status: 200
            name: sample.pdf
    BadRequest:
      description: >-
        Bad request. Typically due to bad input parameters or unreachable input
        URLs (e.g., access restrictions like login or password).
      content:
        application/json:
          schema:
            type: object
            properties:
              error:
                type: boolean
                example: true
              status:
                type: integer
                example: 400
              message:
                type: string
                example: >-
                  Bad request. Typically due to bad input parameters or
                  unreachable input URLs (e.g., access restrictions like login
                  or password).
    Unauthorized:
      description: >-
        Unauthorized. Authentication is required and has failed or has not yet
        been provided.
      content:
        application/json:
          schema:
            type: object
            properties:
              error:
                type: boolean
                example: true
              status:
                type: integer
                example: 401
              message:
                type: string
                example: >-
                  Unauthorized. Authentication is required and has failed or has
                  not yet been provided.
    NotEnoughCredits:
      description: Not enough credits.
      content:
        application/json:
          schema:
            type: object
            properties:
              error:
                type: boolean
                example: true
              status:
                type: integer
                example: 402
              message:
                type: string
                example: Not enough credits.
    Forbidden:
      description: Access forbidden for input URL.
      content:
        application/json:
          schema:
            type: object
            properties:
              error:
                type: boolean
                example: true
              status:
                type: integer
                example: 403
              message:
                type: string
                example: Access forbidden for input URL.
    NotFound:
      description: The requested resource could not be found.
      content:
        application/json:
          schema:
            type: object
            properties:
              error:
                type: boolean
                example: true
              status:
                type: integer
                example: 404
              message:
                type: string
                example: The requested resource could not be found.
    Timeout:
      description: The server timed out waiting for the request.
      content:
        application/json:
          schema:
            type: object
            properties:
              error:
                type: boolean
                example: true
              status:
                type: integer
                example: 408
              message:
                type: string
                example: The server timed out waiting for the request.
    TooManyRequests:
      description: Too many requests in a given time period.
      content:
        application/json:
          schema:
            type: object
            properties:
              error:
                type: boolean
                example: true
              status:
                type: integer
                example: 429
              message:
                type: string
                example: Too many requests in a given time period.
    InvalidPassword:
      description: Invalid Password. Password protected document.
      content:
        application/json:
          schema:
            type: object
            properties:
              error:
                type: boolean
                example: true
              status:
                type: integer
                example: 441
              message:
                type: string
                example: Invalid Password. Password protected document.
    DamagedDocument:
      description: Input document is damaged or of incorrect type.
      content:
        application/json:
          schema:
            type: object
            properties:
              error:
                type: boolean
                example: true
              status:
                type: integer
                example: 442
              message:
                type: string
                example: Input document is damaged or of incorrect type.
    PermissionsError:
      description: >-
        Permissions. The operation is prohibited by document security settings.
        You can turn off this check by setting the `profiles` param to
        `{CheckPermissions: false}`. Important: only use this if you are the
        owner or have legal permission.
      content:
        application/json:
          schema:
            type: object
            properties:
              error:
                type: boolean
                example: true
              status:
                type: integer
                example: 443
              message:
                type: string
                example: >-
                  Permissions. The operation is prohibited by document security
                  settings.
    ProfilesParsingError:
      description: >-
        Profiles parsing error. Please ensure that the configuration is
        supported. See `/profiles` samples.
      content:
        application/json:
          schema:
            type: object
            properties:
              error:
                type: boolean
                example: true
              status:
                type: integer
                example: 444
              message:
                type: string
                example: >-
                  Profiles parsing error. Please ensure that the configuration
                  is supported.
    TimeoutError:
      description: >-
        Timeout error. For large documents, use asynchronous mode (`async=true`)
        and check status via `/job/check`. For many-page files, use the `pages`
        parameter.
      content:
        application/json:
          schema:
            type: object
            properties:
              error:
                type: boolean
                example: true
              status:
                type: integer
                example: 445
              message:
                type: string
                example: >-
                  Timeout error. For large documents, use asynchronous mode
                  (async=true) and check status via /job/check.
    MissingFiles:
      description: Some files required for conversion are missing.
      content:
        application/json:
          schema:
            type: object
            properties:
              error:
                type: boolean
                example: true
              status:
                type: integer
                example: 446
              message:
                type: string
                example: Some files required for conversion are missing.
    InvalidTemplate:
      description: Invalid template.
      content:
        application/json:
          schema:
            type: object
            properties:
              error:
                type: boolean
                example: true
              status:
                type: integer
                example: 447
              message:
                type: string
                example: Invalid template.
    InvalidUrlOrHtml:
      description: Invalid URL or HTML. Ensure the provided URL is valid and accessible.
      content:
        application/json:
          schema:
            type: object
            properties:
              error:
                type: boolean
                example: true
              status:
                type: integer
                example: 448
              message:
                type: string
                example: >-
                  Invalid URL or HTML. Ensure the provided URL is valid and
                  accessible.
    InvalidIndexRange:
      description: >-
        Invalid index range. Page index is out of range. Use `/pdf/info` to get
        page count. First page is `0`.
      content:
        application/json:
          schema:
            type: object
            properties:
              error:
                type: boolean
                example: true
              status:
                type: integer
                example: 449
              message:
                type: string
                example: Invalid index range. Page index is out of range.
    InvalidPageRange:
      description: Invalid page range specified.
      content:
        application/json:
          schema:
            type: object
            properties:
              error:
                type: boolean
                example: true
              status:
                type: integer
                example: 450
              message:
                type: string
                example: Invalid page range specified.
    InvalidUrl:
      description: Invalid URL.
      content:
        application/json:
          schema:
            type: object
            properties:
              error:
                type: boolean
                example: true
              status:
                type: integer
                example: 452
              message:
                type: string
                example: Invalid URL.
    InvalidParameters:
      description: Invalid parameters.
      content:
        application/json:
          schema:
            type: object
            properties:
              error:
                type: boolean
                example: true
              status:
                type: integer
                example: 454
              message:
                type: string
                example: Invalid parameters.
    InternalServerError:
      description: Something went wrong. Please try again or contact support.
      content:
        application/json:
          schema:
            type: object
            properties:
              error:
                type: boolean
                example: true
              status:
                type: integer
                example: 500
              message:
                type: string
                example: Something went wrong. Please try again or contact support.
  securitySchemes:
    ApiKeyAuth:
      type: apiKey
      in: header
      name: x-api-key

````

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