API Documentation

Convert images programmatically with our REST API.

Overview

Base URL: https://www.bulkpicconv.com/api/v1

Authentication: Bearer token via Authorization header

API Key format: sk_ prefix + 48 alphanumeric characters

Rate limits: Team 50K/month, Enterprise unlimited

Max upload size: 15 MB per file

Max image dimensions: 80 megapixels (e.g. 8000×10000)

Accepted input formats: JPEG, PNG, WebP, GIF, BMP, TIFF, HEIC

API access: Team and Enterprise plans (generate key from Dashboard )

Endpoints

MethodEndpointDescription
POST/api/v1/convertConvert and compress an image
POST/api/v1/resizeResize an image
POST/api/v1/cropCrop an image
POST/api/v1/watermarkAdd watermark to an image
POST/api/v1/optimizeSmart optimization without format conversion
POST/api/v2/batchBatch convert ZIP of images (async)
GET/api/v2/batch/{id}/statusQuery batch job status
GET/api/v2/batch/{id}/resultDownload batch result ZIP
GET/api/v2/usageQuery API key monthly usage
GET/api/v2/creditsQuery available API credits
POST/v1/ai/alt-textAI alt text generation (Pro/Team)
POST/v1/ai/renameAI batch rename (Pro/Team)
POST/v1/ai/smart-cropAI smart crop detection (Pro/Team)
POST/v1/ai/enhanceAI image enhancement (Pro/Team)
POST/v1/ai/recommendAI format recommendation (Pro/Team)
POST/api/background-removeRemove image background
GET/PUT/DEL/api/user/ai-keyBYOK model config management
POST/v1/convert

Convert and compress an image to WebP, AVIF, JPEG, or PNG.

Parameters (multipart/form-data)

FieldTypeRequiredDescription
imagefileYesThe image file to convert
formatstringNowebp, avif, jpeg, png (default: webp)
qualitynumberNo1-100 (default: 75)
widthnumberNoOutput width (maintains aspect ratio)
heightnumberNoOutput height
fitstringNocover, contain, fill, inside, outside
grayscalebooleanNoConvert to grayscale
blurnumberNoBlur radius (0.3-100)
rotatenumberNoRotation angle (0-360)

Response

Binary image data with headers:

  • Content-Type : image format MIME type
  • Content-Disposition : attachment with filename (e.g. converted.webp)
  • X-Input-Size : original size in bytes
  • X-Output-Size : converted size in bytes
  • X-Saved-Percent : space saved percentage
  • X-RateLimit-Limit : monthly API call limit
  • X-RateLimit-Remaining : remaining API calls this month
POST/api/v1/resize

Resize an image while preserving aspect ratio.

Parameters (multipart/form-data)

FieldTypeRequiredDescription
imagefileYesThe image file
widthnumberYesTarget width (1-10000)
heightnumberYesTarget height (1-10000)
fitstringNocover/contain/fill/inside/outside (default: inside)
POST/api/v1/crop

Extract a rectangular region from an image.

Parameters (multipart/form-data)

FieldTypeRequiredDescription
imagefileYesThe image file
xnumberYesHorizontal offset (top-left)
ynumberYesVertical offset (top-left)
widthnumberYesCrop region width
heightnumberYesCrop region height
POST/api/v1/watermark

Overlay a watermark image at a configurable position.

Parameters (multipart/form-data)

FieldTypeRequiredDescription
imagefileYesBase image
watermarkfileYesWatermark image
positionstringNotop-left/top-right/bottom-left/bottom-right/center
opacitynumberNo0-100 (default: 100)
scalenumberNoWatermark size as fraction of base width (0.01-1)
POST/api/v1/optimize

Re-encode image to reduce file size without changing format.

Parameters (multipart/form-data)

FieldTypeRequiredDescription
imagefileYesThe image file
qualitynumberNo1-100 (default: 75). Original format preserved.
POST/api/v2/batch

Upload a ZIP archive for async batch conversion. Returns a job ID; poll status until completed.

