> ## Documentation Index
> Fetch the complete documentation index at: https://gcore.com/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# Create AI CM:sport task

> This algorithm allows to identify various sporting activities in a video. Generic info about all capabilities and limits see in the generic ["Content Moderation"](/docs/api-reference/streaming/ai/create-ai-task) method.


**What is Sports activity detection?**

Sports activity detection by AI involves using machine learning and computer vision technologies to automatically identify, analyze, and interpret various activities within sports and generic videos. This can include detecting specific types, actions, events, and moments.

This model operates on a video sequence (and not on images as most of the used computer vision models). Make sure your video is at least 10-15 seconds long.

Sports activities can be detected:
- archery
- arm wrestling
- playing badminton
- playing baseball
- basketball dunk
- bowling
- boxing punch
- boxing speed bag
- catching or throwing baseball
- catching or throwing softball
- cricket
- curling
- disc golfing
- dodgeball
- fencing
- football
- golf chipping
- golf driving
- golf putting
- hitting baseball
- hockey stop
- ice skating
- javelin throw
- juggling soccer ball
- kayaking
- kicking field goal
- kicking soccer ball
- playing cricket
- playing field hockey
- playing ice hockey
- playing kickball
- playing lacrosse
- playing ping pong
- playing polo
- playing squash or racquetball
- playing tennis
- playing volleyball
- pole vault
- riding a bike
- riding or walking with horse
- roller skating
- rowing
- sailing
- shooting goal (soccer)
- skateboarding
- skiing 

Use cases:
- Sports leagues and content creators can use AI to monitor UGC for unauthorized publications of their content. This can include detecting specific sporting events or activities that are part of copyrighted content.
- Sports fans often miss live games and rely on highlight reels. AI can automatically detect key moments like goals, touchdowns, or game-winning shots in uploaded UGC videos and compile them into personalized highlight reels.

