thumbnails
Generate Thumbnail
Generate a thumbnail from a file upload or URL.
File Upload: Use multipart/form-data with a file field.
URL Fetch: Use JSON body with url field. Optionally include url_headers for authenticated URLs.
Options:
- width, height: Max dimensions (default 600x400)
- quality: JPEG quality 1-100 (default 95)
- sync: Wait for result (true) or return job ID (false)
- webhook_url: URL to POST result when complete (async only)
- response_type: "url" returns storage URL, "base64" returns encoded image
post/api/v1/thumbnails/generate
Request
- Base URL: https://docs.thedrive.ai (the document declares no server; this is the origin it was published from)
- URL: https://docs.thedrive.ai/api/v1/thumbnails/generate
- Auth: none declared
Headers
X-API-Keystring
Response
Successful Response
Example response
{
"job_id": "job_abc123",
"metadata": {
"created_at": "2024-01-15T10:30:00Z",
"file_category": "pdf",
"file_size": 102400,
"file_type": "pdf",
"mime_type": "application/pdf",
"original_filename": "document.pdf",
"thumbnail_height": 400,
"thumbnail_width": 600
},
"status": "completed",
"success": true,
"thumbnail_url": "https://storage.example.com/thumbnails/thumb_abc123.jpg"
}Changes
No recorded changes to this operation across all 1 revision of this API.