Search Bulk Tools
Enterprise Pipeline

ImgPipeline Developer API

The ImgPipeline Developer API allows you to integrate image optimization and AI-powered background removal directly into your applications, microservices, and CI/CD pipelines. Our backend is executed completely at the edge on our global edge network, guaranteeing high throughput and low-latency responses.

⚑ 60-Second Production Quickstart

ImgPipeline is a drop-in replacement. You can switch from competitors and push to production with zero code refactoring in three simple steps:

1
πŸ”‘

Get Your Key

Sign up or Log in to generate your unique API key (imgp_...) instantly.

2
πŸ”„

Swap Config

Replace your existing competitor base URL and credentials. Zero refactoring required:

// TinyPNG replacement
tinify.key = "imgp_...";
tinify.proxy = "https://api.imgpipeline.com/shrink";
3
πŸš€

Deploy to Prod

Save your config and deploy. Or automate optimizations by adding the GitHub Action to your repository's actions.

Authentication

To authenticate your requests, you must generate an API Key inside the developer dashboard. Send this key in the Authorization header of every request as a Bearer token:

Authorization: Bearer imgp_your_api_key_here
Important: Keep your API key secret. Never expose it in client-side repositories or public codebases.

Endpoint Matrix

ImgPipeline acts as a 1:1 drop-in replacement proxy for major media processing APIs, allowing you to optimize your media infrastructure billing with zero code refactoring.

POST /v1/shrink
Cost: 1 Credit

Drop-in replacement for TinyPNG API. Compresses the provided image file binary and centers it on a solid background if margins are added.

