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
}
}
}Required capabilities:
filesAcl:READ
Start an asynchronous prediction job for extracting features such as text, asset tags or industrial objects from images. The response of the POST request contains a job ID, which can be used to make subsequent (GET) calls to check the status and retrieve the results of the job (see Retrieve results from a feature extraction job).
It is possible to have up to 20 concurrent jobs per CDF project.
The files referenced by items in the request body must fulfill the following requirements:
.jpeg, .jpg or .pngimage/png or image/jpeg as mimeTypeNew feature extractors may be added in the future.
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
}
}
}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.
cdf version header. Use this to specify the requested CDF release.
"alpha"
A request for running an extract job.
List of image files to be analyzed by the feature extractors.
An external-id or instance-id reference to the referenced file.
Show child attributes
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.
TextDetection [
"TextDetection",
"AssetTagDetection",
"PeopleDetection"
]Feature-specific parameters. New feature extractor parameters may appear.
Show child attributes
{
"textDetectionParameters": { "threshold": 0.8 },
"assetTagDetectionParameters": {
"threshold": 0.8,
"partialMatch": true,
"assetSubtreeIds": [1, 2]
},
"peopleDetectionParameters": { "threshold": 0.8 }
}Success
The status of the job.
Queued, Running, Completed, Failed The number of milliseconds since 00:00:00 Thursday, 1 January 1970, Coordinated Universal Time (UTC), minus leap seconds.
x >= 01730204346000
The number of milliseconds since 00:00:00 Thursday, 1 January 1970, Coordinated Universal Time (UTC), minus leap seconds.
x >= 01730204346000
The number of milliseconds since 00:00:00 Thursday, 1 January 1970, Coordinated Universal Time (UTC), minus leap seconds.
x >= 01730204346000
Contextualization job ID.
123
List of files to be analyzed by the feature extractors.
Show child attributes
The type of detections to perform. New feature extractors may appear.
Detect text in images.
TextDetection [
"TextDetection",
"AssetTagDetection",
"PeopleDetection"
]If the job failed, some more information about the error cause.
null
Feature-specific parameters. New feature extractor parameters may appear.
Show child attributes
{
"textDetectionParameters": { "threshold": 0.8 },
"assetTagDetectionParameters": {
"threshold": 0.8,
"partialMatch": true,
"assetSubtreeIds": [1, 2]
},
"peopleDetectionParameters": { "threshold": 0.8 }
}Was this page helpful?