Skip to main content

Get Direct Download URL

Convert an image URL to a direct download URL. This helps solve cross-domain issues when downloading images directly. The returned URL is valid for 20 minutes.
Rate limits and quotas are enforced by Apikley and may differ from upstream providers.

OpenAPI

4o-image-api/4o-image-api.json post /api/v1/gpt4o-image/download-url
openapi: 3.0.0
info:
  title: 4o Image API-GPT Image 1
  description: Apikley 4o Image 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/gpt4o-image/download-url:
    post:
      summary: Get Direct Download URL
      description: >-
        Convert an image URL to a direct download URL. This helps solve
        cross-domain issues when downloading images directly. The returned URL
        is valid for 20 minutes.
      operationId: get-4o-image-download-url
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                taskId:
                  type: string
                  description: The task ID associated with the image generation
                  example: task12345
                url:
                  type: string
                  format: uri
                  description: >-
                    The original image URL that needs to be converted to a
                    direct download URL
                  example: https://tempfile.aiquickdraw.com/v/xxxxxxx.png
              required:
                - taskId
                - url
              example:
                taskId: task12345
                url: https://tempfile.aiquickdraw.com/v/xxxxxxx.png
      responses:
        '200':
          description: Request successful
          content:
            application/json:
              schema:
                allOf:
                  - type: object
                    properties:
                      code:
                        type: integer
                        enum:
                          - 200
                          - 401
                          - 404
                          - 422
                          - 451
                          - 455
                          - 500
                        description: >-
                          Response Status Codes


                          - **200**: Success - Request has been processed
                          successfully  

                          - **401**: Unauthorized - Authentication credentials
                          are missing or invalid  

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

                          - **422**: Validation Error  
                            - The request parameters failed validation checks  
                            - record is null  
                            - Temporarily supports records within 14 days  
                            - record result data is blank  
                            - record status is not success  
                            - record result data not exist  
                            - record result data is empty  
                          - **451**: Failed to fetch the image. Kindly verify
                          any access limits set by you or your service
                          provider  

                          - **455**: Service Unavailable - System is currently
                          undergoing maintenance  

                          - **500**: Server Error - An unexpected error occurred
                          while processing the request
                      msg:
                        type: string
                        description: Error message when code != 200
                        example: success
                  - type: object
                    properties:
                      data:
                        type: string
                        description: Direct download URL valid for 20 minutes
                        example: >-
                          https://xxxxxx.xxxxxxxx.r2.cloudflarestorage.com/v/xxxxxxx.png?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Date=20250415T101007Z&X-Amz-SignedHeaders=host&X-Amz-Expires=1200&X-Amz-Credential=2464206aa3e576aa7c035d889be3a84e%2F20250415%2Fapac%2Fs3%2Faws4_request&X-Amz-Signature=122ae8bef09110e620841ab2ef8061c1818e754fc201408a9d1c6847b36fd3df
              example:
                code: 200
                msg: success
                data: >-
                  https://xxxxxx.xxxxxxxx.r2.cloudflarestorage.com/v/xxxxxxx.png?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Date=20250415T101007Z&X-Amz-SignedHeaders=host&X-Amz-Expires=1200&X-Amz-Credential=2464206aa3e576aa7c035d889be3a84e%2F20250415%2Fapac%2Fs3%2Faws4_request&X-Amz-Signature=122ae8bef09110e620841ab2ef8061c1818e754fc201408a9d1c6847b36fd3df
        '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


        Note:

        - Keep your API Key secure and do not share it with others

        - If you suspect your API Key has been compromised, reset it immediately
        in the management page


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