> For clean Markdown of any page, append .md to the page URL.
> For a complete documentation index, see https://uploadcare.com/docs/llms.txt.
> For AI client integration (Claude Code, Cursor, etc.), connect to the MCP server at https://uploadcare.com/docs/_mcp/server.

# Execute AWS Rekognition

POST https://api.uploadcare.com/addons/aws_rekognition_detect_labels/execute/
Content-Type: application/json

Execute [AWS Rekognition](https://docs.aws.amazon.com/rekognition/latest/dg/labels-detect-labels-image.html) Add-On for a given target to detect labels in an image. **Note:** Detected labels are stored in the file's appdata.

Reference: https://uploadcare.com/docs/api/rest/add-ons/aws-rekognition-execute

## Authentication

- `Authorization` header (required) — Every request made to `https://api.uploadcare.com/` MUST be signed. HTTPS SHOULD be used with any authorization scheme. Requests MUST contain the `Authorization` header defining `auth-scheme` and `auth-param`: `Authorization: auth-scheme auth-param`. Every request MUST contain the `Accept` header identifying the REST API version: `Accept: application/vnd.uploadcare-v0.7+json`. There are two available authorization schemes: * For production: `Uploadcare`, a scheme where a `signature`, not your Secret API Key MUST be specified. Signatures SHOULD be generated on backend. * For quick tests: `Uploadcare.Simple`, a simple scheme where your [Secret API Key](https://app.uploadcare.com/projects/-/api-keys/) MUST be specified in every request's `auth-param`.

## Request

### Headers

- `Accept` (string, required) — Version header.

### Body (application/json)

This endpoint expects an object.

- `target` (string, required) — Unique ID of the file to process

## Response

### 200

Add-On execution response.

- `request_id` (string, optional) — Request ID.

## Errors

### 400 Bad Request Error

Simple authentication over HTTP is forbidden. Please, use HTTPS or signed requests instead.

- `detail` (string, optional, default: Simple authentication over HTTP is forbidden. Please, use HTTPS or signed requests instead.)

### 401 Unauthorized Error

Authorization errors.

- `detail` (enum, optional)
  - Allowed values: `Incorrect authentication credentials.`, `Public key {public_key} not found.`, `Secret key not found.`, `Invalid signature. Please check your Secret key.`

### 406 Not Acceptable Error

Invalid version header `Accept` for this endpoint.

- `detail` (string, optional, default: Incorrect Accept header provided. Make sure to specify API version. Refer to REST API docs for details.)

### 409 Conflict Error

Add-On concurrent call attempt.

- `detail` (string, optional, default: Concurrent call attempted)

### 429 Too Many Requests Error

Request was throttled.

- `detail` (string, optional)

## Examples

**Request**

```json
{
  "target": "21975c81-7f57-4c7a-aef9-acfe28779f78"
}
```

**Response**

```json
{
  "request_id": "8db3c8b4-2dea-4146-bcdb-63387e2b33c1"
}
```

**SDK Code**

```php PHP
<?php
$configuration = Uploadcare\Configuration::create((string) $_ENV['UPLOADCARE_PUBLIC_KEY'], (string) $_ENV['UPLOADCARE_SECRET_KEY']);

$api = (new Uploadcare\Api($configuration))->addons();
$resultKey = $api->requestAwsRecognition('1bac376c-aa7e-4356-861b-dd2657b5bfd2');
echo \sprintf('Recognition requested. Key is \'%s\'', $resultKey);

```

```python Python
from pyuploadcare import Uploadcare
uploadcare = Uploadcare(public_key='YOUR_PUBLIC_KEY', secret_key='YOUR_SECRET_KEY')

target_file = uploadcare.file("1bac376c-aa7e-4356-861b-dd2657b5bfd2")
aws_recognition_result = uploadcare.addons_api.execute(
    target_file,
    AddonLabels.AWS_LABEL_RECOGNITION,
)

```

```ruby Ruby
require 'uploadcare'
Uploadcare.config.public_key = 'YOUR_PUBLIC_KEY'
Uploadcare.config.secret_key = 'YOUR_SECRET_KEY'

uuid = '1bac376c-aa7e-4356-861b-dd2657b5bfd2'
Uploadcare::Addons.ws_rekognition_detect_labels(uuid)

```

```swift Swift
import Uploadcare

let uploadcare = Uploadcare(withPublicKey: "YOUR_PUBLIC_KEY", secretKey: "YOUR_SECRET_KEY")

let response = try await uploadcare.executeAWSRekognition(fileUUID: "1bac376c-aa7e-4356-861b-dd2657b5bfd2")
print(response) // contains requestID

// Execute and wait for completion:
let status = try await uploadcare.performAWSRekognition(fileUUID: "1bac376c-aa7e-4356-861b-dd2657b5bfd2")
print(status)

```

```kotlin Kotlin
import com.uploadcare.android.library.api.UploadcareClient

val uploadcare = UploadcareClient(publicKey = "YOUR_PUBLIC_KEY", secretKey = "YOUR_SECRET_KEY")

val addOn = AWSRekognitionAddOn(uploadcare)
val response = addOn.execute(fileId = "1bac376c-aa7e-4356-861b-dd2657b5bfd2")
Log.d("TAG", response.toString())

```

```javascript
const url = 'https://api.uploadcare.com/addons/aws_rekognition_detect_labels/execute/';
const options = {
  method: 'POST',
  headers: {
    Accept: 'application/vnd.uploadcare-v0.7+json',
    Authorization: '<apiKey>',
    'Content-Type': 'application/json'
  },
  body: '{"target":"21975c81-7f57-4c7a-aef9-acfe28779f78"}'
};

try {
  const response = await fetch(url, options);
  const data = await response.json();
  console.log(data);
} catch (error) {
  console.error(error);
}
```

```go
package main

import (
	"fmt"
	"strings"
	"net/http"
	"io"
)

func main() {

	url := "https://api.uploadcare.com/addons/aws_rekognition_detect_labels/execute/"

	payload := strings.NewReader("{\n  \"target\": \"21975c81-7f57-4c7a-aef9-acfe28779f78\"\n}")

	req, _ := http.NewRequest("POST", url, payload)

	req.Header.Add("Accept", "application/vnd.uploadcare-v0.7+json")
	req.Header.Add("Authorization", "<apiKey>")
	req.Header.Add("Content-Type", "application/json")

	res, _ := http.DefaultClient.Do(req)

	defer res.Body.Close()
	body, _ := io.ReadAll(res.Body)

	fmt.Println(res)
	fmt.Println(string(body))

}
```

```java
import com.mashape.unirest.http.HttpResponse;
import com.mashape.unirest.http.Unirest;

HttpResponse<String> response = Unirest.post("https://api.uploadcare.com/addons/aws_rekognition_detect_labels/execute/")
  .header("Accept", "application/vnd.uploadcare-v0.7+json")
  .header("Authorization", "<apiKey>")
  .header("Content-Type", "application/json")
  .body("{\n  \"target\": \"21975c81-7f57-4c7a-aef9-acfe28779f78\"\n}")
  .asString();
```

```csharp
using RestSharp;

var client = new RestClient("https://api.uploadcare.com/addons/aws_rekognition_detect_labels/execute/");
var request = new RestRequest(Method.POST);
request.AddHeader("Accept", "application/vnd.uploadcare-v0.7+json");
request.AddHeader("Authorization", "<apiKey>");
request.AddHeader("Content-Type", "application/json");
request.AddParameter("application/json", "{\n  \"target\": \"21975c81-7f57-4c7a-aef9-acfe28779f78\"\n}", ParameterType.RequestBody);
IRestResponse response = client.Execute(request);
```