Parameters (multipart/form-data)

FieldTypeRequiredDescription
filefileYesZIP archive of images
formatstringNowebp, avif, jpeg, png (default: webp)
qualitynumberNo1-100 (default: 75)

GET /api/v2/batch/{id}/status — Poll job status (queued → processing → completed)
GET /api/v2/batch/{id}/result — Download result ZIP

AI Features Pro / Team

AI-powered image analysis using GPT-4o Vision. All AI endpoints accept JSON body with Base64 data URIs. Supports BYOK (Bring Your Own Key) — use your own OpenAI-compatible model for free unlimited access.

POST/v1/ai/alt-text

Generate SEO-friendly alt text with keywords using GPT-4o Vision.

Body (application/json)

FieldTypeRequiredDescription
imagesstring[]YesBase64 data URIs (1-10 images)
languagestringNoen/zh/es/fr/de/ja/ko/pt/it (default: en)
stylestringNodescriptive/concise/seo (default: descriptive)
userProviderobjectNoBYOK config (see below)
POST/v1/ai/rename

Generate SEO-friendly filenames based on image content.

Body (application/json)

FieldTypeRequiredDescription
imagesobject[]Yes{data, originalName} (1-20 images)
rulesobjectNo{prefix, includeSequence, style}
userProviderobjectNoBYOK config
POST/v1/ai/smart-crop

Detect subject and generate platform-specific crop recommendations.

Body (application/json)

FieldTypeRequiredDescription
imagestringYesBase64 data URI
platformsstring[]Noinstagram-square/twitter/facebook/youtube-thumbnail/etc.
customRatioobjectNo{width, height}
returnCroppedImagebooleanNoReturn cropped result (default: false)
userProviderobjectNoBYOK config
POST/v1/ai/enhance

Upscale, denoise, or deblur images.

Body (application/json)

FieldTypeRequiredDescription
imagestringYesBase64 data URI
modestringNoupscale/denoise/deblur/auto (default: auto)
intensitynumberNo1=Light, 2=Medium, 3=Strong (default: 2)
returnPreviewbooleanNoReturn enhanced image (default: true)
POST/v1/ai/recommend

Deep analysis to recommend optimal format, quality, and compression.

Body (application/json)

FieldTypeRequiredDescription
imagesobject[]Yes{data, filename, width, height, fileSize, mimeType} (1-20)
useCasestringNoweb/ecommerce/social-media/print/archive/general
userProviderobjectNoBYOK config

BYOK: userProvider Object (optional)

Include in any AI request to use your own model. Skips Pro check and daily quota.

FieldTypeRequiredDescription
baseUrlstringYesOpenAI-compatible API base URL
modelstringYesVision model name
apiKeystringAPI key (local mode, sent with request)
useAccountKeybooleanUse account-saved encrypted key

† One of apiKey or useAccountKey is required.

Background Removal

POST/api/background-remove

Remove image background. Uses remove.bg API with sharp fallback. Monthly quota applies (configured by admin).

Parameters (multipart/form-data)

FieldTypeRequiredDescription
imagefileYesImage file (max 10 MB)
formatstringNoOutput format: png (default), webp

Account Management

GETPUTDELETE/api/user/ai-key

Manage saved BYOK model configuration (encrypted with AES-256-GCM).

  • GET — Get saved config (key shown as mask only, e.g. sk-12****abcd)
  • PUT — Save/update config (body: baseUrl, model, apiKey). Returns masked key.
  • DELETE — Delete saved config (irreversible)

Error Responses

All errors return JSON with { "statusCode": 4xx, "statusMessage": "..." }

