Skip to main content
GET
/
streaming
/
ai
/
tasks
/
{task_id}
Get AI task result
curl --request GET \
  --url https://api.gcore.com/streaming/ai/tasks/{task_id} \
  --header 'Authorization: <api-key>'
{
  "task_id": "aafe70c6-0000-0000-0000-327b65f7670f",
  "task_data": {
    "url": "https://demo-public.gvideo.io/videos/2675_TVKIqpTO7tEFoFg/qid5774v1_h264_450_360.mp4",
    "category": "sport",
    "client_id": 2675,
    "task_name": "content-moderation"
  },
  "progress": 100,
  "status": "SUCCESS",
  "processing_time": {
    "started_at": "2024-07-13T12:30:00.000Z",
    "completed_at": "2024-07-13T12:31:02.900Z",
    "total_time_sec": 62.901
  },
  "result": {
    "sport_detected": true,
    "detection_results": [
      "shooting goal (soccer)",
      "playing cricket"
    ],
    "frames": [
      {
        "label": "shooting goal (soccer)",
        "frame_number": 68,
        "confidence": 1
      },
      {
        "label": "playing cricket",
        "frame_number": 728,
        "confidence": 0.99
      }
    ]
  }
}

Authorizations

Authorization
string
header
required

API key for authentication. Make sure to include the word apikey, followed by a single space and then your token. Example: apikey 1234$abcdef

Path Parameters

task_id
string
required

ID of the task to get status of execution or result. This value is taken from the response of the initial AI task creation method.

Response

Result of AI task execution

task_id
string<uuid>
required

ID of the AI task

status
enum<string>
required

Status of processing the AI task. See GET /ai/tasks/{task_id} method for description.

Available options:
PENDING,
STARTED,
SUCCESS,
FAILURE,
RECEIVED,
REVOKED,
RETRY
progress
integer
required

Percentage of task completed. A value greater than 0 means that it has been taken into operation and is being processed.

processing_time
object
required
task_data
AI transcription task data · object
required

The object will correspond to the task type that was specified in the original request. There will be one object for transcription, another for searching for nudity, and so on.

Example:
{
"url": "https://demo-files.gvideo.io/apidocs/spritefright-blender-cut30sec.mp4",
"task_name": "transcription",
"audio_language": "ger"
}
result
object
Example:
{
"concatenated_text": "Come on team, we mustn't dilly dally when there's so much nature to see! I was thinking, we should call our class project, Fungi in a Forest!",
"subtitles": [
{
"start_time": "00:00:00.009",
"end_time": "00:00:03.689",
"text": "Come on team, we mustn't dilly dally when there's so much nature to see!"
},
{
"start_time": "00:00:04.129",
"end_time": "00:00:08.169",
"text": "I was thinking, we should call our class project, Fungi in a Forest!"
}
],
"vttContent": "WEBVTT 1 00:00:00.009 --> 00:00:03.689 Come on team, we mustn't dilly dally when there's so much nature to see!\n2 00:00:04.129 --> 00:00:08.169 I was thinking, we should call our class project, Fungi in a Forest!",
"languages": ["eng"]
}