---
title: "Create Upload"
method: POST
path: "/v1/uploads"
tags: ["jobs"]
---

# Create Upload

`POST /v1/uploads`

## Request

- Base URL: `https://api.craterview.ai`
- URL: `https://api.craterview.ai/v1/uploads`
- Auth: HTTP bearer

Presigned PUT, so your image bytes go straight to object storage and never through
this API.

Two limits apply. Your account may mint a bounded number of upload URLs a minute, and each
URL accepts one exact size: `content_length` is signed into it, so the upload must be
exactly that many bytes. A length beyond the platform's maximum is refused here rather than
at the PUT, which means an oversized file costs you a rejected request instead of a stored
object you have to clean up.

The size limit is the same for every model — this endpoint is never told which model the
upload is for.

## Request body

- UploadRequest
  - `content_type` string: The media type you are about to upload. Signed into the URL, so the PUT must send the same one.
  - `content_length` integer, required: Bytes you are about to upload. The presigned URL accepts this figure and no other, so send exactly it. One past the upload limit the catalog states as `max_input_bytes` is refused with a 413; one past 5 GiB, more than any single upload can be, is refused with a 422.

## Response `200`

Successful Response

- UploadResponse
  - `input_key` string, required: Send this as `input_key` when you submit the job.
  - `upload_url` string, required: PUT the file here, with the content type and length you declared. It goes straight to storage and expires shortly, so upload promptly.

## Other responses

- `400`: the path, query or a JSON string in the body contains a NUL character or an unpaired surrogate; the body is not JSON encoded as UTF-8, or carries a number JSON cannot represent (NaN, Infinity, or one too large) or nesting too deep to read; or an Idempotency-Key header is longer than 255 characters or not printable ASCII. The request was not read
- `401`: missing, malformed or unrecognised API key
- `413`: the declared length exceeds the platform's upload limit; or the request body is larger than 1 MiB. The request was not read
- `415`: no model on this platform accepts the declared content type
- `422`: Validation Error
- `429`: this account has minted as many upload URLs as it may this minute

---

[API](https://skmtc.dev/craterview/apis/craterview-ai-api.md) · [All operations](https://skmtc.dev/craterview/apis/craterview-ai-api/llms.txt) · [OpenAPI document](https://skmtc.dev/craterview/apis/craterview-ai-api/revisions/9419a5cd27cd?raw)
