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

# Create a video analysis

> Submit a video for comprehensive AI-powered analysis. The video will be processed in the background, analyzing emotional, cognitive, behavioral, and technical metrics.

**Processing**: Analysis is performed asynchronously. Processing duration scales with video length.

**Video Requirements**:
- Host your video on cloud storage (S3, GCS, etc.) and provide a publicly accessible URL
- Supported formats: MP4, WebM, MOV, AVI
- Maximum duration: Based on your subscription's included minutes

**Polling for Results**: Use `GET /video-analyses/{id}` to check status and retrieve results when complete.



## OpenAPI

````yaml /openapi.json post /video-analyses
openapi: 3.0.3
info:
  title: Mavera API
  version: 1.0.0
  description: >-
    # Getting Started


    The Mavera Responses API provides persona-powered AI responses using the
    **OpenAI Responses API format**. Use `client.responses.create()` with the
    OpenAI SDK — just set the base URL to `https://app.mavera.io/api/v1`.


    ## Authentication


    All API requests require a Bearer token. Create an API key in **Settings >
    Developer > API Keys**.


    ```

    Authorization: Bearer mvra_live_your_key_here

    ```


    ## Quick Start


    ### Step 1: Get a Persona ID


    Every response request requires a `persona_id`. First, list available
    personas:


    ```bash

    curl https://app.mavera.io/api/v1/personas \
      -H "Authorization: Bearer mvra_live_your_key_here"
    ```


    This returns personas you can use. Copy the `id` field from any persona.


    ### Step 2: Create a Response


    Use the persona ID in your request:


    ```bash

    curl https://app.mavera.io/api/v1/responses \
      -H "Authorization: Bearer mvra_live_your_key_here" \
      -H "Content-Type: application/json" \
      -d '{
        "model": "mavera-1",
        "persona_id": "YOUR_PERSONA_ID",
        "input": "Hello!"
      }'
    ```


    ## Rate Limits


    Per-key sliding window limits based on your subscription tier:


    | Tier | Requests / min |

    |------|---------------|

    | Starter | 60 |

    | Basic | 120 |

    | Professional | 240 |

    | Enterprise | 600 |


    When rate limited, the response includes a `Retry-After` header indicating
    how many seconds to wait.


    ## Credits


    Each API call consumes credits from your subscription. The
    `usage.credits_used` field in the response shows the cost of each request.
  contact:
    name: Mavera Support
    url: https://mavera.io
  x-logo:
    url: /Mavera_Logo_Full.png
    altText: Mavera
servers:
  - url: https://app.mavera.io/api/v1
    description: Production
  - url: https://dev.mavera.io/api/v1
    description: Development
security:
  - BearerAuth: []
tags:
  - name: System
    description: Health checks and operational status.
  - name: Responses
    description: >-
      Generate persona-powered AI responses using the OpenAI Responses API
      format. Use `client.responses.create()` with the OpenAI SDK.
  - name: Models
    description: Discover available models and their capabilities.
  - name: Personas
    description: >-
      Browse available personas to inject specialized intelligence into
      responses via `persona_id`.
  - name: Custom Personas
    description: >-
      Create, manage, and customize AI-powered personas. Supports three creation
      pipelines: North Star (AI-generated from minimal input), Intermediate
      (guided 3-step process), and Advanced (full B2B/B2C customization with
      psychographics and purpose packs). 300 credits per persona.
  - name: Brand Voice
    description: >-
      Create, manage, and retrieve brand voice profiles for AI-powered content
      generation. Upload URLs and documents to analyze, and the AI will generate
      tone guidelines, vocabulary preferences, and writing style
      recommendations.
  - name: Generations
    description: >-
      Generate AI-powered content using pre-built templates with optional brand
      voice styling. Browse available generation apps, create content, and
      manage your generation history. Supports streaming responses.
  - name: Mave
    description: >-
      Mave is Mavera's AI-powered research and analysis agent. Send messages to
      conduct comprehensive investigations using multiple data sources,
      personas, and fact-checking. Mave uses a multi-phase orchestration process
      (Triage, Planning, Research, Execution, Validation) to deliver
      well-researched responses with sources.
  - name: Workspaces
    description: >-
      Manage workspaces for organizing your work. Workspaces contain projects,
      threads, personas, and other resources. Invite team members with
      role-based access control. Set budget alerts and usage limits.
  - name: Projects
    description: >-
      Organize work within workspaces using projects. Projects contain threads,
      generations, and other resources. Track usage and set per-project budget
      controls.
  - name: Meetings
    description: >-
      Access meeting recordings, transcripts, and AI-powered analysis. List
      meetings, retrieve transcripts in multiple formats (segments, text, SRT),
      get AI analysis with summaries, tasks, decisions, highlights, and coaching
      metrics. Run custom schemas to extract structured data from transcripts.
  - name: Schemas
    description: >-
      Create and manage meeting schemas for structured data extraction. Schemas
      define fields to extract from meeting transcripts, with support for
      various field types (text, enum, list, boolean, etc.), evidence tracking,
      and scoring.
  - name: Files
    description: >-
      Upload, manage, and retrieve files/assets. Use presigned URLs for direct
      uploads to avoid passing files through the API. Supports images, videos,
      documents, and more. File uploads count against your storage quota.
  - name: Folders
    description: >-
      Create and manage folders to organize your files. Folders can be favorited
      and shared with workspace members.
  - name: Video Analysis
    description: >-
      AI-powered video and advertisement analysis. Submit videos for
      comprehensive emotional, cognitive, behavioral, and technical analysis.
      Chat with AI about the results.
  - name: Focus Groups
    description: >-
      AI-powered synthetic focus group research. Create focus groups with
      personas to gather market research, product feedback, and audience
      insights. Supports 12 question types including NPS, Likert scales, and
      open-ended responses.
  - name: News
    description: >-
      AI-powered news intelligence. Browse trending stories, get AI analysis
      from persona perspectives, and manage scheduled news digests. Story
      analysis uses credits based on token usage.
  - name: Usage
    description: >-
      Monitor your subscription usage including credits, transcription minutes,
      storage, and API request metrics. Get real-time statistics on your billing
      period usage.
