Step 2: Upload a File

Most Gitruck Cloud processing APIs do not accept raw binaries directly. You first upload the file, get a file_id, and then pass that file_id to task creation APIs.

Request Information

ItemValue
Request MethodPOST
Request Path/base/file/upload
Content-Typemultipart/form-data
AuthenticationRaw API key in the Authorization header

cURL Example

curl -X POST https://api.ai-mcn.tv:10000/base/file/upload \
  -H "Authorization: YOUR_API_KEY" \
  -F "file=@/path/to/your/video.mp4"

Success Example

{
  "code": 200,
  "msg": "File uploaded successfully~",
  "data": {
    "file_id": "537489015178246",
    "original_name": "video.mp4",
    "size": 10485760,
    "blake3_id": "a1b2c3d4...",
    "base_ext": ".mp4",
    "download_url": "/download/a1/537489015178246.mp4",
    "created_at": "2026-04-05T08:00:00Z",
    "expire_at": "2026-06-04T00:00:00Z",
    "is_expired": false
  }
}

Fields to Keep

  • file_id: the identifier used in task creation
  • download_url: download location of the original file
  • expire_at: file expiration time

FAQ

Q: Will uploading the same file create a duplicate?

No. The backend uses file fingerprint deduplication and can reuse an existing record.

Q: What is the maximum upload size?

The current backend limit is 20 GB per file.

Next Steps