![AI Content Moderation: sports activity detection visual example](https://demo-files.gvideo.io/apidocs/sports_football_detection.gif)

**How to use?**

The information is returned with the video frame number where it was found and probability of the detected activty.
Identification is done using AI, so for each activity a probability percentage is applied; activities with a probability of at least 30% are included in the response.

Video processing speed is approximately 1:5.


Example of detected sports activity:

```
{
  "sport_detected": true,
  "detection_results": [ "shooting goal (soccer)" ],
  "frames": [
      {
          "label": "shooting goal (soccer)",
          "frame_number": 98,
          "confidence": 0.99
      },...
  ]
}
```

Example response when sports activities were not found:

```
{
  "sport_detected": false,
  "detection_results": []
  "frames": []
}
```

  


Please note that the API only provides a set of data (json) about the objects found, so no video is generated. The demo video video (above ^) was specially created based on json from the API for visual demonstration and better perception of the possibilities.



## OpenAPI

````yaml /api-reference/services_documented/streaming_api.yaml post /streaming/ai/tasks#cm_sport
openapi: 3.1.0
info:
  title: Gcore OpenAPI – Streaming API
  description: >-
    This OpenAPI is an aggregated OpenAPI specification that unifies all Gcore
    products into a single file. It covers Cloud, CDN, DNS, WAAP, DDoS
    Protection, Object Storage, Streaming, and FastEdge services.
  version: '2026-05-11T15:10:30.328297+00:00'
servers:
  - url: https://api.gcore.com
security:
  - APIKey: []
tags:
  - name: AI
    x-displayName: AI
  - name: Broadcasts
    x-displayName: Broadcasts
  - name: Directories
    x-displayName: Directories
  - name: Overlays
    x-displayName: Overlays
  - name: Players
    x-displayName: Players
  - name: Playlists
    x-displayName: Playlists
  - name: QualitySets
    x-displayName: QualitySets
  - name: Restreams
    x-displayName: Restreams
  - name: Streaming Statistics
    x-displayName: Statistics
  - name: Streams
    x-displayName: Streams
  - name: Subtitles
    x-displayName: Subtitles
  - name: Videos
    x-displayName: Videos
paths:
  /streaming/ai/tasks#cm_sport:
    post:
      tags:
        - AI
      summary: Create AI CM:sport task
      description: >-
        This algorithm allows to identify various sporting activities in a
        video. Generic info about all capabilities and limits see in the generic
        ["Content Moderation"](/docs/api-reference/streaming/ai/create-ai-task)
        method.



        **What is Sports activity detection?**


        Sports activity detection by AI involves using machine learning and
        computer vision technologies to automatically identify, analyze, and
        interpret various activities within sports and generic videos. This can
        include detecting specific types, actions, events, and moments.


        This model operates on a video sequence (and not on images as most of
        the used computer vision models). Make sure your video is at least 10-15
        seconds long.


        Sports activities can be detected:

        - archery

        - arm wrestling

        - playing badminton

        - playing baseball

        - basketball dunk

        - bowling

        - boxing punch

        - boxing speed bag

        - catching or throwing baseball

        - catching or throwing softball

        - cricket

        - curling

        - disc golfing

        - dodgeball

        - fencing

        - football

        - golf chipping

        - golf driving

        - golf putting

        - hitting baseball

        - hockey stop

        - ice skating

        - javelin throw

        - juggling soccer ball

        - kayaking

        - kicking field goal

        - kicking soccer ball

        - playing cricket

        - playing field hockey

        - playing ice hockey

        - playing kickball

        - playing lacrosse

        - playing ping pong

        - playing polo

        - playing squash or racquetball

        - playing tennis

        - playing volleyball

        - pole vault

        - riding a bike

        - riding or walking with horse

        - roller skating

        - rowing

        - sailing

        - shooting goal (soccer)

        - skateboarding

        - skiing 


        Use cases:

        - Sports leagues and content creators can use AI to monitor UGC for
        unauthorized publications of their content. This can include detecting
        specific sporting events or activities that are part of copyrighted
        content.

        - Sports fans often miss live games and rely on highlight reels. AI can
        automatically detect key moments like goals, touchdowns, or game-winning
        shots in uploaded UGC videos and compile them into personalized
        highlight reels.


        ![AI Content Moderation: sports activity detection visual
        example](https://demo-files.gvideo.io/apidocs/sports_football_detection.gif)


        **How to use?**


        The information is returned with the video frame number where it was
        found and probability of the detected activty.

        Identification is done using AI, so for each activity a probability
        percentage is applied; activities with a probability of at least 30% are
        included in the response.


        Video processing speed is approximately 1:5.



        Example of detected sports activity:


        ```

        {
          "sport_detected": true,
          "detection_results": [ "shooting goal (soccer)" ],
          "frames": [
              {
                  "label": "shooting goal (soccer)",
                  "frame_number": 98,
                  "confidence": 0.99
              },...
          ]
        }

        ```


        Example response when sports activities were not found:


        ```

        {
          "sport_detected": false,
          "detection_results": []
          "frames": []
        }

        ```

          


        Please note that the API only provides a set of data (json) about the
        objects found, so no video is generated. The demo video video (above ^)
        was specially created based on json from the API for visual
        demonstration and better perception of the possibilities.
      operationId: post_ai_contentmoderation_sport
      parameters: []
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/ai_contentmoderation_sport'
      responses:
        '201':
          description: >-
            Response returns ID of the created AI task. Using this AI task ID,
            you can check the status and get the video processing result. Look
            at GET /ai/results method.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ai_post_response'
        '400':
          description: |-
            Bad request:
            - "url" is not specified,
            - Queue limit reached (100), try later,
            - etc
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/streaming_error'
        '422':
          description: >-
            This is advanced functionality; to enable it, contact your manager
            or the Support Team.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/upgraderequired'
components:
  schemas:
    ai_contentmoderation_sport:
      allOf:
        - $ref: '#/components/schemas/ai_contentmoderation_general'
      required:
        - category
      properties:
        category:
          type: string
          enum:
            - sport
          description: AI content moderation with types of sports activity detection
      example:
        url: >-
          https://demo-files.gvideo.io/ai_demo_soccer_players_passing_the_ball.mp4
        task_name: content-moderation
        category: sport
    ai_post_response:
      type: object
      required:
        - task_id
      properties:
        task_id:
          type: string
          format: uuid
          description: >-
            ID of the created AI task, from which you can get the execution
            result
      example:
        task_id: aafe70c6-0000-0000-0000-327b65f7670f
    streaming_error:
      type: object
      properties:
        error:
          type: string
          description: Text message with description of error.
      example:
        error: Queue limit reached (100), try later.
    upgraderequired:
      type: object
      properties:
        error:
          type: string
          description: >-
            This is advanced functionality; to enable it, contact your manager
            or support service.
      example:
        error: Feature is disabled. Contact support to enable.
    ai_contentmoderation_general:
      type: object
      required:
        - url
        - task_name
      properties:
        task_name:
          type: string
          description: Name of the task to be performed
          enum:
            - content-moderation
        url:
          type: string
          description: >-
            URL to the MP4 file to analyse. File must be publicly accessible via
            HTTP/HTTPS.
        category:
          type: string
          description: >-
            Model for analysis (content-moderation only). Determines what
            exactly needs to be found in the video.
          enum:
            - sport
            - nsfw
            - hard_nudity
            - soft_nudity
        client_user_id:
          type: string
          maxLength: 256
          default: null
          description: >-
            Meta parameter, designed to store your own identifier. Can be used
            by you to tag requests from different end-users. It is not used in
            any way in video processing.
        client_entity_data:
          type: string
          maxLength: 4096
          default: null
          description: >-
            Meta parameter, designed to store your own extra information about a
            video entity: video source, video id, etc. It is not used in any way
            in video processing.


            For example, if an AI-task was created automatically when you
            uploaded a video with the AI auto-processing option (nudity
            detection, etc), then the ID of the associated video for which the
            task was performed will be explicitly indicated here.
      example:
        url: https://demo-files.gvideo.io/ai_demo_subtitles_nudity_detection.mp4
        task_name: content-moderation
        category: nsfw
  securitySchemes:
    APIKey:
      description: >-
        API key for authentication. Make sure to include the word `apikey`,
        followed by a single space and then your token.

        Example: `apikey 1234$abcdef`
      type: apiKey
      in: header
      name: Authorization

````