Skip to main content
PUT
Upload an Image
DCinside sends each candidate’s images once when it enters the queue. Surf proposes a separate upload endpoint; HTTPS versus an S3 folder and the exact layout remain open technical decisions. The existing proposal follows the delivered v1.3 layout, <gall_id>/<post_no>/<NN>.jpg. NN is the original body’s one-based image position, zero-padded to at least two digits. Gaps are permitted when a source image cannot be fetched. Preserve original positions rather than renumbering. The delivered image convention includes all images, resized to a maximum 1,024-pixel long edge without upscaling. The request body for this endpoint is JPEG. The current server has a 5 MiB per-image engineering limit; verify it against rehearsal data rather than treating it as a client quota. images_in_post and optional image_positions describe expected uploads. Confirm these fields and missing-image handling with the client. Whether scoring waits for image features is not settled by using a separate upload route. Verify image readiness and fallback behavior with the actual Model 0924 pipeline before rehearsal. The optional X-Content-SHA256 header checks the uploaded bytes. Repeating the same image path with identical bytes is safe in the current implementation. Different bytes at an existing image key return 409; the stored image is preserved. Verify image retention and replay across restarts before rehearsal. The current route accepts only 1–3 digits for NN and stores a three-digit name; confirm this path convention against the client image layout rather than assuming it matches every source filename.

Authorizations

Authorization
string
header
required

Proposed API key sent as the whole Authorization header value. Long-lived credential scope, handoff and rotation need confirmation. Per-endpoint scopes are not currently enforced.

Headers

X-Content-SHA256
string

Hex SHA-256 of the body. When present we verify it, and a mismatch is rejected with 400.

Pattern: ^[0-9a-f]{64}$

Path Parameters

gall_id
string
required

Gallery id.

Minimum string length: 1
Example:

"example_gallery"

post_no
integer
required

Post number.

Required range: x >= 1
Example:

31900001

NN
string
required

The image's position in the original body: one-based, zero-padded to at least two digits, gaps allowed. The v1.3 layout <gall_id>/<post_no>/<NN>.jpg.

Pattern: ^\d{2,}$
Example:

"01"

Body

image/jpeg

The JPEG, 1024 px on the long edge. Smaller originals are not upscaled.

Response

Already stored with the same bytes.