paths:
  /video-analyses:
    post:
      tags:
        - Video Analysis
      summary: Create a video analysis
      description: >-
        Submit a video for comprehensive AI-powered analysis. The video will be
        processed in the background, analyzing emotional, cognitive, behavioral,
        and technical metrics.


        **Processing**: Analysis is performed asynchronously. Processing
        duration scales with video length.


        **Video Requirements**:

        - Host your video on cloud storage (S3, GCS, etc.) and provide a
        publicly accessible URL

        - Supported formats: MP4, WebM, MOV, AVI

        - Maximum duration: Based on your subscription's included minutes


        **Polling for Results**: Use `GET /video-analyses/{id}` to check status
        and retrieve results when complete.
      operationId: createVideoAnalysis
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/VideoAnalysisRequest'
      responses:
        '202':
          description: Video analysis started. Poll the returned ID for results.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/VideoAnalysisResponse'
        '400':
          description: Invalid request.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '401':
          description: Authentication error.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '402':
          description: Insufficient transcription minutes.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '429':
          description: Rate limit exceeded.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
      x-codeSamples:
        - lang: curl
          label: cURL
          source: |-
            curl -X POST https://app.mavera.io/api/v1/video-analyses \
              -H "Authorization: Bearer mvra_live_your_key_here" \
              -H "Content-Type: application/json" \
              -d '{
                "video_url": "https://your-bucket.s3.amazonaws.com/ad-video.mp4",
                "title": "Summer Campaign 2026",
                "brand": "Acme Corp",
                "product": "Summer Collection",
                "primary_intent": "Persuasive",
                "goal": "Drive brand awareness and summer product sales among Gen Z consumers"
              }'
        - lang: python
          label: Python
          source: |-
            import requests
            import time

            headers = {"Authorization": "Bearer mvra_live_your_key_here"}

            # 1. Submit video for analysis
            response = requests.post(
                "https://app.mavera.io/api/v1/video-analyses",
                headers=headers,
                json={
                    "video_url": "https://your-bucket.s3.amazonaws.com/ad-video.mp4",
                    "title": "Summer Campaign 2026",
                    "brand": "Acme Corp",
                    "product": "Summer Collection",
                    "primary_intent": "Persuasive",
                    "goal": "Drive brand awareness among Gen Z consumers"
                }
            )

            analysis_id = response.json()["id"]
            print(f"Analysis started: {analysis_id}")

            # 2. Poll for completion
            while True:
                status_response = requests.get(
                    f"https://app.mavera.io/api/v1/video-analyses/{analysis_id}",
                    headers=headers
                )
                status = status_response.json()["status"]

                if status == "completed":
                    results = status_response.json()["results"]
                    print(f"Ad Effectiveness Score: {results['metrics']['ad_effectiveness']['score']}/10")
                    break
                elif status == "failed":
                    print(f"Analysis failed: {status_response.json().get('error')}")
                    break

                print(f"Status: {status}, waiting...")
                time.sleep(10)
        - lang: javascript
          label: JavaScript
          source: >-
            const headers = { Authorization: "Bearer mvra_live_your_key_here" };


            // 1. Submit video for analysis

            const response = await
            fetch("https://app.mavera.io/api/v1/video-analyses", {
              method: "POST",
              headers: { ...headers, "Content-Type": "application/json" },
              body: JSON.stringify({
                video_url: "https://your-bucket.s3.amazonaws.com/ad-video.mp4",
                title: "Summer Campaign 2026",
                brand: "Acme Corp",
                product: "Summer Collection",
                primary_intent: "Persuasive",
                goal: "Drive brand awareness among Gen Z consumers"
              })
            });


            const { id: analysisId } = await response.json();

            console.log("Analysis started:", analysisId);


            // 2. Poll for completion

            const pollForResults = async () => {
              const statusRes = await fetch(
                `https://app.mavera.io/api/v1/video-analyses/${analysisId}`,
                { headers }
              );
              const data = await statusRes.json();

              if (data.status === "completed") {
                console.log("Ad Effectiveness:", data.results.metrics.ad_effectiveness.score);
                return data;
              } else if (data.status === "failed") {
                throw new Error(data.error);
              }

              await new Promise(r => setTimeout(r, 10000));
              return pollForResults();
            };


            const results = await pollForResults();
