---
title: "URL-based image operations"
method: POST
path: "/v1/url"
tags: ["URL Operations"]
---

# URL-based image operations

`POST /v1/url`

## Request

- Base URL: `https://api.kraken.io` (the document declares no server; this is the origin it was published from)
- URL: `https://api.kraken.io/v1/url`
- Auth: none declared

Handles image optimization, conversion, and storage via URL with comprehensive input support.

## Request body

- UrlRequest
  - `auth` Auth, required
    - `api_key` string, required
    - `api_secret` string, required
  - `url` string, required: Image URL.
  - `wait` boolean
  - `dev` boolean: Enable sandbox mode for development testing (returns randomized results)
  - `resize` Resize
    - `width` integer
    - `height` integer
    - `strategy` 'exact' | 'crop' | 'portrait' | 'landscape' | 'auto' | 'fit'
  - `convert` Convert
    - `format` 'jpeg' | 'png' | 'gif' | 'webp' | 'avif'
    - `background` string, nullable: Background color for transparent formats (HEX, RGB, RGBA)
    - `keep_extension` boolean: Keep original file extension despite format conversion
  - `quality` integer: Custom quality level for JPG, PNG, and GIF (1-100)
  - `callback_url` string, nullable: URL for asynchronous callback notification
  - `s3_store` object: Store optimized image in Amazon S3
    - `key` string
    - `secret` string
    - `bucket` string
    - `region` string
    - `path` string
  - `gcs_store` object: Store optimized image in Google Cloud Storage
    - `acl` string
    - `bucket` string
    - `path` string
    - `credentials` string
  - `cf_store` object: Store optimized image in Rackspace Cloud Files
    - `username` string
    - `api_key` string
    - `container` string
    - `region` string
    - `path` string
  - `azure_store` object: Store optimized image in Microsoft Azure Blob Storage
    - `account` string
    - `key` string
    - `container` string
    - `headers` object
  - `sl_store` object: Store optimized image in SoftLayer Object Storage
    - `user` string
    - `key` string
    - `container` string
    - `region` string
  - `lossy` boolean: Enable lossy compression for better optimization (defaults to false for lossless)
  - `preserve_meta` string[]: Preserve specific metadata (EXIF, XMP, IPTC, etc.) in the optimized image
  - `auto_orient` boolean: Automatically orient the image based on EXIF orientation data
  - `chroma_subsampling` '4:2:0' | '4:2:2' | '4:4:4': Specify chroma subsampling for JPEG images

## Response `200`

Operation completed successfully.

- OperationResponse
  - `success` boolean
  - `kraked_url` string
  - `file_name` string
  - `original_size` integer
  - `kraked_size` integer
  - `saved_bytes` integer

---

[API](https://skmtc.dev/kraken-io/apis/kraken-io-api-documentation.md) · [All operations](https://skmtc.dev/kraken-io/apis/kraken-io-api-documentation/llms.txt) · [OpenAPI document](https://skmtc.dev/kraken-io/apis/kraken-io-api-documentation/revisions/918d4599daf3?raw)
