API version 1.1

We now support more upload parameters for user API keys, including title, width, and more!

Our public API has some limitations, such as a maximum upload size of 20MB per image and the inability to manage or delete images after they have been uploaded.

Therefore, we encourage you to use our private API, which offers a maximum image size of 50MB and allows you to manage your images. Click the button below to go to the API access page.

Request method

You have the option of using POST or GET requests for API v1.1 calls. Since GET requests have URL length restrictions, it's usually better to go with the POST method.

Request URL



API V1.1 supports header-based authorization by passing the X-API-Key header with your API key.


Required Parameters

Name Description
source FILES["source"] or a base64 (opens new window) encoded image string..
key The API key

Optional Parameters

Name Description
title Image title
description Image description
album_id Image album id, must be owned by the user (encoded string)
category_id Category id (integer)
width Target resize width (automatic height)
expiration Expiration time to auto-delete the image
format Return format, values json, redirect, txt

Expiration table

Value Expires after
PT5M 5 minutes
PT15M 15 minutes
PT30M 30 minutes
PT1H 1 hour
PT3H 3 hours
PT6H 6 hours
PT12H 12 hours
P1D 1 day
P2D 2 days
P3D 3 days
P4D 4 days
P5D 5 days
P6D 6 days
P1W 1 week
P2W 2 weeks
P3W 3 weeks
P1M 1 month
P2M 2 months
P3M 3 months
P4M 4 months
P5M 5 months
P6M 6 months
P1Y 1 year

Example call

POST https://anh.moe/api/1/upload/?key=YOUR_API_KEY&source=FILES["source"]&format=json

Important: Always use POST requests for uploading local files. URL encoding can corrupt Base64-encoded image data due to character conversion or GET request length limits.

API response

The API will provide different types of answers depending on the format parameter.

Format Output
json Image upload info in JSONformat (default)
txt Image direct URL in text/plain format
redirect Redirects to the image viewer URL

API v1 responses provide the complete details of an uploaded image in JSON format.

The JSON response will include header status codes, making it easy to determine if the image upload request was successful or encountered an error. The response will also contain status properties for more specific information.

Example response (JSON)

Example response (txt)


또는 컴퓨터에서 탐색
할 수 있습니다.
Customize upload by clicking on any preview
Customize upload by touching on any preview

또는 컴퓨터에서 탐색
할 수 있습니다.
업로드 중 0 files (0% 완료)
대기열을 업로드하고 있습니다. 완료하는데 몇 초밖에 걸리지 않습니다.
업로드가 완료되었습니다
업로드한 게시물이 앨범에 추가되었습니다. 업로드된 게시물은 create new 앨범를 할 수 있습니다.
업로드한 게시물이 앨범에 추가되었습니다.
업로드된 게시물은 create new 앨범를 할 수 있습니다. 계정에 이 게시물을 저장하려면 계정 만들기 또는 로그인 해야 합니다.
file이(가) 업로드되지 않았습니다
Some errors have occurred and the system couldn't process your request.
    Note: Some files couldn't be uploaded. 더 알아보기
    자세한 내용은 오류 보고서를 참고해주세요.