components:
  schemas:
    VideoAnalysisRequest:
      type: object
      required:
        - video_url
        - title
        - brand
        - product
        - primary_intent
        - goal
      properties:
        video_url:
          type: string
          format: uri
          description: URL to the video file hosted in your cloud storage (S3, GCS, etc.).
          example: https://your-bucket.s3.amazonaws.com/ad-video.mp4
        title:
          type: string
          minLength: 3
          maxLength: 100
          description: Title for this analysis.
          example: Summer Campaign 2026
        brand:
          type: string
          minLength: 2
          maxLength: 100
          description: Brand name featured in the video.
          example: Acme Corp
        product:
          type: string
          minLength: 2
          maxLength: 100
          description: Product or service featured in the video.
          example: Summer Collection
        primary_intent:
          type: string
          enum:
            - Informative
            - Persuasive
            - Directive
            - Expressive
            - Transactional
            - Appreciative
            - Inspirational
            - Entertainment
          description: Primary communication intent of the video.
          example: Persuasive
        secondary_intent:
          type: string
          enum:
            - Informative
            - Persuasive
            - Directive
            - Expressive
            - Transactional
            - Appreciative
            - Inspirational
            - Entertainment
          description: Optional secondary communication intent.
          example: Inspirational
        tertiary_intent:
          type: string
          enum:
            - Informative
            - Persuasive
            - Directive
            - Expressive
            - Transactional
            - Appreciative
            - Inspirational
            - Entertainment
          description: Optional tertiary communication intent.
          example: Entertainment
        goal:
          type: string
          minLength: 10
          maxLength: 500
          description: The goal or purpose of the video/advertisement.
          example: Drive brand awareness and summer product sales among Gen Z consumers
        chunk_duration:
          type: integer
          minimum: 1
          maximum: 10
          default: 2
          description: 'Duration in seconds for each analysis chunk (default: 2).'
          example: 2
        frames_per_chunk:
          type: integer
          minimum: 1
          maximum: 10
          default: 4
          description: 'Number of frames to analyze per chunk (default: 4).'
          example: 4
    VideoAnalysisResponse:
      type: object
      properties:
        id:
          type: string
          description: Unique identifier for the video analysis.
          example: cly1abc2d0001abcdef123456
        object:
          type: string
          enum:
            - video_analysis
          example: video_analysis
        status:
          type: string
          enum:
            - pending
            - generating
            - completed
            - failed
          description: Current processing status.
          example: pending
        created_at:
          type: integer
          description: Unix timestamp when the analysis was created.
          example: 1706380800
        video_url:
          type: string
          example: https://your-bucket.s3.amazonaws.com/ad-video.mp4
        title:
          type: string
          example: Summer Campaign 2026
        brand:
          type: string
          example: Acme Corp
        product:
          type: string
          example: Summer Collection
        primary_intent:
          type: string
          example: Persuasive
        secondary_intent:
          type: string
          nullable: true
        tertiary_intent:
          type: string
          nullable: true
        goal:
          type: string
        chunk_duration:
          type: integer
          example: 2
        frames_per_chunk:
          type: integer
          example: 4
    ErrorResponse:
      type: object
      description: >-
        All error responses follow this format. The `type` field indicates the
        category of error, and `code` provides a machine-readable error code.
      properties:
        error:
          type: object
          properties:
            message:
              type: string
              description: A human-readable error message.
              example: Invalid API key.
            type:
              type: string
              enum:
                - invalid_request_error
                - authentication_error
                - insufficient_credits
                - not_found
                - rate_limit_error
                - api_error
              description: The category of error.
              example: authentication_error
            code:
              type: string
              description: A machine-readable error code.
              example: invalid_api_key
            param:
              type: string
              nullable: true
              description: The request parameter that caused the error, if applicable.
              example: null
      example:
        error:
          message: Invalid API key.
          type: authentication_error
          code: invalid_api_key
          param: null
  securitySchemes:
    BearerAuth:
      type: http
      scheme: bearer
      description: >-
        API key prefixed with `mvra_live_`. Create keys at **Settings >
        Developer > API Keys**.

````