CodeErrorDescription
400missing_form_dataRequest body must be multipart/form-data
400missing_image_fileNo image file found in form data (field name: "image")
400file_too_largeFile exceeds 15 MB upload limit
400invalid_image_typeFile is not a valid image
400invalid_imageImage is corrupted or unreadable
400image_too_largeImage exceeds 80 megapixels
400invalid_paramsInvalid parameter values (see issues field)
401missing_or_invalid_api_keyMissing or malformed Authorization header
401invalid_or_revoked_api_keyAPI key not found or has been revoked
401api_access_not_availableYour plan does not include API access (Team/Enterprise only)
429rate_limitedToo many requests (burst limit: 30/minute)
429monthly_limit_exceededMonthly API call quota exhausted
500conversion_failedServer-side image processing error
AI Feature Errors
403ai_access_deniedPro/Team plan required (or BYOK mode: login required)
429ai_daily_limit_exceededDaily AI quota exhausted (platform mode only; BYOK unlimited)
503ai_service_unavailableAI service not configured on server
403no_saved_ai_keyBYOK: useAccountKey=true but no key saved to account
503ai_key_encryption_disabledServer AI_KEY_ENCRYPTION_SECRET not configured

Code Examples

curl -X POST https://www.bulkpicconv.com/api/v1/convert \
  -H "Authorization: Bearer sk_your_api_key" \
  -F "image=@photo.jpg" \
  -F "format=webp" \
  -F "quality=80" \
  -F "width=1920" \
  -o converted.webp

AI Alt Text (JSON body)

curl -X POST https://www.bulkpicconv.com/v1/ai/alt-text \
  -H "Authorization: Bearer sk_your_api_key" \
  -H "Content-Type: application/json" \
  -d '{"images":["data:image/jpeg;base64,/9j/4AAQ..."],"language":"en","style":"seo"}'

BYOK: Use Your Own Model

curl -X POST https://www.bulkpicconv.com/v1/ai/alt-text \
  -H "Authorization: Bearer YOUR_JWT_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
    "images": ["data:image/jpeg;base64,..."],
    "userProvider": {
      "baseUrl": "https://api.siliconflow.cn/v1",
      "model": "Qwen/Qwen3-VL-32B-Instruct",
      "apiKey": "sk-your-provider-key"
    }
  }'

Try It Out

API Changelog

v3.0.02026-08-21
  • addedPOST /v1/ai/alt-text: AI alt text generation with GPT-4o Vision (Pro/Team or BYOK)
  • addedPOST /v1/ai/rename: AI batch rename based on image content
  • addedPOST /v1/ai/smart-crop: AI smart crop detection with platform presets
  • addedPOST /v1/ai/enhance: AI image enhancement (upscale, denoise, deblur)
  • addedPOST /v1/ai/recommend: AI format and quality recommendation
  • addedBYOK (Bring Your Own Key): use your own OpenAI-compatible model via userProvider object
  • addedGET/PUT/DELETE /api/user/ai-key: manage saved BYOK config (AES-256-GCM encrypted)
  • addedPOST /api/background-remove: remove image background
v2.1.02026-08-12
  • addedBatch webhook callback: pass `webhook_url` in batch creation to receive POST notifications on completion or failure
  • addedAutomatic cleanup of stale batch jobs (30-minute timeout) and result files (24-hour retention)
  • addedGET /api/v2/usage: query API key monthly usage and recent calls
  • addedGET /api/v2/credits: query available API credits and package details
v2.0.02026-08-12
  • addedPOST /api/v2/batch: upload ZIP, async batch conversion
  • addedGET /api/v2/batch/{id}/status: query batch job status
  • addedGET /api/v2/batch/{id}/result: download result ZIP
v1.4.02026-08-12
  • addedPOST /api/v1/resize: resize images via API
  • addedPOST /api/v1/crop: crop images via API
  • addedPOST /api/v1/watermark: add watermark to images via API
  • addedPOST /api/v1/optimize: smart optimization without format conversion
v1.0.02026-08-11
  • addedPOST /api/v1/convert: convert images to WebP/AVIF/JPEG/PNG
  • addedAPI key authentication with sk_ prefix
  • addedRate limiting: 60 requests/min per IP, monthly limits per plan
  • addedAPI credits for non-subscription users

Need an API key? Go to Dashboard

Don't have a subscription? Buy pay-as-you-go API Credits