Skip to main content
POST
/
v1
/
files
/
upload
/
base64
Base64 File Upload
curl --request POST \
  --url https://api.foxapi.cc/v1/files/upload/base64 \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "file_data": "iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAYAAAAfFcSJAAAADUlEQVR42mNk...",
  "file_name": "photo.png",
  "auto_cleanup": true
}
'
{
  "id": "file-1757165031-a1b2c3",
  "filename": "photo.png",
  "url": "https://cdn.foxapi.cc/uploads/20260319/a1b2c3d4e5f6/photo.png",
  "size": 204800,
  "created": 1757165031
}

Documentation Index

Fetch the complete documentation index at: https://docs.foxapi.cc/llms.txt

Use this file to discover all available pages before exploring further.

Authorizations

Authorization
string
header
required

All APIs require Bearer Token authentication

Add to request header:

Authorization: Bearer YOUR_API_KEY

Body

application/json
file_data
string
required

Base64-encoded file content

Example:

"iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAYAAAAfFcSJAAAADUlEQVR42mNk..."

file_name
string

Original filename with extension

Example:

"photo.png"

auto_cleanup
boolean
default:true

Whether to automatically clean up the earliest uploaded files when storage is insufficient

Notes:

  • Default true: Automatically evicts the earliest uploaded files
  • Set to false: Returns a 403 error directly when storage is insufficient
Example:

true

Response

File uploaded successfully

id
string

File ID

Example:

"file-1757165031-a1b2c3"

filename
string

Original filename

Example:

"photo.png"

url
string

Accessible URL of the uploaded file

Example:

"https://cdn.foxapi.cc/uploads/20260319/a1b2c3d4e5f6/photo.png"

size
integer

File size in bytes

Example:

204800

created
integer

Upload timestamp

Example:

1757165031