---
title: "POST /images"
method: POST
path: "/images"
tags: ["Image Search"]
---

# POST /images

`POST /images`

Creates signed upload information that can be used to upload the image.
This is meant for uploading images for image search via `/images/{id}/model-matches`.

The response will include the appropriate headers and upload URL that can be used to upload the image.

```json
{
 "image": {
  "id": "<imageId>",
  "uploadUrl": "<upload-url>",
  "headers": {
    "<header1-name>": "<header1-value>",
    "<header2-name>": "<header2-value>",
  }
 }
}
```

The image can be uploaded via a `PUT` request to the <upload url> including the file and the supplied headers.

Example using curl command:

```
curl -X PUT --upload-file file.png -H '<header1-name>: <header1-value>' -H '<header2-name>: <header2-value>' <upload-url>
```

Image files can be a max of 10 MB in size.

## Headers

- `X-PHYSNA-TENANTID` string

## Request body

- object
  - `filename` string, required

## Response `200`

Ok

- UploadImageResponse
  - `image` UploadImageInfo, required
    - `uploadUrl` string, required
    - `headers` object, required
    - `fileSizeRequirements` object, required
      - `maxSizeInBytes` number, double, required
      - `minSizeInBytes` number, double, required
    - `id` string, required

## Other responses

- `400`

---

[API](https://skmtc.dev/physna/apis/physna-public-api.md) · [All operations](https://skmtc.dev/physna/apis/physna-public-api/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/physna/physna-public-api/revisions/18b6af4c004d/schema)