Request Options

  • Authorization: Bearer token (or standard HTTP Basic authentication where the username is your API key)
  • Content-Type: application/octet-stream or raw image MIME type
  • Query Parameter bg: Hex background color code for padded margins (e.g. #FFFFFF, Default: #FFFFFF)
  • Query Parameter strip_metadata: Set to true to strip GPS location, camera details, and EXIF headers

cURL Example

curl -X POST "https://api.imgpipeline.com/v1/shrink?bg=%23FFFFFF&strip_metadata=true" \
  -H "Authorization: Bearer imgp_your_api_key_here" \
  -H "Content-Type: application/octet-stream" \
  --data-binary @product.png \
  --output optimized.png
POST /v1/removebg
Cost: 5 Credits

Drop-in replacement for Remove.bg API. Removes backgrounds from images using edge-based GPU AI networks.

Request Options

  • Authorization: Bearer token, active Day Pass, or X-Api-Key header
  • Content-Type: multipart/form-data or application/octet-stream
  • Multipart field image_file: Binary file data
  • Multipart field image_url: Fetch and process image from a public URL
  • Multipart field image_file_b64: Base64-encoded image string

Response Formats

Returns raw transparent PNG bytes by default. If the Accept header is set to application/json, returns a JSON object containing the base64 output: { "data": { "result_b64": "..." } }.

POST /v2/edit/background
Cost: 5 Credits

Drop-in replacement for the Photoroom background editor API. Isolate your subject and replace backgrounds with solid colors.

Request Options

  • x-api-key: Your API key header (or standard Bearer token in the Authorization header)
  • Content-Type: multipart/form-data
  • Multipart field image_file: Binary file data
  • Multipart field image_url: Target URL of the image to fetch
  • Multipart field bg_color: Hex code (e.g. #FFFFFF) to apply as a solid background. If set, centers the subject on a 1:1 padded frame.

cURL Example

curl -X POST "https://api.imgpipeline.com/v2/edit/background" \
  -H "x-api-key: imgp_your_api_key_here" \
  -F "[email protected]" \
  -F "bg_color=#F3F4F6" \
  --output subject-isolated.png
POST /v1/upload
Cost: 1 Credit

Drop-in replacement for the Kraken.io image optimizer API. Submits images and returns optimized assets.

Request Options

  • Content-Type: application/json or multipart/form-data
  • JSON Payload structure: { "auth": { "api_key": "YOUR_KEY" }, "url": "https://remote.com/image.jpg" }
  • Multipart file / image: File payload
  • Multipart auth: JSON string containing api credentials {"api_key": "YOUR_KEY"}

Response Output (JSON)

{
  "success": true,
  "file_name": "optimized.jpg",
  "original_size": 240500,
  "kraked_size": 89400,
  "saved_bytes": 151100,
  "kraked_url": "https://api.imgpipeline.com/v1/output/temp-uuid"
}
GET /cloudinary-proxy/image/fetch/:params/*
Cost: 1 Credit (Cache Miss)

Alternative to Cloudinary fetching. Transformed assets are fully cached at the global edge network. Subsequent cached deliveries consume 0 credits.

URL Transformation Matrix

  • w_[pixels]: Resize width (e.g. w_300)
  • h_[pixels]: Resize height (e.g. h_300)
  • c_fit / c_limit: Contain image inside boundaries
  • c_fill: Crop image to cover area
  • c_crop: Direct pixel cropping
  • c_scale: Scale down dimensions
  • Query Parameter api_key or key: Your API key credential

Example HTML Tag

<img src="https://api.imgpipeline.com/cloudinary-proxy/image/fetch/w_400,h_400,c_fill/https://example.com/product.jpg?key=imgp_your_key">
POST /v1/chat/completions
Cost: 10 Credits

Drop-in replacement for OpenAI Vision completion API. Employs Gemini 2.5 Flash at the edge to describe images or compile metadata and alt texts.

API Compatibility

Matches standard OpenAI payload schema (with messages, image_url content type) and system instructions. Ideal for automated alt text generators.

Node.js Integration

import OpenAI from 'openai';
const openai = new OpenAI({
  apiKey: 'imgp_your_api_key_here',
  baseURL: 'https://api.imgpipeline.com/v1'
});

const response = await openai.chat.completions.create({
  model: 'gpt-4o-mini',
  messages: [{
    role: 'user',
    content: [
      { type: 'text', text: 'Generate descriptive alt text.' },
      { type: 'image_url', image_url: { url: 'https://example.com/product.jpg' } }
    ]
  }]
});
console.log(response.choices[0].message.content);
POST /aws/rekognition
Cost: 2 Credits

Drop-in alternative to AWS Rekognition for image content classification and safety moderation checks.

Request Options

  • Authorization: Standard AWS SigV4 header containing your API key as the Credential key
  • X-Api-Key: Direct key header fallback
  • JSON Payload structure: { "Image": { "Bytes": "BASE64_BYTES..." }, "MinConfidence": 50 }

Response Output (JSON)

{
  "ModerationLabels": [
    { "Name": "Suggestive", "Confidence": 89.2, "ParentName": "Explicit Nudity" },
    { "Name": "Violence", "Confidence": 92.4 }
  ],
  "ModerationModelVersion": "EdgeResNet-50.1"
}
POST /api/seo-rename
Cost: 1 Credit / Image

Custom API endpoint. Analyzes image content via AI to output search-engine-optimized, hyphenated, lowercase names. Supports batch renaming.

Request Options

  • Authorization: Bearer token (Required)
  • Content-Type: application/json
  • JSON Single: { "name": "IMG_9912.png", "image": "BASE64_DATA" }
  • JSON Batch: { "images": [{ "name": "...", "image": "..." }] }

cURL Example

curl -X POST "https://api.imgpipeline.com/api/seo-rename" \
  -H "Authorization: Bearer imgp_your_api_key_here" \
  -H "Content-Type: application/json" \
  -d '{"name":"IMG_9912.png", "image":"data:image/png;base64,iVBORw0K..."}'

CI/CD Automation

Optimize your codebase resources automatically during your deploy workflow. Our custom GitHub Action scans repository paths, shrinks matching visual files via the Edge API, and replaces them directly before triggering target CD deployments.

Example Github Workflow Configuration:

name: Optimize Assets
on: [push]
jobs:
  optimize:
    runs-on: ubuntu-latest
    steps:
      - name: Checkout Code
        uses: actions/checkout@v4
      - name: Run ImgPipeline Optimization
        uses: CodeWays-PTY/ImgPipeline/github-action@main
        with:
          api-key: ${{ secrets.IMGPIPELINE_API_KEY }}
          image-glob: '\.(png|jpg|jpeg)$'
πŸ”’ Security & Billing Clarity

How is your API Key protected?

The api-key input uses GitHub's native Encrypted Secrets. You must save your personal ImgPipeline API Key in your repository settings under Secrets and Variables > Actions. It is injected at runtime, completely hidden from workflow logs, and never exposed in the source code.

Who pays for execution?

Runner VM costs are billed directly to your own GitHub account (using your free monthly builder minutes or private runner quotas). ImgPipeline only charges you for the actual image processingβ€”each file successfully optimized consumes exactly 1 credit from your personal balance.

Discover More Bulk Image Tools

Process and optimize your product listings, photos, and store assets locally in your browser.

⚑ Developer API & Day Passes

Integrate ImgPipeline directly into your apps and automation workflows

Need automated, lightning-fast bulk image resizing, background removal, or conversion? Connect via our simple API. Select a cost-effective credit package or get an unlimited 24-Hour Day Pass.