Skip to main content
GET
/
context
/
vision
/
segment
/
{jobId}
Retrieve results from a segmentation job on an image
curl --request GET \
  --url https://{cluster}.cognitedata.com/api/v1/projects/{project}/context/vision/segment/{jobId} \
  --header 'Authorization: Bearer <token>'
{
  "status": "Queued",
  "createdTime": 1730204346000,
  "startTime": 1730204346000,
  "statusTime": 1730204346000,
  "jobId": 123,
  "items": [
    {
      "fileId": 1234,
      "segments": [
        {
          "score": 0.8,
          "polygons": [
            {
              "vertices": [
                {
                  "x": 0.5,
                  "y": 0.5,
                  "confidence": null
                }
              ],
              "confidence": null
            }
          ]
        }
      ],
      "fileExternalId": "1234"
    }
  ],
  "prompt": {
    "points": [
      {
        "x": 0.8,
        "y": 0.8,
        "label": 1
      }
    ],
    "boundingBox": {
      "xMin": 0.1,
      "yMin": 0.2,
      "xMax": 0.5,
      "yMax": 0.6
    }
  },
  "errorMessage": null,
  "failedItems": [
    {
      "errorMessage": "<string>",
      "items": [
        {
          "fileId": 1234,
          "fileExternalId": "1234",
          "fileInstanceId": {
            "space": "space",
            "externalId": "externalId"
          }
        }
      ]
    }
  ]
}

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"

Path Parameters

jobId
integer<int64>
required

Contextualization job ID.

Example:

123

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 file IDs and their corresponding predictions.

prompt
object
required

Input prompt used to segment the image.

errorMessage
string

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

Example:

null

failedItems
object[]
Last modified on April 23, 2026