---
title: Uploads
slug: uploads
docTags: 
createdAt: 2022-04-12T11:46:58.000Z
---

Methods allow you to upload a photo from a file or link and get information about the photo.

***

::::ExpandableHeading{isOpen="true"}
# <font color="#3b9f0f">POST</font> /uploads

Upload images to the service. Only JPEG images are supported. You can also upload an image by [URL](https://docs.eyrene.com/uploads#qa-post-uploadsuploadsbyurl).

:::hint{type="info"}
**Note**

The number of requests to the point is limited to **100 requests per minute**.
:::

:::ApiMethodV2
```json
{
  "tab": "request",
  "url": "https://instance_name/api/v1.5/uploads",
  "name": "Request example",
  "method": "POST",
  "request": {
    "pathParameters": [],
    "queryParameters": [],
    "headerParameters": [
      {
        "kind": "required",
        "name": "Authorization",
        "type": "string",
        "description": "String in \"Token XXXXXX...\" format."
      }
    ],
    "bodyDataParameters": [
      {
        "kind": "required",
        "name": "datafile",
        "type": "string",
        "description": "Image in JPEG."
      }
    ],
    "formDataParameters": []
  },
  "results": {
    "languages": [
      {
        "id": "zotEUkFOi4jsfuNENn9DU",
        "code": "{\n   \"id\": 156673,\n   \"url\": \"https:/test.eyrene.com/media/12345678-1234-5678-1234-567812345678.jpg\",\n   \"width\": 720,\n   \"height\": 1280,\n   \"created_date\": \"2016-08-31T10:32:15.687287Z\",\n   \"duplicate\": false\n}",
        "language": "201",
        "customLabel": ""
      }
    ],
    "selectedLanguageId": "zotEUkFOi4jsfuNENn9DU"
  },
  "examples": {
    "languages": [
      {
        "id": "MokAR1wHIIhFfccYHknSp",
        "code": "curl -i -X POST\n  https://test.eyrene.com/api/v1.5/uploads/ \n  -H ‘Authorization: Token 39fbb6e9-fbf9-459a-9e1b-416dbcf51875e’ \n  -F \"datafile=@/path/to/file/filename.jpg\"",
        "language": "curl",
        "customLabel": ""
      }
    ],
    "selectedLanguageId": "MokAR1wHIIhFfccYHknSp"
  },
  "description": "POST /uploads",
  "currentNewParameter": {
    "label": "Form Parameter",
    "value": "formDataParameters"
  },
  "autoGeneratedAnchorSlug": "request-example",
  "legacyHash": "Tnf2VPNUU96wGsnbgooDb"
}
```
:::

## Response parameters[​](https://help.inspector-cloud.com/en/docs/api/backend/methods/v1.5/upload/uploads#response-definitions)

***

**`id`** *string*

Image ID.

***

**`width`** *integer*

Image width in pixels.

***

**`height`** *integer*

Image height in pixels.

***

**`url`** *url*

Image url.

***

**`created_date`** *datetime*

Date and time when the image was uploaded.

***

**`duplicate`** *bool*

The value is "True/False". "True" if the file is a duplicate.
::::

***

::::ExpandableHeading{isOpen="true"}
# <font color="#3b9f0f">POST</font> /uploads/uploads\_by\_url

Upload image to the service by URL. Only JPEG images are supported. You can also upload an image by [/uploads](https://docs.eyrene.com/uploads#ou-post-uploads).

:::hint{type="info"}
**Note**

The number of requests to the point is limited to **100 requests per minute**.
:::

:::ApiMethodV2
```json
{
  "tab": "request",
  "url": "https://instance_name/api/uploads/uploads_by_url",
  "name": "Request example",
  "method": "POST",
  "request": {
    "pathParameters": [],
    "queryParameters": [],
    "headerParameters": [
      {
        "kind": "required",
        "name": "Authorization",
        "type": "string",
        "description": "String in \"Token XXXXXX...\" format."
      }
    ],
    "bodyDataParameters": [
      {
        "kind": "required",
        "name": "url",
        "type": "String",
        "description": "Image url."
      }
    ],
    "formDataParameters": []
  },
  "results": {
    "languages": [
      {
        "id": "8lATNTjoOp8rOQ8QUwd3h",
        "code": "{\n   \"id\":156673,\n   \"url\":\"https:/test.eyrene.com/media/12345678-1234-5678-1234-567812345678.jpg\",\n   \"width\":720,\n   \"height\":1280,\n   \"created_date\":\"2016-08-31T10:32:15.687287Z\"\n}",
        "language": "201",
        "customLabel": ""
      }
    ],
    "selectedLanguageId": "8lATNTjoOp8rOQ8QUwd3h"
  },
  "examples": {
    "languages": [
      {
        "id": "uOrcbx6OeFdZ6LOXmNDcQ",
        "code": "curl -i -X POST\n  https://test.eyrene.com/api/v1.5/uploads/uploads_by_url/ \n  -H ‘Authorization: Token 39fbb6e9-fbf9-459a-9e1b-416dbcf51875e’ \n  -F \"url=https:/test.eyrene.com/media/567812345678.jpg\"",
        "language": "curl",
        "customLabel": ""
      }
    ],
    "selectedLanguageId": "uOrcbx6OeFdZ6LOXmNDcQ"
  },
  "description": "POST /uploads/uploads_by_url",
  "currentNewParameter": {
    "label": "Header Parameter",
    "value": "headerParameters"
  },
  "autoGeneratedAnchorSlug": "request-example-1",
  "legacyHash": "8SsZfDza8ZnAgJAS0Ljzk"
}
```
:::

## Response parameters[​](https://help.inspector-cloud.com/en/docs/api/backend/methods/v1.5/upload/uploads_by_url#response-definitions)

***

**`id`** *integer*

Image ID.

***

**`width`** *integer*

Image width in pixels.

***

**`height`** *integer*

Image height in pixels.

***

**`url`** *url*

Image url.

***

**`created_date`** *datetime*

Date and time when the image was uploaded.

***
::::

***

::::ExpandableHeading{isOpen="true"}
# <font color="#2166ae">GET</font> uploads/&#x7B;id}

:::ApiMethodV2
```json
{
  "tab": "request",
  "url": "https://instance_name/api/v1.5/uploads/{id}",
  "name": "Get Cakes",
  "method": "GET",
  "request": {
    "pathParameters": [
      {
        "kind": "required",
        "name": "id ",
        "type": "Integer",
        "description": "Image ID."
      }
    ],
    "queryParameters": [],
    "headerParameters": [
      {
        "kind": "required",
        "name": "Authorization",
        "type": "string",
        "description": "String in \"Token XXXXXX...\" format."
      }
    ],
    "bodyDataParameters": [],
    "formDataParameters": []
  },
  "results": {
    "languages": [
      {
        "id": "SmszrWpVhXWUq6EaVYrlM",
        "code": "{\n   \"id\":123456789059846,\n   \"url\":\"https:/test.eyrene.com/media/12345678-1234-5678-1234-567812345678.jpg\",\n   \"width\":720,\n   \"height\":1280,\n   \"created_date\":\"2016-08-31T10:32:15.687287Z\"\n}",
        "language": "200",
        "customLabel": ""
      }
    ],
    "selectedLanguageId": "SmszrWpVhXWUq6EaVYrlM"
  },
  "examples": {
    "languages": [
      {
        "id": "L4mIuIyHzkto5LPFhRjFn",
        "code": "curl –i –X GET\n  https://test.eyrene.com/api/v1.5/uploads/123456789059846 \n  -H ‘Authorization: Token 39fbb6e9-fbf9-459a-9e1b-416dbcf51875e’",
        "language": "curl",
        "customLabel": ""
      }
    ],
    "selectedLanguageId": "L4mIuIyHzkto5LPFhRjFn"
  },
  "description": "Get a cake by its ID",
  "currentNewParameter": {
    "label": "Path Parameter",
    "value": "pathParameters"
  },
  "autoGeneratedAnchorSlug": "get-cakes",
  "legacyHash": "tOkS5VfwAhzxZVDE4z4dO"
}
```
:::

## Response parameters[​](https://help.inspector-cloud.com/en/docs/api/backend/methods/v1.5/upload/uploads_id#response-definitions)

***

**`id`** *integer*

Image ID.

***

**`width`** *integer*

Image width in pixels.

***

**`height`** *integer*

Image height in pixels.

***

**`url`** *URL*

Image url.

***

**`created_date`** *Datetime*

Date and time when the image was uploaded.

***
::::

***

