Skip to main content

Get Download URL for Generated Files

Convert generated file URLs to downloadable temporary URLs. Only supports files generated by Apikley services.

Features

  • Convert Apikley generated file URLs to downloadable links
  • Supports all file types generated by Apikley platform (images, videos, audio, etc.)
  • Temporary download URLs valid for 20 minutes
  • Secure access to generated content
  • API Key authentication protection

Important Notes

Only generated file URLs from Apikley services are supported. External file URLs will result in a 422 validation error.
The downloadable URLs expire after 20 minutes. Make sure to download or cache the content within this timeframe.
Rate limits and quotas are enforced by Apikley and may differ from upstream providers.

OpenAPI

common-api/common-api.json post /api/v1/common/download-url
openapi: 3.0.0
info:
  title: Common API
  description: Apikley Common API Documentation
  version: 1.0.0
  contact:
    name: Technical Support
    email: [email protected]
servers:
  - url: https://api.apikley.ru
    description: API Server
security:
  - BearerAuth: []
paths:
  /api/v1/common/download-url:
    post:
      summary: Get Download URL for Generated Files
      operationId: download-url
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                url:
                  type: string
                  format: uri
                  description: >-
                    Generated file URL from Apikley services. External file URLs
                    are not supported.
                  example: https://api.apikley.ru/file-upload/files/example/temporary-file.bin
              required:
                - url
      responses:
        '200':
          description: Request successful
          content:
            application/json:
              schema:
                allOf:
                  - type: object
                    properties:
                      code:
                        type: integer
                        enum:
                          - 200
                          - 401
                          - 402
                          - 404
                          - 422
                          - 429
                          - 455
                          - 500
                          - 505
                        description: >-
                          Response Status Code


                          | Code | Description |

                          |------|-------------|

                          | 200 | Success - Request has been processed
                          successfully |

                          | 401 | Unauthorized - Authentication credentials are
                          missing or invalid |

                          | 402 | Insufficient Credits - Account does not have
                          enough credits to perform the operation |

                          | 404 | Not Found - The requested resource or endpoint
                          does not exist |

                          | 422 | Validation Error - Invalid URL (External file
                          URLs are not supported) |

                          | 429 | Rate Limited - Request limit has been exceeded
                          for this resource |

                          | 455 | Service Unavailable - System is currently
                          undergoing maintenance |

                          | 500 | Server Error - An unexpected error occurred
                          while processing the request |

                          | 505 | Feature Disabled - The requested feature is
                          currently disabled |
                      msg:
                        type: string
                        description: Error message when code != 200
                        example: success
                  - type: object
                    properties:
                      data:
                        type: string
                        format: uri
                        description: Downloadable URL for the file. Valid for 20 minutes.
                        example: >-
                          https://api.apikley.ru/file-upload/download/eyJwYXRoIjoiZXhhbXBsZS90ZW1wb3JhcnktZmlsZS5iaW4iLCJleHAiOjE3MDAwMDAwMDB9.xxxxxx
              example:
                code: 200
                msg: success
                data: https://api.apikley.ru/file-upload/download/eyJwYXRoIjoiZXhhbXBsZS90ZW1wb3JhcnktZmlsZS5iaW4iLCJleHAiOjE3MDAwMDAwMDB9.xxxxxx
        '500':
          $ref: '#/components/responses/Error'
components:
  responses:
    Error:
      description: Server Error
  securitySchemes:
    BearerAuth:
      type: http
      scheme: bearer
      bearerFormat: API Key
      description: >-
        All APIs require authentication via Bearer Token.


        Get API Key:

        1. Visit [API Key Management Page](https://app.apikley.ru/keys) to get your
        API Key


        Usage:

        Add to request header:

        Authorization: Bearer APIKLEY_API_KEY


To find navigation and other pages in this documentation, fetch the llms.txt file at: https://docs.apikley.ru/llms.txt