Authentication
Authenticate your requests by including your API Key in the x-api-key header. You can generate and manage your keys in the Dashboard.
Headers
{
"x-api-key": "gd_1234567890abcdef...",
"Content-Type": "application/json"
}Clone File
The primary endpoint `POST /api/v1/process` handles file cloning. It supports two operation modes:
Direct Mode (Default)
Returns the direct Google Drive link immediately. Ideal for backend-to-backend integrations.
Hosted Mode
Returns a link to a secure, tracking-enabled download page hosted by us. Ideal for client distributions.
Request
POST /api/v1/process
curl -X POST https://api.driveclone.com/api/v1/process \
-H "x-api-key: YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"url": "https://drive.google.com/file/d/FILE_ID/view",
"expiresIn": 60,
"mode": "hosted"
}'url (Required): The public Google Drive file URL.
expiresIn (Optional): Minutes before auto-deletion. Default: 60.
mode (Optional): "direct" or "hosted". Default: "direct".
Response
200 OK
{
"success": true,
"type": "hosted",
"result_url": "https://driveclone.com/download/7f8c...",
"id": "7f8c..."
}