API 문서
API를 사용하여 프로그래밍 방식으로 이미지 업로드
The ImageUpload.app API enables you to integrate image upload functionality into your web applications, mobile apps, or backend systems. With our RESTful API, you can upload images in seconds and integrate quickly using our JavaScript SDK. Create your API key and start using it right away!
시작하기
1. API 키 받기
먼저 계정을 만들고 다음에서 API 토큰을 생성해야 합니다: 계정 페이지.
2. API 요청하기
다음 방법 중 하나로 API 키를 포함하세요:
- Authorization 헤더:
Authorization: Bearer YOUR_API_KEY - 요청 본문:
key=YOUR_API_KEY - 쿼리 매개변수:
?key=YOUR_API_KEY
이미지 업로드
https://imageupload.app/api/1/upload
매개변수
| 매개변수 | 유형 | 필수 | 설명 |
|---|---|---|---|
key |
string | Yes | 내 API 키 |
images |
file | Yes | 업로드할 이미지 파일 (최대 15개 파일, 각 32MB) |
예제 요청 (cURL)
curl -X POST "https://imageupload.app/api/1/upload" \ -H "Authorization: Bearer YOUR_API_KEY" \ -F "images=@/path/to/your/image.jpg"
예제 요청 (JavaScript)
const formData = new FormData();
formData.append('images', fileInput.files[0]);
formData.append('key', 'YOUR_API_KEY');
fetch('https://imageupload.app/api/1/upload', {
method: 'POST',
body: formData
})
.then(response => response.json())
.then(data => console.log(data))
.catch(error => console.error('Error:', error));
응답 (단일 이미지)
{
"status": 200,
"success": true,
"data": {
"id": "abc123def456",
"title": "image.jpg",
"url_viewer": "https://imageupload.app/i/abc123def456",
"url": "https://i.imageupload.app/abc123def456.jpg",
"display_url": "https://i.imageupload.app/abc123def456.jpg",
"size": 102400,
"time": 1698765432,
"image": {
"filename": "abc123def456.jpg",
"name": "abc123def456",
"mime": "image/jpeg",
"extension": "jpg",
"url": "https://i.imageupload.app/abc123def456.jpg"
}
}
}
응답 (여러 이미지)
{
"status": 200,
"success": true,
"data": {
"images": [
{
"id": "abc123def456",
"url": "https://i.imageupload.app/abc123def456.jpg",
...
},
{
"id": "xyz789uvw012",
"url": "https://i.imageupload.app/xyz789uvw012.jpg",
...
}
],
"count": 2
}
}
웹사이트 스크린샷
https://imageupload.app/api/1/screenshot
매개변수
| 매개변수 | 유형 | 필수 | 설명 |
|---|---|---|---|
key |
string | Yes | 내 API 키 |
url |
string | Yes | The target website URL to capture. |
preset |
string | No |
Viewport preset identifier (e.g., desktop-1080p, iphone-14-pro, ipad-mini).
|
format |
string | No | png, jpeg (Default: png) |
fullPage |
boolean | No |
Set to true to capture the entire scrollable height of the webpage.
|
noAds |
boolean | No |
Set to true to automatically hide common ad containers.
|
noCookie |
boolean | No |
Set to true to automatically hide common cookie banner overlays.
|
colorScheme |
string | No | default, light, dark |
zoom |
number | No | 0.5, 0.75, 1.0, 1.25, 1.5, 2.0 |
share |
boolean | No |
Set to false to bypass host saving and receive a base64 encoded data URI instead.
|
예제 요청 (cURL)
curl -X POST "https://imageupload.app/api/1/screenshot" \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"url": "https://google.com",
"preset": "desktop-1080p",
"fullPage": true
}'
응답 (공유)
{
"status": 200,
"success": true,
"data": {
"id": "abc123def456",
"url_viewer": "https://imageupload.app/i/abc123def456",
"url": "https://i.imageupload.app/abc123def456.png",
"display_url": "https://i.imageupload.app/abc123def456.png",
"shared": true
}
}
응답 (비공개/Base64)
{
"status": 200,
"success": true,
"data": {
"shared": false,
"display_url": "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAA..."
}
}
JavaScript SDK
웹사이트에 쉽게 통합할 수 있는 간단한 JavaScript 라이브러리를 제공합니다.
설치 (CDN)
<script src="https://imageupload.app/imageupload-sdk.min.js"></script>
설치 (npm)
To install our upload widget as an npm package for module bundlers (like Webpack, Vite, or Rollup):
image-uploader-widget
npm install image-uploader-widget
기본 사용법
// Initialize the SDK
const uploader = new ImageUploadApp('YOUR_API_KEY');
// Upload a single file
uploader.upload(fileInput.files[0])
.then(response => {
console.log('Upload successful:', response.url);
})
.catch(error => {
console.error('Upload failed:', error);
});
여러 파일 업로드
const uploader = new ImageUploadApp('YOUR_API_KEY');
uploader.uploadMultiple(fileInput.files)
.then(response => {
console.log('Uploads successful:', response);
})
.catch(error => {
console.error('Upload failed:', error);
});
업로드 위젯 만들기
const uploader = new ImageUploadApp('YOUR_API_KEY');
uploader.createUploadWidget({
multiple: true,
onStart: (files) => {
console.log('Starting upload:', files.length, 'files');
},
onProgress: (percent) => {
console.log('Upload progress:', percent + '%');
},
onSuccess: (response, files) => {
console.log('Upload successful:', response);
},
onError: (error, files) => {
console.error('Upload failed:', error);
}
});
전체 예제
<!DOCTYPE html>
<html>
<head>
<title>Image Upload Example</title>
<script src="https://imageupload.app/imageupload-sdk.min.js"></script>
</head>
<body>
<button id="uploadBtn">Upload Image</button>
<div id="result"></div>
<script>
const uploader = new ImageUploadApp('YOUR_API_KEY');
document.getElementById('uploadBtn').addEventListener('click', function() {
uploader.createUploadWidget({
multiple: false,
onSuccess: (response) => {
document.getElementById('result').innerHTML =
'<img src="' + response.url + '" style="max-width: 300px;">';
},
onError: (error) => {
alert('Upload failed: ' + error.message);
}
});
});
</script>
</body>
</html>
오류 코드
| 코드 | 메시지 | 설명 |
|---|---|---|
| 100 | No API key provided | 요청에 API 키가 누락되었습니다 |
| 110 | Invalid API key | 제공된 API 키가 유효하지 않습니다 |
| 120 | User not found | API 키와 연결된 사용자를 찾을 수 없습니다 |
| 130 | File size too large | 파일이 최대 크기 제한 32MB를 초과했습니다 |
| 131 | Too many files | 한 번에 최대 5개 파일 업로드 가능 |
| 140 | No image file provided | 요청에 이미지 파일이 포함되지 않았습니다 |
| 150 | No files could be uploaded | 모든 파일 업로드 실패 |
Why Use ImageUpload.app API?
🚀 Fast & Reliable
Your images are uploaded instantly with our high-performance servers and remain accessible at all times.
🔒 Secure
Your API keys are stored securely and all requests are encrypted over HTTPS.
📱 Easy Integration
Easily integrate into any platform with our RESTful API and JavaScript SDK. Getting started is easy with detailed documentation and examples!