Image Hosting

Image hosting: upload an image (or a video up to 10 seconds) and get a directly linkable CDN address, with options for output format, encryption and storage location. 2 channels are currently available.

/api/ImageHosting/

Service Description

The image hosting service uploads images to third-party hosting platforms and returns CDN direct links, ideal for site illustrations, Markdown image hosting and user avatars, with no need to run your own storage or bandwidth.

The scdn channel accepts a local image or a remote image URL, and the server de-duplicates by SHA-256 content hash, so uploading the same image again returns the existing link without consuming extra capacity. The picui channel adds server-side Token-pool management: view used and remaining capacity per Token, and top up Tokens in bulk.

Both channels require project signature authentication. Link availability on third-party hosts is up to them, so keep the original files for anything important.

Response Format

Every endpoint returns the same JSON envelope; the payload is always inside data:

{
  "code": 10000,
  "msg": "成功",
  "data": { ... }
}
  • code: business status code. 10000 means success; anything else is an error — see the Error Codes page for the full list.
  • msg: a human-readable message you can show to end users, but never use it for program logic.
  • data: the payload; usually null on error. Each endpoint's Response section lists its data fields.

Judge success by code, not by the HTTP status code. View all error codes

Under Maintenance This service is currently in "Under Maintenance" status, the API may be temporarily unavailable. The docs and debug below are for reference only.

scdn.io Image Host

scdn.io (img.scdn.io) image hosting Signature Required

Uploads an image and returns a link; the server deduplicates by SHA-256 and returns the existing link for duplicate images. Requires a project signature.

POST /api/ImageHosting/scdn/upload Total calls: 0

Upload Image

Upload an image and get a directly usable CDN link.

Local image file (multipart field image; supports jpg/png/webp/gif/bmp/tiff); choose either this or image_url

Remote image address (http/https), fetched by the server; choose either this or image

Optional: output format, default auto

Optional: specify the CDN domain for the links (e.g. img.scdn.io); leave empty to choose automatically

Optional: storage location

Optional: encrypted upload (encrypted images never take part in deduplication)

Optional: required when password_enabled=true

Optional: password mode, default plain

Optional: required when password_type=qa

  • The request body is multipart/form-data (file field image; use the file picker below to upload directly); when using image_url you may also use application/x-www-form-urlencoded.
  • The server deduplicates by SHA-256: on a hit the message reports that the image already exists and was deduplicated, and deduped=true.
  • This service requires a project signature (app_id/timestamp/nonce/sign); the online debugger signs automatically on the server side.
Response Common envelope
Field Type Description
url string CDN direct link
filename string File name
storage_backend string Storage backend
original_size int Original size (bytes)
compressed_size int Compressed size (bytes)
compression_ratio float Compression ratio
deduped bool Whether instant-upload (dedup) was hit
password_protected bool Whether password-protected
Example response
{"url": "https://img.scdn.io/xxxx.jpg", "filename": "xxxx.jpg", "storage_backend": "local", "original_size": 123456, "compressed_size": 98765, "compression_ratio": 80.01, "deduped": false, "password_protected": false}
XiaoYingAPI · Unified API Aggregation Service