Qubico
  1. Tools
Qubico
  • Get Started
    • Overview
    • Quickstart
  • Endpoints
    • Flux
      • Flux with LoRA and Controlnet
      • Available LoRA and Controlnet
      • Flux API with Redux Variation, Fill, Inpaint and Outpaint
      • Create Task
        • Kontext
        • Text to Image
        • Image to Image
      • Get task
    • AI Hug
      • Get Task
      • Create Task
    • Faceswap
      • Multi Faceswap
      • Image Faceswap
      • Video Faceswap
      • Get Task
    • TTS
      • Zeroshot Text-to-Speech F5-TTS
      • Get Task
    • Trellis
      • Create Task
      • Get Task
    • WanX
      • Generate WanX Task with LoRA Using Qubico
      • Available LoRA Types for Wanx
      • Use Cases for Wanx LoRA
      • Use Cases for Wanx Control Camera
      • Create Task
      • Get Task
    • Skyreels
      • Create Task
      • Get Task
    • Framepack
      • Create Task
      • Get Task
    • Hunyuan Video
      • How to Make a Hunyuan API Call
      • Get Task
      • Generate Video
    • Mmaudio
      • Get Task
      • Generate Audio
    • DiffRhythm
      • Generate Audio
      • Get Task
    • Ace Step
      • Create Task
        • Text to Audio
        • Audio to Audio
        • Audio Edit
        • Audio Extend
      • Get Task
    • Tools
      • File Upload API
      • Video Upscale
        POST
      • Video Upscale-Get Task
        GET
      • Remove Background API
        POST
      • Remove Background-Get Task
        GET
      • Segment With Prompt API
        POST
      • Segment With Prompt API-Get Task
        GET
      • Image Upscale(Super Resolution) API
        POST
      • Image Upscale-Get Task
        GET
    • Account Management
      • Account Info
      • Task List Info
      • User Task History
  • Resources
    • Change Log
    • Output Storage
    • Unified API Schema
    • Webhook
    • Billings
  1. Tools

File Upload API

Ephemeral Resource Upload API#

Overview#

This API allows you to upload temporary files that will be automatically deleted after 24 hours. This API is Free of charge for Creator/Pro Plan. If you are on Free plan, you can not use it.

Base URL#

https://upload.theapi.app

Authentication#

Authentication is required via API key
Must be on the Creator plan or higher
Add your API key to the request headers as x-api-key

Endpoint: Upload Temporary File#

Upload a file that will be automatically deleted after 24 hours.

HTTP Request#

POST /api/ephemeral_resource

Headers#

HeaderValueDescription
Content-Typeapplication/jsonRequest body format
x-api-keyYOUR_API_KEYYour API authentication key

Request Body Parameters#

ParameterTypeRequiredDescription
file_namestringYesName of the file with extension (max 128 characters)
file_datastringYesBase64 encoded file data. Can include data URI if it matches the file's content type (max 10MB)

Supported File Extensions#

The following file extensions are supported (case-insensitive):
1.
jpg
2.
jpeg
3.
png
4.
webp
5.
mp4
6.
wav
7.
mp3

File Name Requirements#

Must not be empty
Must include one of the supported extensions
Maximum length: 128 characters
Extensions are case-insensitive

File Data Requirements#

Must be provided as a base64 string
Maximum size: 10MB
Optional data URI is supported
If data URI is included, its content-type must match the file extension's content-type

Example Request#

Success Response#

A successful request will return a 200 status code with the following response structure:
{
  "code": 200,
  "data": {
    "url": "https://example.com/example.png"
  },
  "message": "success"
}

Error Responses#

Invalid Request (400)#

Returned when the request parameters are invalid (e.g., unsupported file type, file too large).
{
  "code": 400,
  "message": "Invalid request parameters"
}

Insufficient Permissions (403)#

Returned when the user's plan level is insufficient (requires Creator plan or higher).
{
  "code": 403,
  "message": "Insufficient plan level"
}

Important Notes#

1.
Uploaded files are automatically deleted after 24 hours
2.
The service requires a Creator plan or higher
3.
The file_data field can include a data URI, but if included, its content-type must match the file extension's expected content-type
4.
File names are validated for supported extensions in a case-insensitive manner

Additional Examples#

Example with JPG file#

Example with MP3 file#

Modified at 2025-06-25 07:03:16
Previous
Get Task
Next
Video Upscale
Built with