GET
/
streaming
/
ai
/
tasks
/
{task_id}
Python
from gcore import Gcore

client = Gcore(
    api_key="My API Key",
)
ai_task = client.streaming.ai_tasks.get(
    "task_id",
)
print(ai_task)
{
  "task_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
  "status": "PENDING",
  "progress": 123,
  "task_name": "content-moderation",
  "task_data": {
    "url": "https://demo-files.gvideo.io/apidocs/spritefright-blender-cut30sec.mp4",
    "task_name": "transcription",
    "audio_language": "ger"
  },
  "processing_time": {
    "started_at": "<string>",
    "completed_at": "<string>",
    "total_time_sec": 123
  },
  "result": {
    "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\n\n1\n00:00:00.009 --> 00:00:03.689\nCome on team, we mustn't dilly dally when there's so much nature to see!\n\n2\n00:00:04.129 --> 00:00:08.169\nI was thinking, we should call our class project, Fungi in a Forest!\n\n",
    "languages": [
      "eng"
    ]
  }
}

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

processing_time
object
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\n\n1\n00:00:00.009 --> 00:00:03.689\nCome on team, we mustn't dilly dally when there's so much nature to see!\n\n2\n00:00:04.129 --> 00:00:08.169\nI was thinking, we should call our class project, Fungi in a Forest!\n\n",
"languages": ["eng"]
}
task_id
string<uuid>

ID of the AI task

status
enum<string>

Status of processing the AI task. See GET /ai/results method for description.

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

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

task_name
enum<string>

Type of AI task

Available options:
content-moderation,
transcription
task_data
object

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"
}