Skip to main content
POST
/
context
/
vision
/
extract
JavaScript SDK
const job = await client.vision.extract(['TextDetection', 'AssetTagDetection', 'PeopleDetection'], [{ fileId: 1234 }]);
{
  "status": "Queued",
  "createdTime": 1730204346000,
  "startTime": 1730204346000,
  "statusTime": 1730204346000,
  "jobId": 123,
  "items": [
    {
      "fileId": 1234,
      "fileExternalId": "1234",
      "fileInstanceId": {
        "space": "space",
        "externalId": "externalId"
      }
    }
  ],
  "features": [
    "TextDetection",
    "AssetTagDetection",
    "PeopleDetection"
  ],
  "errorMessage": null,
  "parameters": {
    "textDetectionParameters": {
      "threshold": 0.8
    },
    "assetTagDetectionParameters": {
      "threshold": 0.8,
      "partialMatch": true,
      "assetSubtreeIds": [
        1,
        2
      ]
    },
    "peopleDetectionParameters": {
      "threshold": 0.8
    }
  }
}

Authorizations

Authorization
string
header
required

Access token issued by the CDF project's configured identity provider. Access token must be an OpenID Connect token, and the project must be configured to accept OpenID Connect tokens. Use a header key of 'Authorization' with a value of 'Bearer $accesstoken'. The token can be obtained through any flow supported by the identity provider.

Headers

cdf-version
string

cdf version header. Use this to specify the requested CDF release.

Example:

"alpha"

Body

application/json

A request for running an extract job.

items
object[]
required

List of image files to be analyzed by the feature extractors.

An external-id or instance-id reference to the referenced file.

features
enum<string>[]
required

The type of detections to perform. New feature extractors may appear. You can use up to three feature extractors per request.

Detect text in images.

Available options:
TextDetection
Example:
[
  "TextDetection",
  "AssetTagDetection",
  "PeopleDetection"
]
parameters
object

Feature-specific parameters. New feature extractor parameters may appear.

Example:
{
  "textDetectionParameters": { "threshold": 0.8 },
  "assetTagDetectionParameters": {
    "threshold": 0.8,
    "partialMatch": true,
    "assetSubtreeIds": [1, 2]
  },
  "peopleDetectionParameters": { "threshold": 0.8 }
}

Response

Success

status
enum<string>
required

The status of the job.

Available options:
Queued,
Running,
Completed,
Failed
createdTime
integer<int64>
required

The number of milliseconds since 00:00:00 Thursday, 1 January 1970, Coordinated Universal Time (UTC), minus leap seconds.

Required range: x >= 0
Example:

1730204346000

startTime
integer<int64>
required

The number of milliseconds since 00:00:00 Thursday, 1 January 1970, Coordinated Universal Time (UTC), minus leap seconds.

Required range: x >= 0
Example:

1730204346000

statusTime
integer<int64>
required

The number of milliseconds since 00:00:00 Thursday, 1 January 1970, Coordinated Universal Time (UTC), minus leap seconds.

Required range: x >= 0
Example:

1730204346000

jobId
integer<int64>
required

Contextualization job ID.

Example:

123

items
object[]
required

List of files to be analyzed by the feature extractors.

features
enum<string>[]
required

The type of detections to perform. New feature extractors may appear.

Detect text in images.

Available options:
TextDetection
Example:
[
  "TextDetection",
  "AssetTagDetection",
  "PeopleDetection"
]
errorMessage
string

If the job failed, some more information about the error cause.

Example:

null

parameters
object

Feature-specific parameters. New feature extractor parameters may appear.

Example:
{
  "textDetectionParameters": { "threshold": 0.8 },
  "assetTagDetectionParameters": {
    "threshold": 0.8,
    "partialMatch": true,
    "assetSubtreeIds": [1, 2]
  },
  "peopleDetectionParameters": { "threshold": 0.8 }
}
Last modified on April 23, 2026