Image Upload API Documentation
Image Upload API Documentation#
Overview#
This API is used to upload image files to the server, supporting various image formats.API Details#
Request URL: https://imageproxy.zhongzhuan.chat/api/upload
Content-Type: multipart/form-data
Request Parameters#
| Parameter | Type | Required | Description |
|---|
| file | File | Yes | The image file to upload |
Request Examples#
cURL Example#
JavaScript Example#
Python Example#
Success Response#
| Field | Type | Description |
|---|
| url | String | Image access link after successful upload |
| created | Number | Creation timestamp (milliseconds) |
Response Example#
{
"url": "https://imageproxy.zhongzhuan.chat/api/proxy/image/2316ce07a01000cf14a628c8b29e97a8",
"created": 1757403998946
}
Error Response#
Possible error status codes:| Status Code | Description |
|---|
| 400 | Request parameter error (e.g., no file provided) |
| 413 | File too large |
| 415 | Unsupported file format |
| 500 | Internal server error |
Error Response Example#
{
"error": "File format not supported",
"code": 415
}
Usage Instructions#
1.
Supported File Formats: Common image formats such as JPG, PNG, GIF, WebP, etc.
2.
File Size Limit: Recommended maximum of 10MB per file
3.
Returned URL: Can be used directly to display images, links are permanently valid
4.
Timestamp Format: Unix timestamp in milliseconds
Notes#
Uploaded images are processed through a proxy service to ensure access stability
It is recommended to compress images on the client side to improve upload speed
Returned image links support cross-origin access
Please ensure network connectivity and appropriate permissions before uploading
Modified at 2026-01-23 04:05:02