Run in Apifox
File Upload# This is an asynchronous file upload import task. This API is optimized for Gemini model large file understanding scenarios . 💡 Why use this API?# Vertex AI has a hard limit of 15MB when passing files directly via HTTP for understanding. For files larger than 15MB (such as long videos or high-resolution images), the official requirement is to use Google Cloud Storage (GCS) links.This API simplifies the process : You only need to provide the file's public URL, and the system will automatically transfer the file to GCS and interface with Vertex AI. You don't need to configure or manage GCS buckets yourself. API Constraints# Supported scenarios : Only for Gemini model large file (>15MB) multimodal understanding.
File size : Maximum support for 2GB .
Network requirements : source_url must be a publicly accessible HTTP/HTTPS address.
Call Flow# 1.
Submit task : Call this API to submit source_url.
2.
Get ID : The API immediately returns file_id, and the task enters the background asynchronous processing queue.
3.
Check status : The client needs to poll the GET /files/{file_id} API until the file status changes to ready.
Request Add parameter in header Authorization
Example: Authorization: ********************
or
Body Params application/json Required
{
"model" : "gemini-3.0-pro-preview" ,
"source_url" : "https://aitoken-public.qnaigc.com/example/generate-video/running-man.jpg" ,
"expires_in" : 172800
} Request Code Samples
curl --location 'https://api-xmodel.nexconn.ai/v1/files' \
--header 'Authorization: <api-key>' \
--header 'Content-Type: application/json' \
--data '{
"model": "gemini-3.0-pro-preview",
"source_url": "https://aitoken-public.qnaigc.com/example/generate-video/running-man.jpg",
"expires_in": 172800
}' Responses File import task created successfully
{
"id" : "qfile-12345-1770727746152401856-01d742" ,
"object" : "file" ,
"status" : "pending" ,
"model" : "gemini-3.0-pro-preview" ,
"created_at" : 1770727746 ,
"expires_at" : 1770900546
}
Modified at 2026-04-24 10:39:56