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

# Analyze video score

> Analyzes the current video and gives it a score of how well it fulfills the criteria.



## OpenAPI

````yaml api-reference/openapi.yml post /observe
openapi: 3.1.0
info:
  title: Mocra
  description: Mocra's APIs for interacting with videos.
  version: 1.0.0
servers:
  - url: https://api.mocra.io/
    description: Official production server
security:
  - bearerAuth: []
paths:
  /observe:
    post:
      summary: Analyze video score
      description: >-
        Analyzes the current video and gives it a score of how well it fulfills
        the criteria.
      requestBody:
        required: true
        content:
          application/json:
            schema:
              required:
                - videoUrl
              type: object
              description: >-
                Request body detailing what URL and criteria to use for the
                analysis.
              properties:
                videoUrl:
                  type: string
                  description: URL of the video to analyze.
                customCriteria:
                  type: array
                  description: A list of extra custom criteria to be analyzed.
                  items:
                    type: object
                    description: Custom criterion that should be analyzed.
                    properties:
                      criterionName:
                        type: string
                        description: Descriptive name for this criterion.
                      criterionDescription:
                        type: string
                        description: >-
                          Plain language description of what this criterion is
                          about.
                removeCriteria:
                  type: array
                  description: >-
                    A list of names of default criteria that should not be used
                    for this analysis
                  items:
                    enum:
                      - UNNATURAL PHYSICS
                      - MORPHING
                      - FLICKERING
                      - ARTIFACTING
                      - TEXT ISSUES
      responses:
        '200':
          description: Score of the given video with the specified criteria.
          content:
            application/json:
              schema:
                type: object
                description: >-
                  Scores detailing the result of the analysis performed by the
                  Mocra API
                required:
                  - severity
                  - criteria
                properties:
                  severity:
                    type: number
                    description: Overall score assigned for the given video
                    minimum: 1
                    maximum: 100
                    multipleOf: 0.01
                  criteria:
                    type: array
                    description: Per-criterion breakdown of scores
                    items:
                      type: object
                      required:
                        - name
                        - score
                      properties:
                        name:
                          type: string
                          description: The name of this criterion
                        score:
                          type: number
                          description: The score assigned for this criterion
                          minimum: 1
                          maximum: 100
                          multipleOf: 0.01
        '400':
          description: Unexpected error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
      x-codeSamples:
        - lang: javascript
          label: Analyze a video
          source: |
            const response = await fetch("https://api.mocra.io/observe", {
              method: "POST",
              headers: {
                "Authorization": "Bearer <YOUR API KEY>",
                "Content-Type": "application/json",
                "Accept": "application/json",
              },
              body: JSON.stringify({
                videoUrl: "<YOUR VIDEO URL>",
                customCriteria: [],
                removeCriteria: [],
              }),
            });

            const result = await response.json();
            console.log(result);
components:
  schemas:
    Error:
      required:
        - message
      type: object
      properties:
        message:
          type: string
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer

````