Documentación de la API

piczen API — integrate image conversion capabilities into your apps

API Overview

This API provides image format conversion, compression, resizing and other capabilities. It is designed in HTTP RESTful style and supports JSON request and response formats.

Base URL:https://api.piczen.net/api/v1

Protocol:HTTPS

Data Format:JSON / Multipart Form

Autenticación

Pasa tu clave API en la cabecera Authorization como token Bearer.

x-api-key: {api_key}
x-api-secret: {api_secret}

Get API key: Log in to User Center → API Key Management → Generate New Key

Convert API

POST /api/v1/convert

Convert an image to the target format

Request Parameters

Response Format

{
  "code": 0,
  "message": "success",
  "data": {
    "url": "https://cdn.piczen.net/converted/xxx.jpg",
    "format": "jpg",
    "size": 102400,
    "width": 1920,
    "height": 1080
  }
}

Code Samples

Compress API

POST /api/v1/compress

Compress image file size

Request Parameters

Response Format

{
  "code": 0,
  "message": "success",
  "data": {
    "url": "https://cdn.piczen.net/compressed/xxx.jpg",
    "originalSize": 1024000,
    "compressedSize": 307200,
    "ratio": "70%"
  }
}

Resize API

POST /api/v1/resize

Resize an image

Request Parameters

Códigos de error

Pricing Tiers

Starter

29CNY

30,000calls quota

approx. 0.001 CNY/call

Standard

99CNY

120,000calls quota

approx. 0.0008 CNY/call

Pro

199CNY

300,000calls quota

approx. 0.0007 CNY/call

Usage Statistics

Log in to User Center to view API usage statistics, including:

  • Daily/weekly/monthly call volume
  • Call distribution by endpoint
  • Remaining quota and alerts
  • Average response time

API Key Management

You can manage your API keys in User Center:

  • Generate new API keys
  • View key quota and usage
  • Top up quota online
  • Disable/delete keys