Get AI task result
Changed onThis is the single method to check the execution status of an AI task, and obtain the result of any type of AI task.
Based on the results of processing, the “result” field will contain an answer corresponding to the type of the initially created task:
- ASR: Transcribe video
- ASR: Translate subtitles
- CM: Sports detection
- CM: Not Safe For Work (NSFW) content detection
- CM: Soft nudity detection
- CM: Hard nudity detection
- CM: Objects recognition (soon)
- etc... (see other methods from /ai/ domain)
A queue is used to process videos. The waiting time depends on the total number of requests in the system, so sometimes you will have to wait.
Statuses:
- RECEIVED – the task is accepted by the system
- PENDING – the task is received and it is pending for available resources
- STARTED – processing has started
- SUCCESS – processing has completed successfully
- FAILURE – processing failed
- REVOKED – processing was cancelled by the user (or the system)
- RETRY – the task execution failed due to internal reasons, the task is queued for re-execution (up to 3 times)
Each task is processed in sub-stages, for example, original language is first determined in a video, and then transcription is performed. In such cases, the video processing status may change from "STARTED" to "PENDING", and back. This is due to waiting for resources for a specific processing sub-stage. In this case, the overall percentage "progress" of video processing will reflect the full picture.
The result data is stored for 1 month, after which it is deleted.
For billing conditions see the corresponding methods in /ai/ domain. The task is billed only after successful completion of the task and transition to "SUCCESS" status.
Request
- Base URLhttps://api.gcore.com
- URLhttps://api.gcore.com/streaming/ai/tasks/{task_id}
- AuthHTTP apikey
Path parameters
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
Example response
{
"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
}
]
}
}Changes
- breaking
the
////////response's property type changed from no type toobjectfor status - breaking
the
////////response's property type changed from no type toobjectfor status - breaking
the
////////response's property type changed from no type toobjectfor status - breaking
the
////////response's property type changed from no type toobjectfor status - warning
removed the optional property
////from the response with the status - warning
removed the optional property
from the response with the status - warning
removed the optional property
from the response with the status - warning
added the new
RECEIVEDenum value to the////response property for the response status - info
added
subschema #2to the response bodyallOflist for the response status - info
added the optional property
/////////to the response with the status - info
added the optional property
/////////to the response with the status - info
added the optional property
/////////to the response with the status - info
added the optional property
/////////to the response with the status - info
added the optional property
/////////to the response with the status - info
added the optional property
/////////to the response with the status - info
added the optional property
/////////to the response with the status - info
added the optional property
/////////to the response with the status - info
added the optional property
/////////to the response with the status - info
added the optional property
/////////to the response with the status - info
added the optional property
/////////to the response with the status - info
added the optional property
/////////to the response with the status - info
added the optional property
/////////to the response with the status - info
removed from the
////////response propertyallOflist for the response status - info
removed from the
////////response propertyallOflist for the response status - info
removed from the
////////response propertyallOflist for the response status - info
removed from the
////////response propertyallOflist for the response status - info
the response property
////became required for the status - info
the response property
////became required for the status - info
the response property
////became required for the status - info
the response property
////became required for the status - info
added the required property
////to the response with the status - info
added the required property
/////////to the response with the status - info
added the required property
/////////to the response with the status - info
added the required property
/////////to the response with the status - info
added the required property
/////////to the response with the status - info
added the required property
/////////to the response with the status - info
added the required property
/////////to the response with the status - info
added the required property
/////////to the response with the status - info
added the required property
/////////to the response with the status
- breaking